From e68351557e9906c0e6da3a79659803e96111b190 Mon Sep 17 00:00:00 2001 From: Sung-hun Kim Date: Wed, 19 Jun 2024 18:35:34 +0900 Subject: [PATCH] Imported Upstream version 14.2 --- ChangeLog | 71 + Makefile.def | 58 +- Makefile.in | 8694 +- Makefile.tpl | 48 +- SECURITY.txt | 6 + bfd/.gitignore | 1 - bfd/ChangeLog | 360 +- bfd/MAINTAINERS | 2 +- bfd/Makefile.am | 161 +- bfd/Makefile.in | 246 +- bfd/PORTING | 2 +- bfd/README | 2 +- bfd/TODO | 2 +- bfd/acinclude.m4 | 2 +- bfd/aix386-core.c | 282 - bfd/aix5ppc-core.c | 33 +- bfd/aout-cris.c | 2 +- bfd/aout-ns32k.c | 2 +- bfd/aout-target.h | 17 +- bfd/aout32.c | 2 +- bfd/aout64.c | 2 +- bfd/aoutx.h | 61 +- bfd/arc-got.h | 2 +- bfd/arc-plt.def | 2 +- bfd/arc-plt.h | 2 +- bfd/archive.c | 176 +- bfd/archive64.c | 32 +- bfd/archures.c | 17 +- bfd/bfd-in.h | 351 +- bfd/bfd-in2.h | 10670 +- bfd/bfd.c | 217 +- bfd/bfd.m4 | 2 +- bfd/bfdio.c | 167 +- bfd/bfdwin.c | 68 +- bfd/binary.c | 4 +- bfd/bpf-reloc.def | 89 + bfd/cache.c | 28 +- bfd/cf-i386lynx.c | 2 +- bfd/cisco-core.c | 10 +- bfd/coff-aarch64.c | 812 +- bfd/coff-alpha.c | 21 +- bfd/coff-arm.c | 4 +- bfd/coff-arm.h | 2 +- bfd/coff-bfd.c | 38 +- bfd/coff-bfd.h | 6 +- bfd/coff-go32.c | 5 +- bfd/coff-i386.c | 5 +- bfd/coff-ia64.c | 9 +- bfd/coff-loongarch64.c | 9 +- bfd/coff-mcore.c | 12 +- bfd/coff-mips.c | 25 +- bfd/coff-rs6000.c | 415 +- bfd/coff-sh.c | 28 +- bfd/coff-stgo32.c | 14 +- bfd/coff-tic30.c | 2 +- bfd/coff-tic4x.c | 2 +- bfd/coff-tic54x.c | 42 +- bfd/coff-x86_64.c | 83 +- bfd/coff-z80.c | 120 +- bfd/coff-z8k.c | 152 +- bfd/coff64-rs6000.c | 75 +- bfd/coffcode.h | 911 +- bfd/coffgen.c | 483 +- bfd/cofflink.c | 101 +- bfd/coffswap.h | 23 +- bfd/compress.c | 15 +- bfd/config.bfd | 81 +- bfd/config.in | 15 + bfd/configure | 358 +- bfd/configure.ac | 53 +- bfd/configure.com | 2 +- bfd/configure.host | 2 +- bfd/corefile.c | 2 +- bfd/cpu-aarch64.c | 6 +- bfd/cpu-aarch64.h | 2 +- bfd/cpu-alpha.c | 2 +- bfd/cpu-amdgcn.c | 2 +- bfd/cpu-arc.c | 2 +- bfd/cpu-arm.c | 8 +- bfd/cpu-arm.h | 2 +- bfd/cpu-avr.c | 2 +- bfd/cpu-bfin.c | 2 +- bfd/cpu-bpf.c | 2 +- bfd/cpu-cr16.c | 2 +- bfd/cpu-cris.c | 2 +- bfd/cpu-crx.c | 2 +- bfd/cpu-csky.c | 2 +- bfd/cpu-d10v.c | 2 +- bfd/cpu-d30v.c | 2 +- bfd/cpu-dlx.c | 2 +- bfd/cpu-epiphany.c | 2 +- bfd/cpu-fr30.c | 2 +- bfd/cpu-frv.c | 2 +- bfd/cpu-ft32.c | 2 +- bfd/cpu-h8300.c | 2 +- bfd/cpu-h8300.h | 2 +- bfd/cpu-hppa.c | 2 +- bfd/cpu-i386.c | 2 +- bfd/cpu-ia64-opc.c | 2 +- bfd/cpu-ia64.c | 2 +- bfd/cpu-iamcu.c | 2 +- bfd/cpu-ip2k.c | 2 +- bfd/cpu-iq2000.c | 2 +- bfd/cpu-kvx.c | 124 + bfd/cpu-lm32.c | 2 +- bfd/cpu-loongarch.c | 2 +- bfd/cpu-m10200.c | 2 +- bfd/cpu-m10300.c | 2 +- bfd/cpu-m32c.c | 2 +- bfd/cpu-m32r.c | 2 +- bfd/cpu-m68hc11.c | 2 +- bfd/cpu-m68hc12.c | 2 +- bfd/cpu-m68k.c | 2 +- bfd/cpu-m68k.h | 2 +- bfd/cpu-m9s12x.c | 2 +- bfd/cpu-m9s12xg.c | 2 +- bfd/cpu-mcore.c | 2 +- bfd/cpu-mep.c | 2 +- bfd/cpu-metag.c | 2 +- bfd/cpu-microblaze.c | 2 +- bfd/cpu-mips.c | 4 +- bfd/cpu-mmix.c | 2 +- bfd/cpu-moxie.c | 2 +- bfd/cpu-msp430.c | 2 +- bfd/cpu-mt.c | 2 +- bfd/cpu-nds32.c | 2 +- bfd/cpu-nfp.c | 2 +- bfd/cpu-nios2.c | 2 +- bfd/cpu-ns32k.c | 2 +- bfd/cpu-or1k.c | 2 +- bfd/cpu-pdp11.c | 2 +- bfd/cpu-pj.c | 2 +- bfd/cpu-powerpc.c | 2 +- bfd/cpu-pru.c | 2 +- bfd/cpu-riscv.c | 2 +- bfd/cpu-riscv.h | 2 +- bfd/cpu-rl78.c | 2 +- bfd/cpu-rs6000.c | 2 +- bfd/cpu-rx.c | 2 +- bfd/cpu-s12z.c | 2 +- bfd/cpu-s390.c | 2 +- bfd/cpu-score.c | 2 +- bfd/cpu-sh.c | 8 +- bfd/cpu-sparc.c | 2 +- bfd/cpu-spu.c | 2 +- bfd/cpu-tic30.c | 2 +- bfd/cpu-tic4x.c | 2 +- bfd/cpu-tic54x.c | 2 +- bfd/cpu-tic6x.c | 2 +- bfd/cpu-tilegx.c | 2 +- bfd/cpu-tilepro.c | 2 +- bfd/cpu-v850.c | 2 +- bfd/cpu-v850_rh850.c | 2 +- bfd/cpu-vax.c | 2 +- bfd/cpu-visium.c | 2 +- bfd/cpu-wasm32.c | 2 +- bfd/cpu-xgate.c | 2 +- bfd/cpu-xstormy16.c | 2 +- bfd/cpu-xtensa.c | 2 +- bfd/cpu-z80.c | 2 +- bfd/cpu-z8k.c | 2 +- bfd/development.sh | 2 +- bfd/doc/aoutx.texi | 69 +- bfd/doc/archive.texi | 23 +- bfd/doc/archures.texi | 152 +- bfd/doc/bfd.info | 10291 +- bfd/doc/bfd.texi | 15 +- bfd/doc/bfdint.texi | 43 +- bfd/doc/bfdio.texi | 84 +- bfd/doc/bfdsumm.texi | 2 +- bfd/doc/bfdt.texi | 553 +- bfd/doc/bfdver.texi | 4 +- bfd/doc/bfdwin.texi | 20 +- bfd/doc/cache.texi | 34 +- bfd/doc/chew.c | 262 +- bfd/doc/coffcode.texi | 221 +- bfd/doc/corefile.texi | 38 +- bfd/doc/doc.str | 68 +- bfd/doc/format.texi | 29 +- bfd/doc/hash.texi | 109 +- bfd/doc/init.texi | 24 - bfd/doc/libbfd.texi | 274 + bfd/doc/linker.texi | 93 +- bfd/doc/local.mk | 14 +- bfd/doc/makefile.vms | 2 +- bfd/doc/opncls.texi | 400 +- bfd/doc/proto.str | 72 +- bfd/doc/reloc.texi | 319 +- bfd/doc/section.texi | 384 +- bfd/doc/syms.texi | 84 +- bfd/doc/targets.texi | 109 +- bfd/dwarf1.c | 23 +- bfd/dwarf2.c | 324 +- bfd/ecoff-bfd.h | 2 +- bfd/ecoff.c | 255 +- bfd/ecofflink.c | 286 +- bfd/ecoffswap.h | 2 +- bfd/elf-attrs.c | 85 +- bfd/elf-bfd.h | 41 +- bfd/elf-eh-frame.c | 3 +- bfd/elf-hppa.h | 5 +- bfd/elf-ifunc.c | 2 +- bfd/elf-linker-x86.h | 5 +- bfd/elf-linux-core.h | 2 +- bfd/elf-m10200.c | 5 +- bfd/elf-m10300.c | 9 +- bfd/elf-nacl.c | 4 +- bfd/elf-nacl.h | 2 +- bfd/elf-properties.c | 2 +- bfd/elf-s390-common.c | 2 +- bfd/elf-s390.h | 2 +- bfd/elf-sframe.c | 54 +- bfd/elf-strtab.c | 7 +- bfd/elf-vxworks.c | 2 +- bfd/elf-vxworks.h | 2 +- bfd/elf.c | 1076 +- bfd/elf32-am33lin.c | 2 +- bfd/elf32-arc.c | 26 +- bfd/elf32-arm.c | 116 +- bfd/elf32-arm.h | 2 +- bfd/elf32-avr.c | 7 +- bfd/elf32-avr.h | 2 +- bfd/elf32-bfin.c | 5 +- bfd/elf32-bfin.h | 2 +- bfd/elf32-cr16.c | 5 +- bfd/elf32-cr16.h | 2 +- bfd/elf32-cris.c | 2 +- bfd/elf32-crx.c | 5 +- bfd/elf32-csky.c | 29 +- bfd/elf32-csky.h | 2 +- bfd/elf32-d10v.c | 2 +- bfd/elf32-d30v.c | 2 +- bfd/elf32-dlx.c | 2 +- bfd/elf32-dlx.h | 2 +- bfd/elf32-epiphany.c | 5 +- bfd/elf32-fr30.c | 2 +- bfd/elf32-frv.c | 2 +- bfd/elf32-ft32.c | 7 +- bfd/elf32-gen.c | 2 +- bfd/elf32-h8300.c | 5 +- bfd/elf32-hppa.c | 8 +- bfd/elf32-hppa.h | 2 +- bfd/elf32-i386.c | 45 +- bfd/elf32-ip2k.c | 7 +- bfd/elf32-iq2000.c | 2 +- bfd/elf32-lm32.c | 2 +- bfd/elf32-m32c.c | 5 +- bfd/elf32-m32r.c | 2 +- bfd/elf32-m68hc11.c | 7 +- bfd/elf32-m68hc12.c | 4 +- bfd/elf32-m68hc1x.c | 2 +- bfd/elf32-m68hc1x.h | 2 +- bfd/elf32-m68k.c | 2 +- bfd/elf32-m68k.h | 2 +- bfd/elf32-mcore.c | 2 +- bfd/elf32-mep.c | 2 +- bfd/elf32-metag.c | 4 +- bfd/elf32-metag.h | 2 +- bfd/elf32-microblaze.c | 6 +- bfd/elf32-mips.c | 11 +- bfd/elf32-moxie.c | 4 +- bfd/elf32-msp430.c | 8 +- bfd/elf32-mt.c | 2 +- bfd/elf32-nds32.c | 12 +- bfd/elf32-nds32.h | 2 +- bfd/elf32-nios2.c | 20 +- bfd/elf32-nios2.h | 2 +- bfd/elf32-or1k.c | 16 +- bfd/elf32-pj.c | 2 +- bfd/elf32-ppc.c | 117 +- bfd/elf32-ppc.h | 2 +- bfd/elf32-pru.c | 8 +- bfd/elf32-rl78.c | 103 +- bfd/elf32-rx.c | 5 +- bfd/elf32-rx.h | 2 +- bfd/elf32-s12z.c | 2 +- bfd/elf32-s390.c | 6 +- bfd/elf32-score.c | 2 +- bfd/elf32-score.h | 2 +- bfd/elf32-score7.c | 2 +- bfd/elf32-sh-relocs.h | 2 +- bfd/elf32-sh.c | 18 +- bfd/elf32-sparc.c | 2 +- bfd/elf32-spu.c | 2 +- bfd/elf32-spu.h | 2 +- bfd/elf32-tic6x.c | 2 +- bfd/elf32-tic6x.h | 2 +- bfd/elf32-tilegx.c | 2 +- bfd/elf32-tilegx.h | 2 +- bfd/elf32-tilepro.c | 2 +- bfd/elf32-tilepro.h | 2 +- bfd/elf32-v850.c | 3 +- bfd/elf32-v850.h | 2 +- bfd/elf32-vax.c | 2 +- bfd/elf32-visium.c | 2 +- bfd/elf32-wasm32.c | 2 +- bfd/elf32-xgate.c | 2 +- bfd/elf32-xstormy16.c | 2 +- bfd/elf32-xtensa.c | 9 +- bfd/elf32-z80.c | 2 +- bfd/elf32.c | 2 +- bfd/elf64-alpha.c | 29 +- bfd/elf64-amdgcn.c | 2 +- bfd/elf64-bpf.c | 324 +- bfd/elf64-gen.c | 2 +- bfd/elf64-hppa.c | 4 +- bfd/elf64-hppa.h | 2 +- bfd/elf64-ia64-vms.c | 22 +- bfd/elf64-mips.c | 11 +- bfd/elf64-mmix.c | 2 +- bfd/elf64-nfp.c | 2 +- bfd/elf64-ppc.c | 223 +- bfd/elf64-ppc.h | 2 +- bfd/elf64-s390.c | 6 +- bfd/elf64-sparc.c | 2 +- bfd/elf64-tilegx.c | 2 +- bfd/elf64-tilegx.h | 2 +- bfd/elf64-x86-64.c | 87 +- bfd/elf64.c | 2 +- bfd/elfcode.h | 131 +- bfd/elfcore.h | 22 +- bfd/elflink.c | 95 +- bfd/elfn32-mips.c | 23 +- bfd/elfnn-aarch64.c | 1002 +- bfd/elfnn-ia64.c | 7 +- bfd/elfnn-kvx.c | 4779 + bfd/elfnn-loongarch.c | 713 +- bfd/elfnn-riscv.c | 621 +- bfd/elfxx-aarch64.c | 2 +- bfd/elfxx-aarch64.h | 2 +- bfd/elfxx-ia64.c | 2 +- bfd/elfxx-ia64.h | 2 +- bfd/elfxx-kvx-relocs.h | 1105 + bfd/elfxx-kvx.c | 211 + bfd/elfxx-kvx.h | 66 + bfd/elfxx-loongarch.c | 703 +- bfd/elfxx-loongarch.h | 14 +- bfd/elfxx-mips.c | 202 +- bfd/elfxx-mips.h | 10 +- bfd/elfxx-riscv.c | 534 +- bfd/elfxx-riscv.h | 13 +- bfd/elfxx-sparc.c | 4 +- bfd/elfxx-sparc.h | 2 +- bfd/elfxx-target.h | 10 +- bfd/elfxx-tilegx.c | 2 +- bfd/elfxx-tilegx.h | 2 +- bfd/elfxx-x86.c | 155 +- bfd/elfxx-x86.h | 12 +- bfd/format.c | 66 +- bfd/gen-aout.c | 2 +- bfd/genlink.h | 2 +- bfd/hash.c | 363 +- bfd/host-aout.c | 2 +- bfd/hosts/alphalinux.h | 2 +- bfd/hosts/alphavms.h | 2 +- bfd/hosts/decstation.h | 2 +- bfd/hosts/dpx2.h | 2 +- bfd/hosts/i386bsd.h | 2 +- bfd/hosts/i386linux.h | 2 +- bfd/hosts/i386mach3.h | 2 +- bfd/hosts/i386sco.h | 38 - bfd/hosts/m68klinux.h | 2 +- bfd/hosts/mipsbsd.h | 2 +- bfd/hosts/mipsmach3.h | 2 +- bfd/hosts/news-mips.h | 2 +- bfd/hosts/pc532mach.h | 2 +- bfd/hosts/riscos.h | 2 +- bfd/hosts/symmetry.h | 39 - bfd/hosts/vaxbsd.h | 2 +- bfd/hosts/vaxlinux.h | 2 +- bfd/hosts/x86-64linux.h | 2 +- bfd/hppabsd-core.c | 4 +- bfd/hpux-core.c | 15 +- bfd/i386aout.c | 2 +- bfd/i386bsd.c | 2 +- bfd/i386lynx.c | 86 +- bfd/i386msdos.c | 14 +- bfd/ihex.c | 28 +- bfd/init.c | 28 +- bfd/irix-core.c | 8 +- bfd/libaout.h | 82 +- bfd/libbfd-in.h | 99 +- bfd/libbfd.c | 242 +- bfd/libbfd.h | 348 +- bfd/libcoff-in.h | 69 +- bfd/libcoff.h | 114 +- bfd/libecoff.h | 18 +- bfd/libhppa.h | 2 +- bfd/libpei.h | 5 +- bfd/libxcoff.h | 2 +- bfd/linker.c | 57 +- bfd/lynx-core.c | 6 +- bfd/mach-o-aarch64.c | 2 +- bfd/mach-o-arm.c | 2 +- bfd/mach-o-i386.c | 2 +- bfd/mach-o-target.c | 3 +- bfd/mach-o-x86-64.c | 2 +- bfd/mach-o.c | 243 +- bfd/mach-o.h | 4 +- bfd/makefile.vms | 2 +- bfd/mep-relocs.pl | 2 +- bfd/merge.c | 801 +- bfd/mmo.c | 101 +- bfd/netbsd-core.c | 6 +- bfd/netbsd.h | 2 +- bfd/ns32k.h | 2 +- bfd/ns32knetbsd.c | 2 +- bfd/opncls.c | 496 +- bfd/osf-core.c | 6 +- bfd/pc532-mach.c | 2 +- bfd/pdb.c | 62 +- bfd/pdp11.c | 80 +- bfd/pe-aarch64.c | 3 +- bfd/pe-arm-wince.c | 2 +- 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 | 3 +- bfd/peXXigen.c | 147 +- bfd/pef-traceback.h | 2 +- bfd/pef.c | 16 +- bfd/pef.h | 2 +- bfd/pei-aarch64.c | 3 +- bfd/pei-arm-wince.c | 4 +- bfd/pei-arm.c | 2 +- bfd/pei-i386.c | 2 +- bfd/pei-ia64.c | 2 +- bfd/pei-loongarch64.c | 3 +- bfd/pei-mcore.c | 2 +- bfd/pei-sh.c | 2 +- bfd/pei-x86_64.c | 8 +- bfd/peicode.h | 167 +- bfd/plugin.c | 27 +- bfd/plugin.h | 4 +- bfd/po/BLD-POTFILES.in | 2 + bfd/po/Make-in | 6 +- bfd/po/SRC-POTFILES.in | 6 +- bfd/po/bfd.pot | 3698 +- bfd/po/fr.gmo | Bin 235365 -> 239357 bytes bfd/po/fr.po | 3732 +- bfd/po/ka.gmo | Bin 0 -> 4993 bytes bfd/po/ka.po | 9348 ++ bfd/po/ro.gmo | Bin 15690 -> 238628 bytes bfd/po/ro.po | 8562 +- bfd/po/ru.gmo | Bin 280588 -> 292997 bytes bfd/po/ru.po | 4359 +- bfd/po/sr.gmo | Bin 287730 -> 292730 bytes bfd/po/sr.po | 3736 +- bfd/po/uk.gmo | Bin 294848 -> 299719 bytes bfd/po/uk.po | 3730 +- bfd/ppcboot.c | 9 +- bfd/ptrace-core.c | 4 +- bfd/reloc.c | 544 +- bfd/reloc16.c | 30 +- bfd/rs6000-core.c | 30 +- bfd/sco5-core.c | 401 - bfd/section.c | 33 +- bfd/simple.c | 2 +- bfd/som.c | 393 +- bfd/som.h | 4 +- bfd/srec.c | 42 +- bfd/stab-syms.c | 13 +- bfd/stabs.c | 102 +- bfd/syms.c | 62 +- bfd/sysdep.h | 2 +- bfd/targets.c | 41 +- bfd/tekhex.c | 22 +- bfd/trad-core.c | 6 +- bfd/vax1knetbsd.c | 2 +- bfd/vaxnetbsd.c | 2 +- bfd/verilog.c | 6 +- bfd/version.h | 2 +- bfd/version.m4 | 2 +- bfd/vms-alpha.c | 343 +- bfd/vms-lib.c | 83 +- bfd/vms-misc.c | 14 +- bfd/vms.h | 4 +- bfd/warning.m4 | 2 +- bfd/wasm-module.c | 37 +- bfd/wasm-module.h | 2 +- bfd/xcofflink.c | 173 +- bfd/xcofflink.h | 2 +- bfd/xsym.c | 44 +- bfd/xsym.h | 2 +- bfd/xtensa-dynconfig.c | 2 +- bfd/xtensa-isa.c | 2 +- bfd/xtensa-modules.c | 2 +- config-ml.in | 37 +- config.guess | 69 +- config.sub | 57 +- config/ChangeLog | 4 + config/bootstrap-lto-lean.mk | 6 +- config/bootstrap-lto.mk | 6 +- config/debuginfod.m4 | 13 +- config/gcc-plugin.m4 | 9 +- config/gthr.m4 | 1 + config/mh-darwin | 65 +- config/mh-mingw | 1 + config/mh-pa-hpux10 | 4 - config/picflag.m4 | 3 + configure | 469 +- configure.ac | 217 +- cpu/ChangeLog | 13 + cpu/bpf.cpu | 855 - cpu/bpf.opc | 191 - cpu/iq2000.cpu | 2 +- cpu/mep.opc | 127 +- djunpack.bat | 4 +- etc/Makefile.in | 2 +- etc/texi2pod.pl | 2 +- gdb/MAINTAINERS | 92 +- gdb/Makefile.in | 60 +- gdb/NEWS | 373 + gdb/README | 45 +- gdb/aarch64-fbsd-nat.c | 5 + gdb/aarch64-linux-nat.c | 237 +- gdb/aarch64-linux-tdep.c | 1204 +- gdb/aarch64-tdep.c | 1006 +- gdb/aarch64-tdep.h | 61 +- gdb/acinclude.m4 | 2 +- gdb/ada-casefold.h | 2 +- gdb/ada-exp.c | 1535 +- gdb/ada-exp.h | 124 +- gdb/ada-exp.y | 140 +- gdb/ada-lang.c | 1761 +- gdb/ada-lang.h | 10 +- gdb/ada-lex.c | 86 +- gdb/ada-lex.l | 86 +- gdb/ada-tasks.c | 63 +- gdb/ada-typeprint.c | 40 +- gdb/ada-unicode.py | 1 + gdb/ada-valprint.c | 154 +- gdb/ada-varobj.c | 12 +- gdb/addrmap.c | 12 +- gdb/addrmap.h | 34 +- gdb/agent.c | 2 +- gdb/aix-thread.c | 638 +- gdb/alpha-bsd-tdep.c | 2 +- gdb/alpha-mdebug-tdep.c | 2 - gdb/alpha-tdep.c | 22 +- gdb/amd-dbgapi-target.c | 2173 + gdb/amd-dbgapi-target.h | 116 + gdb/amd64-fbsd-nat.c | 43 +- gdb/amd64-fbsd-tdep.c | 17 +- gdb/amd64-linux-nat.c | 6 +- gdb/amd64-linux-tdep.c | 17 +- gdb/amd64-tdep.c | 181 +- gdb/amd64-tdep.h | 2 +- gdb/amd64-windows-tdep.c | 41 +- gdb/amdgpu-tdep.c | 1387 + gdb/amdgpu-tdep.h | 93 + gdb/annotate.c | 7 +- gdb/arc-linux-tdep.c | 14 +- gdb/arc-linux-tdep.h | 2 +- gdb/arc-tdep.c | 18 +- gdb/arch-utils.c | 56 +- gdb/arch-utils.h | 17 + gdb/arch/aarch64-scalable-linux.c | 55 + gdb/arch/aarch64-scalable-linux.h | 59 + gdb/arch/aarch64.c | 9 + gdb/arch/aarch64.h | 73 +- gdb/arch/riscv.h | 9 +- gdb/arm-fbsd-nat.c | 3 + gdb/arm-fbsd-tdep.c | 2 +- gdb/arm-linux-nat.c | 3 + gdb/arm-linux-tdep.c | 2 +- gdb/arm-tdep.c | 184 +- gdb/arm-tdep.h | 3 +- gdb/async-event.c | 1 + gdb/auto-load.c | 62 +- gdb/auto-load.h | 5 +- gdb/auxv.c | 21 +- gdb/auxv.h | 2 +- gdb/avr-tdep.c | 24 +- gdb/ax-gdb.c | 127 +- gdb/ax-gdb.h | 2 +- gdb/ax-general.c | 195 +- gdb/ax.h | 67 +- gdb/bfd-target.c | 4 +- gdb/bfd-target.h | 2 +- gdb/bfin-tdep.c | 14 +- gdb/block.c | 331 +- gdb/block.h | 331 +- gdb/blockframe.c | 10 +- gdb/bpf-tdep.c | 4 +- gdb/break-catch-exec.c | 4 +- gdb/break-catch-fork.c | 4 +- gdb/break-catch-load.c | 32 +- gdb/break-catch-sig.c | 14 +- gdb/break-catch-syscall.c | 25 +- gdb/break-catch-throw.c | 21 +- gdb/breakpoint.c | 2380 +- gdb/breakpoint.h | 169 +- gdb/bsd-kvm.c | 4 +- gdb/bsd-uthread.c | 8 +- gdb/bt-utils.c | 2 +- gdb/bt-utils.h | 2 +- gdb/btrace.c | 320 +- gdb/btrace.h | 8 +- gdb/build-id.c | 21 +- gdb/build-id.h | 10 +- gdb/buildsym-legacy.c | 6 +- gdb/buildsym-legacy.h | 6 +- gdb/buildsym.c | 120 +- gdb/buildsym.h | 11 +- gdb/c-exp.c | 1175 +- gdb/c-exp.h | 2 +- gdb/c-exp.y | 21 +- gdb/c-lang.c | 40 +- gdb/c-lang.h | 2 + gdb/c-typeprint.c | 70 +- gdb/c-valprint.c | 53 +- gdb/c-varobj.c | 16 +- gdb/cgen-remap.h | 53 + gdb/cli-out.c | 13 +- gdb/cli-out.h | 2 +- gdb/cli/cli-cmds.c | 295 +- gdb/cli/cli-decode.c | 376 +- gdb/cli/cli-decode.h | 2 +- gdb/cli/cli-dump.c | 12 +- gdb/cli/cli-interp.c | 216 +- gdb/cli/cli-interp.h | 9 + gdb/cli/cli-option.c | 104 +- gdb/cli/cli-option.h | 54 +- gdb/cli/cli-script.c | 13 +- gdb/cli/cli-setshow.c | 284 +- gdb/cli/cli-setshow.h | 20 +- gdb/cli/cli-utils.c | 4 +- gdb/coff-pe-read.c | 133 +- gdb/coffread.c | 186 +- gdb/command.h | 122 +- gdb/compile/compile-c-support.c | 2 +- gdb/compile/compile-c-symbols.c | 37 +- gdb/compile/compile-c-types.c | 15 +- gdb/compile/compile-c.h | 1 + gdb/compile/compile-cplus-symbols.c | 22 +- gdb/compile/compile-cplus-types.c | 19 +- gdb/compile/compile-cplus.h | 1 + gdb/compile/compile-internal.h | 129 - gdb/compile/compile-loc2c.c | 6 +- gdb/compile/compile-object-load.c | 10 +- gdb/compile/compile.c | 15 +- gdb/compile/compile.h | 116 + gdb/completer.c | 2 +- gdb/completer.h | 19 +- gdb/config.in | 21 +- gdb/config.lt | 1484 - gdb/configure | 15075 +- gdb/configure.ac | 168 +- gdb/configure.nat | 10 +- gdb/configure.tgt | 24 +- gdb/contrib/cc-with-tweaks.sh | 18 + gdb/copyright.py | 2 + gdb/corefile.c | 13 +- gdb/corelow.c | 321 +- gdb/cp-abi.c | 3 +- gdb/cp-abi.h | 6 +- gdb/cp-name-parser.c | 74 +- gdb/cp-name-parser.y | 4 +- gdb/cp-namespace.c | 129 +- gdb/cp-support.c | 54 +- gdb/cp-support.h | 4 +- gdb/cp-valprint.c | 119 +- gdb/cris-tdep.c | 12 +- gdb/csky-tdep.c | 348 +- gdb/ctfread.c | 98 +- gdb/d-exp.c | 437 +- gdb/d-exp.y | 23 +- gdb/d-lang.c | 44 +- gdb/d-namespace.c | 6 +- gdb/d-valprint.c | 15 +- gdb/darwin-nat-info.c | 4 +- gdb/darwin-nat.c | 9 +- gdb/data-directory/Makefile.in | 22 + gdb/dbxread.c | 204 +- gdb/dcache.h | 2 +- gdb/debuginfod-support.c | 267 +- gdb/debuginfod-support.h | 39 +- gdb/defs.h | 62 +- gdb/dictionary.c | 15 +- gdb/dictionary.h | 58 +- gdb/disasm.c | 39 +- gdb/disasm.h | 8 +- gdb/displaced-stepping.c | 51 +- gdb/displaced-stepping.h | 2 +- gdb/doc/GDBvn.texi | 2 +- gdb/doc/Makefile.in | 15 +- gdb/doc/gcore.1 | 2 +- gdb/doc/gdb-add-index.1 | 2 +- gdb/doc/gdb.1 | 4 +- gdb/doc/gdb.info | 1697 +- gdb/doc/gdb.info-1 | 251 +- gdb/doc/gdb.info-2 | 405 +- gdb/doc/gdb.info-3 | 525 +- gdb/doc/gdb.info-4 | 2286 +- gdb/doc/gdb.info-5 | 3163 +- gdb/doc/gdb.info-6 | 3741 +- gdb/doc/gdb.info-7 | 4245 +- gdb/doc/gdb.info-8 | 6559 +- gdb/doc/gdb.info-9 | Bin 0 -> 249330 bytes gdb/doc/gdb.texinfo | 2734 +- gdb/doc/gdbinit.5 | 2 +- gdb/doc/gdbserver.1 | 2 +- gdb/doc/guile.texi | 2 +- gdb/doc/python.texi | 1223 +- gdb/doc/stabs.info | 12 +- gdb/doc/stabs.texinfo | 2 +- gdb/doc/version.subst | 2 +- gdb/dtrace-probe.c | 4 +- gdb/dummy-frame.c | 8 +- gdb/dwarf2/abbrev-cache.h | 1 - gdb/dwarf2/abbrev.c | 9 - gdb/dwarf2/ada-imported.c | 122 + gdb/dwarf2/attribute.c | 6 +- gdb/dwarf2/attribute.h | 8 +- gdb/dwarf2/call-site.h | 244 + gdb/dwarf2/comp-unit-head.c | 12 +- gdb/dwarf2/comp-unit-head.h | 56 +- gdb/dwarf2/cooked-index.c | 254 +- gdb/dwarf2/cooked-index.h | 97 +- gdb/dwarf2/cu.c | 2 +- gdb/dwarf2/cu.h | 4 +- gdb/dwarf2/die.c | 229 + gdb/dwarf2/die.h | 21 + gdb/dwarf2/dwz.c | 5 + gdb/dwarf2/dwz.h | 1 + gdb/dwarf2/expr.c | 236 +- gdb/dwarf2/expr.h | 8 +- gdb/dwarf2/frame.c | 94 +- gdb/dwarf2/index-cache.c | 66 +- gdb/dwarf2/index-cache.h | 27 +- gdb/dwarf2/index-write.c | 233 +- gdb/dwarf2/index-write.h | 2 +- gdb/dwarf2/line-header.h | 4 +- gdb/dwarf2/loc.c | 220 +- gdb/dwarf2/loc.h | 6 +- gdb/dwarf2/mapped-index.h | 15 +- gdb/dwarf2/public.h | 6 +- gdb/dwarf2/read-debug-names.c | 1052 + gdb/dwarf2/read-debug-names.h | 30 + gdb/dwarf2/read-gdb-index.c | 869 + gdb/dwarf2/read-gdb-index.h | 47 + gdb/dwarf2/read.c | 4214 +- gdb/dwarf2/read.h | 231 +- gdb/dwarf2/section.c | 2 +- gdb/dwarf2/types.h | 40 + gdb/elf-none-tdep.c | 10 +- gdb/elfread.c | 125 +- gdb/eval.c | 415 +- gdb/event-top.c | 140 +- gdb/exceptions.c | 3 +- gdb/exec.c | 15 +- gdb/expop.h | 74 +- gdb/expprint.c | 58 +- gdb/expression.h | 95 +- gdb/extension-priv.h | 7 +- gdb/extension.c | 80 +- gdb/extension.h | 24 +- gdb/f-array-walker.h | 12 +- gdb/f-exp.c | 607 +- gdb/f-exp.y | 81 +- gdb/f-lang.c | 266 +- gdb/f-lang.h | 6 + gdb/f-typeprint.c | 10 +- gdb/f-valprint.c | 50 +- gdb/fbsd-nat.c | 891 +- gdb/fbsd-nat.h | 62 + gdb/fbsd-tdep.c | 30 +- gdb/features/aarch64-sme.c | 63 + gdb/features/aarch64-sme2.c | 43 + gdb/features/rs6000/powerpc-601.xml | 2 +- gdb/features/rs6000/rs6000.xml | 4 +- gdb/findcmd.c | 4 +- gdb/findvar.c | 124 +- gdb/fork-child.c | 2 +- gdb/frame-id.h | 14 +- gdb/frame-info.c | 65 - gdb/frame-info.h | 211 - gdb/frame-unwind.c | 57 +- gdb/frame-unwind.h | 2 +- gdb/frame.c | 388 +- gdb/frame.h | 229 +- gdb/frv-tdep.c | 33 +- gdb/ft32-tdep.c | 13 +- gdb/gcore-elf.c | 4 +- gdb/gcore-elf.h | 5 +- gdb/gcore.c | 6 +- gdb/gdb-demangle.c | 4 +- gdb/gdb-gdb.gdb.in | 9 +- gdb/gdb-gdb.py.in | 39 +- gdb/gdb.c | 7 + gdb/gdb_bfd.c | 220 +- gdb/gdb_bfd.h | 43 +- gdb/gdb_indent.sh | 92 - gdb/gdbarch-gen.h | 109 +- gdb/gdbarch.c | 259 +- gdb/gdbarch.h | 22 +- gdb/gdbarch.py | 305 +- ...ch-components.py => gdbarch_components.py} | 329 +- gdb/gdbarch_types.py | 183 + gdb/gdbcmd.h | 2 +- gdb/gdbcopyright.py | 7 +- gdb/gdbthread.h | 46 +- gdb/gdbtypes.c | 1140 +- gdb/gdbtypes.h | 681 +- gdb/gmp-utils.c | 156 +- gdb/gmp-utils.h | 457 +- gdb/gnu-nat.c | 8 +- gdb/gnu-v2-abi.c | 31 +- gdb/gnu-v3-abi.c | 178 +- gdb/go-exp.c | 383 +- gdb/go-exp.y | 31 +- gdb/go-lang.c | 107 +- gdb/go-lang.h | 10 +- gdb/go-valprint.c | 8 +- gdb/go32-nat.c | 2 - gdb/guile/guile-internal.h | 5 + gdb/guile/guile.c | 1 + gdb/guile/scm-auto-load.c | 3 +- gdb/guile/scm-block.c | 11 +- gdb/guile/scm-breakpoint.c | 28 +- gdb/guile/scm-disasm.c | 2 +- gdb/guile/scm-math.c | 20 +- gdb/guile/scm-param.c | 322 +- gdb/guile/scm-ports.c | 2 +- gdb/guile/scm-pretty-print.c | 21 +- gdb/guile/scm-type.c | 11 +- gdb/guile/scm-value.c | 59 +- gdb/h8300-tdep.c | 6 +- gdb/hppa-bsd-tdep.c | 59 +- gdb/hppa-linux-tdep.c | 64 +- gdb/hppa-tdep.c | 56 +- gdb/i386-darwin-tdep.c | 6 +- gdb/i386-fbsd-nat.c | 42 +- gdb/i386-fbsd-tdep.c | 73 +- gdb/i386-fbsd-tdep.h | 14 +- gdb/i386-linux-nat.c | 8 +- gdb/i386-linux-tdep.c | 72 +- gdb/i386-linux-tdep.h | 25 +- gdb/i386-tdep.c | 298 +- gdb/i386-tdep.h | 12 +- gdb/i386-windows-tdep.c | 4 +- gdb/i387-tdep.c | 574 +- gdb/i387-tdep.h | 14 + gdb/ia64-tdep.c | 151 +- gdb/ia64-tdep.h | 2 +- gdb/inf-child.c | 2 +- gdb/inf-loop.c | 3 +- gdb/inf-loop.h | 2 +- gdb/inf-ptrace.c | 2 +- gdb/infcall.c | 134 +- gdb/infcmd.c | 343 +- gdb/inferior.c | 126 +- gdb/inferior.h | 103 +- gdb/inflow.c | 3 +- gdb/infrun.c | 844 +- gdb/infrun.h | 27 +- gdb/inline-frame.c | 6 +- gdb/interps.c | 377 +- gdb/interps.h | 235 +- gdb/iq2000-tdep.c | 6 +- gdb/jit.c | 57 +- gdb/language.c | 211 +- gdb/language.h | 35 +- gdb/libtool | 9296 -- gdb/linespec.c | 30 +- gdb/linux-fork.c | 14 +- gdb/linux-nat.c | 127 +- gdb/linux-nat.h | 11 +- gdb/linux-tdep.c | 120 +- gdb/linux-tdep.h | 2 +- gdb/linux-thread-db.c | 41 +- gdb/lm32-tdep.c | 18 +- gdb/loongarch-linux-nat.c | 4 +- gdb/loongarch-linux-tdep.c | 4 +- gdb/loongarch-tdep.c | 86 +- gdb/m2-exp.c | 385 +- gdb/m2-exp.y | 3 - gdb/m2-lang.c | 29 +- gdb/m2-typeprint.c | 10 +- gdb/m2-valprint.c | 18 +- gdb/m32c-tdep.c | 35 +- gdb/m32r-tdep.c | 16 +- gdb/m68hc11-tdep.c | 15 +- gdb/m68k-tdep.c | 20 +- gdb/machoread.c | 20 +- gdb/macroexp.c | 2 +- gdb/macroexp.h | 2 +- gdb/macrotab.h | 2 +- gdb/main.c | 60 +- gdb/maint-test-options.c | 44 +- gdb/maint.c | 28 +- gdb/maint.h | 6 +- gdb/make-target-delegates.py | 131 +- gdb/mdebugread.c | 324 +- gdb/mdebugread.h | 2 +- gdb/mep-tdep.c | 22 +- gdb/mi/mi-cmd-break.c | 65 +- gdb/mi/mi-cmd-catch.c | 37 +- gdb/mi/mi-cmd-disas.c | 6 +- gdb/mi/mi-cmd-env.c | 42 +- gdb/mi/mi-cmd-file.c | 12 +- gdb/mi/mi-cmd-info.c | 10 +- gdb/mi/mi-cmd-stack.c | 61 +- gdb/mi/mi-cmd-target.c | 13 +- gdb/mi/mi-cmd-var.c | 114 +- gdb/mi/mi-cmds.c | 24 +- gdb/mi/mi-cmds.h | 13 +- gdb/mi/mi-common.c | 1 + gdb/mi/mi-common.h | 3 +- gdb/mi/mi-getopt.c | 20 +- gdb/mi/mi-getopt.h | 13 +- gdb/mi/mi-interp.c | 951 +- gdb/mi/mi-interp.h | 51 +- gdb/mi/mi-main.c | 319 +- gdb/mi/mi-main.h | 17 +- gdb/mi/mi-out.c | 17 +- gdb/mi/mi-out.h | 3 +- gdb/mi/mi-parse.c | 225 +- gdb/mi/mi-parse.h | 102 +- gdb/mi/mi-symbol-cmds.c | 48 +- gdb/microblaze-tdep.c | 7 +- gdb/mingw-hdep.c | 2 +- gdb/minidebug.c | 161 +- gdb/minsyms.c | 176 +- gdb/minsyms.h | 14 +- gdb/mips-linux-nat.c | 4 + gdb/mips-linux-tdep.c | 4 - gdb/mips-sde-tdep.c | 1 - gdb/mips-tdep.c | 57 +- gdb/mipsread.c | 8 +- gdb/mn10300-tdep.c | 20 +- gdb/moxie-tdep.c | 6 +- gdb/msp430-tdep.c | 15 +- gdb/namespace.c | 26 + gdb/namespace.h | 16 +- gdb/nat/aarch64-hw-point.c | 2 +- gdb/nat/aarch64-hw-point.h | 3 + gdb/nat/aarch64-linux-hw-point.c | 4 + gdb/nat/aarch64-linux-hw-point.h | 2 +- gdb/nat/aarch64-linux.c | 14 +- gdb/nat/aarch64-scalable-linux-ptrace.c | 1125 + gdb/nat/aarch64-scalable-linux-ptrace.h | 179 + ....h => aarch64-scalable-linux-sigcontext.h} | 73 +- gdb/nat/aarch64-sve-linux-ptrace.c | 392 - gdb/nat/aarch64-sve-linux-ptrace.h | 72 - gdb/nat/amd64-linux-siginfo.h | 2 +- gdb/nat/linux-btrace.c | 159 +- gdb/nat/linux-btrace.h | 60 +- gdb/nat/linux-osdata.c | 56 +- gdb/nat/linux-ptrace.c | 3 +- gdb/nat/linux-ptrace.h | 2 - gdb/nat/x86-cpuid.h | 44 + gdb/nat/x86-dregs.h | 2 +- gdb/nat/x86-xstate.c | 67 + gdb/nat/x86-xstate.h | 35 + gdb/nds32-tdep.c | 23 +- gdb/netbsd-nat.c | 5 +- gdb/netbsd-tdep.c | 37 +- gdb/netbsd-tdep.h | 3 - gdb/nios2-tdep.c | 12 +- gdb/nto-procfs.c | 8 +- gdb/nto-tdep.h | 2 +- gdb/objc-lang.c | 10 +- gdb/objfile-flags.h | 22 +- gdb/objfiles.c | 145 +- gdb/objfiles.h | 189 +- gdb/obsd-nat.c | 2 +- gdb/observable.c | 18 +- gdb/observable.h | 122 +- gdb/opencl-lang.c | 168 +- gdb/or1k-linux-tdep.c | 2 +- gdb/or1k-tdep.c | 30 +- gdb/or1k-tdep.h | 3 + gdb/osabi.c | 3 +- gdb/p-exp.c | 382 +- gdb/p-exp.y | 16 +- gdb/p-lang.c | 3 +- gdb/p-typeprint.c | 59 +- gdb/p-valprint.c | 65 +- gdb/parse.c | 249 +- gdb/parser-defs.h | 77 +- gdb/po/gdb.pot | 13529 +- gdb/ppc-linux-nat.c | 35 +- gdb/ppc-linux-tdep.c | 48 +- gdb/ppc-linux-tdep.h | 2 +- gdb/ppc-sysv-tdep.c | 30 +- gdb/ppc-tdep.h | 10 +- gdb/ppc64-tdep.c | 6 +- gdb/printcmd.c | 296 +- gdb/probe.c | 115 + gdb/probe.h | 5 + gdb/proc-api.c | 6 +- gdb/proc-service.c | 9 +- gdb/process-stratum-target.c | 13 +- gdb/process-stratum-target.h | 3 + gdb/procfs.c | 102 +- gdb/progspace.c | 19 + gdb/progspace.h | 4 + gdb/psympriv.h | 598 - gdb/psymtab.c | 101 +- gdb/psymtab.h | 565 +- gdb/pyproject.toml | 3 + gdb/python/lib/gdb/FrameDecorator.py | 233 +- gdb/python/lib/gdb/FrameIterator.py | 8 +- gdb/python/lib/gdb/__init__.py | 32 + gdb/python/lib/gdb/command/explore.py | 1 - gdb/python/lib/gdb/command/frame_filters.py | 1 + gdb/python/lib/gdb/dap/__init__.py | 73 + gdb/python/lib/gdb/dap/breakpoint.py | 435 + gdb/python/lib/gdb/dap/bt.py | 150 + gdb/python/lib/gdb/dap/disassemble.py | 57 + gdb/python/lib/gdb/dap/evaluate.py | 155 + gdb/python/lib/gdb/dap/events.py | 187 + gdb/python/lib/gdb/dap/frames.py | 150 + gdb/python/lib/gdb/dap/io.py | 69 + gdb/python/lib/gdb/dap/launch.py | 88 + gdb/python/lib/gdb/dap/locations.py | 49 + gdb/python/lib/gdb/dap/memory.py | 38 + gdb/python/lib/gdb/dap/modules.py | 66 + gdb/python/lib/gdb/dap/next.py | 91 + .../python/lib/gdb/dap/pause.py | 18 +- gdb/python/lib/gdb/dap/scopes.py | 136 + gdb/python/lib/gdb/dap/server.py | 302 + gdb/python/lib/gdb/dap/sources.py | 102 + gdb/python/lib/gdb/dap/startup.py | 177 + .../python/lib/gdb/dap/state.py | 23 +- gdb/python/lib/gdb/dap/threads.py | 42 + gdb/python/lib/gdb/dap/typecheck.py | 88 + gdb/python/lib/gdb/dap/varref.py | 275 + gdb/python/lib/gdb/frames.py | 99 +- gdb/python/lib/gdb/printer/bound_registers.py | 11 +- gdb/python/lib/gdb/printing.py | 131 +- gdb/python/lib/gdb/unwinder.py | 49 +- gdb/python/lib/gdb/xmethod.py | 1 - gdb/python/py-all-events.def | 4 + gdb/python/py-arch.c | 23 +- gdb/python/py-auto-load.c | 7 +- gdb/python/py-block.c | 67 +- gdb/python/py-breakpoint.c | 202 +- gdb/python/py-cmd.c | 6 +- gdb/python/py-connection.c | 4 +- gdb/python/py-dap.c | 101 + gdb/python/py-disasm.c | 970 +- gdb/python/py-event-types.def | 20 + gdb/python/py-event.c | 4 +- gdb/python/py-event.h | 5 +- gdb/python/py-evtregistry.c | 4 +- gdb/python/py-finishbreakpoint.c | 63 +- gdb/python/py-frame.c | 95 +- gdb/python/py-framefilter.c | 18 +- gdb/python/py-function.c | 4 +- gdb/python/py-gdb-readline.c | 9 +- gdb/python/py-inferior.c | 247 +- gdb/python/py-infthread.c | 10 +- gdb/python/py-instruction.c | 4 +- gdb/python/py-lazy-string.c | 41 +- gdb/python/py-linetable.c | 18 +- gdb/python/py-membuf.c | 6 +- gdb/python/py-mi.c | 298 + gdb/python/py-micmd.c | 34 +- gdb/python/py-newobjfileevent.c | 8 +- gdb/python/py-objfile.c | 4 +- gdb/python/py-param.c | 299 +- gdb/python/py-prettyprint.c | 90 +- gdb/python/py-progspace.c | 194 +- gdb/python/py-record-btrace.c | 9 +- gdb/python/py-record.c | 10 +- gdb/python/py-registers.c | 6 +- gdb/python/py-symbol.c | 39 +- gdb/python/py-symtab.c | 4 +- gdb/python/py-threadevent.c | 24 +- gdb/python/py-tui.c | 63 +- gdb/python/py-type.c | 109 +- gdb/python/py-unwind.c | 614 +- gdb/python/py-utils.c | 3 + gdb/python/py-value.c | 219 +- gdb/python/py-varobj.c | 4 +- gdb/python/py-xmethods.c | 11 +- gdb/python/python-internal.h | 191 +- gdb/python/python.c | 185 +- gdb/quick-symbol.h | 7 - gdb/ravenscar-thread.c | 10 +- gdb/record-btrace.c | 23 +- gdb/record-full.c | 107 +- gdb/record.c | 3 +- gdb/record.h | 2 +- gdb/regcache.c | 111 +- gdb/regcache.h | 22 +- gdb/reggroups.c | 2 +- gdb/remote-fileio.c | 15 +- gdb/remote-notif.c | 12 +- gdb/remote-notif.h | 16 +- gdb/remote.c | 2374 +- gdb/remote.h | 2 +- gdb/riscv-linux-nat.c | 3 + gdb/riscv-none-tdep.c | 2 +- gdb/riscv-tdep.c | 613 +- gdb/rl78-tdep.c | 31 +- gdb/rs6000-aix-nat.c | 218 +- gdb/rs6000-aix-tdep.c | 264 +- gdb/rs6000-lynx178-tdep.c | 18 +- gdb/rs6000-tdep.c | 102 +- gdb/run-on-main-thread.c | 25 +- gdb/rust-lang.c | 235 +- gdb/rust-lang.h | 54 +- gdb/rust-parse.c | 61 +- gdb/rx-tdep.c | 15 +- gdb/s12z-tdep.c | 4 +- gdb/s390-linux-nat.c | 3 + gdb/s390-tdep.c | 68 +- gdb/s390-tdep.h | 2 + gdb/selftest-arch.c | 4 +- gdb/sentinel-frame.c | 5 +- gdb/ser-base.h | 2 +- gdb/ser-mingw.c | 4 +- gdb/ser-tcp.c | 4 +- gdb/ser-unix.c | 66 + gdb/sh-tdep.c | 37 +- gdb/skip.c | 2 +- gdb/sol-thread.c | 7 +- gdb/solib-aix.c | 25 +- gdb/solib-darwin.c | 9 - gdb/solib-darwin.h | 1 - gdb/solib-dsbt.c | 29 +- gdb/solib-dsbt.h | 1 - gdb/solib-frv.c | 24 +- gdb/solib-rocm.c | 804 + gdb/solib-svr4.c | 76 +- gdb/solib.c | 81 +- gdb/solib.h | 14 +- gdb/solist.h | 3 - gdb/source-cache.c | 2 +- gdb/source.c | 135 +- gdb/source.h | 30 +- gdb/sparc-tdep.c | 30 +- gdb/sparc64-linux-tdep.c | 2 +- gdb/sparc64-tdep.c | 9 +- gdb/split-name.c | 2 +- gdb/split-name.h | 5 +- gdb/stabsread.c | 256 +- gdb/stabsread.h | 4 +- gdb/stack.c | 124 +- gdb/stap-probe.c | 5 +- gdb/std-regs.c | 8 +- gdb/stubs/i386-stub.c | 2 +- gdb/stubs/m32r-stub.c | 6 +- gdb/stubs/m68k-stub.c | 4 +- gdb/stubs/sh-stub.c | 2 +- gdb/stubs/z80-stub.c | 4 +- gdb/symfile-debug.c | 33 +- gdb/symfile-mem.c | 2 +- gdb/symfile.c | 260 +- gdb/symfile.h | 21 +- gdb/symmisc.c | 36 +- gdb/symtab.c | 592 +- gdb/symtab.h | 198 +- gdb/syscalls/aarch64-linux.xml | 26 +- gdb/syscalls/amd64-linux.xml | 106 +- gdb/syscalls/arm-linux.xml | 26 +- gdb/syscalls/bfin-linux.xml | 26 +- gdb/syscalls/freebsd.xml | 16 +- gdb/syscalls/i386-linux.xml | 124 +- gdb/syscalls/linux-defaults.xml.in | 545 +- gdb/syscalls/mips-n32-linux.xml | 122 +- gdb/syscalls/mips-n64-linux.xml | 100 +- gdb/syscalls/mips-o32-linux.xml | 122 +- gdb/syscalls/netbsd.xml | 11 +- gdb/syscalls/ppc-linux.xml | 124 +- gdb/syscalls/ppc64-linux.xml | 104 +- gdb/syscalls/s390-linux.xml | 122 +- gdb/syscalls/s390x-linux.xml | 102 +- gdb/syscalls/sparc-linux.xml | 114 +- gdb/syscalls/sparc64-linux.xml | 94 +- gdb/syscalls/update-freebsd.sh | 4 +- gdb/syscalls/update-linux-defaults.sh | 91 + gdb/target-debug.h | 96 +- gdb/target-delegates.c | 560 +- gdb/target-descriptions.c | 108 +- gdb/target-descriptions.h | 19 - gdb/target-float.c | 8 - gdb/target.c | 61 +- gdb/target.h | 42 +- gdb/target/waitstatus.h | 2 +- .../boards/local-remote-host-native.exp | 45 +- gdb/testsuite/boards/local-remote-host.exp | 49 +- .../boards/remote-gdbserver-on-localhost.exp | 70 +- .../boards/remote-stdio-gdbserver.exp | 27 +- gdb/testsuite/gdb.ada/O2_float_param.exp | 11 +- gdb/testsuite/gdb.ada/access_tagged_param.exp | 2 +- .../gdb.ada/access_to_packed_array.exp | 2 +- .../gdb.ada/access_to_unbounded_array.exp | 2 +- gdb/testsuite/gdb.ada/addr_arith.exp | 2 +- gdb/testsuite/gdb.ada/aliased_array.exp | 2 +- gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp | 93 +- gdb/testsuite/gdb.ada/arr_arr.exp | 2 +- gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp | 2 +- gdb/testsuite/gdb.ada/array_bounds.exp | 2 +- gdb/testsuite/gdb.ada/array_char_idx.exp | 2 +- .../gdb.ada/array_of_symbolic_length.exp | 2 +- .../gdb.ada/array_of_variable_length.exp | 2 +- gdb/testsuite/gdb.ada/array_of_variant.exp | 4 +- gdb/testsuite/gdb.ada/array_ptr_renaming.exp | 2 +- gdb/testsuite/gdb.ada/array_return.exp | 2 +- .../gdb.ada/array_subscript_addr.exp | 2 +- gdb/testsuite/gdb.ada/arraydim.exp | 2 +- gdb/testsuite/gdb.ada/arrayidx.exp | 2 +- gdb/testsuite/gdb.ada/arrayparam.exp | 2 +- gdb/testsuite/gdb.ada/arrayptr.exp | 2 +- gdb/testsuite/gdb.ada/assign_1.exp | 21 +- gdb/testsuite/gdb.ada/assign_arr.exp | 2 +- gdb/testsuite/gdb.ada/assoc.exp | 43 + gdb/testsuite/gdb.ada/assoc/main.adb | 22 + gdb/testsuite/gdb.ada/assoc/pck.ads | 29 + gdb/testsuite/gdb.ada/assoc/xtra.adb | 21 + gdb/testsuite/gdb.ada/assoc/xtra.ads | 24 + gdb/testsuite/gdb.ada/atomic_enum.exp | 2 +- .../gdb.ada/attr_ref_and_charlit.exp | 2 +- gdb/testsuite/gdb.ada/ax-ada.exp | 32 + gdb/testsuite/gdb.ada/ax-ada/prog.adb | 23 + gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp | 2 +- gdb/testsuite/gdb.ada/bias.exp | 2 +- gdb/testsuite/gdb.ada/big_packed_array.exp | 2 +- gdb/testsuite/gdb.ada/boolean_expr.exp | 6 +- gdb/testsuite/gdb.ada/bp_c_mixed_case.exp | 2 +- gdb/testsuite/gdb.ada/bp_enum_homonym.exp | 2 +- gdb/testsuite/gdb.ada/bp_fun_addr.exp | 2 +- gdb/testsuite/gdb.ada/bp_inlined_func.exp | 2 +- gdb/testsuite/gdb.ada/bp_on_var.exp | 2 +- gdb/testsuite/gdb.ada/bp_range_type.exp | 2 +- gdb/testsuite/gdb.ada/bp_reset.exp | 2 +- .../testsuite/gdb.ada/break-label.exp | 25 +- gdb/testsuite/gdb.ada/break-label/pck.adb | 21 + gdb/testsuite/gdb.ada/break-label/pck.ads | 18 + gdb/testsuite/gdb.ada/break-label/proc.adb | 22 + gdb/testsuite/gdb.ada/byte_packed_arr.exp | 2 +- gdb/testsuite/gdb.ada/call-no-debug.exp | 45 + gdb/testsuite/gdb.ada/call-no-debug/pck.adb | 21 + gdb/testsuite/gdb.ada/call-no-debug/pck.ads | 18 + gdb/testsuite/gdb.ada/call-no-debug/prog.adb | 22 + gdb/testsuite/gdb.ada/call_pn.exp | 2 +- gdb/testsuite/gdb.ada/catch_assert_if.exp | 28 +- gdb/testsuite/gdb.ada/catch_ex.exp | 18 +- gdb/testsuite/gdb.ada/catch_ex_std.exp | 31 +- gdb/testsuite/gdb.ada/char_enum.exp | 2 +- gdb/testsuite/gdb.ada/char_enum_overload.exp | 2 +- gdb/testsuite/gdb.ada/char_enum_unicode.exp | 2 +- gdb/testsuite/gdb.ada/char_param.exp | 2 +- gdb/testsuite/gdb.ada/complete.exp | 4 +- gdb/testsuite/gdb.ada/complete/pck.ads | 4 +- gdb/testsuite/gdb.ada/cond_lang.exp | 2 +- gdb/testsuite/gdb.ada/convvar_comp.exp | 2 +- gdb/testsuite/gdb.ada/data-sections.exp | 34 + gdb/testsuite/gdb.ada/data-sections/main.adb | 19 + gdb/testsuite/gdb.ada/dgopt.exp | 2 +- gdb/testsuite/gdb.ada/disc_arr_bound.exp | 2 +- gdb/testsuite/gdb.ada/discrete-char.exp | 2 +- gdb/testsuite/gdb.ada/display_nested.exp | 2 +- gdb/testsuite/gdb.ada/dot_all.exp | 2 +- gdb/testsuite/gdb.ada/dyn-range.exp | 33 + gdb/testsuite/gdb.ada/dyn-range/dyn.adb | 24 + gdb/testsuite/gdb.ada/dyn-range/pck.adb | 26 + gdb/testsuite/gdb.ada/dyn-range/pck.ads | 20 + gdb/testsuite/gdb.ada/dyn_arrayidx.exp | 2 +- gdb/testsuite/gdb.ada/dyn_loc.exp | 2 +- gdb/testsuite/gdb.ada/dyn_stride.exp | 2 +- gdb/testsuite/gdb.ada/dynamic-iface.exp | 7 +- gdb/testsuite/gdb.ada/enum_idx_packed.exp | 2 +- gdb/testsuite/gdb.ada/enum_qual.exp | 2 +- gdb/testsuite/gdb.ada/enums_overload.exp | 2 +- gdb/testsuite/gdb.ada/excep_handle.exp | 48 +- gdb/testsuite/gdb.ada/exec_changed.exp | 7 +- gdb/testsuite/gdb.ada/expr_delims.exp | 2 +- gdb/testsuite/gdb.ada/expr_with_funcall.exp | 2 +- gdb/testsuite/gdb.ada/exprs.exp | 2 +- gdb/testsuite/gdb.ada/file-then-restart.exp | 69 + .../gdb.ada/file-then-restart/first.adb | 25 + .../gdb.ada/file-then-restart/second.adb | 25 + gdb/testsuite/gdb.ada/fin_fun_out.exp | 2 +- gdb/testsuite/gdb.ada/finish-large.exp | 30 + gdb/testsuite/gdb.ada/finish-large/p.adb | 24 + gdb/testsuite/gdb.ada/finish-large/pck.adb | 28 + gdb/testsuite/gdb.ada/finish-large/pck.ads | 37 + gdb/testsuite/gdb.ada/finish-var-size.exp | 40 + gdb/testsuite/gdb.ada/finish-var-size/p.adb | 21 + gdb/testsuite/gdb.ada/finish-var-size/pck.adb | 21 + gdb/testsuite/gdb.ada/finish-var-size/pck.ads | 36 + gdb/testsuite/gdb.ada/fixed_cmp.exp | 2 +- gdb/testsuite/gdb.ada/fixed_points.exp | 8 +- .../gdb.ada/fixed_points/fixed_points.adb | 8 + .../gdb.ada/fixed_points_function.exp | 2 +- gdb/testsuite/gdb.ada/float-bits.exp | 2 +- gdb/testsuite/gdb.ada/float_param.exp | 2 +- gdb/testsuite/gdb.ada/formatted_ref.exp | 2 +- gdb/testsuite/gdb.ada/frame_arg_lang.exp | 2 +- gdb/testsuite/gdb.ada/frame_args.exp | 2 +- gdb/testsuite/gdb.ada/fullname_bp.exp | 2 +- gdb/testsuite/gdb.ada/fun_addr.exp | 2 +- gdb/testsuite/gdb.ada/fun_in_declare.exp | 2 +- gdb/testsuite/gdb.ada/fun_overload_menu.exp | 2 +- gdb/testsuite/gdb.ada/fun_renaming.exp | 2 +- gdb/testsuite/gdb.ada/funcall_char.exp | 2 +- gdb/testsuite/gdb.ada/funcall_param.exp | 2 +- gdb/testsuite/gdb.ada/funcall_ptr.exp | 2 +- gdb/testsuite/gdb.ada/funcall_ref.exp | 2 +- gdb/testsuite/gdb.ada/ghost.exp | 2 +- gdb/testsuite/gdb.ada/homonym.exp | 2 +- gdb/testsuite/gdb.ada/huge.exp | 94 + gdb/testsuite/gdb.ada/huge/foo.adb | 20 + gdb/testsuite/gdb.ada/huge/pck.adb | 88 + gdb/testsuite/gdb.ada/huge/pck.ads | 18 + gdb/testsuite/gdb.ada/import.exp | 94 + .../testsuite/gdb.ada/import/inc.c | 24 +- gdb/testsuite/gdb.ada/import/pkg.adb | 35 + gdb/testsuite/gdb.ada/import/pkg.ads | 38 + gdb/testsuite/gdb.ada/import/prog.adb | 31 + .../gdb.ada/info_addr_mixed_case.exp | 2 +- gdb/testsuite/gdb.ada/info_auto_lang.exp | 12 +- gdb/testsuite/gdb.ada/info_exc.exp | 2 +- .../gdb.ada/info_locals_renaming.exp | 2 +- gdb/testsuite/gdb.ada/info_types.exp | 2 +- gdb/testsuite/gdb.ada/inline-section-gc.exp | 2 +- gdb/testsuite/gdb.ada/int_deref.exp | 2 +- gdb/testsuite/gdb.ada/interface.exp | 7 +- gdb/testsuite/gdb.ada/iwide.exp | 7 +- gdb/testsuite/gdb.ada/lang_switch.exp | 2 +- gdb/testsuite/gdb.ada/length_cond.exp | 2 +- gdb/testsuite/gdb.ada/limited-length.exp | 264 + gdb/testsuite/gdb.ada/limited-length/foo.adb | 37 + gdb/testsuite/gdb.ada/limited-length/pck.adb | 25 + gdb/testsuite/gdb.ada/limited-length/pck.ads | 21 + gdb/testsuite/gdb.ada/literals.exp | 2 +- gdb/testsuite/gdb.ada/local-enum.exp | 2 +- gdb/testsuite/gdb.ada/maint_with_ada.exp | 2 +- gdb/testsuite/gdb.ada/mi_catch_assert.exp | 35 +- gdb/testsuite/gdb.ada/mi_catch_ex.exp | 39 +- gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp | 37 +- gdb/testsuite/gdb.ada/mi_dyn_arr.exp | 2 +- gdb/testsuite/gdb.ada/mi_ex_cond.exp | 42 +- gdb/testsuite/gdb.ada/mi_exc_info.exp | 2 +- gdb/testsuite/gdb.ada/mi_interface.exp | 7 +- gdb/testsuite/gdb.ada/mi_prot.exp | 6 +- gdb/testsuite/gdb.ada/mi_ref_changeable.exp | 2 +- gdb/testsuite/gdb.ada/mi_string_access.exp | 2 +- gdb/testsuite/gdb.ada/mi_task_arg.exp | 12 +- gdb/testsuite/gdb.ada/mi_task_info.exp | 9 +- gdb/testsuite/gdb.ada/mi_var_access.exp | 15 +- gdb/testsuite/gdb.ada/mi_var_array.exp | 2 +- gdb/testsuite/gdb.ada/mi_var_union.exp | 2 +- gdb/testsuite/gdb.ada/mi_variant.exp | 2 +- gdb/testsuite/gdb.ada/minsyms.exp | 2 +- gdb/testsuite/gdb.ada/mod_from_name.exp | 2 +- gdb/testsuite/gdb.ada/multiarray.exp | 2 +- gdb/testsuite/gdb.ada/n_arr_bound.exp | 2 +- gdb/testsuite/gdb.ada/nested.exp | 2 +- gdb/testsuite/gdb.ada/non-ascii-latin-1.exp | 3 +- gdb/testsuite/gdb.ada/non-ascii-latin-3.exp | 3 +- gdb/testsuite/gdb.ada/non-ascii-utf-8.exp | 3 +- gdb/testsuite/gdb.ada/notcplusplus.exp | 2 +- gdb/testsuite/gdb.ada/null_array.exp | 2 +- gdb/testsuite/gdb.ada/null_overload.exp | 2 +- gdb/testsuite/gdb.ada/null_record.exp | 2 +- gdb/testsuite/gdb.ada/operator_bp.exp | 2 +- gdb/testsuite/gdb.ada/operator_call.exp | 2 +- gdb/testsuite/gdb.ada/optim_drec.exp | 2 +- .../gdb.ada/out_of_line_in_inlined.exp | 4 +- gdb/testsuite/gdb.ada/overload_menu_crash.exp | 2 +- gdb/testsuite/gdb.ada/packed_array.exp | 2 +- gdb/testsuite/gdb.ada/packed_array_assign.exp | 2 +- gdb/testsuite/gdb.ada/packed_record.exp | 2 +- gdb/testsuite/gdb.ada/packed_tagged.exp | 2 +- gdb/testsuite/gdb.ada/pckd_arr_ren.exp | 2 +- gdb/testsuite/gdb.ada/pckd_neg.exp | 2 +- gdb/testsuite/gdb.ada/pkd_arr_elem.exp | 2 +- gdb/testsuite/gdb.ada/pp-rec-component.exp | 5 +- gdb/testsuite/gdb.ada/print_chars.exp | 2 +- gdb/testsuite/gdb.ada/print_pc.exp | 2 +- gdb/testsuite/gdb.ada/ptr_typedef.exp | 2 +- gdb/testsuite/gdb.ada/ptype-o.exp | 47 + gdb/testsuite/gdb.ada/ptype-o/prog.adb | 29 + gdb/testsuite/gdb.ada/ptype_arith_binop.exp | 6 +- gdb/testsuite/gdb.ada/ptype_array.exp | 2 +- gdb/testsuite/gdb.ada/ptype_field.exp | 2 +- gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 44 +- gdb/testsuite/gdb.ada/ptype_union.exp | 2 +- gdb/testsuite/gdb.ada/py_range.exp | 9 +- gdb/testsuite/gdb.ada/py_taft.exp | 10 +- gdb/testsuite/gdb.ada/rdv_wait.exp | 2 +- gdb/testsuite/gdb.ada/rec_comp.exp | 2 +- gdb/testsuite/gdb.ada/rec_ptype.exp | 2 +- gdb/testsuite/gdb.ada/rec_return.exp | 2 +- gdb/testsuite/gdb.ada/ref_param.exp | 2 +- gdb/testsuite/gdb.ada/ref_tick_size.exp | 2 +- .../gdb.ada/rename_subscript_param.exp | 6 +- gdb/testsuite/gdb.ada/repeat_dyn.exp | 2 +- gdb/testsuite/gdb.ada/same_component_name.exp | 2 +- gdb/testsuite/gdb.ada/same_enum.exp | 6 +- gdb/testsuite/gdb.ada/same_enum/a.adb | 2 +- gdb/testsuite/gdb.ada/scalar_storage.exp | 2 +- gdb/testsuite/gdb.ada/scoped_watch.exp | 2 +- gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp | 2 +- gdb/testsuite/gdb.ada/set_wstr.exp | 2 +- gdb/testsuite/gdb.ada/small_reg_param.exp | 2 +- gdb/testsuite/gdb.ada/start.exp | 7 +- gdb/testsuite/gdb.ada/static-link.exp | 33 + gdb/testsuite/gdb.ada/static-link/pck.ads | 18 + gdb/testsuite/gdb.ada/static-link/prog.adb | 35 + gdb/testsuite/gdb.ada/str_binop_equal.exp | 22 +- gdb/testsuite/gdb.ada/str_chars.exp | 70 + gdb/testsuite/gdb.ada/str_chars/foo.adb | 26 + gdb/testsuite/gdb.ada/str_ref_cmp.exp | 2 +- gdb/testsuite/gdb.ada/str_uninit.exp | 2 +- gdb/testsuite/gdb.ada/sub_variant.exp | 2 +- gdb/testsuite/gdb.ada/sym_print_name.exp | 2 +- gdb/testsuite/gdb.ada/taft_type.exp | 2 +- gdb/testsuite/gdb.ada/tagged.exp | 7 +- gdb/testsuite/gdb.ada/tagged_access.exp | 7 +- gdb/testsuite/gdb.ada/tagged_not_init.exp | 2 +- gdb/testsuite/gdb.ada/task_bp.exp | 2 +- gdb/testsuite/gdb.ada/task_switch_in_core.exp | 2 +- gdb/testsuite/gdb.ada/task_watch.exp | 4 +- gdb/testsuite/gdb.ada/tasks.exp | 114 +- gdb/testsuite/gdb.ada/tick_last_segv.exp | 2 +- .../gdb.ada/tick_length_array_enum_idx.exp | 2 +- gdb/testsuite/gdb.ada/type_coercion.exp | 2 +- .../gdb.ada/unc_arr_ptr_in_var_rec.exp | 2 +- gdb/testsuite/gdb.ada/unchecked_union.exp | 2 +- .../unchecked_union/unchecked_union.adb | 4 +- gdb/testsuite/gdb.ada/uninitialized_vars.exp | 2 +- gdb/testsuite/gdb.ada/unsigned_last.exp | 2 +- gdb/testsuite/gdb.ada/unsigned_range.exp | 2 +- gdb/testsuite/gdb.ada/var_arr_attrs.exp | 2 +- gdb/testsuite/gdb.ada/var_arr_typedef.exp | 2 +- gdb/testsuite/gdb.ada/var_rec_arr.exp | 2 +- gdb/testsuite/gdb.ada/variant-record.exp | 2 +- gdb/testsuite/gdb.ada/variant.exp | 4 +- .../gdb.ada/variant_record_packed_array.exp | 2 +- gdb/testsuite/gdb.ada/varsize_limit.exp | 4 +- gdb/testsuite/gdb.ada/verylong.exp | 43 + gdb/testsuite/gdb.ada/verylong/prog.adb | 20 + gdb/testsuite/gdb.ada/vla.exp | 2 +- gdb/testsuite/gdb.ada/voidctx.exp | 2 +- gdb/testsuite/gdb.ada/watch_arg.exp | 2 +- gdb/testsuite/gdb.ada/watch_minus_l.exp | 2 +- gdb/testsuite/gdb.ada/whatis_array_val.exp | 2 +- gdb/testsuite/gdb.ada/widewide.exp | 30 +- gdb/testsuite/gdb.ada/win_fu_syms.exp | 2 +- .../gdb.arch/aarch64-atomic-inst.exp | 5 +- .../gdb.arch/aarch64-brk-patterns.exp | 5 +- .../gdb.arch/aarch64-dbreg-contents.exp | 5 +- gdb/testsuite/gdb.arch/aarch64-fp.exp | 5 +- gdb/testsuite/gdb.arch/aarch64-mte-core.exp | 7 +- gdb/testsuite/gdb.arch/aarch64-mte.exp | 5 +- .../gdb.arch/aarch64-non-address-bits.exp | 5 +- gdb/testsuite/gdb.arch/aarch64-pauth.exp | 7 +- gdb/testsuite/gdb.arch/aarch64-prologue.exp | 5 +- .../gdb.arch/aarch64-sighandler-regs.exp | 7 +- .../testsuite/gdb.arch/aarch64-sme-core-0.exp | 23 +- .../testsuite/gdb.arch/aarch64-sme-core-1.exp | 24 +- gdb/testsuite/gdb.arch/aarch64-sme-core-2.exp | 23 + gdb/testsuite/gdb.arch/aarch64-sme-core-3.exp | 23 + gdb/testsuite/gdb.arch/aarch64-sme-core-4.exp | 23 + gdb/testsuite/gdb.arch/aarch64-sme-core.c | 400 + .../gdb.arch/aarch64-sme-core.exp.tcl | 184 + .../gdb.arch/aarch64-sme-regs-available-0.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-1.exp | 29 +- .../gdb.arch/aarch64-sme-regs-available-2.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-3.exp | 28 +- .../gdb.arch/aarch64-sme-regs-available-4.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-5.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-6.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-7.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-8.exp | 26 + .../gdb.arch/aarch64-sme-regs-available-9.exp | 26 + .../gdb.arch/aarch64-sme-regs-available.c | 178 + .../aarch64-sme-regs-available.exp.tcl | 262 + .../gdb.arch/aarch64-sme-regs-sigframe-0.exp | 23 + .../gdb.arch/aarch64-sme-regs-sigframe-1.exp | 23 + .../gdb.arch/aarch64-sme-regs-sigframe-2.exp | 23 + .../gdb.arch/aarch64-sme-regs-sigframe-3.exp | 23 + .../gdb.arch/aarch64-sme-regs-sigframe-4.exp | 23 + .../gdb.arch/aarch64-sme-regs-sigframe.c | 394 + .../aarch64-sme-regs-sigframe.exp.tcl | 190 + .../aarch64-sme-regs-unavailable-0.exp | 26 + .../aarch64-sme-regs-unavailable-1.exp | 26 + .../aarch64-sme-regs-unavailable-2.exp | 26 + .../aarch64-sme-regs-unavailable-3.exp | 26 + .../aarch64-sme-regs-unavailable-4.exp | 26 + .../aarch64-sme-regs-unavailable-5.exp | 26 + .../aarch64-sme-regs-unavailable-6.exp | 26 + .../aarch64-sme-regs-unavailable-7.exp | 26 + .../aarch64-sme-regs-unavailable-8.exp | 26 + .../aarch64-sme-regs-unavailable-9.exp | 26 + .../gdb.arch/aarch64-sme-regs-unavailable.c | 152 + .../aarch64-sme-regs-unavailable.exp.tcl | 224 + gdb/testsuite/gdb.arch/aarch64-sme-sanity.c | 277 + gdb/testsuite/gdb.arch/aarch64-sme-sanity.exp | 72 + gdb/testsuite/gdb.arch/aarch64-sve.exp | 5 +- .../gdb.arch/aarch64-tagged-pointer.exp | 5 +- gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp | 5 +- .../gdb.arch/aarch64-w-registers.exp | 5 +- gdb/testsuite/gdb.arch/aix-sighandle.exp | 4 +- gdb/testsuite/gdb.arch/alpha-step.exp | 10 +- gdb/testsuite/gdb.arch/altivec-abi.exp | 10 +- gdb/testsuite/gdb.arch/altivec-regs.c | 10 +- gdb/testsuite/gdb.arch/altivec-regs.exp | 13 +- .../gdb.arch/amd64-break-on-asm-line.exp | 4 +- gdb/testsuite/gdb.arch/amd64-byte.exp | 6 +- gdb/testsuite/gdb.arch/amd64-disp-step-avx.S | 12 +- .../gdb.arch/amd64-disp-step-avx.exp | 24 +- .../amd64-disp-step-self-call-alarm.c | 24 + .../gdb.arch/amd64-disp-step-self-call.S | 50 + .../gdb.arch/amd64-disp-step-self-call.exp | 82 + .../gdb.arch/amd64-disp-step-signal.c | 37 +- gdb/testsuite/gdb.arch/amd64-disp-step.S | 15 + gdb/testsuite/gdb.arch/amd64-disp-step.exp | 104 +- gdb/testsuite/gdb.arch/amd64-dword.exp | 6 +- .../gdb.arch/amd64-entry-value-inline.exp | 17 +- .../amd64-entry-value-param-dwarf5.exp | 15 +- .../gdb.arch/amd64-entry-value-param.exp | 15 +- .../gdb.arch/amd64-entry-value-paramref.exp | 11 +- gdb/testsuite/gdb.arch/amd64-entry-value.exp | 64 +- gdb/testsuite/gdb.arch/amd64-eval.exp | 5 +- gdb/testsuite/gdb.arch/amd64-gs_base.exp | 15 +- gdb/testsuite/gdb.arch/amd64-i386-address.exp | 7 +- .../gdb.arch/amd64-init-x87-values.exp | 6 +- .../gdb.arch/amd64-invalid-stack-middle.exp | 9 +- .../gdb.arch/amd64-invalid-stack-top.exp | 10 +- .../gdb.arch/amd64-optimout-repeat.exp | 5 +- gdb/testsuite/gdb.arch/amd64-osabi.exp | 6 +- .../gdb.arch/amd64-prologue-skip.exp | 5 +- gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp | 5 +- .../gdb.arch/amd64-stap-expressions.exp | 5 +- .../gdb.arch/amd64-stap-optional-prefix.exp | 5 +- .../gdb.arch/amd64-stap-special-operands.exp | 10 +- .../gdb.arch/amd64-stap-wrong-subexp.exp | 5 +- gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp | 5 +- .../gdb.arch/amd64-tailcall-noret.exp | 5 +- gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp | 14 +- .../gdb.arch/amd64-tailcall-self.exp | 5 +- .../gdb.arch/amd64-watchpoint-downgrade.c | 29 + .../gdb.arch/amd64-watchpoint-downgrade.exp | 67 + gdb/testsuite/gdb.arch/amd64-word.exp | 6 +- .../gdb.arch/arc-analyze-prologue.exp | 5 +- gdb/testsuite/gdb.arch/arc-decode-insn.exp | 5 +- .../gdb.arch/arc-disassembler-options.exp | 5 +- gdb/testsuite/gdb.arch/arc-tdesc-cpu.exp | 5 +- gdb/testsuite/gdb.arch/arm-bl-branch-dest.exp | 5 +- gdb/testsuite/gdb.arch/arm-cmse-sgstubs.exp | 4 +- .../gdb.arch/arm-disassembler-options.exp | 5 +- gdb/testsuite/gdb.arch/arm-disp-step.exp | 5 +- gdb/testsuite/gdb.arch/arm-neon.exp | 10 +- .../gdb.arch/arm-pthread_cond_timedwait-bt.c | 67 + .../arm-pthread_cond_timedwait-bt.exp | 119 + .../arm-single-step-kernel-helper.exp | 5 +- .../gdb.arch/avr-flash-qualifier.exp | 5 +- gdb/testsuite/gdb.arch/core-file-pid0.exp | 73 + .../gdb.arch/core-file-pid0.x86-64.core.bz2 | Bin 0 -> 750 bytes .../gdb.arch/disp-step-insn-reloc.exp | 5 +- gdb/testsuite/gdb.arch/e500-abi.exp | 6 +- gdb/testsuite/gdb.arch/e500-prologue.exp | 11 +- gdb/testsuite/gdb.arch/e500-regs.exp | 13 +- gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp | 10 +- gdb/testsuite/gdb.arch/gdb1291.exp | 11 +- gdb/testsuite/gdb.arch/gdb1431.exp | 11 +- gdb/testsuite/gdb.arch/gdb1558.exp | 11 +- gdb/testsuite/gdb.arch/i386-avx.c | 2 +- gdb/testsuite/gdb.arch/i386-avx.exp | 12 +- gdb/testsuite/gdb.arch/i386-avx512.exp | 6 +- gdb/testsuite/gdb.arch/i386-biarch-core.exp | 7 +- gdb/testsuite/gdb.arch/i386-bp_permanent.exp | 10 +- gdb/testsuite/gdb.arch/i386-byte.exp | 5 +- .../gdb.arch/i386-cfi-notcurrent.exp | 4 +- .../gdb.arch/i386-disp-step-self-call-alarm.c | 24 + .../gdb.arch/i386-disp-step-self-call.S | 50 + .../gdb.arch/i386-disp-step-self-call.exp | 82 + gdb/testsuite/gdb.arch/i386-disp-step.exp | 11 +- gdb/testsuite/gdb.arch/i386-dr3-watch.exp | 4 +- gdb/testsuite/gdb.arch/i386-float.exp | 5 +- gdb/testsuite/gdb.arch/i386-gnu-cfi.exp | 10 +- gdb/testsuite/gdb.arch/i386-mpx-call.exp | 14 +- gdb/testsuite/gdb.arch/i386-mpx-map.exp | 14 +- gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp | 14 +- .../gdb.arch/i386-mpx-simple_segv.exp | 14 +- gdb/testsuite/gdb.arch/i386-mpx.exp | 21 +- gdb/testsuite/gdb.arch/i386-permbkpt.exp | 5 +- gdb/testsuite/gdb.arch/i386-pkru.exp | 51 +- .../i386-prologue-skip-cf-protection.exp | 10 +- gdb/testsuite/gdb.arch/i386-prologue.exp | 10 +- gdb/testsuite/gdb.arch/i386-signal.c | 4 + gdb/testsuite/gdb.arch/i386-signal.exp | 17 +- gdb/testsuite/gdb.arch/i386-size-overlap.exp | 10 +- gdb/testsuite/gdb.arch/i386-size.exp | 10 +- .../gdb.arch/i386-sse-stack-align.exp | 5 +- gdb/testsuite/gdb.arch/i386-sse.c | 2 +- gdb/testsuite/gdb.arch/i386-sse.exp | 7 +- .../gdb.arch/i386-stap-eval-lang-ada.exp | 5 +- gdb/testsuite/gdb.arch/i386-unwind.exp | 10 +- gdb/testsuite/gdb.arch/i386-word.exp | 5 +- .../gdb.arch/ia64-breakpoint-shadow.exp | 10 +- gdb/testsuite/gdb.arch/insn-reloc.c | 6 +- gdb/testsuite/gdb.arch/iwmmxt-regs.exp | 5 +- .../gdb.arch/mips-disassembler-options.exp | 5 +- gdb/testsuite/gdb.arch/mips-fcr.exp | 5 +- gdb/testsuite/gdb.arch/mips-fpregset-core.exp | 5 +- gdb/testsuite/gdb.arch/mips-octeon-bbit.exp | 9 +- gdb/testsuite/gdb.arch/mips16-thunks.exp | 5 +- gdb/testsuite/gdb.arch/pa-nullify.exp | 7 +- gdb/testsuite/gdb.arch/powerpc-addpcis.exp | 5 +- .../gdb.arch/powerpc-aix-prologue.exp | 10 +- gdb/testsuite/gdb.arch/powerpc-altivec.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-altivec2.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-altivec3.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-d128-regs.exp | 12 +- .../gdb.arch/powerpc-disassembler-options.exp | 5 +- .../gdb.arch/powerpc-fpscr-gcore.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-htm-regs.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-lnia.exp | 5 +- .../gdb.arch/powerpc-plxv-nonrel.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-power10.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-power7.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-power8.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-power9.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp | 5 +- .../gdb.arch/powerpc-prologue-frame.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-prologue.exp | 10 +- gdb/testsuite/gdb.arch/powerpc-stackless.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-tar.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-trap.exp | 2 +- .../gdb.arch/powerpc-vector-regs.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-vsx.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-vsx2.exp | 5 +- gdb/testsuite/gdb.arch/powerpc-vsx3.exp | 5 +- gdb/testsuite/gdb.arch/powerpc64-prologue.exp | 5 +- gdb/testsuite/gdb.arch/ppc-dfp.exp | 12 +- gdb/testsuite/gdb.arch/ppc-fp.exp | 12 +- gdb/testsuite/gdb.arch/ppc-longdouble.exp | 5 +- gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp | 6 +- gdb/testsuite/gdb.arch/ppc64-break-on-_exit.c | 2 +- .../gdb.arch/ppc64-break-on-_exit.exp | 5 +- .../gdb.arch/ppc64-isa207-atomic-inst.exp | 5 +- gdb/testsuite/gdb.arch/pr25124.exp | 12 +- gdb/testsuite/gdb.arch/riscv-bp-infcall.exp | 5 +- .../gdb.arch/riscv-default-tdesc.exp | 5 +- gdb/testsuite/gdb.arch/riscv-info-fcsr.exp | 10 +- gdb/testsuite/gdb.arch/riscv-reg-aliases.exp | 5 +- .../gdb.arch/riscv-tdesc-loading.exp | 5 +- gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp | 5 +- .../gdb.arch/riscv-unwind-long-insn.exp | 5 +- .../riscv64-unwind-prologue-with-c_li-foo.s | 47 + .../riscv64-unwind-prologue-with-c_li.c | 29 + .../riscv64-unwind-prologue-with-c_li.exp | 42 + .../riscv64-unwind-prologue-with-ld-lw.exp | 5 +- .../riscv64-unwind-prologue-with-mv.exp | 5 +- gdb/testsuite/gdb.arch/s390-multiarch.exp | 10 +- gdb/testsuite/gdb.arch/s390-stackless.exp | 5 +- gdb/testsuite/gdb.arch/s390-tdbregs.exp | 6 +- gdb/testsuite/gdb.arch/s390-vregs.exp | 5 +- gdb/testsuite/gdb.arch/sparc-sysstep.exp | 4 +- gdb/testsuite/gdb.arch/sparc64-adi.exp | 5 +- gdb/testsuite/gdb.arch/sparc64-regs.exp | 5 +- gdb/testsuite/gdb.arch/thumb-bx-pc.S | 2 +- gdb/testsuite/gdb.arch/thumb-bx-pc.exp | 5 +- gdb/testsuite/gdb.arch/thumb-prologue.exp | 10 +- gdb/testsuite/gdb.arch/thumb-singlestep.S | 2 +- gdb/testsuite/gdb.arch/thumb-singlestep.exp | 5 +- gdb/testsuite/gdb.arch/thumb2-it.S | 2 +- gdb/testsuite/gdb.arch/thumb2-it.exp | 10 +- gdb/testsuite/gdb.arch/vsx-regs.exp | 10 +- gdb/testsuite/gdb.arch/vsx-vsr-float28.exp | 6 +- gdb/testsuite/gdb.arch/x86-avx512bf16.exp | 5 +- gdb/testsuite/gdb.arch/x86-avx512fp16-abi.exp | 5 +- gdb/testsuite/gdb.arch/x86-avx512fp16.exp | 5 +- gdb/testsuite/gdb.asm/asm-source.exp | 14 +- gdb/testsuite/gdb.base/a2-run.exp | 10 +- gdb/testsuite/gdb.base/access-mem-running.exp | 10 +- .../gdb.base/add-symbol-file-attach.c | 28 + .../gdb.base/add-symbol-file-attach.exp | 82 + .../gdb.base/address_space_qualifier.exp | 4 +- .../advance-until-multiple-locations.exp | 2 +- gdb/testsuite/gdb.base/alias.exp | 4 +- gdb/testsuite/gdb.base/align-c++.exp | 4 +- gdb/testsuite/gdb.base/align.exp.tcl | 49 +- .../gdb.base/all-architectures.exp.tcl | 2 +- gdb/testsuite/gdb.base/annota1.exp | 9 +- gdb/testsuite/gdb.base/annota3.exp | 4 +- gdb/testsuite/gdb.base/annotate-symlink.exp | 7 +- gdb/testsuite/gdb.base/args.exp | 98 +- gdb/testsuite/gdb.base/argv0-symlink.exp | 10 +- gdb/testsuite/gdb.base/async-shell.exp | 9 +- .../gdb.base/attach-non-pgrp-leader.exp | 4 +- gdb/testsuite/gdb.base/attach-pie-misread.exp | 7 +- gdb/testsuite/gdb.base/attach-pie-noexec.exp | 4 +- gdb/testsuite/gdb.base/attach-twice.exp | 4 +- gdb/testsuite/gdb.base/attach-wait-input.exp | 4 +- gdb/testsuite/gdb.base/attach.exp | 6 +- .../gdb.base/auto-connect-native-target.exp | 18 +- gdb/testsuite/gdb.base/auto-load.exp | 4 +- gdb/testsuite/gdb.base/auxv.exp | 6 +- gdb/testsuite/gdb.base/backtrace.c | 2 +- gdb/testsuite/gdb.base/backtrace.exp | 6 +- gdb/testsuite/gdb.base/bad-file.exp | 3 + gdb/testsuite/gdb.base/bfd-errors.exp | 5 +- .../gdb.base/bg-exec-sigint-bp-cond.c | 35 + .../gdb.base/bg-exec-sigint-bp-cond.exp | 98 + gdb/testsuite/gdb.base/bigcore.c | 2 +- gdb/testsuite/gdb.base/bigcore.exp | 5 +- gdb/testsuite/gdb.base/bitops.exp | 5 +- gdb/testsuite/gdb.base/bitshift.exp | 8 +- .../gdb.base/bp-cmds-continue-ctrl-c.exp | 10 +- gdb/testsuite/gdb.base/bp-cond-failure.c | 40 + gdb/testsuite/gdb.base/bp-cond-failure.exp | 116 + gdb/testsuite/gdb.base/branch-to-self.exp | 5 +- gdb/testsuite/gdb.base/break-always.exp | 2 +- gdb/testsuite/gdb.base/break-entry.exp | 5 +- gdb/testsuite/gdb.base/break-idempotent.exp | 14 +- gdb/testsuite/gdb.base/break-interp.exp | 15 +- .../gdb.base/break-main-file-remove-fail.exp | 19 +- .../gdb.base/break-on-linker-gcd-function.exp | 2 +- gdb/testsuite/gdb.base/break-probes.exp | 16 +- gdb/testsuite/gdb.base/break-unload-file.exp | 2 +- .../gdb.base/breakpoint-in-ro-region.exp | 5 +- gdb/testsuite/gdb.base/bt-on-fatal-signal.exp | 5 +- gdb/testsuite/gdb.base/cached-source-file.exp | 3 +- gdb/testsuite/gdb.base/call-ar-st.c | 4 +- gdb/testsuite/gdb.base/call-ar-st.exp | 33 +- gdb/testsuite/gdb.base/call-rt-st.c | 2 +- gdb/testsuite/gdb.base/call-rt-st.exp | 28 +- gdb/testsuite/gdb.base/call-sc.exp | 11 +- gdb/testsuite/gdb.base/call-signal-resume.exp | 18 +- gdb/testsuite/gdb.base/call-strs.c | 2 +- gdb/testsuite/gdb.base/call-strs.exp | 10 +- gdb/testsuite/gdb.base/callexit.exp | 7 +- gdb/testsuite/gdb.base/callfuncs.exp | 13 +- gdb/testsuite/gdb.base/cast-call.exp | 5 +- gdb/testsuite/gdb.base/catch-follow-exec.exp | 17 +- gdb/testsuite/gdb.base/catch-fork-static.exp | 4 +- .../gdb.base/catch-gdb-caused-signals.c | 2 +- .../gdb.base/catch-gdb-caused-signals.exp | 11 +- gdb/testsuite/gdb.base/catch-load.exp | 5 +- gdb/testsuite/gdb.base/catch-signal-fork.exp | 5 +- .../gdb.base/catch-signal-siginfo-cond.exp | 12 +- gdb/testsuite/gdb.base/catch-signal.exp | 5 +- gdb/testsuite/gdb.base/catch-syscall.c | 4 + gdb/testsuite/gdb.base/catch-syscall.exp | 54 +- gdb/testsuite/gdb.base/charset.exp | 4 +- gdb/testsuite/gdb.base/checkpoint.exp | 9 +- gdb/testsuite/gdb.base/chng-syms.exp | 1 - gdb/testsuite/gdb.base/clear_non_user_bp.exp | 2 +- gdb/testsuite/gdb.base/commands.exp | 19 +- gdb/testsuite/gdb.base/compare-sections.exp | 2 +- gdb/testsuite/gdb.base/completion.exp | 2 +- gdb/testsuite/gdb.base/complex.exp | 2 - gdb/testsuite/gdb.base/comprdebug.exp | 4 +- gdb/testsuite/gdb.base/cond-eval-mode.exp | 17 +- .../gdb.base/coredump-filter-build-id.exp | 5 +- gdb/testsuite/gdb.base/corefile-buildid.exp | 2 +- gdb/testsuite/gdb.base/corefile.exp | 8 +- gdb/testsuite/gdb.base/corefile2.exp | 4 +- gdb/testsuite/gdb.base/coremaker.c | 2 +- gdb/testsuite/gdb.base/ctf-constvars.exp | 12 +- gdb/testsuite/gdb.base/ctf-ptype.exp | 10 +- gdb/testsuite/gdb.base/ctxobj.exp | 4 +- gdb/testsuite/gdb.base/cursal.exp | 6 +- gdb/testsuite/gdb.base/cvexpr.exp | 9 +- gdb/testsuite/gdb.base/debug-expr.exp | 5 +- gdb/testsuite/gdb.base/default.exp | 18 +- gdb/testsuite/gdb.base/define.exp | 1 - gdb/testsuite/gdb.base/detach.exp | 8 +- gdb/testsuite/gdb.base/dfp-exprs.exp | 6 +- gdb/testsuite/gdb.base/disasm-optim.exp | 4 +- .../gdb.base/displaced-step-closure.c | 21 + .../gdb.base/displaced-step-closure.exp | 39 + gdb/testsuite/gdb.base/display.exp | 23 +- gdb/testsuite/gdb.base/dlmopen.exp | 10 +- gdb/testsuite/gdb.base/dprintf-detach.exp | 4 +- .../gdb.base/dprintf-execution-x-script.exp | 4 +- gdb/testsuite/gdb.base/dprintf-pending.exp | 12 +- gdb/testsuite/gdb.base/dprintf.c | 2 +- gdb/testsuite/gdb.base/dprintf.exp | 11 +- gdb/testsuite/gdb.base/dso2dso.exp | 4 +- gdb/testsuite/gdb.base/dump.exp | 31 +- gdb/testsuite/gdb.base/early-init-file.exp | 16 +- .../gdb.base/empty-host-env-vars.exp | 3 + gdb/testsuite/gdb.base/ena-dis-br.exp | 1 - gdb/testsuite/gdb.base/ending-run.c | 2 +- gdb/testsuite/gdb.base/ending-run.exp | 8 +- gdb/testsuite/gdb.base/environ.exp | 1 - gdb/testsuite/gdb.base/eval-skip.exp | 8 - gdb/testsuite/gdb.base/eval.exp | 16 + gdb/testsuite/gdb.base/exitsignal.exp | 7 +- gdb/testsuite/gdb.base/fileio.exp | 22 +- gdb/testsuite/gdb.base/find-unmapped.exp | 5 +- gdb/testsuite/gdb.base/finish.exp | 6 +- gdb/testsuite/gdb.base/fixsection.exp | 11 +- gdb/testsuite/gdb.base/float.exp | 2 + gdb/testsuite/gdb.base/float128.exp | 37 +- gdb/testsuite/gdb.base/foll-exec-mode.exp | 6 +- gdb/testsuite/gdb.base/foll-exec.exp | 9 +- gdb/testsuite/gdb.base/foll-fork.exp | 43 +- gdb/testsuite/gdb.base/foll-vfork.exp | 602 +- .../fork-no-detach-follow-child-dlopen.exp | 10 +- .../gdb.base/fork-print-inferior-events.exp | 12 +- gdb/testsuite/gdb.base/fork-running-state.exp | 11 +- .../gdb.base/frame-info-consistent.exp | 6 +- gdb/testsuite/gdb.base/frame-view.c | 80 + gdb/testsuite/gdb.base/frame-view.exp | 109 + gdb/testsuite/gdb.base/frame-view.py | 41 + gdb/testsuite/gdb.base/fullname.exp | 21 +- gdb/testsuite/gdb.base/fullpath-expand.exp | 11 +- gdb/testsuite/gdb.base/funcargs.exp | 6 +- gdb/testsuite/gdb.base/gcore-relro.exp | 4 +- gdb/testsuite/gdb.base/gcore.exp | 5 +- gdb/testsuite/gdb.base/gdb-sigterm.exp | 5 +- gdb/testsuite/gdb.base/gdb11531.exp | 6 +- gdb/testsuite/gdb.base/gdb1555.exp | 4 +- .../gdb.base/gdbhistsize-history.exp | 10 +- gdb/testsuite/gdb.base/gdbinit-history.exp | 14 +- gdb/testsuite/gdb.base/gdbvars.exp | 8 + .../gdb.base/global-var-nested-by-dso.exp | 4 +- gdb/testsuite/gdb.base/gnu-ifunc.exp | 10 +- gdb/testsuite/gdb.base/hashline2.exp | 5 +- gdb/testsuite/gdb.base/hashline3.exp | 5 +- .../gdb.base/hbreak-in-shr-unsupported.exp | 8 +- gdb/testsuite/gdb.base/hbreak-unmapped.exp | 4 +- gdb/testsuite/gdb.base/hbreak.exp | 4 +- gdb/testsuite/gdb.base/hook-stop.exp | 2 +- gdb/testsuite/gdb.base/huge.exp | 75 +- .../gdb.base/hw-sw-break-same-address.exp | 6 +- gdb/testsuite/gdb.base/index-cache-2.c | 24 + gdb/testsuite/gdb.base/index-cache.c | 6 +- gdb/testsuite/gdb.base/index-cache.exp | 41 +- gdb/testsuite/gdb.base/infcall-failure.c | 48 + gdb/testsuite/gdb.base/infcall-failure.exp | 183 + gdb/testsuite/gdb.base/infcall-input.exp | 5 +- .../gdb.base/infcall-nested-structs-c++.exp | 4 +- .../gdb.base/infcall-nested-structs.c | 2 +- .../gdb.base/infcall-nested-structs.exp.tcl | 4 +- gdb/testsuite/gdb.base/inferior-args.exp | 17 +- gdb/testsuite/gdb.base/inferior-clone.exp | 9 + gdb/testsuite/gdb.base/inferior-died.exp | 10 +- gdb/testsuite/gdb.base/info-fun.exp | 5 +- gdb/testsuite/gdb.base/info-macros.exp | 17 +- gdb/testsuite/gdb.base/info-os.exp | 5 +- gdb/testsuite/gdb.base/info-program.c | 66 + gdb/testsuite/gdb.base/info-program.exp | 131 +- gdb/testsuite/gdb.base/info-shared.exp | 4 +- gdb/testsuite/gdb.base/info-types-c++.exp | 4 +- gdb/testsuite/gdb.base/info_sources_2.exp | 4 +- .../gdb.base/inline-frame-cycle-unwind.exp | 5 +- .../gdb.base/internal-functions-ptype.exp | 40 + .../gdb.base/internal-string-values.c | 32 + .../gdb.base/internal-string-values.exp | 279 + gdb/testsuite/gdb.base/interp.exp | 9 - .../gdb.base/interrupt-daemon-attach.exp | 14 +- gdb/testsuite/gdb.base/interrupt.c | 2 +- gdb/testsuite/gdb.base/interrupt.exp | 16 +- gdb/testsuite/gdb.base/jit-attach-pie.exp | 4 +- gdb/testsuite/gdb.base/jit-bfd-name.exp | 5 +- gdb/testsuite/gdb.base/jit-elf-fork.exp | 5 +- gdb/testsuite/gdb.base/jit-elf-so.exp | 5 +- gdb/testsuite/gdb.base/jit-elf.exp | 5 +- gdb/testsuite/gdb.base/jit-reader-exec.exp | 4 +- gdb/testsuite/gdb.base/jit-reader-simple.exp | 9 +- gdb/testsuite/gdb.base/jit-reader.exp | 20 +- gdb/testsuite/gdb.base/jump-inline.c | 30 + gdb/testsuite/gdb.base/jump-inline.exp | 44 + gdb/testsuite/gdb.base/jump.exp | 182 +- .../gdb.base/jump_multiple_objfiles-foo.c | 24 + .../gdb.base/jump_multiple_objfiles.c | 30 + .../gdb.base/jump_multiple_objfiles.exp | 54 + .../gdb.base/jump_multiple_objfiles.h | 30 + gdb/testsuite/gdb.base/kill-after-signal.exp | 10 +- .../gdb.base/kill-detach-inferiors-cmd.exp | 4 +- gdb/testsuite/gdb.base/langs.exp | 6 +- gdb/testsuite/gdb.base/libsegfault.exp | 10 +- gdb/testsuite/gdb.base/limited-length.c | 48 + gdb/testsuite/gdb.base/limited-length.exp | 242 + gdb/testsuite/gdb.base/list-nodebug.c | 21 + gdb/testsuite/gdb.base/list-nodebug.exp | 37 + gdb/testsuite/gdb.base/list.exp | 53 +- gdb/testsuite/gdb.base/list1.c | 2 +- .../gdb.base/long-inferior-output.exp | 5 +- gdb/testsuite/gdb.base/long_long.exp | 9 +- gdb/testsuite/gdb.base/longjmp.exp | 298 +- gdb/testsuite/gdb.base/macro-source-path.exp | 4 +- gdb/testsuite/gdb.base/main-c.exp | 29 + .../maint-expand-symbols-header-file.exp | 4 +- .../gdb.base/maint-print-frame-id.exp | 4 - gdb/testsuite/gdb.base/maint.exp | 9 +- gdb/testsuite/gdb.base/max-depth-c++.exp | 4 +- gdb/testsuite/gdb.base/max-value-size.exp | 5 +- gdb/testsuite/gdb.base/mips_pro.exp | 1 - gdb/testsuite/gdb.base/morestack.exp | 7 +- gdb/testsuite/gdb.base/moribund-step.exp | 5 +- gdb/testsuite/gdb.base/msym-bp-shl.exp | 4 +- gdb/testsuite/gdb.base/multi-forks.c | 2 +- gdb/testsuite/gdb.base/multi-forks.exp | 12 +- .../gdb.base/multi-line-starts-subshell.exp | 2 +- .../gdb.base/native-target-noproc-tdesc.exp | 27 + gdb/testsuite/gdb.base/new-ui-echo.exp | 4 +- gdb/testsuite/gdb.base/new-ui.exp | 6 +- .../gdb.base/non-lazy-array-index.exp | 2 +- gdb/testsuite/gdb.base/nostdlib.exp | 5 +- gdb/testsuite/gdb.base/options.exp | 50 +- gdb/testsuite/gdb.base/osabi.exp | 5 +- gdb/testsuite/gdb.base/overlays.exp | 12 +- gdb/testsuite/gdb.base/page-logging.exp | 5 +- gdb/testsuite/gdb.base/page.exp | 2 +- .../paginate-after-ctrl-c-running.exp | 5 +- .../gdb.base/paginate-execution-startup.exp | 14 +- gdb/testsuite/gdb.base/parse_number.exp | 9 +- gdb/testsuite/gdb.base/pc-fp.exp | 2 +- gdb/testsuite/gdb.base/pending.exp | 18 +- gdb/testsuite/gdb.base/permissions.exp | 4 +- gdb/testsuite/gdb.base/pie-execl.exp | 4 +- gdb/testsuite/gdb.base/pr11022.exp | 4 +- gdb/testsuite/gdb.base/prelink.exp | 10 +- .../premature-dummy-frame-removal.exp | 5 +- gdb/testsuite/gdb.base/print-file-var.exp | 11 +- .../gdb.base/print-internal-string.c | 56 + .../gdb.base/print-internal-string.exp | 64 + .../gdb.base/print-symbol-loading.exp | 14 +- gdb/testsuite/gdb.base/printcmds.c | 15 + gdb/testsuite/gdb.base/printcmds.exp | 150 +- gdb/testsuite/gdb.base/printf-wchar_t.c | 28 + gdb/testsuite/gdb.base/printf-wchar_t.exp | 32 + gdb/testsuite/gdb.base/prologue.exp | 2 +- gdb/testsuite/gdb.base/psymtab.exp | 2 +- gdb/testsuite/gdb.base/random-signal.exp | 10 +- gdb/testsuite/gdb.base/range-stepping.exp | 2 - gdb/testsuite/gdb.base/readline-ask.exp | 2 + gdb/testsuite/gdb.base/readline.exp | 57 +- gdb/testsuite/gdb.base/readnever.exp | 11 +- gdb/testsuite/gdb.base/realname-expand.exp | 7 +- gdb/testsuite/gdb.base/recurse.exp | 8 +- gdb/testsuite/gdb.base/relativedebug.exp | 5 +- gdb/testsuite/gdb.base/relocate.exp | 12 +- gdb/testsuite/gdb.base/remote.exp | 48 +- gdb/testsuite/gdb.base/reread-readsym.exp | 4 +- gdb/testsuite/gdb.base/reread.exp | 2 - gdb/testsuite/gdb.base/return-nodebug.exp | 4 +- gdb/testsuite/gdb.base/return.exp | 6 +- gdb/testsuite/gdb.base/return2.exp | 6 +- gdb/testsuite/gdb.base/rtld-step.exp | 8 +- gdb/testsuite/gdb.base/run-after-attach.exp | 4 +- .../run-control-while-bg-execution.exp | 5 +- gdb/testsuite/gdb.base/run.c | 2 +- gdb/testsuite/gdb.base/save-bp.exp | 18 +- gdb/testsuite/gdb.base/savedregs.exp | 5 +- .../gdb.base/scope-hw-watch-disable.c | 26 + .../gdb.base/scope-hw-watch-disable.exp | 40 + gdb/testsuite/gdb.base/scope0.c | 2 +- gdb/testsuite/gdb.base/sep.exp | 5 +- gdb/testsuite/gdb.base/sepdebug.exp | 8 +- gdb/testsuite/gdb.base/set-cwd.exp | 5 +- gdb/testsuite/gdb.base/setshow.exp | 37 +- gdb/testsuite/gdb.base/settings.exp | 28 +- .../gdb.base/share-env-with-gdbserver.exp | 5 +- gdb/testsuite/gdb.base/shell.exp | 36 + gdb/testsuite/gdb.base/shlib-call.exp | 11 +- gdb/testsuite/gdb.base/shmain.c | 2 +- gdb/testsuite/gdb.base/shreloc.exp | 4 +- gdb/testsuite/gdb.base/sigall.exp | 7 +- gdb/testsuite/gdb.base/sigaltstack.exp | 5 +- gdb/testsuite/gdb.base/sigbpt.exp | 5 +- gdb/testsuite/gdb.base/sigchld.exp | 5 +- gdb/testsuite/gdb.base/siginfo-addr.exp | 5 +- gdb/testsuite/gdb.base/siginfo-infcall.exp | 5 +- gdb/testsuite/gdb.base/siginfo-obj.exp | 10 +- gdb/testsuite/gdb.base/siginfo-thread.exp | 10 +- gdb/testsuite/gdb.base/siginfo.exp | 5 +- .../gdb.base/signals-state-child.exp | 27 +- gdb/testsuite/gdb.base/signals.exp | 9 +- .../gdb.base/signed-builtin-types.exp | 55 +- gdb/testsuite/gdb.base/signest.exp | 5 +- gdb/testsuite/gdb.base/signull.exp | 5 +- gdb/testsuite/gdb.base/sigrepeat.exp | 5 +- gdb/testsuite/gdb.base/sigstep.exp | 5 +- gdb/testsuite/gdb.base/sigwinch-notty.exp | 7 +- gdb/testsuite/gdb.base/skip-solib.exp | 13 +- gdb/testsuite/gdb.base/so-impl-ld.exp | 11 +- gdb/testsuite/gdb.base/solib-abort-lib.c | 23 + gdb/testsuite/gdb.base/solib-abort.c | 25 + gdb/testsuite/gdb.base/solib-abort.exp | 56 + gdb/testsuite/gdb.base/solib-corrupted.exp | 38 +- gdb/testsuite/gdb.base/solib-disc.exp | 10 +- gdb/testsuite/gdb.base/solib-display.exp | 8 +- gdb/testsuite/gdb.base/solib-nodir.exp | 12 +- gdb/testsuite/gdb.base/solib-overlap.exp | 8 +- gdb/testsuite/gdb.base/solib-search.exp | 6 +- gdb/testsuite/gdb.base/solib-symbol.exp | 13 +- gdb/testsuite/gdb.base/solib-vanish.exp | 4 +- gdb/testsuite/gdb.base/solib-weak.exp | 9 +- .../gdb.base/sss-bp-on-user-bp-2.exp | 5 +- gdb/testsuite/gdb.base/stap-probe.c | 2 +- gdb/testsuite/gdb.base/stap-probe.exp | 23 +- gdb/testsuite/gdb.base/start-cpp.exp | 5 +- gdb/testsuite/gdb.base/start.exp | 5 +- gdb/testsuite/gdb.base/startup-with-shell.exp | 10 +- gdb/testsuite/gdb.base/step-break.exp | 2 - .../gdb.base/step-indirect-call-thunk.exp | 4 +- gdb/testsuite/gdb.base/step-line.exp | 2 - gdb/testsuite/gdb.base/step-over-exit.exp | 2 +- .../gdb.base/step-over-no-symbols.exp | 6 +- gdb/testsuite/gdb.base/step-over-syscall.exp | 8 +- gdb/testsuite/gdb.base/step-test.exp | 2 - gdb/testsuite/gdb.base/structs.exp | 14 +- .../gdb.base/style-interp-exec-mi.exp | 5 +- gdb/testsuite/gdb.base/style-logging.exp | 15 +- gdb/testsuite/gdb.base/style.exp | 43 +- gdb/testsuite/gdb.base/subst.exp | 4 +- gdb/testsuite/gdb.base/sym-file.exp | 8 +- .../gdb.base/symtab-search-order.exp | 4 +- gdb/testsuite/gdb.base/testenv.exp | 4 +- gdb/testsuite/gdb.base/thread-bp-multi-loc.c | 44 + .../gdb.base/thread-bp-multi-loc.exp | 67 + gdb/testsuite/gdb.base/timestamp.exp | 2 +- gdb/testsuite/gdb.base/trace-commands.exp | 67 +- gdb/testsuite/gdb.base/twice.exp | 1 - gdb/testsuite/gdb.base/type-opaque.exp | 4 +- gdb/testsuite/gdb.base/ui-redirect.exp | 5 +- gdb/testsuite/gdb.base/unload.exp | 11 +- .../gdb.base/until-trailing-insns.exp | 5 +- gdb/testsuite/gdb.base/until.exp | 2 +- .../gdb.base/unwind-on-each-insn-amd64-2.exp | 59 + .../gdb.base/unwind-on-each-insn-amd64-2.s | 54 + .../gdb.base/unwind-on-each-insn-amd64.exp | 43 + .../gdb.base/unwind-on-each-insn-amd64.s | 263 + .../gdb.base/unwind-on-each-insn-foo.c | 8 +- .../gdb.base/unwind-on-each-insn-i386.exp | 43 + .../gdb.base/unwind-on-each-insn-i386.s | 262 + gdb/testsuite/gdb.base/unwind-on-each-insn.c | 6 +- .../gdb.base/unwind-on-each-insn.exp | 164 +- .../gdb.base/unwind-on-each-insn.exp.tcl | 159 + gdb/testsuite/gdb.base/unwindonsignal.exp | 19 +- gdb/testsuite/gdb.base/utf8-identifiers.exp | 6 + gdb/testsuite/gdb.base/valgrind-bt.exp | 7 +- gdb/testsuite/gdb.base/valgrind-disp-step.exp | 7 +- gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 7 +- gdb/testsuite/gdb.base/valgrind-infcall.exp | 7 +- gdb/testsuite/gdb.base/value-double-free.exp | 6 +- .../gdb.base/value-history-unavailable.c | 29 + .../gdb.base/value-history-unavailable.exp | 73 + gdb/testsuite/gdb.base/varargs.c | 2 +- gdb/testsuite/gdb.base/varargs.exp | 12 +- gdb/testsuite/gdb.base/vfork-follow-parent.c | 29 +- .../gdb.base/vfork-follow-parent.exp | 52 +- gdb/testsuite/gdb.base/vla-optimized-out.c | 2 +- gdb/testsuite/gdb.base/vla-optimized-out.exp | 1 + gdb/testsuite/gdb.base/vla-struct-fields.exp | 5 +- gdb/testsuite/gdb.base/warning.exp | 5 +- gdb/testsuite/gdb.base/watch-before-fork.exp | 4 +- gdb/testsuite/gdb.base/watch-bitfields.exp | 10 +- gdb/testsuite/gdb.base/watch-cond-infcall.exp | 11 +- gdb/testsuite/gdb.base/watch-cond.exp | 10 +- gdb/testsuite/gdb.base/watch-read.exp | 4 +- gdb/testsuite/gdb.base/watch-vfork.exp | 2 +- gdb/testsuite/gdb.base/watch_thread_num.exp | 4 +- .../gdb.base/watchpoint-hw-attach.exp | 8 +- .../gdb.base/watchpoint-hw-hit-once.exp | 4 +- gdb/testsuite/gdb.base/watchpoint-hw.exp | 9 +- .../gdb.base/watchpoint-reuse-slot.exp | 6 +- gdb/testsuite/gdb.base/watchpoint-solib.exp | 17 +- .../watchpoint-stops-at-right-insn.exp | 4 +- .../gdb.base/watchpoint-unaligned.exp | 7 +- gdb/testsuite/gdb.base/watchpoint.exp | 83 +- gdb/testsuite/gdb.base/watchpoints.exp | 6 +- gdb/testsuite/gdb.base/whatis-exp.exp | 1 - .../gdb.base/whatis-ptype-typedefs.exp | 2 +- gdb/testsuite/gdb.base/whatis.exp | 9 +- gdb/testsuite/gdb.base/with-mf.exp | 5 +- gdb/testsuite/gdb.base/with.exp | 17 +- gdb/testsuite/gdb.base/wrap-line.exp | 162 + .../gdb.base/wrong_frame_bt_full.exp | 4 +- gdb/testsuite/gdb.btrace/buffer-size.exp | 9 +- gdb/testsuite/gdb.btrace/data.exp | 5 +- gdb/testsuite/gdb.btrace/delta.exp | 5 +- gdb/testsuite/gdb.btrace/dlopen.exp | 10 +- .../gdb.btrace/enable-new-thread.exp | 5 +- gdb/testsuite/gdb.btrace/enable-running.exp | 5 +- gdb/testsuite/gdb.btrace/enable.exp | 12 +- gdb/testsuite/gdb.btrace/exception.exp | 5 +- .../gdb.btrace/function_call_history.exp | 7 +- gdb/testsuite/gdb.btrace/gcore.exp | 7 +- .../gdb.btrace/instruction_history.exp | 15 +- gdb/testsuite/gdb.btrace/multi-inferior.exp | 16 +- .../gdb.btrace/multi-thread-step.exp | 5 +- gdb/testsuite/gdb.btrace/nohist.exp | 5 +- gdb/testsuite/gdb.btrace/non-stop.exp | 5 +- gdb/testsuite/gdb.btrace/reconnect.exp | 14 +- gdb/testsuite/gdb.btrace/record_goto-step.exp | 5 +- gdb/testsuite/gdb.btrace/record_goto.exp | 13 +- gdb/testsuite/gdb.btrace/rn-dl-bind.exp | 5 +- gdb/testsuite/gdb.btrace/segv.exp | 5 +- gdb/testsuite/gdb.btrace/step.exp | 5 +- gdb/testsuite/gdb.btrace/stepi.exp | 5 +- gdb/testsuite/gdb.btrace/tailcall-only.exp | 5 +- gdb/testsuite/gdb.btrace/tailcall.exp | 5 +- gdb/testsuite/gdb.btrace/tsx.exp | 10 +- .../gdb.btrace/unknown_functions.exp | 5 +- gdb/testsuite/gdb.btrace/vdso.exp | 5 +- .../gdb.compile/compile-cplus-anonymous.exp | 7 +- .../gdb.compile/compile-cplus-array-decay.exp | 7 +- .../gdb.compile/compile-cplus-inherit.exp | 7 +- .../gdb.compile/compile-cplus-member.exp | 7 +- .../gdb.compile/compile-cplus-method.exp | 7 +- .../gdb.compile/compile-cplus-namespace.exp | 7 +- .../gdb.compile/compile-cplus-nested.exp | 7 +- .../gdb.compile/compile-cplus-print.exp | 2 + .../gdb.compile/compile-cplus-virtual.exp | 7 +- gdb/testsuite/gdb.compile/compile-cplus.exp | 22 +- gdb/testsuite/gdb.compile/compile-ifunc.exp | 6 +- gdb/testsuite/gdb.compile/compile-ops.exp | 6 +- gdb/testsuite/gdb.compile/compile-print.exp | 2 + gdb/testsuite/gdb.compile/compile-setjmp.exp | 2 + gdb/testsuite/gdb.compile/compile-tls.exp | 2 + gdb/testsuite/gdb.compile/compile.exp | 27 +- gdb/testsuite/gdb.cp/align.exp | 2 +- gdb/testsuite/gdb.cp/ambiguous.exp | 3 +- gdb/testsuite/gdb.cp/annota2.exp | 21 +- gdb/testsuite/gdb.cp/annota3.exp | 31 +- gdb/testsuite/gdb.cp/anon-ns.exp | 3 +- gdb/testsuite/gdb.cp/anon-union.exp | 2 +- gdb/testsuite/gdb.cp/arg-reference.exp | 2 +- gdb/testsuite/gdb.cp/array-indices.exp | 2 +- gdb/testsuite/gdb.cp/array-repeat.exp | 2 +- gdb/testsuite/gdb.cp/bool.exp | 2 +- gdb/testsuite/gdb.cp/break-f-std-string.exp | 2 +- gdb/testsuite/gdb.cp/breakpoint-locs.exp | 4 +- .../gdb.cp/breakpoint-shlib-func-lib.cc | 19 + gdb/testsuite/gdb.cp/breakpoint-shlib-func.cc | 22 + .../gdb.cp/breakpoint-shlib-func.exp | 85 + gdb/testsuite/gdb.cp/breakpoint.exp | 3 +- gdb/testsuite/gdb.cp/bs15503.exp | 34 +- gdb/testsuite/gdb.cp/call-c.exp | 2 +- gdb/testsuite/gdb.cp/call-method-register.exp | 2 +- gdb/testsuite/gdb.cp/casts.exp | 9 +- gdb/testsuite/gdb.cp/chained-calls.exp | 2 +- gdb/testsuite/gdb.cp/class2.exp | 2 +- gdb/testsuite/gdb.cp/classes.cc | 7 +- gdb/testsuite/gdb.cp/classes.exp | 9 +- gdb/testsuite/gdb.cp/cmpd-minsyms.exp | 2 +- gdb/testsuite/gdb.cp/cold-clone.cc | 2 +- gdb/testsuite/gdb.cp/cold-clone.exp | 9 +- gdb/testsuite/gdb.cp/constexpr-field.exp | 3 +- gdb/testsuite/gdb.cp/cp-relocate.exp | 14 +- .../gdb.cp/{pr9594.cc => cpcompletion.cc} | 23 + gdb/testsuite/gdb.cp/cpcompletion.exp | 14 +- gdb/testsuite/gdb.cp/cpexprs.cc | 2 +- gdb/testsuite/gdb.cp/cpexprs.exp.tcl | 4 +- gdb/testsuite/gdb.cp/cplabel.exp | 2 +- gdb/testsuite/gdb.cp/cplusfuncs.exp | 2 +- gdb/testsuite/gdb.cp/cpsizeof.exp | 2 +- gdb/testsuite/gdb.cp/ctti.exp | 19 +- gdb/testsuite/gdb.cp/debug-expr.exp | 2 +- gdb/testsuite/gdb.cp/demangle.exp | 2 +- gdb/testsuite/gdb.cp/derivation.exp | 2 +- gdb/testsuite/gdb.cp/disasm-func-name.exp | 2 +- gdb/testsuite/gdb.cp/dispcxx.exp | 2 +- gdb/testsuite/gdb.cp/empty-enum.cc | 31 + gdb/testsuite/gdb.cp/empty-enum.exp | 77 + gdb/testsuite/gdb.cp/ena-dis-br-range.exp | 2 +- gdb/testsuite/gdb.cp/enum-class.exp | 2 +- .../gdb.cp/except-multi-location.exp | 4 +- gdb/testsuite/gdb.cp/exception.exp | 53 +- gdb/testsuite/gdb.cp/exceptprint.exp | 4 +- gdb/testsuite/gdb.cp/expand-sals.exp | 2 +- gdb/testsuite/gdb.cp/extern-c.exp | 2 +- gdb/testsuite/gdb.cp/filename.exp | 4 +- gdb/testsuite/gdb.cp/formatted-ref.exp | 2 +- gdb/testsuite/gdb.cp/gdb1355.exp | 2 +- gdb/testsuite/gdb.cp/gdb2384.exp | 5 +- gdb/testsuite/gdb.cp/gdb2495.exp | 19 +- gdb/testsuite/gdb.cp/hang.exp | 4 +- gdb/testsuite/gdb.cp/impl-this.exp | 2 +- .../gdb.cp/incomplete-type-overload.exp | 6 +- gdb/testsuite/gdb.cp/infcall-dlopen.exp | 4 +- .../gdb.cp/infcall-nodebug-c++-d0.exp | 4 +- .../gdb.cp/infcall-nodebug-c++-d1.exp | 4 +- gdb/testsuite/gdb.cp/inherit.exp | 2 +- gdb/testsuite/gdb.cp/iostream.exp | 2 +- gdb/testsuite/gdb.cp/koenig.exp | 9 +- gdb/testsuite/gdb.cp/local-static.exp | 2 +- gdb/testsuite/gdb.cp/local.exp | 2 +- gdb/testsuite/gdb.cp/m-data.exp | 3 +- gdb/testsuite/gdb.cp/m-static.exp | 12 +- gdb/testsuite/gdb.cp/main-cp.exp | 29 + gdb/testsuite/gdb.cp/main.cc | 22 + gdb/testsuite/gdb.cp/maint.exp | 9 +- gdb/testsuite/gdb.cp/many-args.exp | 2 +- gdb/testsuite/gdb.cp/mb-ctor.exp | 2 +- gdb/testsuite/gdb.cp/mb-inline.exp | 3 +- gdb/testsuite/gdb.cp/mb-templates.exp | 2 +- gdb/testsuite/gdb.cp/member-name.exp | 2 +- gdb/testsuite/gdb.cp/member-ptr.exp | 2 +- gdb/testsuite/gdb.cp/meth-typedefs.exp | 3 +- gdb/testsuite/gdb.cp/method-call-in-c.exp | 6 +- gdb/testsuite/gdb.cp/method.exp | 2 +- gdb/testsuite/gdb.cp/method2.exp | 2 +- gdb/testsuite/gdb.cp/minsym-fallback.exp | 3 + gdb/testsuite/gdb.cp/misc.exp | 2 +- gdb/testsuite/gdb.cp/namelessclass.exp | 12 +- gdb/testsuite/gdb.cp/namespace.exp | 8 +- .../gdb.cp/nested-class-func-class.exp | 2 +- gdb/testsuite/gdb.cp/nested-types.exp | 2 +- gdb/testsuite/gdb.cp/nextoverthrow.exp | 2 +- gdb/testsuite/gdb.cp/no-libstdcxx-probe.exp | 13 +- gdb/testsuite/gdb.cp/non-trivial-retval.exp | 2 +- gdb/testsuite/gdb.cp/nsalias.exp | 8 +- gdb/testsuite/gdb.cp/nsusing.cc | 3 +- gdb/testsuite/gdb.cp/nsusing.exp | 37 +- gdb/testsuite/gdb.cp/oranking.cc | 6 +- gdb/testsuite/gdb.cp/overload-const.exp | 2 +- gdb/testsuite/gdb.cp/overload.exp | 2 +- gdb/testsuite/gdb.cp/ovldbreak.exp | 16 +- gdb/testsuite/gdb.cp/ovsrch.exp | 5 +- gdb/testsuite/gdb.cp/paramless.exp | 9 +- gdb/testsuite/gdb.cp/pass-by-ref-2.exp | 5 +- gdb/testsuite/gdb.cp/pass-by-ref.exp | 5 +- gdb/testsuite/gdb.cp/pointer-to-member.exp | 2 +- gdb/testsuite/gdb.cp/pr-1023.exp | 3 +- gdb/testsuite/gdb.cp/pr-1210.exp | 3 +- gdb/testsuite/gdb.cp/pr-574.exp | 3 +- gdb/testsuite/gdb.cp/pr10728.exp | 7 +- gdb/testsuite/gdb.cp/pr17132.exp | 2 +- gdb/testsuite/gdb.cp/pr17494.exp | 2 +- gdb/testsuite/gdb.cp/pr9067.exp | 4 +- gdb/testsuite/gdb.cp/pr9631.exp | 2 +- gdb/testsuite/gdb.cp/print-demangle.exp | 2 +- gdb/testsuite/gdb.cp/print-global-stub.cc | 31 + gdb/testsuite/gdb.cp/print-global-stub.exp | 32 + gdb/testsuite/gdb.cp/print-method-args.exp | 2 +- gdb/testsuite/gdb.cp/printmethod.exp | 3 +- gdb/testsuite/gdb.cp/psmang.exp | 2 +- gdb/testsuite/gdb.cp/psymtab-parameter.exp | 2 +- gdb/testsuite/gdb.cp/ptype-cv-cp.exp | 2 +- gdb/testsuite/gdb.cp/ptype-flags.exp | 2 +- gdb/testsuite/gdb.cp/punctuator.exp | 3 +- gdb/testsuite/gdb.cp/re-set-overloaded.exp | 3 +- gdb/testsuite/gdb.cp/ref-params.exp | 4 +- gdb/testsuite/gdb.cp/ref-types.exp | 2 +- gdb/testsuite/gdb.cp/rtti.exp | 5 +- gdb/testsuite/gdb.cp/rvalue-ref-casts.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-overload.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-params.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp | 2 +- gdb/testsuite/gdb.cp/rvalue-ref-types.exp | 2 +- gdb/testsuite/gdb.cp/scope-err.exp | 4 +- gdb/testsuite/gdb.cp/static-method.exp | 3 +- gdb/testsuite/gdb.cp/static-print-quit.exp | 2 +- gdb/testsuite/gdb.cp/static-typedef-print.exp | 2 +- gdb/testsuite/gdb.cp/step-and-next-inline.exp | 11 +- gdb/testsuite/gdb.cp/stub-array-size.exp | 4 +- gdb/testsuite/gdb.cp/subtypes.exp | 68 +- gdb/testsuite/gdb.cp/temargs.exp | 4 +- gdb/testsuite/gdb.cp/templates.exp | 4 +- gdb/testsuite/gdb.cp/try_catch.exp | 3 +- gdb/testsuite/gdb.cp/typed-enum.exp | 9 +- gdb/testsuite/gdb.cp/typedef-base.exp | 2 +- gdb/testsuite/gdb.cp/typedef-operator.exp | 2 +- gdb/testsuite/gdb.cp/typeid.exp | 4 +- gdb/testsuite/gdb.cp/userdef.exp | 23 +- gdb/testsuite/gdb.cp/var-tag.exp | 2 +- gdb/testsuite/gdb.cp/virtbase.exp | 2 +- gdb/testsuite/gdb.cp/virtbase2.exp | 2 +- gdb/testsuite/gdb.cp/virtfunc.exp | 25 +- gdb/testsuite/gdb.cp/virtfunc2.exp | 4 +- gdb/testsuite/gdb.cp/watch-cp.exp | 2 +- gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp | 12 +- gdb/testsuite/gdb.ctf/dwarf2-and-ctf-2.c | 24 + gdb/testsuite/gdb.ctf/dwarf2-and-ctf.c | 26 + gdb/testsuite/gdb.ctf/dwarf2-and-ctf.exp | 54 + gdb/testsuite/gdb.ctf/funcreturn.exp | 12 +- gdb/testsuite/gdb.ctf/multi.exp | 12 +- gdb/testsuite/gdb.dap/ada-arrays.exp | 123 + gdb/testsuite/gdb.dap/ada-arrays/cstuff.c | 22 + gdb/testsuite/gdb.dap/ada-arrays/main.adb | 24 + gdb/testsuite/gdb.dap/ada-arrays/pck.adb | 21 + gdb/testsuite/gdb.dap/ada-arrays/pck.ads | 51 + gdb/testsuite/gdb.dap/ada-nested.exp | 95 + gdb/testsuite/gdb.dap/ada-nested/prog.adb | 32 + gdb/testsuite/gdb.dap/ada-scopes.exp | 84 + gdb/testsuite/gdb.dap/ada-scopes/pack.adb | 23 + gdb/testsuite/gdb.dap/ada-scopes/pack.ads | 21 + gdb/testsuite/gdb.dap/ada-scopes/prog.adb | 26 + gdb/testsuite/gdb.dap/args-env.c | 28 + gdb/testsuite/gdb.dap/args-env.exp | 90 + gdb/testsuite/gdb.dap/assign.c | 35 + gdb/testsuite/gdb.dap/assign.exp | 122 + gdb/testsuite/gdb.dap/assign.py | 54 + gdb/testsuite/gdb.dap/attach.c | 25 + gdb/testsuite/gdb.dap/attach.exp | 36 + gdb/testsuite/gdb.dap/basic-dap.c | 52 + gdb/testsuite/gdb.dap/basic-dap.exp | 215 + gdb/testsuite/gdb.dap/bt-inner.c | 24 + gdb/testsuite/gdb.dap/bt-main.c | 29 + gdb/testsuite/gdb.dap/bt-nodebug.exp | 76 + gdb/testsuite/gdb.dap/catch-exception.exp | 76 + gdb/testsuite/gdb.dap/catch-exception/pck.ads | 18 + .../gdb.dap/catch-exception/prog.adb | 44 + gdb/testsuite/gdb.dap/children.exp | 118 + gdb/testsuite/gdb.dap/children.py | 41 + gdb/testsuite/gdb.dap/cond-bp.c | 26 + gdb/testsuite/gdb.dap/cond-bp.exp | 84 + gdb/testsuite/gdb.dap/cwd.exp | 40 + gdb/testsuite/gdb.dap/cxx-exception.cc | 44 + gdb/testsuite/gdb.dap/cxx-exception.exp | 58 + gdb/testsuite/gdb.dap/frameless.c | 24 + gdb/testsuite/gdb.dap/frameless.exp | 62 + gdb/testsuite/gdb.dap/hover.c | 30 + gdb/testsuite/gdb.dap/hover.exp | 80 + gdb/testsuite/gdb.dap/lazy-string.c | 23 + gdb/testsuite/gdb.dap/lazy-string.exp | 80 + gdb/testsuite/gdb.dap/lazy-string.py | 37 + gdb/testsuite/gdb.dap/log-message.c | 31 + gdb/testsuite/gdb.dap/log-message.exp | 51 + gdb/testsuite/gdb.dap/memory.c | 27 + gdb/testsuite/gdb.dap/memory.exp | 89 + gdb/testsuite/gdb.dap/modules-solib.c | 21 + gdb/testsuite/gdb.dap/modules.c | 43 + gdb/testsuite/gdb.dap/modules.exp | 92 + gdb/testsuite/gdb.dap/pause.c | 44 + gdb/testsuite/gdb.dap/pause.exp | 76 + gdb/testsuite/gdb.dap/ptrref.cc | 46 + gdb/testsuite/gdb.dap/ptrref.exp | 110 + gdb/testsuite/gdb.dap/remote-dap.exp | 49 + gdb/testsuite/gdb.dap/rust-slices.exp | 119 + gdb/testsuite/gdb.dap/rust-slices.rs | 29 + .../testsuite/gdb.dap/scopes.c | 31 +- gdb/testsuite/gdb.dap/scopes.exp | 151 + gdb/testsuite/gdb.dap/sources.c | 22 + gdb/testsuite/gdb.dap/sources.exp | 53 + gdb/testsuite/gdb.dap/stack-format.c | 41 + gdb/testsuite/gdb.dap/stack-format.exp | 133 + gdb/testsuite/gdb.dap/stack-format.py | 64 + gdb/testsuite/gdb.dap/stop-at-main.exp | 37 + .../testsuite/gdb.dap/terminate.exp | 38 +- gdb/testsuite/gdb.dap/type_check.exp | 36 + gdb/testsuite/gdb.dap/type_check.py | 98 + .../build-id-no-debug-warning.c | 20 + .../build-id-no-debug-warning.exp | 165 + gdb/testsuite/gdb.debuginfod/crc_mismatch-2.c | 22 + gdb/testsuite/gdb.debuginfod/crc_mismatch.c | 20 + gdb/testsuite/gdb.debuginfod/crc_mismatch.exp | 135 + .../gdb.debuginfod/fetch_src_and_symbols.exp | 32 +- gdb/testsuite/gdb.disasm/am33.exp | 12 +- gdb/testsuite/gdb.disasm/h8300s.exp | 9 +- gdb/testsuite/gdb.disasm/hppa.exp | 14 +- gdb/testsuite/gdb.disasm/mn10300.exp | 12 +- gdb/testsuite/gdb.disasm/sh3.exp | 10 +- gdb/testsuite/gdb.disasm/t01_mov.exp | 5 +- gdb/testsuite/gdb.disasm/t02_mova.exp | 5 +- gdb/testsuite/gdb.disasm/t03_add.exp | 5 +- gdb/testsuite/gdb.disasm/t04_sub.exp | 5 +- gdb/testsuite/gdb.disasm/t05_cmp.exp | 5 +- gdb/testsuite/gdb.disasm/t06_ari2.exp | 5 +- gdb/testsuite/gdb.disasm/t07_ari3.exp | 5 +- gdb/testsuite/gdb.disasm/t08_or.exp | 5 +- gdb/testsuite/gdb.disasm/t09_xor.exp | 5 +- gdb/testsuite/gdb.disasm/t10_and.exp | 5 +- gdb/testsuite/gdb.disasm/t11_logs.exp | 5 +- gdb/testsuite/gdb.disasm/t12_bit.exp | 5 +- gdb/testsuite/gdb.disasm/t13_otr.exp | 5 +- gdb/testsuite/gdb.dlang/circular.exp | 7 +- gdb/testsuite/gdb.dlang/debug-expr.exp | 2 +- gdb/testsuite/gdb.dlang/demangle.exp | 7 +- gdb/testsuite/gdb.dlang/dlang-start-2.exp | 88 + gdb/testsuite/gdb.dlang/dlang-start.exp | 6 +- gdb/testsuite/gdb.dlang/dmain.c | 31 + gdb/testsuite/gdb.dlang/expression.exp | 7 +- gdb/testsuite/gdb.dlang/primitive-types.exp | 7 +- gdb/testsuite/gdb.dlang/properties.exp | 7 +- gdb/testsuite/gdb.dlang/watch-loc.exp | 7 +- .../DW_OP_piece_with_DW_OP_GNU_uninit.exp | 94 + gdb/testsuite/gdb.dwarf2/ada-cold-name.exp | 4 +- gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp | 4 +- .../gdb.dwarf2/ada-thick-pointer.exp | 4 +- .../gdb.dwarf2/ada-valprint-error.exp | 4 +- gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp | 2 +- gdb/testsuite/gdb.dwarf2/arr-stride.exp | 4 +- gdb/testsuite/gdb.dwarf2/arr-subrange.exp | 4 +- gdb/testsuite/gdb.dwarf2/atomic-type.exp | 4 +- gdb/testsuite/gdb.dwarf2/bad-regnum.exp | 4 +- .../bitfield-parent-optimized-out.exp | 4 +- gdb/testsuite/gdb.dwarf2/callframecfa.exp | 7 +- .../gdb.dwarf2/calling-convention.exp | 4 +- gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp | 4 +- .../gdb.dwarf2/clang-debug-names-2.exp | 4 +- .../gdb.dwarf2/clang-debug-names.exp | 4 +- gdb/testsuite/gdb.dwarf2/clztest.exp | 8 +- gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp | 4 +- gdb/testsuite/gdb.dwarf2/corrupt.exp | 4 +- gdb/testsuite/gdb.dwarf2/count.exp | 4 +- gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp | 4 +- gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp | 4 +- gdb/testsuite/gdb.dwarf2/data-loc.exp | 4 +- ...debug-aranges-duplicate-offset-warning.exp | 5 +- .../gdb.dwarf2/debug-names-bad-cu-index.exp | 4 +- .../gdb.dwarf2/debug-names-duplicate-cu.exp | 4 +- .../gdb.dwarf2/debug-names-missing-cu.exp | 4 +- .../debug-names-non-ascending-cu.exp | 4 +- gdb/testsuite/gdb.dwarf2/debug-names.exp | 4 +- gdb/testsuite/gdb.dwarf2/dup-psym.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp | 24 +- gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-align.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp | 10 +- .../gdb.dwarf2/dw2-anonymous-func.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp | 4 +- .../gdb.dwarf2/dw2-bad-mips-linkage-name.exp | 4 +- .../gdb.dwarf2/dw2-bad-parameter-type.exp | 4 +- .../gdb.dwarf2/dw2-bad-unresolved.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-basic.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-bfloat16.c | 26 + gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp | 27 +- .../gdb.dwarf2/dw2-canonicalize-type.exp | 4 +- .../gdb.dwarf2/dw2-case-insensitive.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-common-block.exp | 12 +- .../gdb.dwarf2/dw2-compdir-oldgcc.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-compressed.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-const.exp | 4 +- .../gdb.dwarf2/dw2-cp-infcall-ref-static.exp | 6 +- gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp | 4 +- .../gdb.dwarf2/dw2-dir-file-name.exp | 10 +- .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp | 4 +- .../gdb.dwarf2/dw2-double-set-die-type.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp | 8 +- .../gdb.dwarf2/dw2-empty-file-name.exp | 8 +- .../gdb.dwarf2/dw2-empty-namespace.exp | 4 +- .../gdb.dwarf2/dw2-empty-pc-range.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-error.exp | 19 +- gdb/testsuite/gdb.dwarf2/dw2-filename.exp | 6 +- gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-icycle.exp | 4 +- .../gdb.dwarf2/dw2-ifort-parameter.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp | 8 +- .../gdb.dwarf2/dw2-inline-header-1.exp | 8 +- .../gdb.dwarf2/dw2-inline-header-2.exp | 8 +- .../gdb.dwarf2/dw2-inline-header-3.exp | 8 +- .../gdb.dwarf2/dw2-inline-many-frames.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp | 4 +- .../gdb.dwarf2/dw2-inline-small-func.exp | 8 +- .../gdb.dwarf2/dw2-inline-stepping.exp | 8 +- .../dw2-inline-with-lexical-scope.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-intercu.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-intermix.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 8 +- .../gdb.dwarf2/dw2-lexical-block-bare.exp | 4 +- .../gdb.dwarf2/dw2-line-number-zero.exp | 10 +- gdb/testsuite/gdb.dwarf2/dw2-lines.exp | 2 +- .../gdb.dwarf2/dw2-linkage-name-trust.exp | 6 +- .../gdb.dwarf2/dw2-main-no-line-number.exp | 10 +- gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp | 4 +- .../gdb.dwarf2/dw2-missing-cu-tag.exp | 8 +- .../gdb.dwarf2/dw2-modula2-self-type.exp | 4 +- .../dw2-namespaceless-anonymous.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-noloc.exp | 4 +- .../gdb.dwarf2/dw2-objfile-overlap.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-op-call.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp | 8 +- .../gdb.dwarf2/dw2-op-stack-value.exp | 4 +- .../gdb.dwarf2/dw2-opt-structptr.exp | 15 +- .../dw2-out-of-range-end-of-seq.exp | 14 +- gdb/testsuite/gdb.dwarf2/dw2-param-error.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-producer.exp | 4 +- .../gdb.dwarf2/dw2-prologue-end-2.exp | 16 +- gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 16 +- gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 10 +- .../gdb.dwarf2/dw2-ranges-overlap.exp | 10 +- .../gdb.dwarf2/dw2-ranges-psym-warning.exp | 5 +- gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp | 10 +- gdb/testsuite/gdb.dwarf2/dw2-ranges.exp | 10 +- .../gdb.dwarf2/dw2-ref-missing-frame.exp | 22 +- .../gdb.dwarf2/dw2-reg-undefined.exp | 8 +- .../gdb.dwarf2/dw2-regno-invalid.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw2-restrict.exp | 8 +- .../gdb.dwarf2/dw2-simple-locdesc.exp | 4 +- .../dw2-single-line-discriminators.exp | 8 +- .../gdb.dwarf2/dw2-skip-prologue.exp | 4 +- .../gdb.dwarf2/dw2-stack-boundary.exp | 19 +- .../dw2-step-out-of-function-no-stmt.exp | 10 +- gdb/testsuite/gdb.dwarf2/dw2-strp.exp | 4 +- .../gdb.dwarf2/dw2-symtab-includes-lookup.exp | 2 +- .../gdb.dwarf2/dw2-symtab-includes.exp | 4 +- .../gdb.dwarf2/dw2-undefined-ret-addr.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp | 4 +- .../gdb.dwarf2/dw2-unspecified-type.exp | 4 +- .../gdb.dwarf2/dw2-unusual-field-names.exp | 4 +- .../gdb.dwarf2/dw2-using-debug-str.exp | 14 +- .../gdb.dwarf2/dw2-var-zero-addr.exp | 4 +- .../gdb.dwarf2/dw2-vendor-extended-opcode.exp | 10 +- .../gdb.dwarf2/dw2-weird-type-len.exp | 8 +- gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp | 12 +- .../gdb.dwarf2/dw4-sig-type-unused.exp | 4 +- gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp | 2 + gdb/testsuite/gdb.dwarf2/dwp-symlink.exp | 4 +- gdb/testsuite/gdb.dwarf2/dwz.exp | 4 +- gdb/testsuite/gdb.dwarf2/dwzbuildid.exp | 90 +- gdb/testsuite/gdb.dwarf2/dwznolink.exp | 13 +- .../gdb.dwarf2/dyn-type-unallocated.c | 2 +- .../gdb.dwarf2/dyn-type-unallocated.exp | 43 +- gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp | 4 +- .../gdb.dwarf2/enqueued-cu-base-addr.exp | 16 +- gdb/testsuite/gdb.dwarf2/enum-type.exp | 4 +- .../gdb.dwarf2/fission-absolute-dwo.exp | 4 +- gdb/testsuite/gdb.dwarf2/fission-base.exp | 12 +- .../gdb.dwarf2/fission-loclists-pie.exp | 12 +- gdb/testsuite/gdb.dwarf2/fission-loclists.exp | 12 +- gdb/testsuite/gdb.dwarf2/fission-mix.exp | 6 +- gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp | 8 +- .../gdb.dwarf2/fission-relative-dwo.exp | 4 +- gdb/testsuite/gdb.dwarf2/fission-reread.exp | 8 +- gdb/testsuite/gdb.dwarf2/formdata16.exp | 4 +- .../gdb.dwarf2/fortran-var-string.exp | 4 +- gdb/testsuite/gdb.dwarf2/forward-spec.exp | 8 +- .../frame-inlined-in-outer-frame.exp | 6 +- .../gdb.dwarf2/gdb-add-index-symlink.exp | 12 +- gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 9 +- gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp | 8 +- .../gdb.dwarf2/gdb-index-nodebug.exp | 2 +- .../gdb.dwarf2/gdb-index-types-dwarf5.exp | 5 +- gdb/testsuite/gdb.dwarf2/gdb-index.exp | 40 +- gdb/testsuite/gdb.dwarf2/implptr-64bit.exp | 4 +- .../gdb.dwarf2/implptr-optimized-out.exp | 4 +- gdb/testsuite/gdb.dwarf2/implptr.exp | 12 +- gdb/testsuite/gdb.dwarf2/implptrconst.exp | 6 +- gdb/testsuite/gdb.dwarf2/implptrpiece.exp | 6 +- gdb/testsuite/gdb.dwarf2/implref-array.exp | 8 +- gdb/testsuite/gdb.dwarf2/implref-const.exp | 8 +- gdb/testsuite/gdb.dwarf2/implref-global.exp | 8 +- gdb/testsuite/gdb.dwarf2/implref-struct.exp | 8 +- .../imported-unit-abstract-const-value.exp | 4 +- .../gdb.dwarf2/imported-unit-bp.exp.tcl | 5 + gdb/testsuite/gdb.dwarf2/imported-unit-c.exp | 4 +- .../gdb.dwarf2/imported-unit-runto-main.exp | 9 +- gdb/testsuite/gdb.dwarf2/imported-unit.exp | 10 +- .../gdb.dwarf2/info-locals-optimized-out.exp | 4 +- .../inlined_subroutine-inheritance.exp | 4 +- gdb/testsuite/gdb.dwarf2/intbits.exp | 6 +- gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp | 4 +- .../locexpr-data-member-location.exp | 9 +- .../gdb.dwarf2/loclists-multiple-cus.exp | 4 +- .../gdb.dwarf2/loclists-sec-offset.exp | 4 +- .../gdb.dwarf2/loclists-start-end.exp | 4 +- gdb/testsuite/gdb.dwarf2/mac-fileno.exp | 4 +- .../gdb.dwarf2/macro-source-path.exp | 4 +- gdb/testsuite/gdb.dwarf2/main-subprogram.exp | 9 +- gdb/testsuite/gdb.dwarf2/mega-enum.exp | 67 + .../gdb.dwarf2/member-ptr-forwardref.exp | 10 +- gdb/testsuite/gdb.dwarf2/method-ptr.exp | 6 +- gdb/testsuite/gdb.dwarf2/missing-line-table.c | 32 + .../gdb.dwarf2/missing-line-table.exp | 122 + gdb/testsuite/gdb.dwarf2/missing-sig-type.exp | 6 +- .../missing-type-name-for-templates.exp | 4 +- .../gdb.dwarf2/missing-type-name.exp | 4 +- gdb/testsuite/gdb.dwarf2/multidictionary.exp | 4 +- .../negative-data-member-location.exp | 4 +- gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp | 8 +- gdb/testsuite/gdb.dwarf2/nonvar-access.exp | 2 +- gdb/testsuite/gdb.dwarf2/nostaticblock.exp | 6 +- gdb/testsuite/gdb.dwarf2/nullptr_t.exp | 11 +- .../gdb.dwarf2/opaque-type-lookup.exp | 4 +- .../gdb.dwarf2/opt-out-not-implptr.exp | 114 + gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 11 +- .../gdb.dwarf2/pieces-optimized-out.exp | 13 +- gdb/testsuite/gdb.dwarf2/pieces.exp | 7 +- gdb/testsuite/gdb.dwarf2/pr11465.exp | 4 +- gdb/testsuite/gdb.dwarf2/pr13961.exp | 14 +- .../gdb.dwarf2/rnglists-multiple-cus.exp | 4 +- .../gdb.dwarf2/rnglists-sec-offset.exp | 4 +- gdb/testsuite/gdb.dwarf2/self-spec.exp | 66 + gdb/testsuite/gdb.dwarf2/shortpiece.exp | 56 +- .../gdb.dwarf2/static-optimized-out.exp | 67 + gdb/testsuite/gdb.dwarf2/staticvirtual.exp | 6 +- gdb/testsuite/gdb.dwarf2/struct-decl.exp | 4 +- .../gdb.dwarf2/struct-with-sig-2.exp | 128 + gdb/testsuite/gdb.dwarf2/struct-with-sig.exp | 4 +- gdb/testsuite/gdb.dwarf2/subrange-enum.exp | 4 +- gdb/testsuite/gdb.dwarf2/subrange.exp | 53 +- .../gdb.dwarf2/symbol_needs_eval_fail.exp | 16 +- .../gdb.dwarf2/symbol_needs_eval_timeout.exp | 16 +- gdb/testsuite/gdb.dwarf2/symtab-producer.exp | 10 +- .../template-specification-full-name.exp | 4 +- gdb/testsuite/gdb.dwarf2/trace-crash.exp | 8 +- gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S | 8 +- gdb/testsuite/gdb.dwarf2/typeddwarf.S | 8 +- gdb/testsuite/gdb.dwarf2/typeddwarf.exp | 12 +- .../gdb.dwarf2/typedef-void-finish.exp | 10 +- gdb/testsuite/gdb.dwarf2/utf-rust.exp | 4 +- gdb/testsuite/gdb.dwarf2/valop.exp | 7 +- gdb/testsuite/gdb.dwarf2/var-access.exp | 4 +- gdb/testsuite/gdb.dwarf2/variant.exp | 4 +- gdb/testsuite/gdb.dwarf2/varval.exp | 4 +- gdb/testsuite/gdb.dwarf2/void-type.exp | 4 +- gdb/testsuite/gdb.dwarf2/watch-notconst.exp | 8 +- gdb/testsuite/gdb.fortran/allocated.exp | 2 +- .../gdb.fortran/array-bounds-high.exp | 2 +- gdb/testsuite/gdb.fortran/array-bounds.exp | 2 +- gdb/testsuite/gdb.fortran/array-element.exp | 2 +- gdb/testsuite/gdb.fortran/array-indices.exp | 2 +- gdb/testsuite/gdb.fortran/array-no-bounds.exp | 2 +- gdb/testsuite/gdb.fortran/array-repeat.exp | 2 +- .../gdb.fortran/array-slices-bad.exp | 15 +- .../gdb.fortran/array-slices-sub-slices.exp | 2 +- gdb/testsuite/gdb.fortran/array-slices.exp | 8 +- gdb/testsuite/gdb.fortran/associated.exp | 2 +- gdb/testsuite/gdb.fortran/assumedrank.exp | 2 +- gdb/testsuite/gdb.fortran/backtrace.exp | 38 + gdb/testsuite/gdb.fortran/backtrace.f90 | 32 + gdb/testsuite/gdb.fortran/block-data.exp | 2 +- gdb/testsuite/gdb.fortran/call-no-debug.exp | 2 +- gdb/testsuite/gdb.fortran/charset.exp | 2 +- .../gdb.fortran/class-allocatable-array.exp | 2 +- gdb/testsuite/gdb.fortran/common-block.exp | 4 +- gdb/testsuite/gdb.fortran/completion.exp | 2 +- gdb/testsuite/gdb.fortran/complex.exp | 2 +- gdb/testsuite/gdb.fortran/debug-expr.exp | 7 +- .../gdb.fortran/derived-type-function.exp | 2 +- .../gdb.fortran/derived-type-striding.exp | 2 +- gdb/testsuite/gdb.fortran/derived-type.exp | 2 +- gdb/testsuite/gdb.fortran/dot-ops.exp | 2 +- .../gdb.fortran/dynamic-ptype-whatis.exp | 2 +- gdb/testsuite/gdb.fortran/empty-string.exp | 2 +- gdb/testsuite/gdb.fortran/exprs.exp | 8 +- gdb/testsuite/gdb.fortran/function-calls.exp | 6 +- gdb/testsuite/gdb.fortran/huge.F90 | 21 + gdb/testsuite/gdb.fortran/huge.exp | 95 + gdb/testsuite/gdb.fortran/info-main.exp | 42 + gdb/testsuite/gdb.fortran/info-main.f90 | 19 + gdb/testsuite/gdb.fortran/info-modules.exp | 2 +- gdb/testsuite/gdb.fortran/info-types.exp | 19 +- .../gdb.fortran/intrinsic-precedence.c | 18 + .../gdb.fortran/intrinsic-precedence.exp | 74 + .../gdb.fortran/intrinsic-precedence.f90 | 33 + gdb/testsuite/gdb.fortran/intrinsics.exp | 2 +- gdb/testsuite/gdb.fortran/lbound-ubound.F90 | 22 - gdb/testsuite/gdb.fortran/lbound-ubound.exp | 68 +- .../gdb.fortran/library-module-lib.f90 | 2 +- .../gdb.fortran/library-module-main.f90 | 2 +- gdb/testsuite/gdb.fortran/library-module.exp | 2 +- gdb/testsuite/gdb.fortran/limited-length.exp | 220 + gdb/testsuite/gdb.fortran/limited-length.f90 | 39 + gdb/testsuite/gdb.fortran/logical.exp | 2 +- gdb/testsuite/gdb.fortran/max-depth.exp | 2 +- .../gdb.fortran/mixed-lang-stack.exp | 25 +- gdb/testsuite/gdb.fortran/module.exp | 2 +- gdb/testsuite/gdb.fortran/module.f90 | 11 +- gdb/testsuite/gdb.fortran/multi-dim.exp | 2 +- gdb/testsuite/gdb.fortran/namelist.exp | 2 +- gdb/testsuite/gdb.fortran/nested-funcs-2.exp | 2 +- gdb/testsuite/gdb.fortran/nested-funcs.exp | 2 +- gdb/testsuite/gdb.fortran/oop_extend_type.exp | 4 +- .../gdb.fortran/pointer-to-pointer.exp | 2 +- gdb/testsuite/gdb.fortran/print-formatted.exp | 4 +- gdb/testsuite/gdb.fortran/print_type.exp | 2 +- gdb/testsuite/gdb.fortran/printing-types.exp | 2 +- gdb/testsuite/gdb.fortran/ptr-indentation.exp | 2 +- .../gdb.fortran/ptype-on-functions.exp | 2 +- gdb/testsuite/gdb.fortran/rank.exp | 2 +- gdb/testsuite/gdb.fortran/shape.exp | 2 +- .../short-circuit-argument-list.exp | 2 +- gdb/testsuite/gdb.fortran/size.exp | 2 +- gdb/testsuite/gdb.fortran/string-types.exp | 2 +- gdb/testsuite/gdb.fortran/subarray.exp | 2 +- gdb/testsuite/gdb.fortran/type-kinds.exp | 2 +- gdb/testsuite/gdb.fortran/types.exp | 9 +- gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp | 2 +- gdb/testsuite/gdb.fortran/vla-datatypes.exp | 2 +- gdb/testsuite/gdb.fortran/vla-history.exp | 2 +- gdb/testsuite/gdb.fortran/vla-ptr-info.exp | 2 +- gdb/testsuite/gdb.fortran/vla-ptype-sub.exp | 2 +- gdb/testsuite/gdb.fortran/vla-ptype.exp | 2 +- gdb/testsuite/gdb.fortran/vla-sizeof.exp | 2 +- gdb/testsuite/gdb.fortran/vla-type.exp | 13 +- .../gdb.fortran/vla-value-sub-arbitrary.exp | 2 +- .../gdb.fortran/vla-value-sub-finish.exp | 2 +- gdb/testsuite/gdb.fortran/vla-value-sub.exp | 2 +- gdb/testsuite/gdb.fortran/vla-value.exp | 2 +- gdb/testsuite/gdb.fortran/whatis_type.exp | 2 +- gdb/testsuite/gdb.gdb/python-helper.exp | 125 +- gdb/testsuite/gdb.gdb/selftest.exp | 26 +- gdb/testsuite/gdb.gdb/unittest.exp | 82 +- gdb/testsuite/gdb.go/basic-types.exp | 8 +- gdb/testsuite/gdb.go/chan.exp | 3 +- .../gdb.go/global-local-var-shadow.exp | 3 +- gdb/testsuite/gdb.go/handcall.exp | 3 +- gdb/testsuite/gdb.go/hello.exp | 3 +- gdb/testsuite/gdb.go/integers.exp | 3 +- gdb/testsuite/gdb.go/max-depth.exp | 3 +- gdb/testsuite/gdb.go/methods.exp | 3 +- gdb/testsuite/gdb.go/no-package.exp | 31 + gdb/testsuite/gdb.go/package.exp | 3 +- gdb/testsuite/gdb.go/print.exp | 8 +- gdb/testsuite/gdb.go/strings.exp | 3 +- gdb/testsuite/gdb.go/types.exp | 3 +- gdb/testsuite/gdb.go/unsafe.exp | 3 +- gdb/testsuite/gdb.guile/guile.exp | 45 +- gdb/testsuite/gdb.guile/scm-arch.exp | 5 +- gdb/testsuite/gdb.guile/scm-block.exp | 5 +- gdb/testsuite/gdb.guile/scm-breakpoint.exp | 7 +- gdb/testsuite/gdb.guile/scm-cmd.exp | 26 +- gdb/testsuite/gdb.guile/scm-disasm.exp | 5 +- gdb/testsuite/gdb.guile/scm-equal.exp | 5 +- gdb/testsuite/gdb.guile/scm-error.exp | 5 +- gdb/testsuite/gdb.guile/scm-frame-args.exp | 5 +- gdb/testsuite/gdb.guile/scm-frame-inline.exp | 5 +- gdb/testsuite/gdb.guile/scm-frame.exp | 5 +- gdb/testsuite/gdb.guile/scm-gsmob.exp | 9 +- gdb/testsuite/gdb.guile/scm-iterator.exp | 5 +- gdb/testsuite/gdb.guile/scm-lazy-string.exp | 5 +- gdb/testsuite/gdb.guile/scm-math.exp | 5 +- .../gdb.guile/scm-objfile-script.exp | 15 +- gdb/testsuite/gdb.guile/scm-objfile.exp | 5 +- gdb/testsuite/gdb.guile/scm-parameter.exp | 53 +- gdb/testsuite/gdb.guile/scm-ports.exp | 119 +- gdb/testsuite/gdb.guile/scm-pretty-print.exp | 20 +- gdb/testsuite/gdb.guile/scm-progspace.exp | 11 +- .../gdb.guile/scm-section-script.exp | 15 +- gdb/testsuite/gdb.guile/scm-symbol.exp | 13 +- gdb/testsuite/gdb.guile/scm-symtab.exp | 18 +- gdb/testsuite/gdb.guile/scm-type.exp | 7 +- gdb/testsuite/gdb.guile/scm-value-cc.exp | 5 +- gdb/testsuite/gdb.guile/scm-value.exp | 7 +- gdb/testsuite/gdb.guile/types-module.exp | 5 +- gdb/testsuite/gdb.linespec/break-ask.exp | 9 +- gdb/testsuite/gdb.linespec/break-asm-file.exp | 4 +- .../gdb.linespec/cp-completion-aliases.exp | 2 +- gdb/testsuite/gdb.linespec/cpcompletion.exp | 10 +- gdb/testsuite/gdb.linespec/cpexplicit.exp | 5 +- gdb/testsuite/gdb.linespec/cpls-abi-tag.exp | 8 + gdb/testsuite/gdb.linespec/cpls.cc | 33 +- gdb/testsuite/gdb.linespec/explicit.exp | 5 +- gdb/testsuite/gdb.linespec/keywords.exp | 10 +- gdb/testsuite/gdb.linespec/linespec.exp | 5 +- gdb/testsuite/gdb.linespec/ls-dollar.exp | 5 +- gdb/testsuite/gdb.linespec/ls-errs.exp | 2 +- gdb/testsuite/gdb.linespec/macro-relative.exp | 12 +- gdb/testsuite/gdb.linespec/skip-two.exp | 5 +- .../gdb.mi/dw2-ref-missing-frame.exp | 16 +- gdb/testsuite/gdb.mi/gdb2549.exp | 1 - gdb/testsuite/gdb.mi/gdb680.exp | 4 +- gdb/testsuite/gdb.mi/gdb701.exp | 1 - gdb/testsuite/gdb.mi/gdb792.exp | 3 +- .../gdb.mi/list-thread-groups-available.exp | 10 +- .../gdb.mi/list-thread-groups-no-inferior.exp | 3 +- gdb/testsuite/gdb.mi/mi-async-run.exp | 4 +- gdb/testsuite/gdb.mi/mi-async.exp | 18 +- gdb/testsuite/gdb.mi/mi-basics.exp | 11 +- gdb/testsuite/gdb.mi/mi-break-qualified.exp | 8 +- gdb/testsuite/gdb.mi/mi-break.exp | 17 +- .../gdb.mi/mi-breakpoint-changed.exp | 9 +- .../gdb.mi/mi-catch-cpp-exceptions.exp | 8 +- gdb/testsuite/gdb.mi/mi-catch-load.exp | 8 +- gdb/testsuite/gdb.mi/mi-cli.exp | 1 - gdb/testsuite/gdb.mi/mi-cmd-error.exp | 5 +- gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp | 2 - gdb/testsuite/gdb.mi/mi-cmd-user-context.exp | 12 +- .../gdb.mi/mi-condbreak-call-thr-state.exp | 12 +- gdb/testsuite/gdb.mi/mi-condbreak-fail.c | 39 + gdb/testsuite/gdb.mi/mi-condbreak-fail.exp | 109 + gdb/testsuite/gdb.mi/mi-condbreak-throw.cc | 38 + gdb/testsuite/gdb.mi/mi-condbreak-throw.exp | 121 + gdb/testsuite/gdb.mi/mi-console.exp | 12 +- gdb/testsuite/gdb.mi/mi-corefile.exp | 4 +- gdb/testsuite/gdb.mi/mi-disassemble.exp | 1 - gdb/testsuite/gdb.mi/mi-dprintf-pending.exp | 19 +- gdb/testsuite/gdb.mi/mi-dprintf.c | 2 +- gdb/testsuite/gdb.mi/mi-dprintf.exp | 17 +- gdb/testsuite/gdb.mi/mi-editing.exp | 3 +- gdb/testsuite/gdb.mi/mi-eval.exp | 13 +- gdb/testsuite/gdb.mi/mi-exec-run.exp | 8 +- gdb/testsuite/gdb.mi/mi-exit-code.exp | 1 - gdb/testsuite/gdb.mi/mi-file-transfer.exp | 9 +- gdb/testsuite/gdb.mi/mi-file.exp | 11 +- gdb/testsuite/gdb.mi/mi-fortran-modules.exp | 2 +- gdb/testsuite/gdb.mi/mi-fullname-deleted.exp | 10 +- gdb/testsuite/gdb.mi/mi-hack-cli.exp | 4 +- gdb/testsuite/gdb.mi/mi-i-cmd.exp | 3 +- gdb/testsuite/gdb.mi/mi-info-os.exp | 16 +- gdb/testsuite/gdb.mi/mi-info-sources.exp | 32 +- .../gdb.mi/mi-inheritance-syntax-error.exp | 13 +- gdb/testsuite/gdb.mi/mi-language.exp | 3 +- gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp | 4 +- gdb/testsuite/gdb.mi/mi-memory-changed.exp | 5 +- gdb/testsuite/gdb.mi/mi-multi-commands.exp | 3 +- gdb/testsuite/gdb.mi/mi-nonstop-exit.exp | 5 +- gdb/testsuite/gdb.mi/mi-nonstop.exp | 5 +- gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp | 5 +- gdb/testsuite/gdb.mi/mi-nsintrall.exp | 5 +- gdb/testsuite/gdb.mi/mi-nsmoribund.exp | 12 +- gdb/testsuite/gdb.mi/mi-nsthrexec.exp | 5 +- gdb/testsuite/gdb.mi/mi-pending.exp | 66 +- gdb/testsuite/gdb.mi/mi-pthreads.exp | 10 +- gdb/testsuite/gdb.mi/mi-py-modify-bp.c | 28 + gdb/testsuite/gdb.mi/mi-py-modify-bp.exp | 61 + .../testsuite/gdb.mi/mi-py-modify-bp.py | 19 +- gdb/testsuite/gdb.mi/mi-read-memory.exp | 1 - gdb/testsuite/gdb.mi/mi-record-changed.exp | 6 +- gdb/testsuite/gdb.mi/mi-reg-undefined.exp | 20 +- gdb/testsuite/gdb.mi/mi-regs.exp | 17 +- gdb/testsuite/gdb.mi/mi-return.exp | 14 +- gdb/testsuite/gdb.mi/mi-reverse.exp | 7 +- gdb/testsuite/gdb.mi/mi-simplerun.exp | 13 +- gdb/testsuite/gdb.mi/mi-solib.exp | 16 +- gdb/testsuite/gdb.mi/mi-stack.exp | 36 +- gdb/testsuite/gdb.mi/mi-start.exp | 17 +- gdb/testsuite/gdb.mi/mi-stepi.exp | 1 - gdb/testsuite/gdb.mi/mi-syn-frame.exp | 7 +- gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c | 88 + gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp | 282 + gdb/testsuite/gdb.mi/mi-thread-specific-bp.c | 44 + .../gdb.mi/mi-thread-specific-bp.exp | 91 + gdb/testsuite/gdb.mi/mi-threads-interrupt.exp | 11 +- gdb/testsuite/gdb.mi/mi-undefined-cmd.exp | 4 +- gdb/testsuite/gdb.mi/mi-until.exp | 13 +- gdb/testsuite/gdb.mi/mi-var-block.exp | 12 +- gdb/testsuite/gdb.mi/mi-var-child-f.exp | 12 +- gdb/testsuite/gdb.mi/mi-var-child.exp | 12 +- gdb/testsuite/gdb.mi/mi-var-cmd.exp | 13 +- gdb/testsuite/gdb.mi/mi-var-cp.exp | 12 +- gdb/testsuite/gdb.mi/mi-var-display.exp | 12 +- .../gdb.mi/mi-var-invalidate-shlib.exp | 9 +- gdb/testsuite/gdb.mi/mi-var-invalidate.exp | 12 +- ...i-var-list-children-invalid-grandchild.exp | 11 +- gdb/testsuite/gdb.mi/mi-var-rtti.exp | 12 +- gdb/testsuite/gdb.mi/mi-vla-c99.exp | 12 +- gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 14 +- gdb/testsuite/gdb.mi/mi-watch-nonstop.exp | 9 +- gdb/testsuite/gdb.mi/mi-watch.exp | 27 +- .../gdb.mi/mi2-amd64-entry-value.exp | 19 +- gdb/testsuite/gdb.mi/mi2-cli-display.exp | 10 +- gdb/testsuite/gdb.mi/mi2-prompt.exp | 3 +- gdb/testsuite/gdb.mi/mi2-var-child.exp | 12 +- gdb/testsuite/gdb.mi/new-ui-bp-deleted.c | 29 + gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp | 108 + gdb/testsuite/gdb.mi/new-ui-mi-sync.exp | 13 +- gdb/testsuite/gdb.mi/pr11022.exp | 4 +- gdb/testsuite/gdb.mi/print-simple-values.cc | 62 + gdb/testsuite/gdb.mi/print-simple-values.exp | 58 + gdb/testsuite/gdb.mi/run-with-two-mi-uis.c | 7 + gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp | 67 + .../gdb.mi/user-selected-context-sync.exp | 20 +- .../gdb.multi/attach-no-multi-process.exp | 8 +- .../gdb.multi/attach-while-running.exp | 5 +- gdb/testsuite/gdb.multi/bkpt-multi-exec.exp | 6 +- gdb/testsuite/gdb.multi/bp-thread-specific.c | 28 + .../gdb.multi/bp-thread-specific.exp | 107 + .../gdb.multi/dummy-frame-restore.exp | 4 +- gdb/testsuite/gdb.multi/gdb-settings.c | 22 + gdb/testsuite/gdb.multi/gdb-settings.exp | 123 + .../gdb.multi/inferior-specific-bp-1.c | 52 + .../gdb.multi/inferior-specific-bp-2.c | 52 + .../gdb.multi/inferior-specific-bp.exp | 179 + gdb/testsuite/gdb.multi/multi-arch-exec.exp | 6 +- gdb/testsuite/gdb.multi/multi-arch.exp | 12 +- gdb/testsuite/gdb.multi/multi-attach.exp | 4 +- gdb/testsuite/gdb.multi/multi-exit.exp | 4 +- gdb/testsuite/gdb.multi/multi-kill.exp | 4 +- .../gdb.multi/multi-target-info-inferiors.exp | 10 +- .../gdb.multi/multi-target-info-inferiors.py | 1 + gdb/testsuite/gdb.multi/multi-target.exp.tcl | 10 +- .../gdb.multi/multi-term-settings.exp | 4 +- .../gdb.multi/run-only-second-inf.exp | 4 +- .../gdb.multi/start-inferior-specific.exp | 4 +- gdb/testsuite/gdb.multi/tids-gid-reset.exp | 5 +- gdb/testsuite/gdb.multi/tids.exp | 7 +- gdb/testsuite/gdb.multi/watchpoint-multi.exp | 12 +- gdb/testsuite/gdb.objc/basicclass.exp | 11 +- gdb/testsuite/gdb.objc/nondebug.exp | 13 +- gdb/testsuite/gdb.objc/objcdecode.exp | 13 +- gdb/testsuite/gdb.objc/print.exp | 6 +- gdb/testsuite/gdb.opencl/callfuncs.exp | 12 +- gdb/testsuite/gdb.opencl/convs_casts.exp | 5 +- gdb/testsuite/gdb.opencl/datatypes.exp | 5 +- gdb/testsuite/gdb.opencl/operators.exp | 5 +- gdb/testsuite/gdb.opencl/vec_comps.exp | 5 +- gdb/testsuite/gdb.opt/inline-break.exp | 6 +- gdb/testsuite/gdb.opt/main.c | 22 + gdb/testsuite/gdb.opt/solib-intra-step.exp | 4 +- gdb/testsuite/gdb.opt/static-optimized-out.c | 18 + .../gdb.opt/static-optimized-out.exp | 49 + gdb/testsuite/gdb.pascal/print.exp | 6 +- gdb/testsuite/gdb.pascal/str-chars.exp | 55 + gdb/testsuite/gdb.pascal/str-chars.pas | 28 + gdb/testsuite/gdb.pascal/types.exp | 6 +- gdb/testsuite/gdb.perf/backtrace.exp | 4 +- gdb/testsuite/gdb.perf/backtrace.py | 1 - gdb/testsuite/gdb.perf/disassemble.exp | 9 +- .../gdb.perf/gmonster1-null-lookup.exp | 4 +- .../gdb.perf/gmonster1-pervasive-typedef.exp | 4 +- .../gdb.perf/gmonster1-print-cerr.exp | 4 +- .../gdb.perf/gmonster1-ptype-string.exp | 4 +- .../gdb.perf/gmonster1-runto-main.exp | 4 +- .../gdb.perf/gmonster1-select-file.exp | 4 +- gdb/testsuite/gdb.perf/gmonster1.exp | 4 +- .../gdb.perf/gmonster2-null-lookup.exp | 4 +- .../gdb.perf/gmonster2-pervasive-typedef.exp | 4 +- .../gdb.perf/gmonster2-print-cerr.exp | 4 +- .../gdb.perf/gmonster2-ptype-string.exp | 4 +- .../gdb.perf/gmonster2-runto-main.exp | 4 +- .../gdb.perf/gmonster2-select-file.exp | 4 +- gdb/testsuite/gdb.perf/gmonster2.exp | 4 +- gdb/testsuite/gdb.perf/single-step.exp | 6 +- gdb/testsuite/gdb.perf/skip-command.exp | 4 +- gdb/testsuite/gdb.perf/skip-prologue.exp | 4 +- gdb/testsuite/gdb.perf/solib.exp | 4 +- .../gdb.perf/template-breakpoints.exp | 4 +- .../gdb.python/compare-enum-type.exp | 4 +- .../gdb.python/flexible-array-member.exp | 5 +- gdb/testsuite/gdb.python/lib-types.exp | 5 +- gdb/testsuite/gdb.python/lotsa-lines.exp | 51 + .../gdb.python/pretty-print-call-by-hand.exp | 14 +- .../gdb.python/py-arch-reg-groups.exp | 4 +- .../gdb.python/py-arch-reg-names.exp | 4 +- gdb/testsuite/gdb.python/py-arch.exp | 10 +- gdb/testsuite/gdb.python/py-as-string.exp | 4 +- .../gdb.python/py-auto-load-chaining.exp | 5 +- ...ed-pretty-printers-in-newobjfile-event.exp | 29 +- gdb/testsuite/gdb.python/py-bad-printers.exp | 5 +- gdb/testsuite/gdb.python/py-block.c | 31 + gdb/testsuite/gdb.python/py-block.exp | 43 +- gdb/testsuite/gdb.python/py-bp-locations.exp | 36 +- .../gdb.python/py-breakpoint-create-fail.exp | 5 +- gdb/testsuite/gdb.python/py-breakpoint.c | 2 + gdb/testsuite/gdb.python/py-breakpoint.exp | 148 +- gdb/testsuite/gdb.python/py-caller-is.exp | 5 +- gdb/testsuite/gdb.python/py-charset.exp | 5 +- gdb/testsuite/gdb.python/py-cmd.exp | 7 +- gdb/testsuite/gdb.python/py-completion.exp | 7 +- .../gdb.python/py-connection-removed.exp | 5 +- gdb/testsuite/gdb.python/py-connection.exp | 5 +- gdb/testsuite/gdb.python/py-disasm.exp | 108 +- gdb/testsuite/gdb.python/py-disasm.py | 252 +- gdb/testsuite/gdb.python/py-doc-reformat.exp | 4 +- gdb/testsuite/gdb.python/py-error.exp | 5 +- gdb/testsuite/gdb.python/py-event-load.exp | 12 +- gdb/testsuite/gdb.python/py-events.exp | 6 +- gdb/testsuite/gdb.python/py-evsignal.exp | 4 +- gdb/testsuite/gdb.python/py-evthreads.exp | 7 +- gdb/testsuite/gdb.python/py-exec-file.c | 22 + gdb/testsuite/gdb.python/py-exec-file.exp | 195 + gdb/testsuite/gdb.python/py-exec-mi.exp | 32 + gdb/testsuite/gdb.python/py-explore-cc.exp | 5 +- gdb/testsuite/gdb.python/py-explore.exp | 5 +- .../py-finish-breakpoint-deletion.exp | 5 +- .../gdb.python/py-finish-breakpoint.exp | 9 +- .../gdb.python/py-finish-breakpoint2.cc | 5 +- .../gdb.python/py-finish-breakpoint2.exp | 52 +- .../gdb.python/py-format-address.exp | 4 +- gdb/testsuite/gdb.python/py-format-string.exp | 67 +- gdb/testsuite/gdb.python/py-frame-args.exp | 5 +- gdb/testsuite/gdb.python/py-frame-inline.exp | 5 +- gdb/testsuite/gdb.python/py-frame.exp | 59 +- .../gdb.python/py-framefilter-addr.exp | 5 +- .../gdb.python/py-framefilter-addr.py | 1 + .../gdb.python/py-framefilter-invalidarg.exp | 10 +- .../gdb.python/py-framefilter-mi.exp | 11 +- gdb/testsuite/gdb.python/py-framefilter.exp | 10 +- gdb/testsuite/gdb.python/py-framefilter.py | 1 + gdb/testsuite/gdb.python/py-function.exp | 9 +- gdb/testsuite/gdb.python/py-inferior-leak.exp | 5 +- gdb/testsuite/gdb.python/py-inferior-leak.py | 2 + gdb/testsuite/gdb.python/py-inferior.c | 1 + gdb/testsuite/gdb.python/py-inferior.exp | 135 +- gdb/testsuite/gdb.python/py-infthread.exp | 5 +- .../gdb.python/py-label-symbol-value.exp | 4 +- gdb/testsuite/gdb.python/py-lazy-string.exp | 5 +- gdb/testsuite/gdb.python/py-linetable.exp | 9 +- gdb/testsuite/gdb.python/py-lookup-type.exp | 9 +- gdb/testsuite/gdb.python/py-mi-cmd.py | 27 + gdb/testsuite/gdb.python/py-mi-events.exp | 14 +- gdb/testsuite/gdb.python/py-mi-objfile.exp | 13 +- .../py-mi-var-info-path-expression.exp | 5 +- gdb/testsuite/gdb.python/py-mi.exp | 37 +- gdb/testsuite/gdb.python/py-nested-maps.exp | 9 +- .../gdb.python/py-objfile-script.exp | 5 +- gdb/testsuite/gdb.python/py-objfile.exp | 5 +- gdb/testsuite/gdb.python/py-parameter.exp | 36 +- .../gdb.python/py-pending-frame-level.exp | 5 +- gdb/testsuite/gdb.python/py-pp-cast.c | 35 + gdb/testsuite/gdb.python/py-pp-cast.exp | 40 + .../testsuite/gdb.python/py-pp-cast.py | 25 +- gdb/testsuite/gdb.python/py-pp-integral.exp | 5 +- gdb/testsuite/gdb.python/py-pp-maint.exp | 10 +- gdb/testsuite/gdb.python/py-pp-re-notag.exp | 5 +- .../gdb.python/py-pp-registration.exp | 5 +- gdb/testsuite/gdb.python/py-prettyprint.c | 11 + gdb/testsuite/gdb.python/py-prettyprint.exp | 21 +- gdb/testsuite/gdb.python/py-prettyprint.py | 1 + .../gdb.python/py-progspace-events.c | 73 + .../gdb.python/py-progspace-events.exp | 125 + .../gdb.python/py-progspace-events.py | 32 + gdb/testsuite/gdb.python/py-progspace.exp | 27 +- gdb/testsuite/gdb.python/py-prompt.exp | 187 +- gdb/testsuite/gdb.python/py-rbreak.exp | 17 +- .../gdb.python/py-record-btrace-threads.exp | 15 +- gdb/testsuite/gdb.python/py-record-btrace.exp | 80 +- gdb/testsuite/gdb.python/py-record-full.exp | 12 +- .../gdb.python/py-recurse-unwind.exp | 5 +- gdb/testsuite/gdb.python/py-recurse-unwind.py | 5 - .../gdb.python/py-rvalue-ref-value-cc.exp | 5 +- .../gdb.python/py-section-script.exp | 15 +- gdb/testsuite/gdb.python/py-send-packet.exp | 8 +- gdb/testsuite/gdb.python/py-send-packet.py | 1 + gdb/testsuite/gdb.python/py-shared.exp | 11 +- .../gdb.python/py-source-styling.exp | 6 +- gdb/testsuite/gdb.python/py-startup-opt.exp | 12 +- gdb/testsuite/gdb.python/py-strfns.exp | 5 +- gdb/testsuite/gdb.python/py-symbol.exp | 7 +- gdb/testsuite/gdb.python/py-symtab.exp | 5 +- gdb/testsuite/gdb.python/py-sync-interp.exp | 14 +- gdb/testsuite/gdb.python/py-template.exp | 11 +- gdb/testsuite/gdb.python/py-thread-exited.c | 48 + gdb/testsuite/gdb.python/py-thread-exited.exp | 54 + gdb/testsuite/gdb.python/py-thread-exited.py | 55 + gdb/testsuite/gdb.python/py-thrhandle.exp | 5 +- gdb/testsuite/gdb.python/py-type.exp | 13 +- gdb/testsuite/gdb.python/py-typeprint.cc | 6 + gdb/testsuite/gdb.python/py-typeprint.exp | 8 +- gdb/testsuite/gdb.python/py-typeprint.py | 28 +- gdb/testsuite/gdb.python/py-unwind-inline.exp | 5 +- gdb/testsuite/gdb.python/py-unwind-maint.exp | 5 +- .../gdb.python/py-unwind-user-regs.exp | 5 +- gdb/testsuite/gdb.python/py-unwind.exp | 240 +- gdb/testsuite/gdb.python/py-unwind.py | 187 +- gdb/testsuite/gdb.python/py-value-cc.cc | 2 +- gdb/testsuite/gdb.python/py-value-cc.exp | 8 +- gdb/testsuite/gdb.python/py-value.c | 3 + gdb/testsuite/gdb.python/py-value.exp | 26 +- gdb/testsuite/gdb.python/py-varobj.c | 28 + gdb/testsuite/gdb.python/py-varobj.exp | 61 + gdb/testsuite/gdb.python/py-varobj.py | 38 + gdb/testsuite/gdb.python/py-watchpoint.c | 26 + gdb/testsuite/gdb.python/py-watchpoint.exp | 46 + .../testsuite/gdb.python/py-watchpoint.py | 23 +- gdb/testsuite/gdb.python/py-xmethods.cc | 2 +- gdb/testsuite/gdb.python/py-xmethods.exp | 35 +- gdb/testsuite/gdb.python/py-xmethods.py | 17 + gdb/testsuite/gdb.python/python.exp | 11 +- .../gdb.python/tui-window-disabled.c | 2 +- .../gdb.python/tui-window-disabled.exp | 19 +- .../gdb.python/tui-window-factory.exp | 108 + .../gdb.python/tui-window-factory.py | 48 + gdb/testsuite/gdb.python/tui-window-names.exp | 11 +- gdb/testsuite/gdb.python/tui-window.exp | 12 +- gdb/testsuite/gdb.python/tui-window.py | 6 + .../gdb.reverse/amd64-tailcall-reverse.exp | 9 +- gdb/testsuite/gdb.reverse/break-precsave.exp | 10 +- gdb/testsuite/gdb.reverse/break-reverse.c | 4 +- gdb/testsuite/gdb.reverse/break-reverse.exp | 4 +- .../gdb.reverse/consecutive-precsave.exp | 10 +- .../gdb.reverse/consecutive-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/finish-precsave.exp | 4 +- .../gdb.reverse/finish-reverse-bkpt.exp | 4 +- .../gdb.reverse/finish-reverse-next.c | 91 + .../gdb.reverse/finish-reverse-next.exp | 224 + gdb/testsuite/gdb.reverse/finish-reverse.c | 4 +- gdb/testsuite/gdb.reverse/finish-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/fstatat-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/getrandom.exp | 5 +- .../gdb.reverse/getresuid-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/i386-precsave.exp | 16 +- gdb/testsuite/gdb.reverse/i386-reverse.exp | 10 +- .../gdb.reverse/i386-sse-reverse.exp | 5 +- .../gdb.reverse/i387-env-reverse.exp | 5 +- .../gdb.reverse/i387-stack-reverse.exp | 5 +- gdb/testsuite/gdb.reverse/insn-reverse-x86.c | 324 +- gdb/testsuite/gdb.reverse/insn-reverse.exp | 11 +- .../gdb.reverse/machinestate-precsave.exp | 70 +- gdb/testsuite/gdb.reverse/machinestate.exp | 64 +- .../gdb.reverse/maint-print-instruction.c | 25 + .../gdb.reverse/maint-print-instruction.exp | 75 + .../gdb.reverse/next-reverse-bkpt-over-sr.exp | 4 +- gdb/testsuite/gdb.reverse/pipe-reverse.exp | 4 +- .../gdb.reverse/ppc_record_test_isa_2_06.exp | 5 +- .../gdb.reverse/ppc_record_test_isa_3_1.exp | 5 +- gdb/testsuite/gdb.reverse/readv-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/recvmsg-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/rerun-prec.exp | 4 +- gdb/testsuite/gdb.reverse/s390-mvcle.exp | 9 +- gdb/testsuite/gdb.reverse/shr2.c | 3 +- gdb/testsuite/gdb.reverse/sigall-precsave.exp | 16 +- gdb/testsuite/gdb.reverse/sigall-reverse.exp | 16 +- .../gdb.reverse/singlejmp-reverse.exp | 16 +- gdb/testsuite/gdb.reverse/solib-precsave.exp | 45 +- gdb/testsuite/gdb.reverse/solib-reverse.c | 5 +- gdb/testsuite/gdb.reverse/solib-reverse.exp | 39 +- .../gdb.reverse/step-indirect-call-thunk.exp | 71 +- gdb/testsuite/gdb.reverse/step-precsave.exp | 23 +- gdb/testsuite/gdb.reverse/step-reverse.exp | 59 +- gdb/testsuite/gdb.reverse/time-reverse.c | 8 +- gdb/testsuite/gdb.reverse/time-reverse.exp | 75 +- gdb/testsuite/gdb.reverse/until-precsave.exp | 10 +- gdb/testsuite/gdb.reverse/until-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/waitpid-reverse.exp | 4 +- gdb/testsuite/gdb.reverse/watch-precsave.exp | 10 +- gdb/testsuite/gdb.reverse/watch-reverse.c | 4 +- gdb/testsuite/gdb.reverse/watch-reverse.exp | 4 +- .../fork-exec-gpu-to-non-gpu-execee.cpp | 27 + .../fork-exec-gpu-to-non-gpu-execer.cpp | 55 + .../gdb.rocm/fork-exec-gpu-to-non-gpu.exp | 89 + .../fork-exec-non-gpu-to-gpu-execee.cpp | 36 + .../fork-exec-non-gpu-to-gpu-execer.cpp | 46 + .../gdb.rocm/fork-exec-non-gpu-to-gpu.exp | 88 + gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp | 113 + gdb/testsuite/gdb.rocm/multi-inferior-gpu.exp | 89 + gdb/testsuite/gdb.rocm/precise-memory-exec.c | 44 + .../gdb.rocm/precise-memory-exec.exp | 58 + gdb/testsuite/gdb.rocm/precise-memory-fork.c | 41 + .../gdb.rocm/precise-memory-fork.exp | 50 + .../precise-memory-multi-inferiors.exp | 87 + .../precise-memory-warning-sigsegv.cpp | 33 + .../precise-memory-warning-sigsegv.exp | 45 + gdb/testsuite/gdb.rocm/precise-memory.cpp | 32 + gdb/testsuite/gdb.rocm/precise-memory.exp | 57 + gdb/testsuite/gdb.rocm/simple.cpp | 48 + gdb/testsuite/gdb.rocm/simple.exp | 49 + gdb/testsuite/gdb.rust/completion.exp | 34 + gdb/testsuite/gdb.rust/completion.rs | 19 + gdb/testsuite/gdb.rust/dwindex.exp | 10 +- gdb/testsuite/gdb.rust/expr.exp | 24 +- gdb/testsuite/gdb.rust/finish.exp | 40 + gdb/testsuite/gdb.rust/finish.rs | 30 + gdb/testsuite/gdb.rust/fnfield.exp | 7 +- gdb/testsuite/gdb.rust/generics.exp | 5 +- gdb/testsuite/gdb.rust/main-crash.exp | 3 +- gdb/testsuite/gdb.rust/methods.exp | 8 +- gdb/testsuite/gdb.rust/modules.exp | 5 +- gdb/testsuite/gdb.rust/onetwoeight.exp | 70 + gdb/testsuite/gdb.rust/onetwoeight.rs | 31 + gdb/testsuite/gdb.rust/pp.exp | 7 +- gdb/testsuite/gdb.rust/rawids.exp | 12 +- gdb/testsuite/gdb.rust/rust-start.exp | 8 +- gdb/testsuite/gdb.rust/rust-style.exp | 10 +- gdb/testsuite/gdb.rust/simple.exp | 10 +- gdb/testsuite/gdb.rust/traits.exp | 5 +- gdb/testsuite/gdb.rust/unicode.exp | 12 +- gdb/testsuite/gdb.rust/union.exp | 5 +- gdb/testsuite/gdb.rust/unsized.exp | 10 +- gdb/testsuite/gdb.rust/watch.exp | 7 +- gdb/testsuite/gdb.server/abspath.exp | 8 +- gdb/testsuite/gdb.server/attach-flag.exp | 10 +- .../gdb.server/bkpt-other-inferior.exp | 7 +- .../gdb.server/connect-stopped-target.exp | 4 +- .../connect-with-no-symbol-file.exp | 11 +- .../connect-without-multi-process.exp | 8 +- .../gdb.server/exit-multiple-threads.exp | 30 +- gdb/testsuite/gdb.server/ext-attach.exp | 8 +- gdb/testsuite/gdb.server/ext-restart.exp | 9 +- gdb/testsuite/gdb.server/ext-run.exp | 10 +- gdb/testsuite/gdb.server/ext-wrapper.exp | 9 +- .../gdb.server/extended-remote-restart.exp | 6 +- gdb/testsuite/gdb.server/file-transfer.exp | 16 +- .../gdb.server/monitor-exit-quit.exp | 4 +- gdb/testsuite/gdb.server/multi-ui-errors.c | 5 + gdb/testsuite/gdb.server/multi-ui-errors.exp | 36 +- gdb/testsuite/gdb.server/no-thread-db.exp | 4 +- .../gdb.server/non-existing-program.exp | 10 +- gdb/testsuite/gdb.server/reconnect-ctrl-c.exp | 14 +- .../gdb.server/run-without-local-binary.exp | 8 +- gdb/testsuite/gdb.server/server-connect.exp | 8 +- gdb/testsuite/gdb.server/server-exec-info.exp | 11 +- .../gdb.server/server-kill-python.exp | 41 +- gdb/testsuite/gdb.server/server-kill.exp | 63 +- gdb/testsuite/gdb.server/server-mon.exp | 4 +- gdb/testsuite/gdb.server/server-pipe.exp | 10 +- gdb/testsuite/gdb.server/server-run.exp | 4 +- gdb/testsuite/gdb.server/solib-list.exp | 13 +- .../gdb.server/stop-reply-no-thread-multi.exp | 17 +- .../gdb.server/stop-reply-no-thread.exp | 18 +- gdb/testsuite/gdb.server/sysroot.exp | 26 +- gdb/testsuite/gdb.server/target-exec-file.c | 22 + gdb/testsuite/gdb.server/target-exec-file.exp | 174 + gdb/testsuite/gdb.server/twice-connect.exp | 8 +- gdb/testsuite/gdb.server/unittest.exp | 6 +- gdb/testsuite/gdb.server/wrapper.exp | 4 +- gdb/testsuite/gdb.stabs/exclfwd.exp | 6 +- gdb/testsuite/gdb.stabs/weird.exp | 16 +- gdb/testsuite/gdb.testsuite/board-sanity.exp | 145 + .../gdb-caching-proc-consistency.exp} | 5 + .../gdb.testsuite/gdb-caching-proc.exp | 45 + gdb/testsuite/gdb.testsuite/gdb-test.exp | 11 + .../testsuite/gdb.testsuite/lmap.exp | 19 +- gdb/testsuite/gdb.testsuite/with-override.exp | 81 + .../access-mem-running-thread-exit.exp | 10 +- .../gdb.threads/attach-into-signal.exp | 7 +- .../attach-many-short-lived-threads.exp | 4 +- gdb/testsuite/gdb.threads/attach-non-stop.exp | 4 +- .../gdb.threads/attach-slow-waitpid.exp | 7 +- gdb/testsuite/gdb.threads/attach-stopped.exp | 18 +- .../gdb.threads/check-libthread-db.exp | 8 +- .../gdb.threads/clone-attach-detach.exp | 15 +- .../gdb.threads/continue-pending-status.exp | 5 +- gdb/testsuite/gdb.threads/corethreads.exp | 3 +- .../gdb.threads/detach-step-over.exp | 14 +- .../gdb.threads/dlopen-libpthread.exp | 58 +- gdb/testsuite/gdb.threads/execl.c | 8 + gdb/testsuite/gdb.threads/execl.exp | 3 + .../gdb.threads/foll-fork-other-thread.c | 84 + .../gdb.threads/foll-fork-other-thread.exp | 172 + .../gdb.threads/fork-thread-pending.exp | 6 +- gdb/testsuite/gdb.threads/gcore-thread.exp | 4 +- .../gdb.threads/hand-call-in-threads.exp | 13 +- .../gdb.threads/interrupted-hand-call.exp | 13 +- gdb/testsuite/gdb.threads/leader-exit.exp | 5 +- .../gdb.threads/local-watch-wrong-thread.exp | 4 +- gdb/testsuite/gdb.threads/manythreads.exp | 5 +- gdb/testsuite/gdb.threads/multi-create.c | 8 +- .../gdb.threads/multiple-step-overs.exp | 5 +- .../multiple-successive-infcall.exp | 3 + gdb/testsuite/gdb.threads/names.exp | 4 +- .../gdb.threads/next-bp-other-thread.c | 9 + .../gdb.threads/next-fork-exec-other-thread.c | 82 + .../next-fork-exec-other-thread.exp | 131 + .../gdb.threads/non-stop-fair-events.exp | 5 +- .../gdb.threads/pending-fork-event-detach.exp | 15 +- gdb/testsuite/gdb.threads/print-threads.exp | 2 - .../process-dies-while-detaching.exp | 12 +- .../process-dies-while-handling-bp.exp | 9 +- ...cess-exit-status-is-leader-exit-status.exp | 19 +- gdb/testsuite/gdb.threads/pthreads.c | 86 +- gdb/testsuite/gdb.threads/pthreads.exp | 19 +- .../gdb.threads/reconnect-signal.exp | 1 + gdb/testsuite/gdb.threads/schedlock.c | 10 +- gdb/testsuite/gdb.threads/schedlock.exp | 11 +- .../signal-command-handle-nopass.exp | 5 +- ...ignal-command-multiple-signals-pending.exp | 5 +- .../signal-delivered-right-thread.exp | 5 +- gdb/testsuite/gdb.threads/signal-sigtrap.exp | 5 +- ...al-while-stepping-over-bp-other-thread.exp | 9 +- gdb/testsuite/gdb.threads/sigthread.exp | 9 +- .../gdb.threads/step-N-all-progress.exp | 2 +- .../step-bg-decr-pc-switch-thread.exp | 15 +- gdb/testsuite/gdb.threads/step-over-exec.c | 2 +- gdb/testsuite/gdb.threads/step-over-exec.exp | 2 + .../step-over-trips-on-watchpoint.exp | 4 +- .../gdb.threads/stepi-random-signal.exp | 5 +- gdb/testsuite/gdb.threads/thread-bp-deleted.c | 88 + .../gdb.threads/thread-bp-deleted.exp | 200 + .../gdb.threads/thread-specific-bp.exp | 148 +- gdb/testsuite/gdb.threads/thread-specific.exp | 2 - .../gdb.threads/thread-unwindonsignal.exp | 13 +- .../gdb.threads/threxit-hop-specific.exp | 2 - gdb/testsuite/gdb.threads/tls-nodebug.exp | 2 - gdb/testsuite/gdb.threads/tls-sepdebug-main.c | 29 + .../gdb.threads/tls-sepdebug-shared.c | 21 + gdb/testsuite/gdb.threads/tls-sepdebug.exp | 95 + gdb/testsuite/gdb.threads/tls.exp | 7 +- .../gdb.threads/vfork-multi-inferior.exp | 5 +- .../gdb.threads/watchpoint-fork-mt.c | 10 +- gdb/testsuite/gdb.threads/watchpoint-fork.exp | 12 +- .../gdb.threads/watchthreads-reorder.exp | 5 +- gdb/testsuite/gdb.threads/watchthreads.exp | 10 +- gdb/testsuite/gdb.threads/watchthreads2.exp | 7 +- gdb/testsuite/gdb.threads/wp-replication.exp | 4 +- gdb/testsuite/gdb.trace/actions-changed.exp | 7 +- gdb/testsuite/gdb.trace/actions.exp | 135 +- gdb/testsuite/gdb.trace/ax.exp | 11 +- gdb/testsuite/gdb.trace/backtrace.exp | 5 +- gdb/testsuite/gdb.trace/change-loc.exp | 19 +- gdb/testsuite/gdb.trace/collection.exp | 113 +- gdb/testsuite/gdb.trace/deltrace.exp | 87 +- gdb/testsuite/gdb.trace/entry-values.exp | 15 +- gdb/testsuite/gdb.trace/ftrace-lock.exp | 9 +- gdb/testsuite/gdb.trace/ftrace.exp | 9 +- gdb/testsuite/gdb.trace/infotrace.exp | 36 +- .../gdb.trace/mi-trace-frame-collected.exp | 5 +- .../gdb.trace/mi-traceframe-changed.exp | 2 - .../gdb.trace/mi-tracepoint-changed.exp | 30 +- gdb/testsuite/gdb.trace/mi-tsv-changed.exp | 25 +- gdb/testsuite/gdb.trace/packetlen.exp | 13 +- gdb/testsuite/gdb.trace/passc-dyn.exp | 12 +- gdb/testsuite/gdb.trace/passcount.exp | 21 +- gdb/testsuite/gdb.trace/pending.exp | 21 +- gdb/testsuite/gdb.trace/qtro.exp | 6 +- gdb/testsuite/gdb.trace/range-stepping.exp | 4 +- gdb/testsuite/gdb.trace/read-memory.exp | 4 +- gdb/testsuite/gdb.trace/report.exp | 12 +- gdb/testsuite/gdb.trace/save-trace.exp | 13 +- gdb/testsuite/gdb.trace/signal.exp | 5 +- gdb/testsuite/gdb.trace/stap-trace.exp | 12 +- gdb/testsuite/gdb.trace/strace.exp | 4 +- gdb/testsuite/gdb.trace/tfile.exp | 5 +- gdb/testsuite/gdb.trace/tfind.exp | 13 +- gdb/testsuite/gdb.trace/trace-break.exp | 9 +- gdb/testsuite/gdb.trace/trace-condition.exp | 9 +- .../gdb.trace/trace-enable-disable.exp | 9 +- gdb/testsuite/gdb.trace/trace-mt.exp | 9 +- gdb/testsuite/gdb.trace/tracecmd.exp | 21 +- .../gdb.trace/tracefile-pseudo-reg.exp | 5 +- gdb/testsuite/gdb.trace/tspeed.exp | 4 +- gdb/testsuite/gdb.trace/tstatus.exp | 5 +- gdb/testsuite/gdb.trace/tsv.exp | 11 +- .../gdb.trace/unavailable-dwarf-piece.exp | 4 +- gdb/testsuite/gdb.trace/unavailable.exp | 90 +- gdb/testsuite/gdb.trace/while-dyn.exp | 13 +- gdb/testsuite/gdb.trace/while-stepping.exp | 28 +- gdb/testsuite/gdb.tui/basic.exp | 8 + gdb/testsuite/gdb.tui/color-prompt.exp | 32 + gdb/testsuite/gdb.tui/compact-source.exp | 70 + gdb/testsuite/gdb.tui/completion.exp | 35 +- gdb/testsuite/gdb.tui/corefile-run.exp | 26 +- gdb/testsuite/gdb.tui/long-prompt.exp | 139 + gdb/testsuite/gdb.tui/main.exp | 14 +- gdb/testsuite/gdb.tui/new-layout.exp | 9 + gdb/testsuite/gdb.tui/pr30056.exp | 88 + gdb/testsuite/gdb.tui/resize-2.exp | 89 + gdb/testsuite/gdb.tui/secondary-prompt.exp | 38 + gdb/testsuite/gdb.tui/single-key-2.exp | 40 + gdb/testsuite/gdb.tui/single-key.exp | 60 + .../gdb.tui/tui-disasm-long-lines.exp | 17 +- gdb/testsuite/gdb.tui/tui-focus.c | 22 + gdb/testsuite/gdb.tui/tui-focus.exp | 143 + .../gdb.tui/tui-layout-asm-short-prog.exp | 11 +- gdb/testsuite/gdb.tui/tui-layout.exp | 71 +- gdb/testsuite/gdb.tui/tui-missing-src.exp | 2 +- .../gdb.tui/tui-nl-filtered-output.exp | 38 +- gdb/testsuite/gdb.tui/tuiterm-2.exp | 111 + gdb/testsuite/gdb.tui/tuiterm.exp | 79 + gdb/testsuite/gdb.tui/wrap-line.exp | 164 + gdb/testsuite/gdb.xml/maint-xml-dump.exp | 5 +- gdb/testsuite/gdb.xml/maint_print_struct.exp | 14 +- gdb/testsuite/gdb.xml/tdesc-arch.exp | 5 +- gdb/testsuite/gdb.xml/tdesc-errors.exp | 5 +- gdb/testsuite/gdb.xml/tdesc-regs.exp | 11 +- gdb/testsuite/gdb.xml/tdesc-reload.exp | 11 +- gdb/testsuite/gdb.xml/tdesc-xinclude.exp | 5 +- gdb/testsuite/lib/aarch64-scalable.exp | 283 + gdb/testsuite/lib/aarch64-test-sme.c | 90 + gdb/testsuite/lib/aarch64-test-sve.c | 90 + gdb/testsuite/lib/aarch64.exp | 153 + gdb/testsuite/lib/ada.exp | 40 +- gdb/testsuite/lib/cache.exp | 30 +- gdb/testsuite/lib/compile-support.exp | 59 +- gdb/testsuite/lib/compiler.F90 | 4 + gdb/testsuite/lib/completion-support.exp | 24 +- gdb/testsuite/lib/dap-support.exp | 418 + gdb/testsuite/lib/debuginfod-support.exp | 14 +- gdb/testsuite/lib/dwarf.exp | 6 +- gdb/testsuite/lib/fortran.exp | 26 +- gdb/testsuite/lib/future.exp | 44 +- gdb/testsuite/lib/gdb-guile.exp | 21 +- gdb/testsuite/lib/gdb-utils.exp | 38 + gdb/testsuite/lib/gdb.exp | 1852 +- gdb/testsuite/lib/gdbserver-support.exp | 16 +- gdb/testsuite/lib/go.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 380 +- gdb/testsuite/lib/opencl.exp | 22 +- gdb/testsuite/lib/perftest.exp | 10 +- gdb/testsuite/lib/prelink-support.exp | 4 +- gdb/testsuite/lib/prompt.exp | 11 + gdb/testsuite/lib/read1.c | 2 +- gdb/testsuite/lib/rocm.exp | 211 + gdb/testsuite/lib/rust-support.exp | 11 +- gdb/testsuite/lib/selftest-support.exp | 2 +- gdb/testsuite/lib/ton.tcl | 303 + gdb/testsuite/lib/tuiterm.exp | 361 +- gdb/testsuite/make-check-all.sh | 329 + gdb/thread-fsm.h | 2 +- gdb/thread-iter.c | 4 +- gdb/thread.c | 202 +- gdb/tic6x-tdep.c | 14 +- gdb/tilegx-tdep.c | 8 +- gdb/top.c | 246 +- gdb/top.h | 203 +- gdb/tracectf.c | 83 +- gdb/tracefile-tfile.c | 115 +- gdb/tracefile.c | 6 +- gdb/tracepoint.c | 225 +- gdb/tracepoint.h | 6 +- gdb/trad-frame.h | 2 +- gdb/tramp-frame.c | 1 + gdb/tramp-frame.h | 8 +- gdb/tui/tui-data.c | 11 + gdb/tui/tui-data.h | 17 +- gdb/tui/tui-disasm.c | 39 + gdb/tui/tui-hooks.c | 13 +- gdb/tui/tui-interp.c | 6 +- gdb/tui/tui-io.c | 63 +- gdb/tui/tui-layout.c | 66 +- gdb/tui/tui-layout.h | 54 +- gdb/tui/tui-location.h | 2 +- gdb/tui/tui-regs.c | 10 +- gdb/tui/tui-source.c | 32 +- gdb/tui/tui-stack.c | 11 +- gdb/tui/tui-win.c | 289 +- gdb/tui/tui-win.h | 6 + gdb/tui/tui-wingeneral.c | 16 +- gdb/tui/tui-winsource.c | 244 +- gdb/tui/tui-winsource.h | 73 +- gdb/tui/tui.c | 19 +- gdb/tui/tui.h | 3 + gdb/typeprint.c | 41 +- gdb/typeprint.h | 2 +- gdb/ui-file.h | 4 + gdb/ui-out.c | 10 +- gdb/ui-out.h | 10 +- gdb/ui.c | 251 + gdb/ui.h | 227 + gdb/unittests/enum-flags-selftests.c | 69 +- gdb/unittests/filtered_iterator-selftests.c | 20 +- gdb/unittests/frame_info_ptr-selftests.c | 76 + gdb/unittests/gdb_tilde_expand-selftests.c | 8 +- gdb/unittests/gmp-utils-selftests.c | 91 +- gdb/unittests/intrusive_list-selftests.c | 60 +- gdb/unittests/parallel-for-selftests.c | 4 +- gdb/unittests/ptid-selftests.c | 4 +- gdb/unittests/vec-utils-selftests.c | 2 +- gdb/utils.c | 266 +- gdb/utils.h | 116 +- gdb/v850-tdep.c | 21 +- gdb/valarith.c | 760 +- gdb/valops.c | 638 +- gdb/valprint.c | 288 +- gdb/valprint.h | 37 +- gdb/value.c | 2029 +- gdb/value.h | 1277 +- gdb/varobj.c | 132 +- gdb/vax-tdep.c | 4 +- gdb/version.in | 2 +- gdb/windows-nat.c | 28 +- gdb/windows-tdep.c | 67 +- gdb/x86-fbsd-nat.c | 21 + gdb/x86-fbsd-nat.h | 20 + gdb/x86-linux-nat.c | 6 + gdb/x86-linux-nat.h | 9 +- gdb/xcoffread.c | 147 +- gdb/xml-support.c | 2 +- gdb/xml-tdesc.c | 2 +- gdb/xstormy16-tdep.c | 61 +- gdb/xtensa-config.c | 4 +- gdb/xtensa-tdep.c | 25 +- gdb/yy-remap.h | 1 + gdb/z80-tdep.c | 35 +- gdbserver/Makefile.in | 9 +- gdbserver/ax-result-types.def | 44 + gdbserver/ax.cc | 14 +- gdbserver/ax.h | 12 +- gdbserver/config.in | 3 + gdbserver/configure | 571 + gdbserver/configure.srv | 15 +- gdbserver/i387-fp.cc | 287 +- gdbserver/i387-fp.h | 4 +- gdbserver/inferiors.h | 2 +- gdbserver/linux-aarch64-low.cc | 152 +- gdbserver/linux-aarch64-tdesc.cc | 28 +- gdbserver/linux-arc-low.cc | 2 +- gdbserver/linux-arm-low.cc | 2 +- gdbserver/linux-csky-low.cc | 9 +- gdbserver/linux-loongarch-low.cc | 7 +- gdbserver/linux-low.cc | 132 +- gdbserver/linux-low.h | 27 +- gdbserver/linux-ppc-low.cc | 8 +- gdbserver/linux-riscv-low.cc | 8 +- gdbserver/linux-s390-low.cc | 2 +- gdbserver/linux-x86-low.cc | 10 +- gdbserver/mem-break.cc | 2 +- gdbserver/netbsd-low.cc | 4 +- gdbserver/netbsd-low.h | 2 +- gdbserver/regcache.cc | 5 +- gdbserver/remote-utils.cc | 20 +- gdbserver/server.cc | 169 +- gdbserver/server.h | 5 +- gdbserver/target.cc | 12 +- gdbserver/target.h | 18 +- gdbserver/tdesc.cc | 23 +- gdbserver/tdesc.h | 4 +- gdbserver/tracepoint.cc | 48 +- gdbserver/tracepoint.h | 11 +- gdbserver/utils.cc | 22 - gdbserver/win32-low.cc | 2 +- gdbsupport/Makefile.am | 1 - gdbsupport/Makefile.in | 9 +- gdbsupport/agent.cc | 14 +- gdbsupport/agent.h | 2 +- gdbsupport/array-view.h | 3 +- gdbsupport/btrace-common.h | 18 +- gdbsupport/buffer.cc | 178 - gdbsupport/buffer.h | 68 - gdbsupport/common-debug.h | 21 +- gdbsupport/common-defs.h | 4 +- gdbsupport/common-exceptions.cc | 16 +- gdbsupport/common-exceptions.h | 26 +- gdbsupport/common-types.h | 14 +- gdbsupport/common-utils.cc | 20 +- gdbsupport/common-utils.h | 54 + gdbsupport/common.m4 | 26 + gdbsupport/config.in | 3 + gdbsupport/configure | 571 + gdbsupport/default-init-alloc.h | 13 +- gdbsupport/enum-flags.h | 68 +- gdbsupport/errors.cc | 24 + gdbsupport/errors.h | 13 +- gdbsupport/fileio.h | 2 +- gdbsupport/filestuff.cc | 4 +- gdbsupport/filtered-iterator.h | 7 +- gdbsupport/format.cc | 26 +- gdbsupport/format.h | 6 +- gdbsupport/gdb-checked-static-cast.h | 19 + gdbsupport/gdb-safe-ctype.h | 5 +- gdbsupport/gdb_signals.h | 2 +- gdbsupport/gdb_tilde_expand.cc | 6 +- gdbsupport/gdb_unique_ptr.h | 13 + gdbsupport/gdb_wait.h | 4 +- gdbsupport/observable.h | 20 +- gdbsupport/packed.h | 2 +- gdbsupport/parallel-for.h | 4 +- gdbsupport/pathstuff.cc | 2 +- gdbsupport/poison.h | 2 +- gdbsupport/ptid.h | 26 +- gdbsupport/reference-to-pointer-iterator.h | 20 +- gdbsupport/safe-iterator.h | 6 +- gdbsupport/scoped_ignore_sigttou.h | 2 +- gdbsupport/signals.cc | 2 +- gdbsupport/thread-pool.h | 27 + gdbsupport/x86-xstate.h | 77 +- gnulib/Makefile.in | 2 +- gnulib/doc/gendocs_template | 2 +- gnulib/doc/gendocs_template_min | 2 +- gnulib/update-gnulib.sh | 2 +- include/ChangeLog | 66 +- include/MAINTAINERS | 2 +- include/alloca-conf.h | 2 +- include/ansidecl.h | 4 +- include/aout/aout64.h | 2 +- include/aout/ar.h | 2 +- include/aout/encap.h | 135 - include/aout/host.h | 2 +- include/aout/hp.h | 2 +- include/aout/hppa.h | 2 +- include/aout/ranlib.h | 2 +- include/aout/stab.def | 2 +- include/aout/stab_gnu.h | 2 +- include/aout/sun4.h | 2 +- include/bfdlink.h | 5 +- include/binary-io.h | 2 +- include/bout.h | 2 +- include/cgen/basic-modes.h | 2 +- include/cgen/basic-ops.h | 2 +- include/cgen/bitset.h | 2 +- include/coff/aarch64.h | 10 +- include/coff/alpha.h | 2 +- include/coff/arm.h | 2 +- include/coff/ecoff.h | 7 +- include/coff/external.h | 2 +- include/coff/i386.h | 2 +- include/coff/ia64.h | 2 +- include/coff/internal.h | 86 +- include/coff/loongarch64.h | 7 +- include/coff/mcore.h | 2 +- include/coff/mips.h | 2 +- include/coff/msdos.h | 4 +- include/coff/pe.h | 8 +- include/coff/rs6000.h | 2 +- include/coff/rs6k64.h | 2 +- include/coff/sh.h | 2 +- include/coff/ti.h | 2 +- include/coff/tic30.h | 2 +- include/coff/tic4x.h | 2 +- include/coff/tic54x.h | 2 +- include/coff/x86_64.h | 7 +- include/coff/xcoff.h | 58 +- include/coff/z80.h | 2 +- include/coff/z8k.h | 2 +- include/collectorAPI.h | 2 +- include/ctf-api.h | 2 +- include/ctf.h | 10 +- include/demangle.h | 22 +- include/diagnostics.h | 2 +- include/dis-asm.h | 4 +- include/dwarf2.def | 2 +- include/dwarf2.h | 12 +- include/dyn-string.h | 2 +- include/elf/aarch64.h | 2 +- include/elf/alpha.h | 2 +- include/elf/amdgpu.h | 2 +- include/elf/arc-cpu.def | 2 +- include/elf/arc-reloc.def | 2 +- include/elf/arc.h | 2 +- include/elf/arm.h | 2 +- include/elf/avr.h | 2 +- include/elf/bfin.h | 2 +- include/elf/bpf.h | 30 +- include/elf/common.h | 32 +- include/elf/cr16.h | 2 +- include/elf/cris.h | 2 +- include/elf/crx.h | 2 +- include/elf/csky.h | 2 +- include/elf/d10v.h | 2 +- include/elf/d30v.h | 2 +- include/elf/dlx.h | 2 +- include/elf/dwarf.h | 2 +- include/elf/epiphany.h | 2 +- include/elf/external.h | 2 +- include/elf/fr30.h | 2 +- include/elf/frv.h | 2 +- include/elf/ft32.h | 2 +- include/elf/h8.h | 2 +- include/elf/hppa.h | 2 +- include/elf/i370.h | 2 +- include/elf/i386.h | 2 +- include/elf/i860.h | 2 +- include/elf/i960.h | 2 +- include/elf/ia64.h | 2 +- include/elf/internal.h | 2 +- include/elf/ip2k.h | 2 +- include/elf/iq2000.h | 2 +- include/elf/kvx.h | 115 + include/elf/kvx_elfids.h | 81 + include/elf/lm32.h | 2 +- include/elf/loongarch.h | 24 +- include/elf/m32c.h | 2 +- include/elf/m32r.h | 2 +- include/elf/m68hc11.h | 2 +- include/elf/m68k.h | 2 +- include/elf/mcore.h | 2 +- include/elf/mep.h | 2 +- include/elf/metag.h | 2 +- include/elf/microblaze.h | 2 +- include/elf/mips.h | 3 +- include/elf/mmix.h | 2 +- include/elf/mn10200.h | 2 +- include/elf/mn10300.h | 2 +- include/elf/moxie.h | 2 +- include/elf/msp430.h | 2 +- include/elf/mt.h | 2 +- include/elf/nds32.h | 2 +- include/elf/nfp.h | 2 +- include/elf/nios2.h | 2 +- include/elf/or1k.h | 2 +- include/elf/pj.h | 2 +- include/elf/ppc.h | 2 +- include/elf/ppc64.h | 2 +- include/elf/pru.h | 2 +- include/elf/reloc-macros.h | 2 +- include/elf/riscv.h | 5 +- include/elf/rl78.h | 2 +- include/elf/rx.h | 2 +- include/elf/s12z.h | 2 +- include/elf/s390.h | 2 +- include/elf/score.h | 2 +- include/elf/sh.h | 2 +- include/elf/sparc.h | 2 +- include/elf/spu.h | 2 +- include/elf/tic6x-attrs.h | 2 +- include/elf/tic6x.h | 2 +- include/elf/tilegx.h | 2 +- include/elf/tilepro.h | 2 +- include/elf/v850.h | 2 +- include/elf/vax.h | 2 +- include/elf/visium.h | 2 +- include/elf/vxworks.h | 2 +- include/elf/wasm32.h | 2 +- include/elf/x86-64.h | 7 +- include/elf/xgate.h | 2 +- include/elf/xstormy16.h | 2 +- include/elf/xtensa.h | 2 +- include/elf/z80.h | 2 +- include/environ.h | 2 +- include/fibheap.h | 2 +- include/filenames.h | 2 +- include/floatformat.h | 2 +- include/fnmatch.h | 2 +- include/fopen-bin.h | 2 +- include/fopen-same.h | 2 +- include/fopen-vms.h | 2 +- include/gcc-c-fe.def | 2 +- include/gcc-c-interface.h | 2 +- include/gcc-cp-fe.def | 2 +- include/gcc-cp-interface.h | 2 +- include/gcc-interface.h | 2 +- include/getopt.h | 2 +- include/hashtab.h | 2 +- include/hp-symtab.h | 2 +- include/leb128.h | 2 +- include/libcollector.h | 2 +- include/libfcollector.h | 2 +- include/libiberty.h | 2 +- include/longlong.h | 14 +- include/lto-symtab.h | 2 +- include/mach-o/arm.h | 2 +- include/mach-o/arm64.h | 2 +- include/mach-o/codesign.h | 2 +- include/mach-o/external.h | 2 +- include/mach-o/loader.h | 2 +- include/mach-o/reloc.h | 2 +- include/mach-o/unwind.h | 2 +- include/mach-o/x86-64.h | 2 +- include/md5.h | 2 +- include/oasys.h | 2 +- include/objalloc.h | 2 +- include/obstack.h | 2 +- include/opcode/aarch64.h | 652 +- include/opcode/alpha.h | 2 +- include/opcode/arc-attrs.h | 2 +- include/opcode/arc-func.h | 2 +- include/opcode/arc.h | 2 +- include/opcode/arm.h | 2 +- include/opcode/avr.h | 2 +- include/opcode/bfin.h | 2 +- include/opcode/bpf.h | 325 + include/opcode/cgen.h | 4 +- include/opcode/convex.h | 2 +- include/opcode/cr16.h | 2 +- include/opcode/cris.h | 2 +- include/opcode/crx.h | 2 +- include/opcode/csky.h | 2 +- include/opcode/d10v.h | 2 +- include/opcode/d30v.h | 2 +- include/opcode/dlx.h | 2 +- include/opcode/ft32.h | 2 +- include/opcode/h8300.h | 2 +- include/opcode/hppa.h | 2 +- include/opcode/i386.h | 2 +- include/opcode/ia64.h | 2 +- include/opcode/kvx.h | 3159 + include/opcode/loongarch.h | 25 +- include/opcode/m68hc11.h | 2 +- include/opcode/m68k.h | 2 +- include/opcode/metag.h | 2 +- include/opcode/mips.h | 8 +- include/opcode/mmix.h | 2 +- include/opcode/mn10200.h | 2 +- include/opcode/mn10300.h | 2 +- include/opcode/moxie.h | 2 +- include/opcode/msp430-decode.h | 2 +- include/opcode/msp430.h | 2 +- include/opcode/nds32.h | 2 +- include/opcode/nfp.h | 2 +- include/opcode/nios2.h | 2 +- include/opcode/nios2r1.h | 2 +- include/opcode/nios2r2.h | 2 +- include/opcode/np1.h | 2 +- include/opcode/ns32k.h | 2 +- include/opcode/pdp11.h | 2 +- include/opcode/pj.h | 2 +- include/opcode/pn.h | 2 +- include/opcode/ppc.h | 2 +- include/opcode/pru.h | 2 +- include/opcode/pyr.h | 2 +- include/opcode/riscv-opc.h | 338 +- include/opcode/riscv.h | 56 +- include/opcode/rl78.h | 2 +- include/opcode/rx.h | 2 +- include/opcode/s390.h | 2 +- include/opcode/score-datadep.h | 2 +- include/opcode/score-inst.h | 2 +- include/opcode/sparc.h | 2 +- include/opcode/spu-insns.h | 2 +- include/opcode/spu.h | 2 +- include/opcode/tic30.h | 2 +- include/opcode/tic4x.h | 2 +- include/opcode/tic54x.h | 2 +- include/opcode/tic6x-control-registers.h | 2 +- include/opcode/tic6x-insn-formats.h | 2 +- include/opcode/tic6x-opcode-table.h | 2 +- include/opcode/tic6x.h | 2 +- include/opcode/tilegx.h | 2 +- include/opcode/tilepro.h | 2 +- include/opcode/v850.h | 2 +- include/opcode/vax.h | 2 +- include/opcode/visium.h | 2 +- include/opcode/wasm.h | 2 +- include/opcode/xgate.h | 2 +- include/os9k.h | 2 +- include/partition.h | 2 +- include/plugin-api.h | 63 +- include/progress.h | 38 - include/safe-ctype.h | 2 +- include/sframe-api.h | 67 +- include/sframe.h | 79 +- include/sha1.h | 2 +- include/sim/callback.h | 2 +- include/{gdb => sim}/sim-aarch64.h | 0 include/{gdb => sim}/sim-arm.h | 0 include/{gdb => sim}/sim-bfin.h | 0 include/{gdb => sim}/sim-cr16.h | 0 include/{gdb => sim}/sim-d10v.h | 0 include/{gdb => sim}/sim-frv.h | 0 include/{gdb => sim}/sim-ft32.h | 0 include/{gdb => sim}/sim-h8300.h | 0 include/{gdb => sim}/sim-lm32.h | 0 include/{gdb => sim}/sim-m32c.h | 0 include/{gdb => sim}/sim-ppc.h | 0 include/{gdb => sim}/sim-riscv.h | 0 include/{gdb => sim}/sim-rl78.h | 0 include/{gdb => sim}/sim-rx.h | 0 include/{gdb => sim}/sim-sh.h | 0 include/sim/sim.h | 19 +- include/simple-object.h | 2 +- include/som/aout.h | 2 +- include/som/clock.h | 2 +- include/som/internal.h | 2 +- include/som/lst.h | 2 +- include/som/reloc.h | 2 +- include/sort.h | 2 +- include/splay-tree.h | 2 +- include/symcat.h | 2 +- include/timeval-utils.h | 2 +- include/vms/dcx.h | 2 +- include/vms/dmt.h | 2 +- include/vms/dsc.h | 2 +- include/vms/dst.h | 2 +- include/vms/eeom.h | 2 +- include/vms/egps.h | 2 +- include/vms/egsd.h | 2 +- include/vms/egst.h | 2 +- include/vms/egsy.h | 2 +- include/vms/eiaf.h | 2 +- include/vms/eicp.h | 2 +- include/vms/eidc.h | 2 +- include/vms/eiha.h | 2 +- include/vms/eihd.h | 2 +- include/vms/eihi.h | 2 +- include/vms/eihs.h | 2 +- include/vms/eihvn.h | 2 +- include/vms/eisd.h | 2 +- include/vms/emh.h | 2 +- include/vms/eobjrec.h | 2 +- include/vms/esdf.h | 2 +- include/vms/esdfm.h | 2 +- include/vms/esdfv.h | 2 +- include/vms/esgps.h | 2 +- include/vms/esrf.h | 2 +- include/vms/etir.h | 2 +- include/vms/internal.h | 2 +- include/vms/lbr.h | 2 +- include/vms/prt.h | 2 +- include/vms/shl.h | 2 +- include/vtv-change-permission.h | 6 +- include/xregex2.h | 2 +- include/xtensa-config.h | 2 +- include/xtensa-dynconfig.h | 109 +- include/xtensa-isa-internal.h | 2 +- include/xtensa-isa.h | 2 +- intl/configure | 34 + intl/configure.ac | 21 + libbacktrace/configure | 73 +- libbacktrace/gstdint.h | 2 +- libctf/ChangeLog | 10 +- libctf/Makefile.am | 12 +- libctf/Makefile.in | 104 +- libctf/configure | 92 +- libctf/configure.ac | 11 +- libctf/ctf-archive.c | 14 +- libctf/ctf-create.c | 6 +- libctf/ctf-decl.c | 2 +- libctf/ctf-decls.h | 2 +- libctf/ctf-dedup.c | 8 +- libctf/ctf-dump.c | 2 +- libctf/ctf-endian.h | 2 +- libctf/ctf-error.c | 2 +- libctf/ctf-hash.c | 2 +- libctf/ctf-impl.h | 2 +- libctf/ctf-inlines.h | 2 +- libctf/ctf-intl.h | 2 +- libctf/ctf-labels.c | 2 +- libctf/ctf-link.c | 58 +- libctf/ctf-lookup.c | 23 +- libctf/ctf-open-bfd.c | 2 +- libctf/ctf-open.c | 5 +- libctf/ctf-qsort_r.c | 2 +- libctf/ctf-serialize.c | 2 +- libctf/ctf-sha1.c | 2 +- libctf/ctf-sha1.h | 2 +- libctf/ctf-string.c | 2 +- libctf/ctf-subr.c | 2 +- libctf/ctf-types.c | 36 +- libctf/ctf-util.c | 2 +- libctf/doc/ctf-spec.info | 2 +- libctf/doc/ctf-spec.texi | 2 +- libctf/doc/local.mk | 2 +- libctf/elf.h | 2 +- libctf/libctf.ver | 2 +- libctf/swap.h | 2 +- libctf/testsuite/config/default.exp | 7 +- libctf/testsuite/lib/ctf-lib.exp | 14 +- libctf/testsuite/libctf-lookup/lookup.exp | 2 +- .../libctf-lookup/unnamed-field-info-ctf.c | 36 + .../libctf-lookup/unnamed-field-info.c | 79 + .../libctf-lookup/unnamed-field-info.lk | 3 + .../libctf-regression/libctf-repeat-cu.exp | 2 +- .../libctf-regression/regression.exp | 2 +- .../libctf-writable/error-propagation.c | 164 + .../libctf-writable/error-propagation.lk | 1 + libctf/testsuite/libctf-writable/writable.exp | 2 +- libdecnumber/configure | 22 +- libdecnumber/configure.ac | 19 +- libiberty/ChangeLog | 384 +- libiberty/Makefile.in | 2 +- libiberty/README | 2 +- libiberty/_doprnt.c | 3 +- libiberty/acinclude.m4 | 2 +- libiberty/argv.c | 35 +- libiberty/asprintf.c | 2 +- libiberty/choose-temp.c | 2 +- libiberty/clock.c | 2 +- libiberty/concat.c | 2 +- libiberty/configure | 7 +- libiberty/configure.ac | 4 +- libiberty/copying-lib.texi | 2 +- libiberty/cp-demangle.c | 441 +- libiberty/cp-demangle.h | 4 +- libiberty/cp-demint.c | 2 +- libiberty/cplus-dem.c | 2 +- libiberty/crc32.c | 2 +- libiberty/d-demangle.c | 2 +- libiberty/dwarfnames.c | 2 +- libiberty/dyn-string.c | 2 +- libiberty/fdmatch.c | 2 +- libiberty/fibheap.c | 2 +- libiberty/filedescriptor.c | 2 +- libiberty/filename_cmp.c | 2 +- libiberty/floatformat.c | 2 +- libiberty/fnmatch.c | 2 +- libiberty/fopen_unlocked.c | 2 +- libiberty/functions.texi | 2 +- libiberty/gather-docs | 2 +- libiberty/getopt.c | 2 +- libiberty/getopt1.c | 2 +- libiberty/getruntime.c | 2 +- libiberty/hashtab.c | 2 +- libiberty/hex.c | 2 +- libiberty/lbasename.c | 2 +- libiberty/libiberty.texi | 4 +- libiberty/lrealpath.c | 201 +- libiberty/maint-tool | 2 +- libiberty/make-relative-prefix.c | 2 +- libiberty/make-temp-file.c | 3 +- libiberty/md5.c | 2 +- libiberty/memmem.c | 2 +- libiberty/mempcpy.c | 2 +- libiberty/mkstemps.c | 2 +- libiberty/objalloc.c | 2 +- libiberty/obstack.c | 2 +- libiberty/obstacks.texi | 4 +- libiberty/partition.c | 2 +- libiberty/pex-common.c | 2 +- libiberty/pex-common.h | 2 +- libiberty/pex-djgpp.c | 2 +- libiberty/pex-msdos.c | 2 +- libiberty/pex-one.c | 2 +- libiberty/pex-unix.c | 2 +- libiberty/pex-win32.c | 95 +- libiberty/pexecute.c | 2 +- libiberty/physmem.c | 2 +- libiberty/putenv.c | 2 +- libiberty/regex.c | 2 +- libiberty/rust-demangle.c | 2 +- libiberty/safe-ctype.c | 2 +- libiberty/setenv.c | 2 +- libiberty/setproctitle.c | 2 +- libiberty/sha1.c | 2 +- libiberty/simple-object-coff.c | 2 +- libiberty/simple-object-common.h | 2 +- libiberty/simple-object-elf.c | 2 +- libiberty/simple-object-mach-o.c | 2 +- libiberty/simple-object-xcoff.c | 2 +- libiberty/simple-object.c | 2 +- libiberty/snprintf.c | 2 +- libiberty/sort.c | 2 +- libiberty/spaces.c | 2 +- libiberty/splay-tree.c | 2 +- libiberty/stack-limit.c | 2 +- libiberty/stpcpy.c | 2 +- libiberty/stpncpy.c | 2 +- libiberty/strndup.c | 2 +- libiberty/strstr.c | 15 +- libiberty/strtod.c | 2 +- libiberty/strverscmp.c | 2 +- libiberty/testsuite/Makefile.in | 2 +- libiberty/testsuite/demangle-expected | 123 +- libiberty/testsuite/demangler-fuzzer.c | 2 +- libiberty/testsuite/test-demangle.c | 2 +- libiberty/testsuite/test-expandargv.c | 2 +- libiberty/testsuite/test-pexecute.c | 2 +- libiberty/testsuite/test-strtol.c | 2 +- libiberty/timeval-utils.c | 2 +- libiberty/unlink-if-ordinary.c | 2 +- libiberty/vasprintf.c | 2 +- libiberty/vfprintf.c | 2 +- libiberty/vprintf-support.c | 2 +- libiberty/vprintf-support.h | 2 +- libiberty/vsnprintf.c | 2 +- libiberty/vsprintf.c | 2 +- libiberty/xasprintf.c | 2 +- libiberty/xexit.c | 2 +- libiberty/xmalloc.c | 2 +- libiberty/xstrndup.c | 2 +- libiberty/xvasprintf.c | 2 +- libsframe/Makefile.am | 17 +- libsframe/Makefile.in | 149 +- libsframe/configure | 171 +- libsframe/configure.ac | 31 +- libsframe/doc/local.mk | 2 +- libsframe/doc/sframe-spec.info | 347 +- libsframe/doc/sframe-spec.texi | 177 +- libsframe/libsframe.ver | 40 + libsframe/libtool-version | 30 + libsframe/sframe-dump.c | 88 +- libsframe/sframe-error.c | 2 +- libsframe/sframe-impl.h | 38 +- libsframe/sframe.c | 640 +- libsframe/testsuite/config/default.exp | 2 +- libsframe/testsuite/libsframe.decode/DATA-BE | Bin 64 -> 67 bytes libsframe/testsuite/libsframe.decode/DATA1 | Bin 60 -> 63 bytes libsframe/testsuite/libsframe.decode/DATA2 | Bin 92 -> 98 bytes .../testsuite/libsframe.decode/be-flipping.c | 5 +- .../testsuite/libsframe.decode/decode.exp | 2 +- .../testsuite/libsframe.decode/frecnt-1.c | 5 +- .../testsuite/libsframe.decode/frecnt-2.c | 5 +- .../testsuite/libsframe.encode/encode-1.c | 2 +- .../testsuite/libsframe.encode/encode.exp | 2 +- libsframe/testsuite/libsframe.find/find.exp | 42 + .../testsuite/libsframe.find/findfre-1.c | 155 + .../testsuite/libsframe.find/findfunc-1.c | 204 + libsframe/testsuite/libsframe.find/local.mk | 15 + .../testsuite/libsframe.find/plt-findfre-1.c | 127 + libsframe/testsuite/local.mk | 3 +- libtool.m4 | 88 +- ltmain.sh | 8 +- opcodes/ChangeLog | 122 +- opcodes/MAINTAINERS | 2 +- opcodes/Makefile.am | 53 +- opcodes/Makefile.in | 59 +- opcodes/aarch64-asm-2.c | 352 +- opcodes/aarch64-asm.c | 183 +- opcodes/aarch64-asm.h | 7 +- opcodes/aarch64-dis-2.c | 9957 +- opcodes/aarch64-dis.c | 317 +- opcodes/aarch64-dis.h | 7 +- opcodes/aarch64-gen.c | 4 +- opcodes/aarch64-opc-2.c | 107 +- opcodes/aarch64-opc.c | 2050 +- opcodes/aarch64-opc.h | 224 +- opcodes/aarch64-sys-regs.def | 1060 + opcodes/aarch64-tbl.h | 1289 +- opcodes/alpha-dis.c | 2 +- opcodes/alpha-opc.c | 2 +- opcodes/arc-dis.c | 2 +- opcodes/arc-dis.h | 2 +- opcodes/arc-ext-tbl.h | 2 +- opcodes/arc-ext.c | 2 +- opcodes/arc-ext.h | 2 +- opcodes/arc-fxi.h | 2 +- opcodes/arc-opc.c | 2 +- opcodes/arc-regs.h | 2 +- opcodes/arc-tbl.h | 724 +- opcodes/arm-dis.c | 23 +- opcodes/avr-dis.c | 2 +- opcodes/bfin-dis.c | 2 +- opcodes/bpf-asm.c | 590 - opcodes/bpf-desc.c | 1939 - opcodes/bpf-desc.h | 268 - opcodes/bpf-dis.c | 815 +- opcodes/bpf-ibld.c | 961 - opcodes/bpf-opc.c | 2309 +- opcodes/bpf-opc.h | 166 - opcodes/cgen-asm.c | 2 +- opcodes/cgen-asm.in | 2 +- opcodes/cgen-bitset.c | 2 +- opcodes/cgen-dis.c | 4 +- opcodes/cgen-dis.in | 2 +- opcodes/cgen-ibld.in | 2 +- opcodes/cgen-opc.c | 2 +- opcodes/cgen.sh | 4 +- opcodes/configure | 101 +- opcodes/configure.ac | 10 +- opcodes/configure.com | 2 +- opcodes/cr16-dis.c | 2 +- opcodes/cr16-opc.c | 2 +- opcodes/cris-desc.c | 2 +- opcodes/cris-desc.h | 2 +- opcodes/cris-dis.c | 38 +- opcodes/cris-opc.c | 2 +- opcodes/cris-opc.h | 2 +- opcodes/crx-dis.c | 2 +- opcodes/crx-opc.c | 2 +- opcodes/csky-dis.c | 18 +- opcodes/csky-opc.h | 2 +- opcodes/d10v-dis.c | 2 +- opcodes/d10v-opc.c | 2 +- opcodes/d30v-dis.c | 2 +- opcodes/d30v-opc.c | 2 +- opcodes/dis-buf.c | 2 +- opcodes/dis-init.c | 2 +- opcodes/disassemble.c | 66 +- opcodes/disassemble.h | 5 +- opcodes/dlx-dis.c | 2 +- opcodes/epiphany-asm.c | 2 +- opcodes/epiphany-desc.c | 2 +- opcodes/epiphany-desc.h | 2 +- opcodes/epiphany-dis.c | 2 +- opcodes/epiphany-ibld.c | 2 +- opcodes/epiphany-opc.c | 2 +- opcodes/epiphany-opc.h | 2 +- opcodes/fr30-asm.c | 2 +- opcodes/fr30-desc.c | 2 +- opcodes/fr30-desc.h | 2 +- opcodes/fr30-dis.c | 2 +- opcodes/fr30-ibld.c | 2 +- opcodes/fr30-opc.c | 2 +- opcodes/fr30-opc.h | 2 +- opcodes/frv-asm.c | 2 +- opcodes/frv-desc.c | 2 +- opcodes/frv-desc.h | 2 +- opcodes/frv-dis.c | 2 +- opcodes/frv-ibld.c | 2 +- opcodes/frv-opc.c | 2 +- opcodes/frv-opc.h | 2 +- opcodes/ft32-dis.c | 4 +- opcodes/ft32-opc.c | 2 +- opcodes/h8300-dis.c | 2 +- opcodes/hppa-dis.c | 2 +- opcodes/i386-dis-evex-len.h | 28 +- opcodes/i386-dis-evex-mod.h | 60 +- opcodes/i386-dis-evex-prefix.h | 22 +- opcodes/i386-dis-evex-reg.h | 8 +- opcodes/i386-dis-evex-w.h | 36 +- opcodes/i386-dis-evex.h | 60 +- opcodes/i386-dis.c | 4126 +- opcodes/i386-gen.c | 1448 +- opcodes/i386-init.h | 2189 +- opcodes/i386-mnem.h | 2362 + opcodes/i386-opc.h | 249 +- opcodes/i386-opc.tbl | 3986 +- opcodes/i386-reg.tbl | 2 +- opcodes/i386-tbl.h | 57235 +++----- opcodes/ia64-asmtab.c | 2 +- opcodes/ia64-asmtab.h | 2 +- opcodes/ia64-dis.c | 2 +- opcodes/ia64-gen.c | 10 +- opcodes/ia64-opc-a.c | 2 +- opcodes/ia64-opc-b.c | 2 +- opcodes/ia64-opc-d.c | 2 +- opcodes/ia64-opc-f.c | 2 +- opcodes/ia64-opc-i.c | 2 +- opcodes/ia64-opc-m.c | 2 +- opcodes/ia64-opc-x.c | 2 +- opcodes/ia64-opc.c | 2 +- opcodes/ia64-opc.h | 2 +- opcodes/ip2k-asm.c | 2 +- opcodes/ip2k-desc.c | 2 +- opcodes/ip2k-desc.h | 2 +- opcodes/ip2k-dis.c | 2 +- opcodes/ip2k-ibld.c | 2 +- opcodes/ip2k-opc.c | 2 +- opcodes/ip2k-opc.h | 2 +- opcodes/iq2000-asm.c | 2 +- opcodes/iq2000-desc.c | 2 +- opcodes/iq2000-desc.h | 2 +- opcodes/iq2000-dis.c | 2 +- opcodes/iq2000-ibld.c | 2 +- opcodes/iq2000-opc.c | 2 +- opcodes/iq2000-opc.h | 2 +- opcodes/kvx-dis.c | 1587 + opcodes/kvx-dis.h | 65 + opcodes/kvx-opc.c | 111104 +++++++++++++++ opcodes/lm32-asm.c | 2 +- opcodes/lm32-desc.c | 2 +- opcodes/lm32-desc.h | 2 +- opcodes/lm32-dis.c | 2 +- opcodes/lm32-ibld.c | 2 +- opcodes/lm32-opc.c | 2 +- opcodes/lm32-opc.h | 2 +- opcodes/lm32-opinst.c | 2 +- opcodes/loongarch-coder.c | 2 +- opcodes/loongarch-dis.c | 127 +- opcodes/loongarch-opc.c | 1878 +- opcodes/m10200-dis.c | 2 +- opcodes/m10200-opc.c | 2 +- opcodes/m10300-dis.c | 2 +- opcodes/m10300-opc.c | 2 +- opcodes/m32c-asm.c | 2 +- opcodes/m32c-desc.c | 2 +- opcodes/m32c-desc.h | 2 +- opcodes/m32c-dis.c | 2 +- opcodes/m32c-ibld.c | 2 +- opcodes/m32c-opc.c | 2 +- opcodes/m32c-opc.h | 2 +- opcodes/m32r-asm.c | 2 +- opcodes/m32r-desc.c | 2 +- opcodes/m32r-desc.h | 2 +- opcodes/m32r-dis.c | 2 +- opcodes/m32r-ibld.c | 2 +- opcodes/m32r-opc.c | 2 +- opcodes/m32r-opc.h | 2 +- opcodes/m32r-opinst.c | 2 +- opcodes/m68hc11-dis.c | 2 +- opcodes/m68hc11-opc.c | 2 +- opcodes/m68k-dis.c | 356 +- opcodes/m68k-opc.c | 2 +- opcodes/makefile.vms | 2 +- opcodes/mcore-dis.c | 2 +- opcodes/mcore-opc.h | 2 +- opcodes/mep-asm.c | 11 +- opcodes/mep-desc.c | 2 +- opcodes/mep-desc.h | 2 +- opcodes/mep-dis.c | 50 +- opcodes/mep-ibld.c | 2 +- opcodes/mep-opc.c | 2 +- opcodes/mep-opc.h | 2 +- opcodes/metag-dis.c | 2 +- opcodes/microblaze-dis.c | 2 +- opcodes/microblaze-dis.h | 2 +- opcodes/microblaze-opc.h | 46 +- opcodes/microblaze-opcm.h | 14 +- opcodes/micromips-opc.c | 2 +- opcodes/mips-dis.c | 18 +- opcodes/mips-formats.h | 2 +- opcodes/mips-opc.c | 109 +- opcodes/mips16-opc.c | 2 +- opcodes/mmix-dis.c | 2 +- opcodes/mmix-opc.c | 2 +- opcodes/moxie-dis.c | 2 +- opcodes/moxie-opc.c | 2 +- opcodes/msp430-decode.c | 2 +- opcodes/msp430-decode.opc | 2 +- opcodes/msp430-dis.c | 2 +- opcodes/mt-asm.c | 2 +- opcodes/mt-desc.c | 2 +- opcodes/mt-desc.h | 2 +- opcodes/mt-dis.c | 2 +- opcodes/mt-ibld.c | 2 +- opcodes/mt-opc.c | 2 +- opcodes/mt-opc.h | 2 +- opcodes/nds32-asm.c | 2 +- opcodes/nds32-asm.h | 2 +- opcodes/nds32-dis.c | 2 +- opcodes/nds32-opc.h | 2 +- opcodes/nfp-dis.c | 6 +- opcodes/nios2-dis.c | 2 +- opcodes/nios2-opc.c | 2 +- opcodes/ns32k-dis.c | 2 +- opcodes/opc2c.c | 2 +- opcodes/opintl.h | 2 +- opcodes/or1k-asm.c | 2 +- opcodes/or1k-desc.c | 2 +- opcodes/or1k-desc.h | 2 +- opcodes/or1k-dis.c | 2 +- opcodes/or1k-ibld.c | 2 +- opcodes/or1k-opc.c | 2 +- opcodes/or1k-opc.h | 2 +- opcodes/or1k-opinst.c | 2 +- opcodes/pdp11-dis.c | 2 +- opcodes/pdp11-opc.c | 2 +- opcodes/pj-dis.c | 2 +- opcodes/pj-opc.c | 2 +- opcodes/po/Make-in | 2 +- opcodes/po/POTFILES.in | 20 +- opcodes/po/de.gmo | Bin 58176 -> 54340 bytes opcodes/po/de.po | 926 +- opcodes/po/opcodes.pot | 691 +- opcodes/po/ro.gmo | Bin 9020 -> 56150 bytes opcodes/po/ro.po | 2089 +- opcodes/po/sr.gmo | Bin 72091 -> 67410 bytes opcodes/po/sr.po | 924 +- opcodes/po/sv.gmo | Bin 55277 -> 55522 bytes opcodes/po/sv.po | 489 +- opcodes/po/uk.gmo | Bin 75714 -> 70903 bytes opcodes/po/uk.po | 922 +- opcodes/ppc-dis.c | 2 +- opcodes/ppc-opc.c | 2 +- opcodes/pru-dis.c | 2 +- opcodes/pru-opc.c | 2 +- opcodes/riscv-dis.c | 306 +- opcodes/riscv-opc.c | 412 +- opcodes/rl78-decode.c | 2 +- opcodes/rl78-decode.opc | 2 +- opcodes/rl78-dis.c | 2 +- opcodes/rx-decode.c | 2 +- opcodes/rx-decode.opc | 2 +- opcodes/rx-dis.c | 2 +- opcodes/s12z-dis.c | 2 +- opcodes/s12z-opc.c | 2 +- opcodes/s12z-opc.h | 2 +- opcodes/s390-dis.c | 2 +- opcodes/s390-mkopc.c | 2 +- opcodes/s390-opc.c | 2 +- opcodes/s390-opc.txt | 2 +- opcodes/score-dis.c | 2 +- opcodes/score-opc.h | 2 +- opcodes/score7-dis.c | 2 +- opcodes/sh-dis.c | 2 +- opcodes/sh-opc.h | 2 +- opcodes/sparc-dis.c | 2 +- opcodes/sparc-opc.c | 2 +- opcodes/spu-dis.c | 2 +- opcodes/spu-opc.c | 2 +- opcodes/sysdep.h | 2 +- opcodes/tic30-dis.c | 2 +- opcodes/tic4x-dis.c | 2 +- opcodes/tic54x-dis.c | 2 +- opcodes/tic54x-opc.c | 2 +- opcodes/tic6x-dis.c | 2 +- opcodes/tilegx-dis.c | 2 +- opcodes/tilegx-opc.c | 2 +- opcodes/tilepro-dis.c | 2 +- opcodes/tilepro-opc.c | 2 +- opcodes/v850-dis.c | 2 +- opcodes/v850-opc.c | 2 +- opcodes/vax-dis.c | 2 +- opcodes/visium-dis.c | 2 +- opcodes/visium-opc.c | 2 +- opcodes/wasm32-dis.c | 2 +- opcodes/xgate-dis.c | 2 +- opcodes/xgate-opc.c | 2 +- opcodes/xstormy16-asm.c | 2 +- opcodes/xstormy16-desc.c | 2 +- opcodes/xstormy16-desc.h | 2 +- opcodes/xstormy16-dis.c | 2 +- opcodes/xstormy16-ibld.c | 2 +- opcodes/xstormy16-opc.c | 2 +- opcodes/xstormy16-opc.h | 2 +- opcodes/xtensa-dis.c | 58 +- opcodes/z80-dis.c | 2 +- opcodes/z8k-dis.c | 2 +- opcodes/z8k-opc.h | 2 +- opcodes/z8kgen.c | 4 +- readline/readline/isearch.c | 3 + readline/readline/mbutil.c | 2 +- sha256.sum | 8887 +- sim/Makefile.am | 41 +- sim/Makefile.in | 3438 +- sim/README-HACKING | 102 +- sim/aarch64/Makefile.in | 33 - sim/aarch64/aarch64-sim.h | 60 + sim/aarch64/cpustate.c | 244 +- sim/aarch64/cpustate.h | 3 +- sim/aarch64/interp.c | 7 +- sim/aarch64/local.mk | 22 + sim/aarch64/sim-main.h | 35 - sim/aarch64/simulator.c | 6 +- sim/aclocal.m4 | 1 + sim/arch-subdir.mk.in | 10 - sim/arm/arm-sim.h | 26 + sim/arm/armdefs.h | 6 + sim/arm/armemu.h | 2 + sim/arm/armos.c | 3 - sim/arm/local.mk | 24 + sim/arm/sim-main.h | 11 - sim/arm/wrapper.c | 21 +- sim/{bpf/decode.h => avr/avr-sim.h} | 36 +- sim/avr/interp.c | 210 +- sim/avr/local.mk | 19 + sim/avr/sim-main.h | 18 - sim/bfin/Makefile.in | 64 - sim/bfin/bfin-sim.c | 2 + sim/bfin/bfin-sim.h | 29 + sim/bfin/devices.h | 2 + sim/bfin/dv-bfin_pll.c | 1 - sim/bfin/interp.c | 20 +- sim/bfin/local.mk | 59 + sim/bfin/machs.c | 5 +- sim/bfin/sim-main.h | 42 - sim/bpf/Makefile.in | 151 - sim/bpf/arch.c | 35 - sim/bpf/arch.h | 50 - sim/bpf/bpf-helpers.c | 181 - sim/bpf/bpf-helpers.def | 194 - sim/bpf/bpf-sim.c | 1447 + sim/bpf/bpf-sim.h | 20 +- sim/bpf/bpf.c | 329 - sim/bpf/cpu.c | 61 - sim/bpf/cpu.h | 81 - sim/bpf/cpuall.h | 65 - sim/bpf/decode-be.c | 1131 - sim/bpf/decode-be.h | 94 - sim/bpf/decode-le.c | 1131 - sim/bpf/decode-le.h | 94 - sim/bpf/defs-be.h | 383 - sim/bpf/defs-le.h | 383 - sim/bpf/local.mk | 56 +- sim/bpf/mloop.in | 168 - sim/bpf/sem-be.c | 3207 - sim/bpf/sem-le.c | 3207 - sim/bpf/sim-if.c | 228 - sim/bpf/sim-main.h | 22 +- sim/common/Make-common.in | 427 - sim/common/callback.c | 2 - sim/common/cgen-cpu.h | 5 + sim/common/cgen-defs.h | 2 + sim/common/cgen-mem.h | 2 + sim/common/cgen-scache.c | 2 +- sim/common/cgen-scache.h | 2 +- sim/common/cgen-trace.h | 1 + sim/common/cgen.sh | 4 - sim/common/defs.h | 2 +- sim/common/dv-core.c | 18 + sim/common/dv-pal.c | 2 - sim/common/dv-sockser.c | 2 - sim/common/hw-events.c | 2 + sim/common/local.mk | 185 +- sim/common/nrun.c | 2 - sim/common/sim-base.h | 2 + sim/common/sim-close.c | 2 + sim/common/sim-core.h | 1 + sim/common/sim-cpu.c | 23 +- sim/common/sim-cpu.h | 61 +- sim/common/sim-endian.c | 2 + sim/common/sim-endian.h | 2 - sim/common/sim-hrw.c | 8 +- sim/common/sim-info.c | 2 +- sim/common/sim-io.c | 2 - sim/common/sim-memopt.c | 4 - sim/common/sim-module.c | 2 +- sim/common/sim-module.h | 4 +- sim/common/sim-options.c | 2 +- sim/common/sim-profile.c | 12 +- sim/common/sim-profile.h | 2 +- sim/common/sim-signal.c | 3 +- sim/common/sim-trace.h | 1 + sim/common/sim-types.h | 2 + sim/common/sim-utils.c | 11 +- sim/common/sim-utils.h | 4 +- sim/common/syscall.c | 2 - sim/config.h.in | 35 +- sim/configure | 1619 +- sim/configure.ac | 69 +- sim/cr16/Makefile.in | 27 - sim/cr16/{cr16_sim.h => cr16-sim.h} | 1 + sim/cr16/gencode.c | 3 +- sim/cr16/interp.c | 6 +- sim/cr16/local.mk | 28 +- sim/cr16/sim-main.h | 12 - sim/cr16/simops.c | 6 +- sim/cris/Makefile.in | 71 - sim/cris/arch.c | 5 +- sim/cris/arch.h | 13 +- sim/cris/cpuall.h | 5 +- sim/cris/cpuv10.c | 5 +- sim/cris/cpuv10.h | 7 +- sim/cris/cpuv32.c | 5 +- sim/cris/cpuv32.h | 7 +- sim/cris/cris-tmpl.c | 29 +- sim/cris/decodev10.c | 5 +- sim/cris/decodev10.h | 6 +- sim/cris/decodev32.c | 5 +- sim/cris/decodev32.h | 7 +- sim/cris/dv-rv.c | 2 - sim/cris/local.mk | 67 +- sim/cris/modelv10.c | 5 +- sim/cris/modelv32.c | 5 +- sim/cris/rvdummy.c | 3 - sim/cris/semcrisv10f-switch.c | 5 +- sim/cris/semcrisv32f-switch.c | 5 +- sim/cris/sim-if.c | 45 +- sim/cris/sim-main.h | 21 +- sim/cris/traps.c | 416 +- sim/d10v/{d10v_sim.h => d10v-sim.h} | 5 + sim/d10v/endian.c | 4 +- sim/d10v/gencode.c | 3 +- sim/d10v/interp.c | 20 +- sim/d10v/local.mk | 29 +- sim/d10v/sim-main.h | 12 - sim/d10v/simops.c | 6 +- sim/erc32/Makefile.in | 33 - sim/erc32/interf.c | 10 +- sim/erc32/local.mk | 33 +- sim/example-synacor/example-synacor-sim.h | 38 + sim/example-synacor/interp.c | 5 +- sim/example-synacor/local.mk | 20 + sim/example-synacor/sim-main.c | 74 +- sim/example-synacor/sim-main.h | 15 - sim/frv/Makefile.in | 63 - sim/frv/arch.c | 5 +- sim/frv/arch.h | 13 +- sim/frv/cpu.c | 5 +- sim/frv/cpu.h | 23 +- sim/frv/cpuall.h | 5 +- sim/frv/decode.c | 27 +- sim/frv/decode.h | 5 +- sim/frv/frv.c | 2 +- sim/frv/local.mk | 72 +- sim/frv/model.c | 5 +- sim/frv/profile.c | 4 +- sim/frv/profile.h | 2 +- sim/frv/sem.c | 5 +- sim/frv/sim-if.c | 6 +- sim/frv/sim-main.h | 42 +- sim/frv/traps.c | 2 +- sim/ft32/ft32-sim.h | 4 +- sim/ft32/interp.c | 183 +- sim/ft32/local.mk | 19 + sim/ft32/sim-main.h | 12 - sim/h8300/compile.c | 75 +- sim/h8300/h8300-sim.h | 153 + sim/h8300/local.mk | 19 + sim/h8300/sim-main.h | 150 - sim/igen/gen-itable.c | 34 +- sim/igen/lf.c | 79 +- sim/igen/local.mk | 8 +- sim/iq2000/Makefile.in | 63 - sim/iq2000/arch.c | 5 +- sim/iq2000/arch.h | 13 +- sim/iq2000/cpu.c | 5 +- sim/iq2000/cpu.h | 15 +- sim/iq2000/cpuall.h | 5 +- sim/iq2000/decode.c | 289 +- sim/iq2000/decode.h | 9 +- sim/iq2000/local.mk | 50 +- sim/iq2000/model.c | 5 +- sim/iq2000/sem-switch.c | 9 +- sim/iq2000/sem.c | 9 +- sim/iq2000/sim-if.c | 5 +- sim/iq2000/sim-main.h | 17 +- sim/lm32/Makefile.in | 41 - sim/lm32/arch.c | 5 +- sim/lm32/arch.h | 13 +- sim/lm32/cpu.c | 5 +- sim/lm32/cpu.h | 22 +- sim/lm32/cpuall.h | 5 +- sim/lm32/decode.c | 13 +- sim/lm32/decode.h | 5 +- sim/lm32/lm32-sim.h | 2 +- sim/lm32/local.mk | 55 +- sim/lm32/model.c | 5 +- sim/lm32/sem-switch.c | 5 +- sim/lm32/sem.c | 5 +- sim/lm32/sim-if.c | 5 +- sim/lm32/sim-main.h | 30 +- sim/m32c/Makefile.in | 40 - sim/m32c/gdb-if.c | 12 +- sim/m32c/local.mk | 36 +- sim/m32c/trace.c | 2 +- sim/m32r/Makefile.in | 91 - sim/m32r/arch.c | 5 +- sim/m32r/arch.h | 13 +- sim/m32r/cpu.c | 5 +- sim/m32r/cpu.h | 15 +- sim/m32r/cpu2.c | 5 +- sim/m32r/cpu2.h | 15 +- sim/m32r/cpuall.h | 5 +- sim/m32r/cpux.c | 5 +- sim/m32r/cpux.h | 15 +- sim/m32r/decode.c | 23 +- sim/m32r/decode.h | 5 +- sim/m32r/decode2.c | 27 +- sim/m32r/decode2.h | 5 +- sim/m32r/decodex.c | 27 +- sim/m32r/decodex.h | 5 +- sim/m32r/local.mk | 98 +- sim/m32r/m32r-sim.h | 24 + sim/m32r/m32r.c | 2 + sim/m32r/m32r2.c | 2 + sim/m32r/m32rx.c | 2 + sim/m32r/model.c | 5 +- sim/m32r/model2.c | 5 +- sim/m32r/modelx.c | 5 +- sim/m32r/sem-switch.c | 5 +- sim/m32r/sem.c | 5 +- sim/m32r/sem2-switch.c | 5 +- sim/m32r/semx-switch.c | 5 +- sim/m32r/sim-if.c | 13 +- sim/m32r/sim-main.h | 38 +- sim/m32r/traps.c | 2 + sim/m4/sim_ac_option_cgen_maint.m4 | 3 + sim/m4/sim_ac_option_environment.m4 | 6 - sim/m4/sim_ac_option_smp.m4 | 21 +- sim/m4/sim_ac_output.m4 | 51 - sim/m4/sim_ac_platform.m4 | 22 +- sim/m4/sim_ac_toolchain.m4 | 1 - sim/m68hc11/Makefile.in | 39 - sim/m68hc11/dv-m68hc11.c | 136 +- sim/m68hc11/dv-m68hc11eepr.c | 44 +- sim/m68hc11/dv-m68hc11sio.c | 77 +- sim/m68hc11/dv-m68hc11spi.c | 46 +- sim/m68hc11/dv-m68hc11tim.c | 130 +- sim/m68hc11/dv-nvram.c | 1 + sim/m68hc11/emulos.c | 8 +- sim/m68hc11/gencode.c | 2 +- sim/m68hc11/interp.c | 67 +- sim/m68hc11/interrupts.c | 18 +- sim/m68hc11/local.mk | 42 +- sim/m68hc11/m68hc11-sim.h | 565 + sim/m68hc11/m68hc11_sim.c | 199 +- sim/m68hc11/sim-main.h | 537 - sim/mcore/interp.c | 111 +- sim/mcore/local.mk | 19 + sim/mcore/mcore-sim.h | 64 + sim/mcore/sim-main.h | 46 - sim/microblaze/Makefile.in | 25 - sim/microblaze/interp.c | 13 +- sim/microblaze/local.mk | 19 + sim/microblaze/microblaze-sim.h | 46 + sim/microblaze/microblaze.h | 4 +- sim/microblaze/sim-main.h | 27 - sim/mips/Makefile.in | 596 - sim/mips/acinclude.m4 | 338 + sim/mips/aclocal.m4 | 17 - sim/mips/configure | 3534 - sim/mips/configure.ac | 416 - sim/mips/interp.c | 154 +- sim/mips/local.mk | 363 + sim/mips/m16run.c | 4 - sim/mips/micromipsrun.c | 4 - sim/mips/sim-main.h | 69 +- sim/mn10300/am33.igen | 8 +- sim/mn10300/dv-mn103cpu.c | 4 + sim/mn10300/interp.c | 9 +- sim/mn10300/local.mk | 92 +- sim/mn10300/{mn10300_sim.h => mn10300-sim.h} | 24 +- sim/mn10300/mn10300.igen | 24 +- sim/mn10300/op_utils.c | 14 +- sim/mn10300/sim-main.c | 5 + sim/mn10300/sim-main.h | 55 +- sim/moxie/interp.c | 34 +- sim/moxie/local.mk | 21 + sim/{bpf/eng.h => moxie/moxie-sim.h} | 23 +- sim/moxie/sim-main.h | 16 - sim/msp430/Makefile.in | 26 - sim/msp430/local.mk | 19 + sim/msp430/msp430-sim.c | 224 +- sim/msp430/msp430-sim.h | 4 +- sim/msp430/sim-main.h | 16 - sim/or1k/Makefile.in | 93 - sim/or1k/cpu.h | 6 +- sim/or1k/decode.c | 12 +- sim/or1k/local.mk | 55 +- sim/or1k/or1k-sim.h | 27 + sim/or1k/or1k.c | 36 +- sim/or1k/sem-switch.c | 2 +- sim/or1k/sim-if.c | 7 +- sim/or1k/sim-main.h | 43 +- sim/or1k/traps.c | 19 +- sim/ppc/Makefile.in | 73 +- sim/ppc/configure | 2 +- sim/ppc/configure.ac | 2 +- sim/ppc/dgen.c | 335 - sim/ppc/emul_bugapi.c | 2 - sim/ppc/emul_chirp.c | 2 - sim/ppc/emul_netbsd.c | 2 - sim/ppc/emul_unix.c | 6 - sim/ppc/gdb-sim.c | 2 +- sim/ppc/hw_com.c | 2 - sim/ppc/hw_disk.c | 3 - sim/ppc/hw_pal.c | 2 - sim/ppc/lf.c | 85 +- sim/ppc/local.mk | 19 +- sim/ppc/main.c | 2 - sim/ppc/mon.c | 2 - sim/ppc/options.c | 4 - sim/ppc/pk.h | 2 +- sim/ppc/psim.c | 2 +- sim/ppc/sim-main.h | 7 - sim/ppc/sim_calls.c | 20 +- sim/ppc/spreg-gen.py | 305 + sim/ppc/spreg.c | 1175 + sim/ppc/spreg.h | 108 + sim/ppc/table.c | 2 - sim/pru/interp.c | 32 +- sim/pru/local.mk | 19 + sim/pru/pru.h | 58 +- sim/pru/sim-main.h | 61 - sim/riscv/interp.c | 9 +- sim/riscv/local.mk | 23 + sim/riscv/machs.c | 1 + sim/riscv/riscv-sim.h | 78 + sim/riscv/sim-main.c | 443 +- sim/riscv/sim-main.h | 56 - sim/rl78/Makefile.in | 34 - sim/rl78/gdb-if.c | 12 +- sim/rl78/load.c | 4 +- sim/rl78/local.mk | 25 +- sim/rl78/main.c | 2 - sim/rx/Makefile.in | 39 - sim/rx/gdb-if.c | 13 +- sim/rx/load.c | 4 +- sim/rx/local.mk | 31 +- sim/rx/main.c | 2 - sim/semcrisv32f-switch.c | 14120 ++ sim/sh/interp.c | 20 +- sim/sh/local.mk | 31 +- sim/sh/sh-sim.h | 118 + sim/sh/sim-main.h | 101 - sim/testsuite/bpf/allinsn.exp | 5 +- sim/testsuite/bpf/alu.s | 4 +- sim/testsuite/bpf/alu32.s | 6 +- sim/testsuite/bpf/ldabs.s | 8 +- sim/testsuite/bpf/mem.s | 2 +- sim/testsuite/bpf/mov.s | 2 +- sim/testsuite/bpf/testutils.inc | 2 +- sim/testsuite/lib/sim-defs.exp | 19 + sim/testsuite/or1k/adrp.S | 5 +- sim/testsuite/or1k/fpu-unordered.S | 2 +- sim/testsuite/or1k/fpu64a32-unordered.S | 2 +- sim/testsuite/or1k/fpu64a32.S | 2 +- sim/testsuite/or1k/or1k-test.ld | 7 +- sim/v850/Makefile.in | 28 - sim/v850/interp.c | 17 +- sim/v850/local.mk | 87 +- sim/v850/sim-main.h | 729 +- sim/v850/simops.c | 11 +- sim/v850/simops.h | 7 +- sim/v850/v850-sim.h | 722 + sim/v850/v850.igen | 158 +- sim/v850/v850_sim.h | 8 - src-release.sh | 4 +- zlib/Makefile.in | 2 + zlib/configure | 97 +- zlib/configure.ac | 21 +- 4712 files changed, 379455 insertions(+), 209075 deletions(-) create mode 100644 SECURITY.txt delete mode 100644 bfd/aix386-core.c create mode 100644 bfd/bpf-reloc.def create mode 100644 bfd/cpu-kvx.c delete mode 100644 bfd/doc/init.texi create mode 100644 bfd/elfnn-kvx.c create mode 100644 bfd/elfxx-kvx-relocs.h create mode 100644 bfd/elfxx-kvx.c create mode 100644 bfd/elfxx-kvx.h delete mode 100644 bfd/hosts/i386sco.h delete mode 100644 bfd/hosts/symmetry.h create mode 100644 bfd/po/ka.gmo create mode 100644 bfd/po/ka.po delete mode 100644 bfd/sco5-core.c delete mode 100644 config/mh-pa-hpux10 delete mode 100644 cpu/bpf.cpu delete mode 100644 cpu/bpf.opc create mode 100644 gdb/amd-dbgapi-target.c create mode 100644 gdb/amd-dbgapi-target.h create mode 100644 gdb/amdgpu-tdep.c create mode 100644 gdb/amdgpu-tdep.h create mode 100644 gdb/arch/aarch64-scalable-linux.c create mode 100644 gdb/arch/aarch64-scalable-linux.h create mode 100644 gdb/cgen-remap.h delete mode 100755 gdb/config.lt create mode 100644 gdb/doc/gdb.info-9 create mode 100644 gdb/dwarf2/ada-imported.c create mode 100644 gdb/dwarf2/call-site.h create mode 100644 gdb/dwarf2/die.c create mode 100644 gdb/dwarf2/read-debug-names.c create mode 100644 gdb/dwarf2/read-debug-names.h create mode 100644 gdb/dwarf2/read-gdb-index.c create mode 100644 gdb/dwarf2/read-gdb-index.h create mode 100644 gdb/dwarf2/types.h create mode 100644 gdb/features/aarch64-sme.c create mode 100644 gdb/features/aarch64-sme2.c delete mode 100644 gdb/frame-info.c delete mode 100644 gdb/frame-info.h delete mode 100755 gdb/gdb_indent.sh rename gdb/{gdbarch-components.py => gdbarch_components.py} (90%) create mode 100755 gdb/gdbarch_types.py delete mode 100755 gdb/libtool create mode 100644 gdb/nat/aarch64-scalable-linux-ptrace.c create mode 100644 gdb/nat/aarch64-scalable-linux-ptrace.h rename gdb/nat/{aarch64-sve-linux-sigcontext.h => aarch64-scalable-linux-sigcontext.h} (78%) delete mode 100644 gdb/nat/aarch64-sve-linux-ptrace.c delete mode 100644 gdb/nat/aarch64-sve-linux-ptrace.h create mode 100644 gdb/nat/x86-xstate.c create mode 100644 gdb/nat/x86-xstate.h delete mode 100644 gdb/psympriv.h create mode 100644 gdb/python/lib/gdb/dap/__init__.py create mode 100644 gdb/python/lib/gdb/dap/breakpoint.py create mode 100644 gdb/python/lib/gdb/dap/bt.py create mode 100644 gdb/python/lib/gdb/dap/disassemble.py create mode 100644 gdb/python/lib/gdb/dap/evaluate.py create mode 100644 gdb/python/lib/gdb/dap/events.py create mode 100644 gdb/python/lib/gdb/dap/frames.py create mode 100644 gdb/python/lib/gdb/dap/io.py create mode 100644 gdb/python/lib/gdb/dap/launch.py create mode 100644 gdb/python/lib/gdb/dap/locations.py create mode 100644 gdb/python/lib/gdb/dap/memory.py create mode 100644 gdb/python/lib/gdb/dap/modules.py create mode 100644 gdb/python/lib/gdb/dap/next.py rename sim/ft32/Makefile.in => gdb/python/lib/gdb/dap/pause.py (70%) create mode 100644 gdb/python/lib/gdb/dap/scopes.py create mode 100644 gdb/python/lib/gdb/dap/server.py create mode 100644 gdb/python/lib/gdb/dap/sources.py create mode 100644 gdb/python/lib/gdb/dap/startup.py rename sim/d10v/Makefile.in => gdb/python/lib/gdb/dap/state.py (66%) create mode 100644 gdb/python/lib/gdb/dap/threads.py create mode 100644 gdb/python/lib/gdb/dap/typecheck.py create mode 100644 gdb/python/lib/gdb/dap/varref.py create mode 100644 gdb/python/py-dap.c create mode 100644 gdb/python/py-mi.c create mode 100644 gdb/solib-rocm.c create mode 100755 gdb/syscalls/update-linux-defaults.sh create mode 100644 gdb/testsuite/gdb.ada/assoc.exp create mode 100644 gdb/testsuite/gdb.ada/assoc/main.adb create mode 100644 gdb/testsuite/gdb.ada/assoc/pck.ads create mode 100644 gdb/testsuite/gdb.ada/assoc/xtra.adb create mode 100644 gdb/testsuite/gdb.ada/assoc/xtra.ads create mode 100644 gdb/testsuite/gdb.ada/ax-ada.exp create mode 100644 gdb/testsuite/gdb.ada/ax-ada/prog.adb rename sim/riscv/Makefile.in => gdb/testsuite/gdb.ada/break-label.exp (62%) create mode 100644 gdb/testsuite/gdb.ada/break-label/pck.adb create mode 100644 gdb/testsuite/gdb.ada/break-label/pck.ads create mode 100644 gdb/testsuite/gdb.ada/break-label/proc.adb create mode 100644 gdb/testsuite/gdb.ada/call-no-debug.exp create mode 100644 gdb/testsuite/gdb.ada/call-no-debug/pck.adb create mode 100644 gdb/testsuite/gdb.ada/call-no-debug/pck.ads create mode 100644 gdb/testsuite/gdb.ada/call-no-debug/prog.adb create mode 100644 gdb/testsuite/gdb.ada/data-sections.exp create mode 100644 gdb/testsuite/gdb.ada/data-sections/main.adb create mode 100644 gdb/testsuite/gdb.ada/dyn-range.exp create mode 100644 gdb/testsuite/gdb.ada/dyn-range/dyn.adb create mode 100644 gdb/testsuite/gdb.ada/dyn-range/pck.adb create mode 100644 gdb/testsuite/gdb.ada/dyn-range/pck.ads create mode 100644 gdb/testsuite/gdb.ada/file-then-restart.exp create mode 100644 gdb/testsuite/gdb.ada/file-then-restart/first.adb create mode 100644 gdb/testsuite/gdb.ada/file-then-restart/second.adb create mode 100644 gdb/testsuite/gdb.ada/finish-large.exp create mode 100644 gdb/testsuite/gdb.ada/finish-large/p.adb create mode 100644 gdb/testsuite/gdb.ada/finish-large/pck.adb create mode 100644 gdb/testsuite/gdb.ada/finish-large/pck.ads create mode 100644 gdb/testsuite/gdb.ada/finish-var-size.exp create mode 100644 gdb/testsuite/gdb.ada/finish-var-size/p.adb create mode 100644 gdb/testsuite/gdb.ada/finish-var-size/pck.adb create mode 100644 gdb/testsuite/gdb.ada/finish-var-size/pck.ads create mode 100644 gdb/testsuite/gdb.ada/huge.exp create mode 100644 gdb/testsuite/gdb.ada/huge/foo.adb create mode 100644 gdb/testsuite/gdb.ada/huge/pck.adb create mode 100644 gdb/testsuite/gdb.ada/huge/pck.ads create mode 100644 gdb/testsuite/gdb.ada/import.exp rename bfd/hosts/vaxult.h => gdb/testsuite/gdb.ada/import/inc.c (53%) create mode 100644 gdb/testsuite/gdb.ada/import/pkg.adb create mode 100644 gdb/testsuite/gdb.ada/import/pkg.ads create mode 100644 gdb/testsuite/gdb.ada/import/prog.adb create mode 100644 gdb/testsuite/gdb.ada/limited-length.exp create mode 100644 gdb/testsuite/gdb.ada/limited-length/foo.adb create mode 100644 gdb/testsuite/gdb.ada/limited-length/pck.adb create mode 100644 gdb/testsuite/gdb.ada/limited-length/pck.ads create mode 100644 gdb/testsuite/gdb.ada/ptype-o.exp create mode 100644 gdb/testsuite/gdb.ada/ptype-o/prog.adb create mode 100644 gdb/testsuite/gdb.ada/static-link.exp create mode 100644 gdb/testsuite/gdb.ada/static-link/pck.ads create mode 100644 gdb/testsuite/gdb.ada/static-link/prog.adb create mode 100644 gdb/testsuite/gdb.ada/str_chars.exp create mode 100644 gdb/testsuite/gdb.ada/str_chars/foo.adb create mode 100644 gdb/testsuite/gdb.ada/verylong.exp create mode 100644 gdb/testsuite/gdb.ada/verylong/prog.adb rename sim/h8300/Makefile.in => gdb/testsuite/gdb.arch/aarch64-sme-core-0.exp (67%) rename sim/mcore/Makefile.in => gdb/testsuite/gdb.arch/aarch64-sme-core-1.exp (67%) create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-core-2.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-core-3.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-core-4.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-core.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-core.exp.tcl create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-0.exp rename sim/pru/Makefile.in => gdb/testsuite/gdb.arch/aarch64-sme-regs-available-1.exp (65%) create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-2.exp rename sim/example-synacor/Makefile.in => gdb/testsuite/gdb.arch/aarch64-sme-regs-available-3.exp (64%) create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-4.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-5.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-6.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-7.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-8.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available-9.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-available.exp.tcl create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe-0.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe-1.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe-2.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe-3.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe-4.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-sigframe.exp.tcl create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-0.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-1.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-2.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-3.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-4.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-5.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-6.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-7.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-8.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-9.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable.exp.tcl create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-sanity.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-sme-sanity.exp create mode 100644 gdb/testsuite/gdb.arch/amd64-disp-step-self-call-alarm.c create mode 100644 gdb/testsuite/gdb.arch/amd64-disp-step-self-call.S create mode 100644 gdb/testsuite/gdb.arch/amd64-disp-step-self-call.exp rename bfd/hosts/vaxult2.h => gdb/testsuite/gdb.arch/amd64-disp-step-signal.c (53%) create mode 100644 gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c create mode 100644 gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp create mode 100644 gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.c create mode 100644 gdb/testsuite/gdb.arch/arm-pthread_cond_timedwait-bt.exp create mode 100644 gdb/testsuite/gdb.arch/core-file-pid0.exp create mode 100644 gdb/testsuite/gdb.arch/core-file-pid0.x86-64.core.bz2 create mode 100644 gdb/testsuite/gdb.arch/i386-disp-step-self-call-alarm.c create mode 100644 gdb/testsuite/gdb.arch/i386-disp-step-self-call.S create mode 100644 gdb/testsuite/gdb.arch/i386-disp-step-self-call.exp create mode 100644 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li-foo.s create mode 100644 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.c create mode 100644 gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp create mode 100644 gdb/testsuite/gdb.base/add-symbol-file-attach.c create mode 100644 gdb/testsuite/gdb.base/add-symbol-file-attach.exp create mode 100644 gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.c create mode 100644 gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.c create mode 100644 gdb/testsuite/gdb.base/bp-cond-failure.exp create mode 100644 gdb/testsuite/gdb.base/displaced-step-closure.c create mode 100644 gdb/testsuite/gdb.base/displaced-step-closure.exp create mode 100644 gdb/testsuite/gdb.base/frame-view.c create mode 100644 gdb/testsuite/gdb.base/frame-view.exp create mode 100644 gdb/testsuite/gdb.base/frame-view.py create mode 100644 gdb/testsuite/gdb.base/index-cache-2.c create mode 100644 gdb/testsuite/gdb.base/infcall-failure.c create mode 100644 gdb/testsuite/gdb.base/infcall-failure.exp create mode 100644 gdb/testsuite/gdb.base/info-program.c create mode 100644 gdb/testsuite/gdb.base/internal-functions-ptype.exp create mode 100644 gdb/testsuite/gdb.base/internal-string-values.c create mode 100644 gdb/testsuite/gdb.base/internal-string-values.exp create mode 100644 gdb/testsuite/gdb.base/jump-inline.c create mode 100644 gdb/testsuite/gdb.base/jump-inline.exp create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.c create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.h create mode 100644 gdb/testsuite/gdb.base/limited-length.c create mode 100644 gdb/testsuite/gdb.base/limited-length.exp create mode 100644 gdb/testsuite/gdb.base/list-nodebug.c create mode 100644 gdb/testsuite/gdb.base/list-nodebug.exp create mode 100644 gdb/testsuite/gdb.base/main-c.exp create mode 100644 gdb/testsuite/gdb.base/native-target-noproc-tdesc.exp create mode 100644 gdb/testsuite/gdb.base/print-internal-string.c create mode 100644 gdb/testsuite/gdb.base/print-internal-string.exp create mode 100644 gdb/testsuite/gdb.base/printf-wchar_t.c create mode 100644 gdb/testsuite/gdb.base/printf-wchar_t.exp create mode 100644 gdb/testsuite/gdb.base/scope-hw-watch-disable.c create mode 100644 gdb/testsuite/gdb.base/scope-hw-watch-disable.exp create mode 100644 gdb/testsuite/gdb.base/solib-abort-lib.c create mode 100644 gdb/testsuite/gdb.base/solib-abort.c create mode 100644 gdb/testsuite/gdb.base/solib-abort.exp create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.c create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.exp create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.s create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.exp create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-amd64.s create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-i386.exp create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn-i386.s create mode 100644 gdb/testsuite/gdb.base/unwind-on-each-insn.exp.tcl create mode 100644 gdb/testsuite/gdb.base/value-history-unavailable.c create mode 100644 gdb/testsuite/gdb.base/value-history-unavailable.exp create mode 100644 gdb/testsuite/gdb.base/wrap-line.exp create mode 100644 gdb/testsuite/gdb.cp/breakpoint-shlib-func-lib.cc create mode 100644 gdb/testsuite/gdb.cp/breakpoint-shlib-func.cc create mode 100644 gdb/testsuite/gdb.cp/breakpoint-shlib-func.exp rename gdb/testsuite/gdb.cp/{pr9594.cc => cpcompletion.cc} (64%) create mode 100644 gdb/testsuite/gdb.cp/empty-enum.cc create mode 100644 gdb/testsuite/gdb.cp/empty-enum.exp create mode 100644 gdb/testsuite/gdb.cp/main-cp.exp create mode 100644 gdb/testsuite/gdb.cp/main.cc create mode 100644 gdb/testsuite/gdb.cp/print-global-stub.cc create mode 100644 gdb/testsuite/gdb.cp/print-global-stub.exp create mode 100644 gdb/testsuite/gdb.ctf/dwarf2-and-ctf-2.c create mode 100644 gdb/testsuite/gdb.ctf/dwarf2-and-ctf.c create mode 100644 gdb/testsuite/gdb.ctf/dwarf2-and-ctf.exp create mode 100644 gdb/testsuite/gdb.dap/ada-arrays.exp create mode 100644 gdb/testsuite/gdb.dap/ada-arrays/cstuff.c create mode 100644 gdb/testsuite/gdb.dap/ada-arrays/main.adb create mode 100644 gdb/testsuite/gdb.dap/ada-arrays/pck.adb create mode 100644 gdb/testsuite/gdb.dap/ada-arrays/pck.ads create mode 100644 gdb/testsuite/gdb.dap/ada-nested.exp create mode 100644 gdb/testsuite/gdb.dap/ada-nested/prog.adb create mode 100644 gdb/testsuite/gdb.dap/ada-scopes.exp create mode 100644 gdb/testsuite/gdb.dap/ada-scopes/pack.adb create mode 100644 gdb/testsuite/gdb.dap/ada-scopes/pack.ads create mode 100644 gdb/testsuite/gdb.dap/ada-scopes/prog.adb create mode 100644 gdb/testsuite/gdb.dap/args-env.c create mode 100644 gdb/testsuite/gdb.dap/args-env.exp create mode 100644 gdb/testsuite/gdb.dap/assign.c create mode 100644 gdb/testsuite/gdb.dap/assign.exp create mode 100644 gdb/testsuite/gdb.dap/assign.py create mode 100644 gdb/testsuite/gdb.dap/attach.c create mode 100644 gdb/testsuite/gdb.dap/attach.exp create mode 100644 gdb/testsuite/gdb.dap/basic-dap.c create mode 100644 gdb/testsuite/gdb.dap/basic-dap.exp create mode 100644 gdb/testsuite/gdb.dap/bt-inner.c create mode 100644 gdb/testsuite/gdb.dap/bt-main.c create mode 100644 gdb/testsuite/gdb.dap/bt-nodebug.exp create mode 100644 gdb/testsuite/gdb.dap/catch-exception.exp create mode 100644 gdb/testsuite/gdb.dap/catch-exception/pck.ads create mode 100644 gdb/testsuite/gdb.dap/catch-exception/prog.adb create mode 100644 gdb/testsuite/gdb.dap/children.exp create mode 100644 gdb/testsuite/gdb.dap/children.py create mode 100644 gdb/testsuite/gdb.dap/cond-bp.c create mode 100644 gdb/testsuite/gdb.dap/cond-bp.exp create mode 100644 gdb/testsuite/gdb.dap/cwd.exp create mode 100644 gdb/testsuite/gdb.dap/cxx-exception.cc create mode 100644 gdb/testsuite/gdb.dap/cxx-exception.exp create mode 100644 gdb/testsuite/gdb.dap/frameless.c create mode 100644 gdb/testsuite/gdb.dap/frameless.exp create mode 100644 gdb/testsuite/gdb.dap/hover.c create mode 100644 gdb/testsuite/gdb.dap/hover.exp create mode 100644 gdb/testsuite/gdb.dap/lazy-string.c create mode 100644 gdb/testsuite/gdb.dap/lazy-string.exp create mode 100644 gdb/testsuite/gdb.dap/lazy-string.py create mode 100644 gdb/testsuite/gdb.dap/log-message.c create mode 100644 gdb/testsuite/gdb.dap/log-message.exp create mode 100644 gdb/testsuite/gdb.dap/memory.c create mode 100644 gdb/testsuite/gdb.dap/memory.exp create mode 100644 gdb/testsuite/gdb.dap/modules-solib.c create mode 100644 gdb/testsuite/gdb.dap/modules.c create mode 100644 gdb/testsuite/gdb.dap/modules.exp create mode 100644 gdb/testsuite/gdb.dap/pause.c create mode 100644 gdb/testsuite/gdb.dap/pause.exp create mode 100644 gdb/testsuite/gdb.dap/ptrref.cc create mode 100644 gdb/testsuite/gdb.dap/ptrref.exp create mode 100644 gdb/testsuite/gdb.dap/remote-dap.exp create mode 100644 gdb/testsuite/gdb.dap/rust-slices.exp create mode 100644 gdb/testsuite/gdb.dap/rust-slices.rs rename sim/bpf/bpf-helpers.h => gdb/testsuite/gdb.dap/scopes.c (60%) create mode 100644 gdb/testsuite/gdb.dap/scopes.exp create mode 100644 gdb/testsuite/gdb.dap/sources.c create mode 100644 gdb/testsuite/gdb.dap/sources.exp create mode 100644 gdb/testsuite/gdb.dap/stack-format.c create mode 100644 gdb/testsuite/gdb.dap/stack-format.exp create mode 100644 gdb/testsuite/gdb.dap/stack-format.py create mode 100644 gdb/testsuite/gdb.dap/stop-at-main.exp rename sim/mn10300/Makefile.in => gdb/testsuite/gdb.dap/terminate.exp (50%) create mode 100644 gdb/testsuite/gdb.dap/type_check.exp create mode 100644 gdb/testsuite/gdb.dap/type_check.py create mode 100644 gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.c create mode 100644 gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp create mode 100644 gdb/testsuite/gdb.debuginfod/crc_mismatch-2.c create mode 100644 gdb/testsuite/gdb.debuginfod/crc_mismatch.c create mode 100644 gdb/testsuite/gdb.debuginfod/crc_mismatch.exp create mode 100644 gdb/testsuite/gdb.dlang/dlang-start-2.exp create mode 100644 gdb/testsuite/gdb.dlang/dmain.c create mode 100644 gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-bfloat16.c create mode 100644 gdb/testsuite/gdb.dwarf2/mega-enum.exp create mode 100644 gdb/testsuite/gdb.dwarf2/missing-line-table.c create mode 100644 gdb/testsuite/gdb.dwarf2/missing-line-table.exp create mode 100644 gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp create mode 100644 gdb/testsuite/gdb.dwarf2/self-spec.exp create mode 100644 gdb/testsuite/gdb.dwarf2/static-optimized-out.exp create mode 100644 gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp create mode 100644 gdb/testsuite/gdb.fortran/backtrace.exp create mode 100644 gdb/testsuite/gdb.fortran/backtrace.f90 create mode 100644 gdb/testsuite/gdb.fortran/huge.F90 create mode 100644 gdb/testsuite/gdb.fortran/huge.exp create mode 100644 gdb/testsuite/gdb.fortran/info-main.exp create mode 100644 gdb/testsuite/gdb.fortran/info-main.f90 create mode 100644 gdb/testsuite/gdb.fortran/intrinsic-precedence.c create mode 100644 gdb/testsuite/gdb.fortran/intrinsic-precedence.exp create mode 100644 gdb/testsuite/gdb.fortran/intrinsic-precedence.f90 create mode 100644 gdb/testsuite/gdb.fortran/limited-length.exp create mode 100644 gdb/testsuite/gdb.fortran/limited-length.f90 create mode 100644 gdb/testsuite/gdb.go/no-package.exp create mode 100644 gdb/testsuite/gdb.mi/mi-condbreak-fail.c create mode 100644 gdb/testsuite/gdb.mi/mi-condbreak-fail.exp create mode 100644 gdb/testsuite/gdb.mi/mi-condbreak-throw.cc create mode 100644 gdb/testsuite/gdb.mi/mi-condbreak-throw.exp create mode 100644 gdb/testsuite/gdb.mi/mi-py-modify-bp.c create mode 100644 gdb/testsuite/gdb.mi/mi-py-modify-bp.exp rename sim/avr/Makefile.in => gdb/testsuite/gdb.mi/mi-py-modify-bp.py (72%) create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.c create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp create mode 100644 gdb/testsuite/gdb.mi/new-ui-bp-deleted.c create mode 100644 gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp create mode 100644 gdb/testsuite/gdb.mi/print-simple-values.cc create mode 100644 gdb/testsuite/gdb.mi/print-simple-values.exp create mode 100644 gdb/testsuite/gdb.mi/run-with-two-mi-uis.c create mode 100644 gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp create mode 100644 gdb/testsuite/gdb.multi/bp-thread-specific.c create mode 100644 gdb/testsuite/gdb.multi/bp-thread-specific.exp create mode 100644 gdb/testsuite/gdb.multi/gdb-settings.c create mode 100644 gdb/testsuite/gdb.multi/gdb-settings.exp create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-1.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-2.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp.exp create mode 100644 gdb/testsuite/gdb.opt/main.c create mode 100644 gdb/testsuite/gdb.opt/static-optimized-out.c create mode 100644 gdb/testsuite/gdb.opt/static-optimized-out.exp create mode 100644 gdb/testsuite/gdb.pascal/str-chars.exp create mode 100644 gdb/testsuite/gdb.pascal/str-chars.pas create mode 100644 gdb/testsuite/gdb.python/lotsa-lines.exp create mode 100644 gdb/testsuite/gdb.python/py-exec-file.c create mode 100644 gdb/testsuite/gdb.python/py-exec-file.exp create mode 100644 gdb/testsuite/gdb.python/py-exec-mi.exp create mode 100644 gdb/testsuite/gdb.python/py-pp-cast.c create mode 100644 gdb/testsuite/gdb.python/py-pp-cast.exp rename sim/arm/Makefile.in => gdb/testsuite/gdb.python/py-pp-cast.py (60%) create mode 100644 gdb/testsuite/gdb.python/py-progspace-events.c create mode 100644 gdb/testsuite/gdb.python/py-progspace-events.exp create mode 100644 gdb/testsuite/gdb.python/py-progspace-events.py create mode 100644 gdb/testsuite/gdb.python/py-thread-exited.c create mode 100644 gdb/testsuite/gdb.python/py-thread-exited.exp create mode 100644 gdb/testsuite/gdb.python/py-thread-exited.py create mode 100644 gdb/testsuite/gdb.python/py-varobj.c create mode 100644 gdb/testsuite/gdb.python/py-varobj.exp create mode 100644 gdb/testsuite/gdb.python/py-varobj.py create mode 100644 gdb/testsuite/gdb.python/py-watchpoint.c create mode 100644 gdb/testsuite/gdb.python/py-watchpoint.exp rename sim/moxie/Makefile.in => gdb/testsuite/gdb.python/py-watchpoint.py (64%) create mode 100644 gdb/testsuite/gdb.python/tui-window-factory.exp create mode 100644 gdb/testsuite/gdb.python/tui-window-factory.py create mode 100644 gdb/testsuite/gdb.reverse/finish-reverse-next.c create mode 100644 gdb/testsuite/gdb.reverse/finish-reverse-next.exp create mode 100644 gdb/testsuite/gdb.reverse/maint-print-instruction.c create mode 100644 gdb/testsuite/gdb.reverse/maint-print-instruction.exp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu-execee.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu-execer.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execee.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu-execer.cpp create mode 100644 gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp create mode 100644 gdb/testsuite/gdb.rocm/multi-inferior-gpu.cpp create mode 100644 gdb/testsuite/gdb.rocm/multi-inferior-gpu.exp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-exec.c create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-exec.exp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-fork.c create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-fork.exp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-multi-inferiors.exp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-warning-sigsegv.cpp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory-warning-sigsegv.exp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory.cpp create mode 100644 gdb/testsuite/gdb.rocm/precise-memory.exp create mode 100644 gdb/testsuite/gdb.rocm/simple.cpp create mode 100644 gdb/testsuite/gdb.rocm/simple.exp create mode 100644 gdb/testsuite/gdb.rust/completion.exp create mode 100644 gdb/testsuite/gdb.rust/completion.rs create mode 100644 gdb/testsuite/gdb.rust/finish.exp create mode 100644 gdb/testsuite/gdb.rust/finish.rs create mode 100644 gdb/testsuite/gdb.rust/onetwoeight.exp create mode 100644 gdb/testsuite/gdb.rust/onetwoeight.rs create mode 100644 gdb/testsuite/gdb.server/target-exec-file.c create mode 100644 gdb/testsuite/gdb.server/target-exec-file.exp create mode 100644 gdb/testsuite/gdb.testsuite/board-sanity.exp rename gdb/testsuite/{gdb.base/gdb-caching-proc.exp => gdb.testsuite/gdb-caching-proc-consistency.exp} (96%) create mode 100644 gdb/testsuite/gdb.testsuite/gdb-caching-proc.exp rename sim/sh/Makefile.in => gdb/testsuite/gdb.testsuite/lmap.exp (70%) create mode 100644 gdb/testsuite/gdb.testsuite/with-override.exp create mode 100644 gdb/testsuite/gdb.threads/foll-fork-other-thread.c create mode 100644 gdb/testsuite/gdb.threads/foll-fork-other-thread.exp create mode 100644 gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c create mode 100644 gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.c create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.exp create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-main.c create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-shared.c create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug.exp create mode 100644 gdb/testsuite/gdb.tui/color-prompt.exp create mode 100644 gdb/testsuite/gdb.tui/compact-source.exp create mode 100644 gdb/testsuite/gdb.tui/long-prompt.exp create mode 100644 gdb/testsuite/gdb.tui/pr30056.exp create mode 100644 gdb/testsuite/gdb.tui/resize-2.exp create mode 100644 gdb/testsuite/gdb.tui/secondary-prompt.exp create mode 100644 gdb/testsuite/gdb.tui/single-key-2.exp create mode 100644 gdb/testsuite/gdb.tui/single-key.exp create mode 100644 gdb/testsuite/gdb.tui/tui-focus.c create mode 100644 gdb/testsuite/gdb.tui/tui-focus.exp create mode 100644 gdb/testsuite/gdb.tui/tuiterm-2.exp create mode 100644 gdb/testsuite/gdb.tui/wrap-line.exp create mode 100644 gdb/testsuite/lib/aarch64-scalable.exp create mode 100644 gdb/testsuite/lib/aarch64-test-sme.c create mode 100644 gdb/testsuite/lib/aarch64-test-sve.c create mode 100644 gdb/testsuite/lib/aarch64.exp create mode 100644 gdb/testsuite/lib/dap-support.exp create mode 100644 gdb/testsuite/lib/rocm.exp create mode 100644 gdb/testsuite/lib/ton.tcl create mode 100755 gdb/testsuite/make-check-all.sh create mode 100644 gdb/ui.c create mode 100644 gdb/ui.h create mode 100644 gdb/unittests/frame_info_ptr-selftests.c create mode 100644 gdbserver/ax-result-types.def delete mode 100644 gdbsupport/buffer.cc delete mode 100644 gdbsupport/buffer.h delete mode 100644 include/aout/encap.h create mode 100644 include/elf/kvx.h create mode 100644 include/elf/kvx_elfids.h create mode 100644 include/opcode/bpf.h create mode 100644 include/opcode/kvx.h delete mode 100644 include/progress.h rename include/{gdb => sim}/sim-aarch64.h (100%) rename include/{gdb => sim}/sim-arm.h (100%) rename include/{gdb => sim}/sim-bfin.h (100%) rename include/{gdb => sim}/sim-cr16.h (100%) rename include/{gdb => sim}/sim-d10v.h (100%) rename include/{gdb => sim}/sim-frv.h (100%) rename include/{gdb => sim}/sim-ft32.h (100%) rename include/{gdb => sim}/sim-h8300.h (100%) rename include/{gdb => sim}/sim-lm32.h (100%) rename include/{gdb => sim}/sim-m32c.h (100%) rename include/{gdb => sim}/sim-ppc.h (100%) rename include/{gdb => sim}/sim-riscv.h (100%) rename include/{gdb => sim}/sim-rl78.h (100%) rename include/{gdb => sim}/sim-rx.h (100%) rename include/{gdb => sim}/sim-sh.h (100%) create mode 100644 libctf/testsuite/libctf-lookup/unnamed-field-info-ctf.c create mode 100644 libctf/testsuite/libctf-lookup/unnamed-field-info.c create mode 100644 libctf/testsuite/libctf-lookup/unnamed-field-info.lk create mode 100644 libctf/testsuite/libctf-writable/error-propagation.c create mode 100644 libctf/testsuite/libctf-writable/error-propagation.lk create mode 100644 libsframe/libsframe.ver create mode 100644 libsframe/libtool-version create mode 100644 libsframe/testsuite/libsframe.find/find.exp create mode 100644 libsframe/testsuite/libsframe.find/findfre-1.c create mode 100644 libsframe/testsuite/libsframe.find/findfunc-1.c create mode 100644 libsframe/testsuite/libsframe.find/local.mk create mode 100644 libsframe/testsuite/libsframe.find/plt-findfre-1.c create mode 100644 opcodes/aarch64-sys-regs.def delete mode 100644 opcodes/bpf-asm.c delete mode 100644 opcodes/bpf-desc.c delete mode 100644 opcodes/bpf-desc.h delete mode 100644 opcodes/bpf-ibld.c delete mode 100644 opcodes/bpf-opc.h create mode 100644 opcodes/i386-mnem.h create mode 100644 opcodes/kvx-dis.c create mode 100644 opcodes/kvx-dis.h create mode 100644 opcodes/kvx-opc.c delete mode 100644 sim/aarch64/Makefile.in create mode 100644 sim/aarch64/aarch64-sim.h create mode 100644 sim/arm/arm-sim.h rename sim/{bpf/decode.h => avr/avr-sim.h} (56%) delete mode 100644 sim/bfin/Makefile.in delete mode 100644 sim/bpf/Makefile.in delete mode 100644 sim/bpf/arch.c delete mode 100644 sim/bpf/arch.h delete mode 100644 sim/bpf/bpf-helpers.c delete mode 100644 sim/bpf/bpf-helpers.def create mode 100644 sim/bpf/bpf-sim.c delete mode 100644 sim/bpf/bpf.c delete mode 100644 sim/bpf/cpu.c delete mode 100644 sim/bpf/cpu.h delete mode 100644 sim/bpf/cpuall.h delete mode 100644 sim/bpf/decode-be.c delete mode 100644 sim/bpf/decode-be.h delete mode 100644 sim/bpf/decode-le.c delete mode 100644 sim/bpf/decode-le.h delete mode 100644 sim/bpf/defs-be.h delete mode 100644 sim/bpf/defs-le.h delete mode 100644 sim/bpf/mloop.in delete mode 100644 sim/bpf/sem-be.c delete mode 100644 sim/bpf/sem-le.c delete mode 100644 sim/bpf/sim-if.c delete mode 100644 sim/common/Make-common.in delete mode 100644 sim/cr16/Makefile.in rename sim/cr16/{cr16_sim.h => cr16-sim.h} (99%) delete mode 100644 sim/cris/Makefile.in rename sim/d10v/{d10v_sim.h => d10v-sim.h} (99%) delete mode 100644 sim/erc32/Makefile.in create mode 100644 sim/example-synacor/example-synacor-sim.h delete mode 100644 sim/frv/Makefile.in create mode 100644 sim/h8300/h8300-sim.h delete mode 100644 sim/iq2000/Makefile.in delete mode 100644 sim/lm32/Makefile.in delete mode 100644 sim/m32c/Makefile.in delete mode 100644 sim/m32r/Makefile.in delete mode 100644 sim/m4/sim_ac_output.m4 delete mode 100644 sim/m68hc11/Makefile.in create mode 100644 sim/m68hc11/m68hc11-sim.h create mode 100644 sim/mcore/mcore-sim.h delete mode 100644 sim/microblaze/Makefile.in create mode 100644 sim/microblaze/microblaze-sim.h delete mode 100644 sim/mips/Makefile.in create mode 100644 sim/mips/acinclude.m4 delete mode 100644 sim/mips/aclocal.m4 delete mode 100755 sim/mips/configure delete mode 100644 sim/mips/configure.ac rename sim/mn10300/{mn10300_sim.h => mn10300-sim.h} (94%) rename sim/{bpf/eng.h => moxie/moxie-sim.h} (55%) delete mode 100644 sim/msp430/Makefile.in delete mode 100644 sim/or1k/Makefile.in delete mode 100644 sim/ppc/dgen.c create mode 100755 sim/ppc/spreg-gen.py create mode 100644 sim/ppc/spreg.c create mode 100644 sim/ppc/spreg.h create mode 100644 sim/riscv/riscv-sim.h delete mode 100644 sim/rl78/Makefile.in delete mode 100644 sim/rx/Makefile.in create mode 100644 sim/semcrisv32f-switch.c create mode 100644 sim/sh/sh-sim.h delete mode 100644 sim/v850/Makefile.in create mode 100644 sim/v850/v850-sim.h delete mode 100644 sim/v850/v850_sim.h diff --git a/ChangeLog b/ChangeLog index 73c3a0068..356ac1657 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,74 @@ +2023-07-03 Nick Clifton + + 2.41 Branch Point. + +2023-06-26 Nick Clifton + + * Import these updates to the config scripts + + commit 4ad4bb7c30aca1e705448ba8d51a210bbd47bb52 + Author: Paul Eggert + Date: Fri Jun 23 09:55:10 2023 -0700 + + Quote 'like this', not `like this'. + + commit 63acb96f92473ceb5e21d873d7c0aee266b3d6d3 + Author: Paul Eggert + Date: Sat Jan 21 00:15:01 2023 -0600 + + Fix config.sub spelling typo for "athlon" + + commit 4ce12a5c9125cedc0d0ba584444a6865396923ec + Author: Dmitry V. Levin + Date: Sun Jan 1 08:00:00 2023 +0000 + + Update copyright years + + commit c397e2c040bce50bcdccb131f90115ba7e8bfc19 + Author: Arsen Arsenovi + Date: Sat Sep 17 23:34:48 2022 +0200 + + config.sub: add linux-mlibc targets + + commit 9f9f9b0b13197269848c76e3e057a3ed0680b4bf + Author: Arsen Arsenovi + Date: Sat Sep 17 23:34:47 2022 +0200 + + config.guess: support running on Managarm systems + + commit 87e6687749da7bb2ab158a79fa83721c19ed9246 + Author: Arsen Arsenovi + Date: Sat Sep 17 23:34:46 2022 +0200 + + config.sub: add managarm-{mlibc,kernel} targets + + commit 20403c5701973a4cbd7e0b4bbeb627fcd424a0f1 + Author: Xiaotian Wu + Date: Mon Aug 1 16:05:29 2022 +0800 + + Remove loongarchx32 + + commit 02ba26b218d3d3db6c56e014655faf463cefa983 + Author: Alexander von Gluck IV + Date: Wed May 25 15:43:13 2022 -0500 + + config.guess: Update Haiku guesses + + commit f56a7140386d08a531bcfd444d632b28c61a6329 + Author: Bruno Haible + Date: Sun May 8 19:08:08 2022 +0200 + + config.guess (x86_64:Linux:*:*): Detect 32-bit ABI. + +2023-04-20 Nick Clifton + + * SECURITY.txt: New file. + * src-release.sh (DEVO_SUPPORT): Add SECURITY.txt. + +2022-12-31 Nick Clifton + + * 2.40 binutils branch created. + 2022-10-10 Nick Clifton * src-release.sh: Add "-r " option to create reproducible diff --git a/Makefile.def b/Makefile.def index f974565d8..870150183 100644 --- a/Makefile.def +++ b/Makefile.def @@ -4,7 +4,7 @@ AutoGen definitions Makefile.tpl; // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. // This file was originally written by Nathanael Nerode. // -// Copyright 2002-2021 Free Software Foundation +// Copyright 2002-2022 Free Software Foundation // // This file is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -47,10 +47,11 @@ host_modules= { module= fixincludes; bootstrap=true; host_modules= { module= flex; no_check_cross= true; }; host_modules= { module= gas; bootstrap=true; }; host_modules= { module= gcc; bootstrap=true; - extra_make_flags="$(EXTRA_GCC_FLAGS)"; }; + extra_make_flags="$(EXTRA_GCC_FLAGS)"; + extra_configure_flags='@gcc_host_pie@'; }; host_modules= { module= gmp; lib_path=.libs; bootstrap=true; // Work around in-tree gmp configure bug with missing flex. - extra_configure_flags='--disable-shared LEX="touch lex.yy.c"'; + extra_configure_flags='--disable-shared LEX="touch lex.yy.c" @host_libs_picflag@'; extra_make_flags='AM_CFLAGS="-DNO_ASM"'; no_install= true; // none-*-* disables asm optimizations, bootstrap-testing @@ -60,22 +61,20 @@ host_modules= { module= gmp; lib_path=.libs; bootstrap=true; // different from host for target. target="none-${host_vendor}-${host_os}"; }; host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true; - extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@'; + extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@'; extra_make_flags='AM_CFLAGS="-DNO_ASM"'; no_install= true; }; host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true; - extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode'; + extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode'; no_install= true; }; host_modules= { module= isl; lib_path=.libs; bootstrap=true; - extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@'; + extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@'; extra_make_flags='V=1'; no_install= true; }; -host_modules= { module= libelf; lib_path=.libs; bootstrap=true; - extra_configure_flags='--disable-shared'; - no_install= true; }; host_modules= { module= gold; bootstrap=true; }; host_modules= { module= gprof; }; host_modules= { module= gprofng; }; +// intl acts on 'host_shared' directly, and does not support --with-pic. host_modules= { module= intl; bootstrap=true; }; host_modules= { module= tcl; missing=mostlyclean; }; @@ -111,7 +110,7 @@ host_modules= { module= libiberty-linker-plugin; bootstrap=true; // We abuse missing to avoid installing anything for libiconv. host_modules= { module= libiconv; bootstrap=true; - extra_configure_flags='--disable-shared'; + extra_configure_flags='--disable-shared @host_libs_picflag@'; no_install= true; missing= pdf; missing= html; @@ -126,7 +125,7 @@ host_modules= { module= sim; }; host_modules= { module= texinfo; no_install= true; }; host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; - extra_configure_flags='@extra_host_zlib_configure_flags@';}; + extra_configure_flags='@extra_host_zlib_configure_flags@ @host_libs_picflag@';}; host_modules= { module= gnulib; }; host_modules= { module= gdbsupport; }; host_modules= { module= gdbserver; }; @@ -163,22 +162,19 @@ target_modules = { module= libvtv; bootstrap=true; lib_path=.libs; raw_cxx=true; }; -target_modules = { module= liboffloadmic; - lib_path=.libs; - extra_configure_flags='@extra_liboffloadmic_configure_flags@'; }; target_modules = { module= libssp; lib_path=.libs; }; target_modules = { module= newlib; }; target_modules = { module= libgcc; bootstrap=true; no_check=true; missing=TAGS; missing=install-dvi; }; -target_modules = { module= libbacktrace; }; +target_modules = { module= libbacktrace; bootstrap=true; }; target_modules = { module= libquadmath; }; target_modules = { module= libgfortran; }; target_modules = { module= libobjc; missing=TAGS; missing=install-dvi; }; target_modules = { module= libgo; }; -target_modules = { module= libphobos; +target_modules = { module= libphobos; bootstrap=true; lib_path=src/.libs; }; target_modules = { module= libtermcap; no_check=true; missing=mostlyclean; @@ -187,13 +183,15 @@ target_modules = { module= libtermcap; no_check=true; missing=maintainer-clean; }; target_modules = { module= winsup; }; target_modules = { module= libgloss; no_check=true; }; -target_modules = { module= libffi; no_install=true; }; -target_modules = { module= zlib; }; +target_modules = { module= libffi; no_install=true; + extra_configure_flags='--disable-shared --with-pic'; }; +target_modules = { module= zlib; bootstrap=true; }; target_modules = { module= rda; }; target_modules = { module= libada; }; +target_modules = { module= libgm2; lib_path=.libs; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; target_modules = { module= libitm; lib_path=.libs; }; -target_modules = { module= libatomic; lib_path=.libs; }; +target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; }; // These are (some of) the make targets to be done in each subdirectory. // Not all; these are the ones which don't have special options. @@ -313,6 +311,8 @@ flags_to_pass = { flag= GOC_FOR_TARGET ; }; flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; }; flags_to_pass = { flag= GDC_FOR_TARGET ; }; flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; }; +flags_to_pass = { flag= GM2_FOR_TARGET ; }; +flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; }; flags_to_pass = { flag= LD_FOR_TARGET ; }; flags_to_pass = { flag= LIPO_FOR_TARGET ; }; flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; }; @@ -355,7 +355,6 @@ dependencies = { module=configure-gcc; on=all-binutils; }; dependencies = { module=configure-gcc; on=all-gas; }; dependencies = { module=configure-gcc; on=all-ld; }; dependencies = { module=configure-gcc; on=all-gold; }; -dependencies = { module=configure-gcc; on=all-libelf; }; dependencies = { module=configure-gcc; on=all-libiconv; }; dependencies = { module=all-gcc; on=all-libiberty; hard=true; }; dependencies = { module=all-gcc; on=all-intl; }; @@ -419,6 +418,8 @@ dependencies = { module=configure-isl; on=all-gmp; }; dependencies = { module=all-intl; on=all-libiconv; }; // Host modules specific to gdb. +dependencies = { module=configure-gdb; on=all-gmp; }; +dependencies = { module=configure-gdb; on=all-mpfr; }; dependencies = { module=configure-gdb; on=all-intl; }; dependencies = { module=configure-gdb; on=configure-sim; }; dependencies = { module=configure-gdb; on=all-bfd; }; @@ -491,7 +492,6 @@ dependencies = { module=install-binutils; on=install-opcodes; }; dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; // Likewise for ld, libctf, and bfd. -dependencies = { module=install-bfd; on=install-libsframe; }; dependencies = { module=install-libctf; on=install-bfd; }; dependencies = { module=install-ld; on=install-bfd; }; dependencies = { module=install-ld; on=install-libctf; }; @@ -499,6 +499,10 @@ dependencies = { module=install-strip-libctf; on=install-strip-bfd; }; dependencies = { module=install-strip-ld; on=install-strip-bfd; }; dependencies = { module=install-strip-ld; on=install-strip-libctf; }; +// libbfd depends on libsframe +dependencies = { module=install-bfd; on=install-libsframe; }; +dependencies = { module=install-strip-bfd; on=install-strip-libsframe; }; + // libopcodes depends on libbfd dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; }; dependencies = { module=install-opcodes; on=install-bfd; }; @@ -624,7 +628,6 @@ dependencies = { module=all-m4; on=all-build-texinfo; }; // on libgcc and newlib/libgloss. lang_env_dependencies = { module=libitm; cxx=true; }; lang_env_dependencies = { module=libffi; cxx=true; }; -lang_env_dependencies = { module=liboffloadmic; cxx=true; }; lang_env_dependencies = { module=newlib; no_c=true; }; lang_env_dependencies = { module=libgloss; no_c=true; }; lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; }; @@ -637,24 +640,23 @@ dependencies = { module=configure-target-fastjar; on=configure-target-zlib; }; dependencies = { module=all-target-fastjar; on=all-target-zlib; }; dependencies = { module=configure-target-libgo; on=configure-target-libffi; }; dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; }; -dependencies = { module=configure-target-libffi; on=all-target-libstdc++-v3; }; dependencies = { module=all-target-libgo; on=all-target-libbacktrace; }; dependencies = { module=all-target-libgo; on=all-target-libffi; }; dependencies = { module=all-target-libgo; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgm2; on=all-target-libstdc++-v3; }; +dependencies = { module=all-target-libgm2; on=all-target-libatomic; }; dependencies = { module=configure-target-libphobos; on=configure-target-libbacktrace; }; dependencies = { module=configure-target-libphobos; on=configure-target-zlib; }; dependencies = { module=all-target-libphobos; on=all-target-libbacktrace; }; dependencies = { module=all-target-libphobos; on=all-target-zlib; }; dependencies = { module=all-target-libphobos; on=all-target-libatomic; }; dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; }; -dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; }; dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; }; dependencies = { module=configure-target-libvtv; on=all-target-libstdc++-v3; }; // parallel_list.o and parallel_settings.o depend on omp.h, which is // generated by the libgomp configure. Unfortunately, due to the use of // recursive make, we can't be that specific. dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; }; -dependencies = { module=all-target-liboffloadmic; on=all-target-libgomp; }; dependencies = { module=install-target-libgo; on=install-target-libatomic; }; dependencies = { module=install-target-libgfortran; on=install-target-libquadmath; }; @@ -664,8 +666,6 @@ dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++ dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; }; dependencies = { module=install-target-libvtv; on=install-target-libstdc++-v3; }; dependencies = { module=install-target-libvtv; on=install-target-libgcc; }; -dependencies = { module=install-target-liboffloadmic; on=install-target-libstdc++-v3; }; -dependencies = { module=install-target-liboffloadmic; on=install-target-libgcc; }; dependencies = { module=install-target-libitm; on=install-target-libgcc; }; dependencies = { module=install-target-libobjc; on=install-target-libgcc; }; dependencies = { module=install-target-libstdc++-v3; on=install-target-libgcc; }; @@ -681,6 +681,7 @@ dependencies = { module=configure-target-newlib; on=all-binutils; }; dependencies = { module=configure-target-newlib; on=all-ld; }; dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; }; dependencies = { module=configure-target-libgfortran; on=all-target-libbacktrace; }; +dependencies = { module=configure-target-libgo; on=all-target-libbacktrace; }; languages = { language=c; gcc-check-target=check-gcc; }; languages = { language=c++; gcc-check-target=check-c++; @@ -699,9 +700,12 @@ languages = { language=obj-c++; gcc-check-target=check-obj-c++; }; languages = { language=go; gcc-check-target=check-go; lib-check-target=check-target-libgo; lib-check-target=check-gotools; }; +languages = { language=m2; gcc-check-target=check-m2; + lib-check-target=check-target-libgm2; }; languages = { language=d; gcc-check-target=check-d; lib-check-target=check-target-libphobos; }; languages = { language=jit; gcc-check-target=check-jit; }; +languages = { language=rust; gcc-check-target=check-rust; }; // Toplevel bootstrap bootstrap_stage = { id=1 ; }; diff --git a/Makefile.in b/Makefile.in index a425b54e0..c97130a23 100644 --- a/Makefile.in +++ b/Makefile.in @@ -163,6 +163,8 @@ BUILD_EXPORTS = \ GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ GDC="$(GDC_FOR_BUILD)"; export GDC; \ GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \ + GM2="$(GM2_FOR_BUILD)"; export GM2; \ + GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \ LD="$(LD_FOR_BUILD)"; export LD; \ @@ -201,6 +203,7 @@ HOST_EXPORTS = \ GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \ GOC="$(GOC)"; export GOC; \ GDC="$(GDC)"; export GDC; \ + GM2="$(GM2)"; export GM2; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ @@ -223,7 +226,7 @@ HOST_EXPORTS = \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ DSYMUTIL_FOR_TARGET="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL_FOR_TARGET; \ - GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET) $$TFLAGS"; export GCC_FOR_TARGET; \ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ @@ -237,8 +240,6 @@ HOST_EXPORTS = \ GMPINC="$(HOST_GMPINC)"; export GMPINC; \ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \ ISLINC="$(HOST_ISLINC)"; export ISLINC; \ - LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \ - LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \ XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \ @if gcc-bootstrap $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ @@ -274,11 +275,14 @@ POSTSTAGE1_HOST_EXPORTS = \ $(POSTSTAGE1_CXX_EXPORT) \ $(LTO_EXPORTS) \ GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ - -B$(build_tooldir)/bin/ $(GDC_FLAGS_FOR_TARGET) \ + -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \ -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ -I$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime -I$$s/libphobos/libdruntime \ -L$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ - -L$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/.libs"; \ + -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \ export GDC; \ GDC_FOR_BUILD="$$GDC"; export GDC_FOR_BUILD; \ GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \ @@ -304,6 +308,7 @@ BASE_TARGET_EXPORTS = \ GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \ + GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ @@ -341,10 +346,6 @@ HOST_GMPINC = @gmpinc@ HOST_ISLLIBS = @isllibs@ HOST_ISLINC = @islinc@ -# Where to find libelf -HOST_LIBELFLIBS = @libelflibs@ -HOST_LIBELFINC = @libelfinc@ - # ---------------------------------------------- # Programs producing files for the BUILD machine # ---------------------------------------------- @@ -374,6 +375,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@ GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@ GOC_FOR_BUILD = @GOC_FOR_BUILD@ GDC_FOR_BUILD = @GDC_FOR_BUILD@ +GM2_FOR_BUILD = @GM2_FOR_BUILD@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LD_FOR_BUILD = @LD_FOR_BUILD@ NM_FOR_BUILD = @NM_FOR_BUILD@ @@ -403,7 +405,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 10000000 +AUTO_PROFILE = gcc-auto-profile --all -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still @@ -443,7 +445,8 @@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) -GDCFLAGS = $(CFLAGS) +GDCFLAGS = @GDCFLAGS@ +GM2FLAGS = $(CFLAGS) PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -491,6 +494,7 @@ PGO-TRAINING-TARGETS = binutils gas gdb ld sim PGO_BUILD_TRAINING = $(addprefix maybe-check-,$(PGO-TRAINING-TARGETS)) CREATE_GCOV = create_gcov +PROFILE_MERGER = profile_merger TFLAGS = @@ -610,6 +614,11 @@ STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ --disable-build-format-warnings +@if target-libphobos-bootstrap +STAGE1_CONFIGURE_FLAGS += --with-libphobos-druntime-only +STAGE2_CONFIGURE_FLAGS += --with-libphobos-druntime-only +@endif target-libphobos-bootstrap + # When using the slow stage1 compiler disable IL verification and forcefully # enable it when using the stage2 compiler instead. As we later compare # stage2 and stage3 we are merely avoid doing redundant work, plus we apply @@ -629,11 +638,14 @@ STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) -STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g +STAGEautoprofile_CFLAGS = $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g STAGEautoprofile_TFLAGS = $(STAGE2_TFLAGS) STAGEautofeedback_CFLAGS = $(STAGE3_CFLAGS) STAGEautofeedback_TFLAGS = $(STAGE3_TFLAGS) +# Disable warnings as errors since inlining decisions with -fauto-profile +# may result in additional warnings. +STAGEautofeedback_CONFIGURE_FLAGS = $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS)) do-compare = @do_compare@ do-compare3 = $(do-compare) @@ -656,6 +668,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@ +GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@ @@ -681,6 +694,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ +GM2FLAGS_FOR_TARGET = -O2 -g GOCFLAGS_FOR_TARGET = -O2 -g GDCFLAGS_FOR_TARGET = -O2 -g @@ -707,7 +721,7 @@ all: # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the target machine work. -TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc) +TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc) @if target-libstdc++-v3 TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: @@ -721,10 +735,6 @@ TARGET_LIB_PATH_libsanitizer = $$r/$(TARGET_SUBDIR)/libsanitizer/.libs: TARGET_LIB_PATH_libvtv = $$r/$(TARGET_SUBDIR)/libvtv/.libs: @endif target-libvtv -@if target-liboffloadmic -TARGET_LIB_PATH_liboffloadmic = $$r/$(TARGET_SUBDIR)/liboffloadmic/.libs: -@endif target-liboffloadmic - @if target-libssp TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs: @endif target-libssp @@ -733,6 +743,10 @@ TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs: TARGET_LIB_PATH_libphobos = $$r/$(TARGET_SUBDIR)/libphobos/src/.libs: @endif target-libphobos +@if target-libgm2 +TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs: +@endif target-libgm2 + @if target-libgomp TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs: @endif target-libgomp @@ -749,7 +763,7 @@ TARGET_LIB_PATH_libatomic = $$r/$(TARGET_SUBDIR)/libatomic/.libs: # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. -HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_libelf) +HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl) # Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch @if gcc @@ -777,11 +791,6 @@ HOST_LIB_PATH_isl = \ $$r/$(HOST_SUBDIR)/isl/.libs:$$r/$(HOST_SUBDIR)/prev-isl/.libs: @endif isl -@if libelf -HOST_LIB_PATH_libelf = \ - $$r/$(HOST_SUBDIR)/libelf/.libs:$$r/$(HOST_SUBDIR)/prev-libelf/.libs: -@endif libelf - CXX_FOR_TARGET_FLAG_TO_PASS = \ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" @@ -883,6 +892,8 @@ BASE_FLAGS_TO_PASS = \ "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \ "GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \ "GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \ + "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \ + "GM2FLAGS_FOR_TARGET=$(GM2FLAGS_FOR_TARGET)" \ "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \ "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \ @@ -956,6 +967,7 @@ EXTRA_HOST_FLAGS = \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ 'GDC=$(GDC)' \ + 'GM2=$(GM2)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -966,7 +978,8 @@ EXTRA_HOST_FLAGS = \ 'STRIP=$(STRIP)' \ 'WINDRES=$(WINDRES)' \ 'WINDMC=$(WINDMC)' \ - 'CREATE_GCOV=$(CREATE_GCOV)' + 'CREATE_GCOV=$(CREATE_GCOV)' \ + 'PROFILE_MERGER=$(PROFILE_MERGER)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) @@ -982,6 +995,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \ GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \ + GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \ GNATBIND="$${GNATBIND}" \ LDFLAGS="$${LDFLAGS}" \ HOST_LIBS="$${HOST_LIBS}" \ @@ -1017,6 +1031,8 @@ EXTRA_TARGET_FLAGS = \ 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \ 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \ + 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ + 'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \ 'LD=$(COMPILER_LD_FOR_TARGET)' \ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ @@ -1042,7 +1058,8 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) # The BUILD_* variables are a special case, which are used for the gcc # cross-building scheme. EXTRA_GCC_FLAGS = \ - "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \ + "GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" @@ -1073,7 +1090,6 @@ configure-host: \ maybe-configure-mpfr \ maybe-configure-mpc \ maybe-configure-isl \ - maybe-configure-libelf \ maybe-configure-gold \ maybe-configure-gprof \ maybe-configure-gprofng \ @@ -1116,7 +1132,6 @@ configure-target: \ maybe-configure-target-libstdc++-v3 \ maybe-configure-target-libsanitizer \ maybe-configure-target-libvtv \ - maybe-configure-target-liboffloadmic \ maybe-configure-target-libssp \ maybe-configure-target-newlib \ maybe-configure-target-libgcc \ @@ -1133,6 +1148,7 @@ configure-target: \ maybe-configure-target-zlib \ maybe-configure-target-rda \ maybe-configure-target-libada \ + maybe-configure-target-libgm2 \ maybe-configure-target-libgomp \ maybe-configure-target-libitm \ maybe-configure-target-libatomic @@ -1226,9 +1242,6 @@ all-host: maybe-all-mpc @if isl-no-bootstrap all-host: maybe-all-isl @endif isl-no-bootstrap -@if libelf-no-bootstrap -all-host: maybe-all-libelf -@endif libelf-no-bootstrap @if gold-no-bootstrap all-host: maybe-all-gold @endif gold-no-bootstrap @@ -1306,30 +1319,38 @@ all-target: maybe-all-target-libsanitizer @if target-libvtv-no-bootstrap all-target: maybe-all-target-libvtv @endif target-libvtv-no-bootstrap -all-target: maybe-all-target-liboffloadmic all-target: maybe-all-target-libssp all-target: maybe-all-target-newlib @if target-libgcc-no-bootstrap all-target: maybe-all-target-libgcc @endif target-libgcc-no-bootstrap +@if target-libbacktrace-no-bootstrap all-target: maybe-all-target-libbacktrace +@endif target-libbacktrace-no-bootstrap all-target: maybe-all-target-libquadmath all-target: maybe-all-target-libgfortran all-target: maybe-all-target-libobjc all-target: maybe-all-target-libgo +@if target-libphobos-no-bootstrap all-target: maybe-all-target-libphobos +@endif target-libphobos-no-bootstrap all-target: maybe-all-target-libtermcap all-target: maybe-all-target-winsup all-target: maybe-all-target-libgloss all-target: maybe-all-target-libffi +@if target-zlib-no-bootstrap all-target: maybe-all-target-zlib +@endif target-zlib-no-bootstrap all-target: maybe-all-target-rda all-target: maybe-all-target-libada +all-target: maybe-all-target-libgm2 @if target-libgomp-no-bootstrap all-target: maybe-all-target-libgomp @endif target-libgomp-no-bootstrap all-target: maybe-all-target-libitm +@if target-libatomic-no-bootstrap all-target: maybe-all-target-libatomic +@endif target-libatomic-no-bootstrap # Do a target for all the subdirectories. A ``make do-X'' will do a # ``make X'' in all subdirectories (because, in general, there is a @@ -1363,7 +1384,6 @@ info-host: maybe-info-gmp info-host: maybe-info-mpfr info-host: maybe-info-mpc info-host: maybe-info-isl -info-host: maybe-info-libelf info-host: maybe-info-gold info-host: maybe-info-gprof info-host: maybe-info-gprofng @@ -1407,7 +1427,6 @@ info-host: maybe-info-libsframe info-target: maybe-info-target-libstdc++-v3 info-target: maybe-info-target-libsanitizer info-target: maybe-info-target-libvtv -info-target: maybe-info-target-liboffloadmic info-target: maybe-info-target-libssp info-target: maybe-info-target-newlib info-target: maybe-info-target-libgcc @@ -1424,6 +1443,7 @@ info-target: maybe-info-target-libffi info-target: maybe-info-target-zlib info-target: maybe-info-target-rda info-target: maybe-info-target-libada +info-target: maybe-info-target-libgm2 info-target: maybe-info-target-libgomp info-target: maybe-info-target-libitm info-target: maybe-info-target-libatomic @@ -1455,7 +1475,6 @@ dvi-host: maybe-dvi-gmp dvi-host: maybe-dvi-mpfr dvi-host: maybe-dvi-mpc dvi-host: maybe-dvi-isl -dvi-host: maybe-dvi-libelf dvi-host: maybe-dvi-gold dvi-host: maybe-dvi-gprof dvi-host: maybe-dvi-gprofng @@ -1499,7 +1518,6 @@ dvi-host: maybe-dvi-libsframe dvi-target: maybe-dvi-target-libstdc++-v3 dvi-target: maybe-dvi-target-libsanitizer dvi-target: maybe-dvi-target-libvtv -dvi-target: maybe-dvi-target-liboffloadmic dvi-target: maybe-dvi-target-libssp dvi-target: maybe-dvi-target-newlib dvi-target: maybe-dvi-target-libgcc @@ -1516,6 +1534,7 @@ dvi-target: maybe-dvi-target-libffi dvi-target: maybe-dvi-target-zlib dvi-target: maybe-dvi-target-rda dvi-target: maybe-dvi-target-libada +dvi-target: maybe-dvi-target-libgm2 dvi-target: maybe-dvi-target-libgomp dvi-target: maybe-dvi-target-libitm dvi-target: maybe-dvi-target-libatomic @@ -1547,7 +1566,6 @@ pdf-host: maybe-pdf-gmp pdf-host: maybe-pdf-mpfr pdf-host: maybe-pdf-mpc pdf-host: maybe-pdf-isl -pdf-host: maybe-pdf-libelf pdf-host: maybe-pdf-gold pdf-host: maybe-pdf-gprof pdf-host: maybe-pdf-gprofng @@ -1591,7 +1609,6 @@ pdf-host: maybe-pdf-libsframe pdf-target: maybe-pdf-target-libstdc++-v3 pdf-target: maybe-pdf-target-libsanitizer pdf-target: maybe-pdf-target-libvtv -pdf-target: maybe-pdf-target-liboffloadmic pdf-target: maybe-pdf-target-libssp pdf-target: maybe-pdf-target-newlib pdf-target: maybe-pdf-target-libgcc @@ -1608,6 +1625,7 @@ pdf-target: maybe-pdf-target-libffi pdf-target: maybe-pdf-target-zlib pdf-target: maybe-pdf-target-rda pdf-target: maybe-pdf-target-libada +pdf-target: maybe-pdf-target-libgm2 pdf-target: maybe-pdf-target-libgomp pdf-target: maybe-pdf-target-libitm pdf-target: maybe-pdf-target-libatomic @@ -1639,7 +1657,6 @@ html-host: maybe-html-gmp html-host: maybe-html-mpfr html-host: maybe-html-mpc html-host: maybe-html-isl -html-host: maybe-html-libelf html-host: maybe-html-gold html-host: maybe-html-gprof html-host: maybe-html-gprofng @@ -1683,7 +1700,6 @@ html-host: maybe-html-libsframe html-target: maybe-html-target-libstdc++-v3 html-target: maybe-html-target-libsanitizer html-target: maybe-html-target-libvtv -html-target: maybe-html-target-liboffloadmic html-target: maybe-html-target-libssp html-target: maybe-html-target-newlib html-target: maybe-html-target-libgcc @@ -1700,6 +1716,7 @@ html-target: maybe-html-target-libffi html-target: maybe-html-target-zlib html-target: maybe-html-target-rda html-target: maybe-html-target-libada +html-target: maybe-html-target-libgm2 html-target: maybe-html-target-libgomp html-target: maybe-html-target-libitm html-target: maybe-html-target-libatomic @@ -1731,7 +1748,6 @@ TAGS-host: maybe-TAGS-gmp TAGS-host: maybe-TAGS-mpfr TAGS-host: maybe-TAGS-mpc TAGS-host: maybe-TAGS-isl -TAGS-host: maybe-TAGS-libelf TAGS-host: maybe-TAGS-gold TAGS-host: maybe-TAGS-gprof TAGS-host: maybe-TAGS-gprofng @@ -1775,7 +1791,6 @@ TAGS-host: maybe-TAGS-libsframe TAGS-target: maybe-TAGS-target-libstdc++-v3 TAGS-target: maybe-TAGS-target-libsanitizer TAGS-target: maybe-TAGS-target-libvtv -TAGS-target: maybe-TAGS-target-liboffloadmic TAGS-target: maybe-TAGS-target-libssp TAGS-target: maybe-TAGS-target-newlib TAGS-target: maybe-TAGS-target-libgcc @@ -1792,6 +1807,7 @@ TAGS-target: maybe-TAGS-target-libffi TAGS-target: maybe-TAGS-target-zlib TAGS-target: maybe-TAGS-target-rda TAGS-target: maybe-TAGS-target-libada +TAGS-target: maybe-TAGS-target-libgm2 TAGS-target: maybe-TAGS-target-libgomp TAGS-target: maybe-TAGS-target-libitm TAGS-target: maybe-TAGS-target-libatomic @@ -1823,7 +1839,6 @@ install-info-host: maybe-install-info-gmp install-info-host: maybe-install-info-mpfr install-info-host: maybe-install-info-mpc install-info-host: maybe-install-info-isl -install-info-host: maybe-install-info-libelf install-info-host: maybe-install-info-gold install-info-host: maybe-install-info-gprof install-info-host: maybe-install-info-gprofng @@ -1867,7 +1882,6 @@ install-info-host: maybe-install-info-libsframe install-info-target: maybe-install-info-target-libstdc++-v3 install-info-target: maybe-install-info-target-libsanitizer install-info-target: maybe-install-info-target-libvtv -install-info-target: maybe-install-info-target-liboffloadmic install-info-target: maybe-install-info-target-libssp install-info-target: maybe-install-info-target-newlib install-info-target: maybe-install-info-target-libgcc @@ -1884,6 +1898,7 @@ install-info-target: maybe-install-info-target-libffi install-info-target: maybe-install-info-target-zlib install-info-target: maybe-install-info-target-rda install-info-target: maybe-install-info-target-libada +install-info-target: maybe-install-info-target-libgm2 install-info-target: maybe-install-info-target-libgomp install-info-target: maybe-install-info-target-libitm install-info-target: maybe-install-info-target-libatomic @@ -1915,7 +1930,6 @@ install-dvi-host: maybe-install-dvi-gmp install-dvi-host: maybe-install-dvi-mpfr install-dvi-host: maybe-install-dvi-mpc install-dvi-host: maybe-install-dvi-isl -install-dvi-host: maybe-install-dvi-libelf install-dvi-host: maybe-install-dvi-gold install-dvi-host: maybe-install-dvi-gprof install-dvi-host: maybe-install-dvi-gprofng @@ -1959,7 +1973,6 @@ install-dvi-host: maybe-install-dvi-libsframe install-dvi-target: maybe-install-dvi-target-libstdc++-v3 install-dvi-target: maybe-install-dvi-target-libsanitizer install-dvi-target: maybe-install-dvi-target-libvtv -install-dvi-target: maybe-install-dvi-target-liboffloadmic install-dvi-target: maybe-install-dvi-target-libssp install-dvi-target: maybe-install-dvi-target-newlib install-dvi-target: maybe-install-dvi-target-libgcc @@ -1976,6 +1989,7 @@ install-dvi-target: maybe-install-dvi-target-libffi install-dvi-target: maybe-install-dvi-target-zlib install-dvi-target: maybe-install-dvi-target-rda install-dvi-target: maybe-install-dvi-target-libada +install-dvi-target: maybe-install-dvi-target-libgm2 install-dvi-target: maybe-install-dvi-target-libgomp install-dvi-target: maybe-install-dvi-target-libitm install-dvi-target: maybe-install-dvi-target-libatomic @@ -2007,7 +2021,6 @@ install-pdf-host: maybe-install-pdf-gmp install-pdf-host: maybe-install-pdf-mpfr install-pdf-host: maybe-install-pdf-mpc install-pdf-host: maybe-install-pdf-isl -install-pdf-host: maybe-install-pdf-libelf install-pdf-host: maybe-install-pdf-gold install-pdf-host: maybe-install-pdf-gprof install-pdf-host: maybe-install-pdf-gprofng @@ -2051,7 +2064,6 @@ install-pdf-host: maybe-install-pdf-libsframe install-pdf-target: maybe-install-pdf-target-libstdc++-v3 install-pdf-target: maybe-install-pdf-target-libsanitizer install-pdf-target: maybe-install-pdf-target-libvtv -install-pdf-target: maybe-install-pdf-target-liboffloadmic install-pdf-target: maybe-install-pdf-target-libssp install-pdf-target: maybe-install-pdf-target-newlib install-pdf-target: maybe-install-pdf-target-libgcc @@ -2068,6 +2080,7 @@ install-pdf-target: maybe-install-pdf-target-libffi install-pdf-target: maybe-install-pdf-target-zlib install-pdf-target: maybe-install-pdf-target-rda install-pdf-target: maybe-install-pdf-target-libada +install-pdf-target: maybe-install-pdf-target-libgm2 install-pdf-target: maybe-install-pdf-target-libgomp install-pdf-target: maybe-install-pdf-target-libitm install-pdf-target: maybe-install-pdf-target-libatomic @@ -2099,7 +2112,6 @@ install-html-host: maybe-install-html-gmp install-html-host: maybe-install-html-mpfr install-html-host: maybe-install-html-mpc install-html-host: maybe-install-html-isl -install-html-host: maybe-install-html-libelf install-html-host: maybe-install-html-gold install-html-host: maybe-install-html-gprof install-html-host: maybe-install-html-gprofng @@ -2143,7 +2155,6 @@ install-html-host: maybe-install-html-libsframe install-html-target: maybe-install-html-target-libstdc++-v3 install-html-target: maybe-install-html-target-libsanitizer install-html-target: maybe-install-html-target-libvtv -install-html-target: maybe-install-html-target-liboffloadmic install-html-target: maybe-install-html-target-libssp install-html-target: maybe-install-html-target-newlib install-html-target: maybe-install-html-target-libgcc @@ -2160,6 +2171,7 @@ install-html-target: maybe-install-html-target-libffi install-html-target: maybe-install-html-target-zlib install-html-target: maybe-install-html-target-rda install-html-target: maybe-install-html-target-libada +install-html-target: maybe-install-html-target-libgm2 install-html-target: maybe-install-html-target-libgomp install-html-target: maybe-install-html-target-libitm install-html-target: maybe-install-html-target-libatomic @@ -2191,7 +2203,6 @@ installcheck-host: maybe-installcheck-gmp installcheck-host: maybe-installcheck-mpfr installcheck-host: maybe-installcheck-mpc installcheck-host: maybe-installcheck-isl -installcheck-host: maybe-installcheck-libelf installcheck-host: maybe-installcheck-gold installcheck-host: maybe-installcheck-gprof installcheck-host: maybe-installcheck-gprofng @@ -2235,7 +2246,6 @@ installcheck-host: maybe-installcheck-libsframe installcheck-target: maybe-installcheck-target-libstdc++-v3 installcheck-target: maybe-installcheck-target-libsanitizer installcheck-target: maybe-installcheck-target-libvtv -installcheck-target: maybe-installcheck-target-liboffloadmic installcheck-target: maybe-installcheck-target-libssp installcheck-target: maybe-installcheck-target-newlib installcheck-target: maybe-installcheck-target-libgcc @@ -2252,6 +2262,7 @@ installcheck-target: maybe-installcheck-target-libffi installcheck-target: maybe-installcheck-target-zlib installcheck-target: maybe-installcheck-target-rda installcheck-target: maybe-installcheck-target-libada +installcheck-target: maybe-installcheck-target-libgm2 installcheck-target: maybe-installcheck-target-libgomp installcheck-target: maybe-installcheck-target-libitm installcheck-target: maybe-installcheck-target-libatomic @@ -2283,7 +2294,6 @@ mostlyclean-host: maybe-mostlyclean-gmp mostlyclean-host: maybe-mostlyclean-mpfr mostlyclean-host: maybe-mostlyclean-mpc mostlyclean-host: maybe-mostlyclean-isl -mostlyclean-host: maybe-mostlyclean-libelf mostlyclean-host: maybe-mostlyclean-gold mostlyclean-host: maybe-mostlyclean-gprof mostlyclean-host: maybe-mostlyclean-gprofng @@ -2327,7 +2337,6 @@ mostlyclean-host: maybe-mostlyclean-libsframe mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target: maybe-mostlyclean-target-libsanitizer mostlyclean-target: maybe-mostlyclean-target-libvtv -mostlyclean-target: maybe-mostlyclean-target-liboffloadmic mostlyclean-target: maybe-mostlyclean-target-libssp mostlyclean-target: maybe-mostlyclean-target-newlib mostlyclean-target: maybe-mostlyclean-target-libgcc @@ -2344,6 +2353,7 @@ mostlyclean-target: maybe-mostlyclean-target-libffi mostlyclean-target: maybe-mostlyclean-target-zlib mostlyclean-target: maybe-mostlyclean-target-rda mostlyclean-target: maybe-mostlyclean-target-libada +mostlyclean-target: maybe-mostlyclean-target-libgm2 mostlyclean-target: maybe-mostlyclean-target-libgomp mostlyclean-target: maybe-mostlyclean-target-libitm mostlyclean-target: maybe-mostlyclean-target-libatomic @@ -2375,7 +2385,6 @@ clean-host: maybe-clean-gmp clean-host: maybe-clean-mpfr clean-host: maybe-clean-mpc clean-host: maybe-clean-isl -clean-host: maybe-clean-libelf clean-host: maybe-clean-gold clean-host: maybe-clean-gprof clean-host: maybe-clean-gprofng @@ -2419,7 +2428,6 @@ clean-host: maybe-clean-libsframe clean-target: maybe-clean-target-libstdc++-v3 clean-target: maybe-clean-target-libsanitizer clean-target: maybe-clean-target-libvtv -clean-target: maybe-clean-target-liboffloadmic clean-target: maybe-clean-target-libssp clean-target: maybe-clean-target-newlib clean-target: maybe-clean-target-libgcc @@ -2436,6 +2444,7 @@ clean-target: maybe-clean-target-libffi clean-target: maybe-clean-target-zlib clean-target: maybe-clean-target-rda clean-target: maybe-clean-target-libada +clean-target: maybe-clean-target-libgm2 clean-target: maybe-clean-target-libgomp clean-target: maybe-clean-target-libitm clean-target: maybe-clean-target-libatomic @@ -2467,7 +2476,6 @@ distclean-host: maybe-distclean-gmp distclean-host: maybe-distclean-mpfr distclean-host: maybe-distclean-mpc distclean-host: maybe-distclean-isl -distclean-host: maybe-distclean-libelf distclean-host: maybe-distclean-gold distclean-host: maybe-distclean-gprof distclean-host: maybe-distclean-gprofng @@ -2511,7 +2519,6 @@ distclean-host: maybe-distclean-libsframe distclean-target: maybe-distclean-target-libstdc++-v3 distclean-target: maybe-distclean-target-libsanitizer distclean-target: maybe-distclean-target-libvtv -distclean-target: maybe-distclean-target-liboffloadmic distclean-target: maybe-distclean-target-libssp distclean-target: maybe-distclean-target-newlib distclean-target: maybe-distclean-target-libgcc @@ -2528,6 +2535,7 @@ distclean-target: maybe-distclean-target-libffi distclean-target: maybe-distclean-target-zlib distclean-target: maybe-distclean-target-rda distclean-target: maybe-distclean-target-libada +distclean-target: maybe-distclean-target-libgm2 distclean-target: maybe-distclean-target-libgomp distclean-target: maybe-distclean-target-libitm distclean-target: maybe-distclean-target-libatomic @@ -2559,7 +2567,6 @@ maintainer-clean-host: maybe-maintainer-clean-gmp maintainer-clean-host: maybe-maintainer-clean-mpfr maintainer-clean-host: maybe-maintainer-clean-mpc maintainer-clean-host: maybe-maintainer-clean-isl -maintainer-clean-host: maybe-maintainer-clean-libelf maintainer-clean-host: maybe-maintainer-clean-gold maintainer-clean-host: maybe-maintainer-clean-gprof maintainer-clean-host: maybe-maintainer-clean-gprofng @@ -2603,7 +2610,6 @@ maintainer-clean-host: maybe-maintainer-clean-libsframe maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer maintainer-clean-target: maybe-maintainer-clean-target-libvtv -maintainer-clean-target: maybe-maintainer-clean-target-liboffloadmic maintainer-clean-target: maybe-maintainer-clean-target-libssp maintainer-clean-target: maybe-maintainer-clean-target-newlib maintainer-clean-target: maybe-maintainer-clean-target-libgcc @@ -2620,6 +2626,7 @@ maintainer-clean-target: maybe-maintainer-clean-target-libffi maintainer-clean-target: maybe-maintainer-clean-target-zlib maintainer-clean-target: maybe-maintainer-clean-target-rda maintainer-clean-target: maybe-maintainer-clean-target-libada +maintainer-clean-target: maybe-maintainer-clean-target-libgm2 maintainer-clean-target: maybe-maintainer-clean-target-libgomp maintainer-clean-target: maybe-maintainer-clean-target-libitm maintainer-clean-target: maybe-maintainer-clean-target-libatomic @@ -2709,7 +2716,6 @@ check-host: \ maybe-check-mpfr \ maybe-check-mpc \ maybe-check-isl \ - maybe-check-libelf \ maybe-check-gold \ maybe-check-gprof \ maybe-check-gprofng \ @@ -2753,7 +2759,6 @@ check-target: \ maybe-check-target-libstdc++-v3 \ maybe-check-target-libsanitizer \ maybe-check-target-libvtv \ - maybe-check-target-liboffloadmic \ maybe-check-target-libssp \ maybe-check-target-newlib \ maybe-check-target-libgcc \ @@ -2770,6 +2775,7 @@ check-target: \ maybe-check-target-zlib \ maybe-check-target-rda \ maybe-check-target-libada \ + maybe-check-target-libgm2 \ maybe-check-target-libgomp \ maybe-check-target-libitm \ maybe-check-target-libatomic @@ -2848,7 +2854,6 @@ install-host-nogcc: \ maybe-install-mpfr \ maybe-install-mpc \ maybe-install-isl \ - maybe-install-libelf \ maybe-install-gold \ maybe-install-gprof \ maybe-install-gprofng \ @@ -2905,7 +2910,6 @@ install-host: \ maybe-install-mpfr \ maybe-install-mpc \ maybe-install-isl \ - maybe-install-libelf \ maybe-install-gold \ maybe-install-gprof \ maybe-install-gprofng \ @@ -2949,7 +2953,6 @@ install-target: \ maybe-install-target-libstdc++-v3 \ maybe-install-target-libsanitizer \ maybe-install-target-libvtv \ - maybe-install-target-liboffloadmic \ maybe-install-target-libssp \ maybe-install-target-newlib \ maybe-install-target-libgcc \ @@ -2966,6 +2969,7 @@ install-target: \ maybe-install-target-zlib \ maybe-install-target-rda \ maybe-install-target-libada \ + maybe-install-target-libgm2 \ maybe-install-target-libgomp \ maybe-install-target-libitm \ maybe-install-target-libatomic @@ -3017,7 +3021,6 @@ install-strip-host: \ maybe-install-strip-mpfr \ maybe-install-strip-mpc \ maybe-install-strip-isl \ - maybe-install-strip-libelf \ maybe-install-strip-gold \ maybe-install-strip-gprof \ maybe-install-strip-gprofng \ @@ -3061,7 +3064,6 @@ install-strip-target: \ maybe-install-strip-target-libstdc++-v3 \ maybe-install-strip-target-libsanitizer \ maybe-install-strip-target-libvtv \ - maybe-install-strip-target-liboffloadmic \ maybe-install-strip-target-libssp \ maybe-install-strip-target-newlib \ maybe-install-strip-target-libgcc \ @@ -3078,6 +3080,7 @@ install-strip-target: \ maybe-install-strip-target-zlib \ maybe-install-strip-target-rda \ maybe-install-strip-target-libada \ + maybe-install-strip-target-libgm2 \ maybe-install-strip-target-libgomp \ maybe-install-strip-target-libitm \ maybe-install-strip-target-libatomic @@ -12041,7 +12044,7 @@ configure-gcc: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ + --target=${target_alias} @gcc_host_pie@ \ || exit 1 @endif gcc @@ -12076,7 +12079,8 @@ configure-stage1-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ \ - $(STAGE1_CONFIGURE_FLAGS) + $(STAGE1_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stage2-gcc maybe-configure-stage2-gcc @@ -12109,7 +12113,8 @@ configure-stage2-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE2_CONFIGURE_FLAGS) + $(STAGE2_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stage3-gcc maybe-configure-stage3-gcc @@ -12142,7 +12147,8 @@ configure-stage3-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE3_CONFIGURE_FLAGS) + $(STAGE3_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stage4-gcc maybe-configure-stage4-gcc @@ -12175,7 +12181,8 @@ configure-stage4-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE4_CONFIGURE_FLAGS) + $(STAGE4_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc @@ -12208,7 +12215,8 @@ configure-stageprofile-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEprofile_CONFIGURE_FLAGS) + $(STAGEprofile_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stagetrain-gcc maybe-configure-stagetrain-gcc @@ -12241,7 +12249,8 @@ configure-stagetrain-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEtrain_CONFIGURE_FLAGS) + $(STAGEtrain_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc @@ -12274,7 +12283,8 @@ configure-stagefeedback-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEfeedback_CONFIGURE_FLAGS) + $(STAGEfeedback_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stageautoprofile-gcc maybe-configure-stageautoprofile-gcc @@ -12307,7 +12317,8 @@ configure-stageautoprofile-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautoprofile_CONFIGURE_FLAGS) + $(STAGEautoprofile_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap .PHONY: configure-stageautofeedback-gcc maybe-configure-stageautofeedback-gcc @@ -12340,7 +12351,8 @@ configure-stageautofeedback-gcc: $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautofeedback_CONFIGURE_FLAGS) + $(STAGEautofeedback_CONFIGURE_FLAGS) \ + @gcc_host_pie@ @endif gcc-bootstrap @@ -13181,7 +13193,7 @@ configure-gmp: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \ - --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" \ + --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ \ || exit 1 @endif gmp @@ -13217,7 +13229,7 @@ configure-stage1-gmp: --target=none-${host_vendor}-${host_os} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stage2-gmp maybe-configure-stage2-gmp @@ -13251,7 +13263,7 @@ configure-stage2-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stage3-gmp maybe-configure-stage3-gmp @@ -13285,7 +13297,7 @@ configure-stage3-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stage4-gmp maybe-configure-stage4-gmp @@ -13319,7 +13331,7 @@ configure-stage4-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp @@ -13353,7 +13365,7 @@ configure-stageprofile-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stagetrain-gmp maybe-configure-stagetrain-gmp @@ -13387,7 +13399,7 @@ configure-stagetrain-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp @@ -13421,7 +13433,7 @@ configure-stagefeedback-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stageautoprofile-gmp maybe-configure-stageautoprofile-gmp @@ -13455,7 +13467,7 @@ configure-stageautoprofile-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap .PHONY: configure-stageautofeedback-gmp maybe-configure-stageautofeedback-gmp @@ -13489,7 +13501,7 @@ configure-stageautofeedback-gmp: --target=none-${host_vendor}-${host_os} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared LEX="touch lex.yy.c" + --disable-shared LEX="touch lex.yy.c" @host_libs_picflag@ @endif gmp-bootstrap @@ -14318,7 +14330,7 @@ configure-mpfr: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ \ + --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ \ || exit 1 @endif mpfr @@ -14354,7 +14366,7 @@ configure-stage1-mpfr: --target=${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr @@ -14388,7 +14400,7 @@ configure-stage2-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr @@ -14422,7 +14434,7 @@ configure-stage3-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr @@ -14456,7 +14468,7 @@ configure-stage4-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr @@ -14490,7 +14502,7 @@ configure-stageprofile-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stagetrain-mpfr maybe-configure-stagetrain-mpfr @@ -14524,7 +14536,7 @@ configure-stagetrain-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr @@ -14558,7 +14570,7 @@ configure-stagefeedback-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stageautoprofile-mpfr maybe-configure-stageautoprofile-mpfr @@ -14592,7 +14604,7 @@ configure-stageautoprofile-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap .PHONY: configure-stageautofeedback-mpfr maybe-configure-stageautofeedback-mpfr @@ -14626,7 +14638,7 @@ configure-stageautofeedback-mpfr: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpfr_configure_flags@ + --disable-shared @extra_mpfr_configure_flags@ @host_libs_picflag@ @endif mpfr-bootstrap @@ -15455,7 +15467,7 @@ configure-mpc: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode \ + --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode \ || exit 1 @endif mpc @@ -15491,7 +15503,7 @@ configure-stage1-mpc: --target=${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stage2-mpc maybe-configure-stage2-mpc @@ -15525,7 +15537,7 @@ configure-stage2-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stage3-mpc maybe-configure-stage3-mpc @@ -15559,7 +15571,7 @@ configure-stage3-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stage4-mpc maybe-configure-stage4-mpc @@ -15593,7 +15605,7 @@ configure-stage4-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stageprofile-mpc maybe-configure-stageprofile-mpc @@ -15627,7 +15639,7 @@ configure-stageprofile-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stagetrain-mpc maybe-configure-stagetrain-mpc @@ -15661,7 +15673,7 @@ configure-stagetrain-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stagefeedback-mpc maybe-configure-stagefeedback-mpc @@ -15695,7 +15707,7 @@ configure-stagefeedback-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stageautoprofile-mpc maybe-configure-stageautoprofile-mpc @@ -15729,7 +15741,7 @@ configure-stageautoprofile-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap .PHONY: configure-stageautofeedback-mpc maybe-configure-stageautofeedback-mpc @@ -15763,7 +15775,7 @@ configure-stageautofeedback-mpc: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ --disable-maintainer-mode + --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ @host_libs_picflag@ --disable-maintainer-mode @endif mpc-bootstrap @@ -16592,7 +16604,7 @@ configure-isl: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ \ + --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ \ || exit 1 @endif isl @@ -16628,7 +16640,7 @@ configure-stage1-isl: --target=${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stage2-isl maybe-configure-stage2-isl @@ -16662,7 +16674,7 @@ configure-stage2-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stage3-isl maybe-configure-stage3-isl @@ -16696,7 +16708,7 @@ configure-stage3-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stage4-isl maybe-configure-stage4-isl @@ -16730,7 +16742,7 @@ configure-stage4-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stageprofile-isl maybe-configure-stageprofile-isl @@ -16764,7 +16776,7 @@ configure-stageprofile-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stagetrain-isl maybe-configure-stagetrain-isl @@ -16798,7 +16810,7 @@ configure-stagetrain-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stagefeedback-isl maybe-configure-stagefeedback-isl @@ -16832,7 +16844,7 @@ configure-stagefeedback-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stageautoprofile-isl maybe-configure-stageautoprofile-isl @@ -16866,7 +16878,7 @@ configure-stageautoprofile-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap .PHONY: configure-stageautofeedback-isl maybe-configure-stageautofeedback-isl @@ -16900,7 +16912,7 @@ configure-stageautofeedback-isl: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared @extra_isl_gmp_configure_flags@ + --disable-shared @extra_isl_gmp_configure_flags@ @host_libs_picflag@ @endif isl-bootstrap @@ -17704,380 +17716,371 @@ maintainer-clean-isl: -.PHONY: configure-libelf maybe-configure-libelf -maybe-configure-libelf: +.PHONY: configure-gold maybe-configure-gold +maybe-configure-gold: @if gcc-bootstrap -configure-libelf: stage_current +configure-gold: stage_current @endif gcc-bootstrap -@if libelf -maybe-configure-libelf: configure-libelf -configure-libelf: +@if gold +maybe-configure-gold: configure-gold +configure-gold: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/libelf; \ - cd "$(HOST_SUBDIR)/libelf" || exit 1; \ + echo Configuring in $(HOST_SUBDIR)/gold; \ + cd "$(HOST_SUBDIR)/gold" || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) \ $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} --disable-shared \ + --target=${target_alias} \ || exit 1 -@endif libelf +@endif gold -.PHONY: configure-stage1-libelf maybe-configure-stage1-libelf -maybe-configure-stage1-libelf: -@if libelf-bootstrap -maybe-configure-stage1-libelf: configure-stage1-libelf -configure-stage1-libelf: +.PHONY: configure-stage1-gold maybe-configure-stage1-gold +maybe-configure-stage1-gold: +@if gold-bootstrap +maybe-configure-stage1-gold: configure-stage1-gold +configure-stage1-gold: @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE1_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 1 in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage 1 in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ \ - $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stage2-libelf maybe-configure-stage2-libelf -maybe-configure-stage2-libelf: -@if libelf-bootstrap -maybe-configure-stage2-libelf: configure-stage2-libelf -configure-stage2-libelf: + $(STAGE1_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stage2-gold maybe-configure-stage2-gold +maybe-configure-stage2-gold: +@if gold-bootstrap +maybe-configure-stage2-gold: configure-stage2-gold +configure-stage2-gold: @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE2_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 2 in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage 2 in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stage3-libelf maybe-configure-stage3-libelf -maybe-configure-stage3-libelf: -@if libelf-bootstrap -maybe-configure-stage3-libelf: configure-stage3-libelf -configure-stage3-libelf: + $(STAGE2_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stage3-gold maybe-configure-stage3-gold +maybe-configure-stage3-gold: +@if gold-bootstrap +maybe-configure-stage3-gold: configure-stage3-gold +configure-stage3-gold: @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE3_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 3 in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage 3 in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stage4-libelf maybe-configure-stage4-libelf -maybe-configure-stage4-libelf: -@if libelf-bootstrap -maybe-configure-stage4-libelf: configure-stage4-libelf -configure-stage4-libelf: + $(STAGE3_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stage4-gold maybe-configure-stage4-gold +maybe-configure-stage4-gold: +@if gold-bootstrap +maybe-configure-stage4-gold: configure-stage4-gold +configure-stage4-gold: @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE4_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 4 in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage 4 in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stageprofile-libelf maybe-configure-stageprofile-libelf -maybe-configure-stageprofile-libelf: -@if libelf-bootstrap -maybe-configure-stageprofile-libelf: configure-stageprofile-libelf -configure-stageprofile-libelf: + $(STAGE4_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stageprofile-gold maybe-configure-stageprofile-gold +maybe-configure-stageprofile-gold: +@if gold-bootstrap +maybe-configure-stageprofile-gold: configure-stageprofile-gold +configure-stageprofile-gold: @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEprofile_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage profile in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage profile in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stagetrain-libelf maybe-configure-stagetrain-libelf -maybe-configure-stagetrain-libelf: -@if libelf-bootstrap -maybe-configure-stagetrain-libelf: configure-stagetrain-libelf -configure-stagetrain-libelf: + $(STAGEprofile_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stagetrain-gold maybe-configure-stagetrain-gold +maybe-configure-stagetrain-gold: +@if gold-bootstrap +maybe-configure-stagetrain-gold: configure-stagetrain-gold +configure-stagetrain-gold: @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEtrain_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGEtrain_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGEtrain_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGEtrain_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage train in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage train in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stagefeedback-libelf maybe-configure-stagefeedback-libelf -maybe-configure-stagefeedback-libelf: -@if libelf-bootstrap -maybe-configure-stagefeedback-libelf: configure-stagefeedback-libelf -configure-stagefeedback-libelf: + $(STAGEtrain_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stagefeedback-gold maybe-configure-stagefeedback-gold +maybe-configure-stagefeedback-gold: +@if gold-bootstrap +maybe-configure-stagefeedback-gold: configure-stagefeedback-gold +configure-stagefeedback-gold: @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEfeedback_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage feedback in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage feedback in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stageautoprofile-libelf maybe-configure-stageautoprofile-libelf -maybe-configure-stageautoprofile-libelf: -@if libelf-bootstrap -maybe-configure-stageautoprofile-libelf: configure-stageautoprofile-libelf -configure-stageautoprofile-libelf: + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stageautoprofile-gold maybe-configure-stageautoprofile-gold +maybe-configure-stageautoprofile-gold: +@if gold-bootstrap +maybe-configure-stageautoprofile-gold: configure-stageautoprofile-gold +configure-stageautoprofile-gold: @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGEautoprofile_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGEautoprofile_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage autoprofile in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage autoprofile in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap - -.PHONY: configure-stageautofeedback-libelf maybe-configure-stageautofeedback-libelf -maybe-configure-stageautofeedback-libelf: -@if libelf-bootstrap -maybe-configure-stageautofeedback-libelf: configure-stageautofeedback-libelf -configure-stageautofeedback-libelf: + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif gold-bootstrap + +.PHONY: configure-stageautofeedback-gold maybe-configure-stageautofeedback-gold +maybe-configure-stageautofeedback-gold: +@if gold-bootstrap +maybe-configure-stageautofeedback-gold: configure-stageautofeedback-gold +configure-stageautofeedback-gold: @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \ + test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ CFLAGS="$(STAGEautofeedback_CFLAGS)"; export CFLAGS; \ CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)"; export CXXFLAGS; \ LIBCFLAGS="$(STAGEautofeedback_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage autofeedback in $(HOST_SUBDIR)/libelf; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \ - cd $(HOST_SUBDIR)/libelf || exit 1; \ + echo Configuring stage autofeedback in $(HOST_SUBDIR)/gold; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + cd $(HOST_SUBDIR)/gold || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/libelf/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=libelf; \ + module_srcdir=gold; \ $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared -@endif libelf-bootstrap + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif gold-bootstrap -.PHONY: all-libelf maybe-all-libelf -maybe-all-libelf: +.PHONY: all-gold maybe-all-gold +maybe-all-gold: @if gcc-bootstrap -all-libelf: stage_current +all-gold: stage_current @endif gcc-bootstrap -@if libelf -TARGET-libelf=all -maybe-all-libelf: all-libelf -all-libelf: configure-libelf +@if gold +TARGET-gold=all +maybe-all-gold: all-gold +all-gold: configure-gold @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/libelf && \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ - $(TARGET-libelf)) -@endif libelf + $(TARGET-gold)) +@endif gold -.PHONY: all-stage1-libelf maybe-all-stage1-libelf -.PHONY: clean-stage1-libelf maybe-clean-stage1-libelf -maybe-all-stage1-libelf: -maybe-clean-stage1-libelf: -@if libelf-bootstrap -maybe-all-stage1-libelf: all-stage1-libelf -all-stage1: all-stage1-libelf -TARGET-stage1-libelf = $(TARGET-libelf) -all-stage1-libelf: configure-stage1-libelf +.PHONY: all-stage1-gold maybe-all-stage1-gold +.PHONY: clean-stage1-gold maybe-clean-stage1-gold +maybe-all-stage1-gold: +maybe-clean-stage1-gold: +@if gold-bootstrap +maybe-all-stage1-gold: all-stage1-gold +all-stage1: all-stage1-gold +TARGET-stage1-gold = $(TARGET-gold) +all-stage1-gold: configure-stage1-gold @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE1_TFLAGS)"; \ $(HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" \ @@ -18090,39 +18093,39 @@ all-stage1-libelf: configure-stage1-libelf $(EXTRA_HOST_FLAGS) \ $(STAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGE1_TFLAGS)" \ - $(TARGET-stage1-libelf) + $(TARGET-stage1-gold) -maybe-clean-stage1-libelf: clean-stage1-libelf -clean-stage1: clean-stage1-libelf -clean-stage1-libelf: +maybe-clean-stage1-gold: clean-stage1-gold +clean-stage1: clean-stage1-gold +clean-stage1-gold: @if [ $(current_stage) = stage1 ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stage1-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stage1-gold/Makefile ] || exit 0; \ $(MAKE) stage1-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) \ $(STAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stage2-libelf maybe-all-stage2-libelf -.PHONY: clean-stage2-libelf maybe-clean-stage2-libelf -maybe-all-stage2-libelf: -maybe-clean-stage2-libelf: -@if libelf-bootstrap -maybe-all-stage2-libelf: all-stage2-libelf -all-stage2: all-stage2-libelf -TARGET-stage2-libelf = $(TARGET-libelf) -all-stage2-libelf: configure-stage2-libelf +@endif gold-bootstrap + + +.PHONY: all-stage2-gold maybe-all-stage2-gold +.PHONY: clean-stage2-gold maybe-clean-stage2-gold +maybe-all-stage2-gold: +maybe-clean-stage2-gold: +@if gold-bootstrap +maybe-all-stage2-gold: all-stage2-gold +all-stage2: all-stage2-gold +TARGET-stage2-gold = $(TARGET-gold) +all-stage2-gold: configure-stage2-gold @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE2_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGE2_CFLAGS)" \ @@ -18134,38 +18137,38 @@ all-stage2-libelf: configure-stage2-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGE2_TFLAGS)" \ - $(TARGET-stage2-libelf) + $(TARGET-stage2-gold) -maybe-clean-stage2-libelf: clean-stage2-libelf -clean-stage2: clean-stage2-libelf -clean-stage2-libelf: +maybe-clean-stage2-gold: clean-stage2-gold +clean-stage2: clean-stage2-gold +clean-stage2-gold: @if [ $(current_stage) = stage2 ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stage2-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stage2-gold/Makefile ] || exit 0; \ $(MAKE) stage2-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stage3-libelf maybe-all-stage3-libelf -.PHONY: clean-stage3-libelf maybe-clean-stage3-libelf -maybe-all-stage3-libelf: -maybe-clean-stage3-libelf: -@if libelf-bootstrap -maybe-all-stage3-libelf: all-stage3-libelf -all-stage3: all-stage3-libelf -TARGET-stage3-libelf = $(TARGET-libelf) -all-stage3-libelf: configure-stage3-libelf +@endif gold-bootstrap + + +.PHONY: all-stage3-gold maybe-all-stage3-gold +.PHONY: clean-stage3-gold maybe-clean-stage3-gold +maybe-all-stage3-gold: +maybe-clean-stage3-gold: +@if gold-bootstrap +maybe-all-stage3-gold: all-stage3-gold +all-stage3: all-stage3-gold +TARGET-stage3-gold = $(TARGET-gold) +all-stage3-gold: configure-stage3-gold @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE3_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGE3_CFLAGS)" \ @@ -18177,38 +18180,38 @@ all-stage3-libelf: configure-stage3-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGE3_TFLAGS)" \ - $(TARGET-stage3-libelf) + $(TARGET-stage3-gold) -maybe-clean-stage3-libelf: clean-stage3-libelf -clean-stage3: clean-stage3-libelf -clean-stage3-libelf: +maybe-clean-stage3-gold: clean-stage3-gold +clean-stage3: clean-stage3-gold +clean-stage3-gold: @if [ $(current_stage) = stage3 ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stage3-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stage3-gold/Makefile ] || exit 0; \ $(MAKE) stage3-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stage4-libelf maybe-all-stage4-libelf -.PHONY: clean-stage4-libelf maybe-clean-stage4-libelf -maybe-all-stage4-libelf: -maybe-clean-stage4-libelf: -@if libelf-bootstrap -maybe-all-stage4-libelf: all-stage4-libelf -all-stage4: all-stage4-libelf -TARGET-stage4-libelf = $(TARGET-libelf) -all-stage4-libelf: configure-stage4-libelf +@endif gold-bootstrap + + +.PHONY: all-stage4-gold maybe-all-stage4-gold +.PHONY: clean-stage4-gold maybe-clean-stage4-gold +maybe-all-stage4-gold: +maybe-clean-stage4-gold: +@if gold-bootstrap +maybe-all-stage4-gold: all-stage4-gold +all-stage4: all-stage4-gold +TARGET-stage4-gold = $(TARGET-gold) +all-stage4-gold: configure-stage4-gold @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGE4_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGE4_CFLAGS)" \ @@ -18220,38 +18223,38 @@ all-stage4-libelf: configure-stage4-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGE4_TFLAGS)" \ - $(TARGET-stage4-libelf) + $(TARGET-stage4-gold) -maybe-clean-stage4-libelf: clean-stage4-libelf -clean-stage4: clean-stage4-libelf -clean-stage4-libelf: +maybe-clean-stage4-gold: clean-stage4-gold +clean-stage4: clean-stage4-gold +clean-stage4-gold: @if [ $(current_stage) = stage4 ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stage4-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stage4-gold/Makefile ] || exit 0; \ $(MAKE) stage4-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stageprofile-libelf maybe-all-stageprofile-libelf -.PHONY: clean-stageprofile-libelf maybe-clean-stageprofile-libelf -maybe-all-stageprofile-libelf: -maybe-clean-stageprofile-libelf: -@if libelf-bootstrap -maybe-all-stageprofile-libelf: all-stageprofile-libelf -all-stageprofile: all-stageprofile-libelf -TARGET-stageprofile-libelf = $(TARGET-libelf) -all-stageprofile-libelf: configure-stageprofile-libelf +@endif gold-bootstrap + + +.PHONY: all-stageprofile-gold maybe-all-stageprofile-gold +.PHONY: clean-stageprofile-gold maybe-clean-stageprofile-gold +maybe-all-stageprofile-gold: +maybe-clean-stageprofile-gold: +@if gold-bootstrap +maybe-all-stageprofile-gold: all-stageprofile-gold +all-stageprofile: all-stageprofile-gold +TARGET-stageprofile-gold = $(TARGET-gold) +all-stageprofile-gold: configure-stageprofile-gold @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEprofile_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGEprofile_CFLAGS)" \ @@ -18263,38 +18266,38 @@ all-stageprofile-libelf: configure-stageprofile-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGEprofile_TFLAGS)" \ - $(TARGET-stageprofile-libelf) + $(TARGET-stageprofile-gold) -maybe-clean-stageprofile-libelf: clean-stageprofile-libelf -clean-stageprofile: clean-stageprofile-libelf -clean-stageprofile-libelf: +maybe-clean-stageprofile-gold: clean-stageprofile-gold +clean-stageprofile: clean-stageprofile-gold +clean-stageprofile-gold: @if [ $(current_stage) = stageprofile ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stageprofile-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stageprofile-gold/Makefile ] || exit 0; \ $(MAKE) stageprofile-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stagetrain-libelf maybe-all-stagetrain-libelf -.PHONY: clean-stagetrain-libelf maybe-clean-stagetrain-libelf -maybe-all-stagetrain-libelf: -maybe-clean-stagetrain-libelf: -@if libelf-bootstrap -maybe-all-stagetrain-libelf: all-stagetrain-libelf -all-stagetrain: all-stagetrain-libelf -TARGET-stagetrain-libelf = $(TARGET-libelf) -all-stagetrain-libelf: configure-stagetrain-libelf +@endif gold-bootstrap + + +.PHONY: all-stagetrain-gold maybe-all-stagetrain-gold +.PHONY: clean-stagetrain-gold maybe-clean-stagetrain-gold +maybe-all-stagetrain-gold: +maybe-clean-stagetrain-gold: +@if gold-bootstrap +maybe-all-stagetrain-gold: all-stagetrain-gold +all-stagetrain: all-stagetrain-gold +TARGET-stagetrain-gold = $(TARGET-gold) +all-stagetrain-gold: configure-stagetrain-gold @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEtrain_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGEtrain_CFLAGS)" \ @@ -18306,38 +18309,38 @@ all-stagetrain-libelf: configure-stagetrain-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGEtrain_TFLAGS)" \ - $(TARGET-stagetrain-libelf) + $(TARGET-stagetrain-gold) -maybe-clean-stagetrain-libelf: clean-stagetrain-libelf -clean-stagetrain: clean-stagetrain-libelf -clean-stagetrain-libelf: +maybe-clean-stagetrain-gold: clean-stagetrain-gold +clean-stagetrain: clean-stagetrain-gold +clean-stagetrain-gold: @if [ $(current_stage) = stagetrain ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stagetrain-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stagetrain-gold/Makefile ] || exit 0; \ $(MAKE) stagetrain-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stagefeedback-libelf maybe-all-stagefeedback-libelf -.PHONY: clean-stagefeedback-libelf maybe-clean-stagefeedback-libelf -maybe-all-stagefeedback-libelf: -maybe-clean-stagefeedback-libelf: -@if libelf-bootstrap -maybe-all-stagefeedback-libelf: all-stagefeedback-libelf -all-stagefeedback: all-stagefeedback-libelf -TARGET-stagefeedback-libelf = $(TARGET-libelf) -all-stagefeedback-libelf: configure-stagefeedback-libelf +@endif gold-bootstrap + + +.PHONY: all-stagefeedback-gold maybe-all-stagefeedback-gold +.PHONY: clean-stagefeedback-gold maybe-clean-stagefeedback-gold +maybe-all-stagefeedback-gold: +maybe-clean-stagefeedback-gold: +@if gold-bootstrap +maybe-all-stagefeedback-gold: all-stagefeedback-gold +all-stagefeedback: all-stagefeedback-gold +TARGET-stagefeedback-gold = $(TARGET-gold) +all-stagefeedback-gold: configure-stagefeedback-gold @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEfeedback_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGEfeedback_CFLAGS)" \ @@ -18349,38 +18352,38 @@ all-stagefeedback-libelf: configure-stagefeedback-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGEfeedback_TFLAGS)" \ - $(TARGET-stagefeedback-libelf) + $(TARGET-stagefeedback-gold) -maybe-clean-stagefeedback-libelf: clean-stagefeedback-libelf -clean-stagefeedback: clean-stagefeedback-libelf -clean-stagefeedback-libelf: +maybe-clean-stagefeedback-gold: clean-stagefeedback-gold +clean-stagefeedback: clean-stagefeedback-gold +clean-stagefeedback-gold: @if [ $(current_stage) = stagefeedback ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stagefeedback-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stagefeedback-gold/Makefile ] || exit 0; \ $(MAKE) stagefeedback-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stageautoprofile-libelf maybe-all-stageautoprofile-libelf -.PHONY: clean-stageautoprofile-libelf maybe-clean-stageautoprofile-libelf -maybe-all-stageautoprofile-libelf: -maybe-clean-stageautoprofile-libelf: -@if libelf-bootstrap -maybe-all-stageautoprofile-libelf: all-stageautoprofile-libelf -all-stageautoprofile: all-stageautoprofile-libelf -TARGET-stageautoprofile-libelf = $(TARGET-libelf) -all-stageautoprofile-libelf: configure-stageautoprofile-libelf +@endif gold-bootstrap + + +.PHONY: all-stageautoprofile-gold maybe-all-stageautoprofile-gold +.PHONY: clean-stageautoprofile-gold maybe-clean-stageautoprofile-gold +maybe-all-stageautoprofile-gold: +maybe-clean-stageautoprofile-gold: +@if gold-bootstrap +maybe-all-stageautoprofile-gold: all-stageautoprofile-gold +all-stageautoprofile: all-stageautoprofile-gold +TARGET-stageautoprofile-gold = $(TARGET-gold) +all-stageautoprofile-gold: configure-stageautoprofile-gold @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $$s/gcc/config/i386/$(AUTO_PROFILE) \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGEautoprofile_CFLAGS)" \ @@ -18392,38 +18395,38 @@ all-stageautoprofile-libelf: configure-stageautoprofile-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGEautoprofile_TFLAGS)" \ - $(TARGET-stageautoprofile-libelf) + $(TARGET-stageautoprofile-gold) -maybe-clean-stageautoprofile-libelf: clean-stageautoprofile-libelf -clean-stageautoprofile: clean-stageautoprofile-libelf -clean-stageautoprofile-libelf: +maybe-clean-stageautoprofile-gold: clean-stageautoprofile-gold +clean-stageautoprofile: clean-stageautoprofile-gold +clean-stageautoprofile-gold: @if [ $(current_stage) = stageautoprofile ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stageautoprofile-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stageautoprofile-gold/Makefile ] || exit 0; \ $(MAKE) stageautoprofile-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap - - -.PHONY: all-stageautofeedback-libelf maybe-all-stageautofeedback-libelf -.PHONY: clean-stageautofeedback-libelf maybe-clean-stageautofeedback-libelf -maybe-all-stageautofeedback-libelf: -maybe-clean-stageautofeedback-libelf: -@if libelf-bootstrap -maybe-all-stageautofeedback-libelf: all-stageautofeedback-libelf -all-stageautofeedback: all-stageautofeedback-libelf -TARGET-stageautofeedback-libelf = $(TARGET-libelf) -all-stageautofeedback-libelf: configure-stageautofeedback-libelf +@endif gold-bootstrap + + +.PHONY: all-stageautofeedback-gold maybe-all-stageautofeedback-gold +.PHONY: clean-stageautofeedback-gold maybe-clean-stageautofeedback-gold +maybe-all-stageautofeedback-gold: +maybe-clean-stageautofeedback-gold: +@if gold-bootstrap +maybe-all-stageautofeedback-gold: all-stageautofeedback-gold +all-stageautofeedback: all-stageautofeedback-gold +TARGET-stageautofeedback-gold = $(TARGET-gold) +all-stageautofeedback-gold: configure-stageautofeedback-gold @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ \ $(MAKE) $(BASE_FLAGS_TO_PASS) \ CFLAGS="$(STAGEautofeedback_CFLAGS)" \ @@ -18435,76 +18438,88 @@ all-stageautofeedback-libelf: configure-stageautofeedback-libelf LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ - $(TARGET-stageautofeedback-libelf) + $(TARGET-stageautofeedback-gold) -maybe-clean-stageautofeedback-libelf: clean-stageautofeedback-libelf -clean-stageautofeedback: clean-stageautofeedback-libelf -clean-stageautofeedback-libelf: +maybe-clean-stageautofeedback-gold: clean-stageautofeedback-gold +clean-stageautofeedback: clean-stageautofeedback-gold +clean-stageautofeedback-gold: @if [ $(current_stage) = stageautofeedback ]; then \ - [ -f $(HOST_SUBDIR)/libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ else \ - [ -f $(HOST_SUBDIR)/stageautofeedback-libelf/Makefile ] || exit 0; \ + [ -f $(HOST_SUBDIR)/stageautofeedback-gold/Makefile ] || exit 0; \ $(MAKE) stageautofeedback-start; \ fi; \ - cd $(HOST_SUBDIR)/libelf && \ + cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif libelf-bootstrap +@endif gold-bootstrap -.PHONY: check-libelf maybe-check-libelf -maybe-check-libelf: -@if libelf -maybe-check-libelf: check-libelf +.PHONY: check-gold maybe-check-gold +maybe-check-gold: +@if gold +maybe-check-gold: check-gold -check-libelf: +check-gold: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/libelf && \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) -@endif libelf +@endif gold -.PHONY: install-libelf maybe-install-libelf -maybe-install-libelf: -@if libelf -maybe-install-libelf: install-libelf +.PHONY: install-gold maybe-install-gold +maybe-install-gold: +@if gold +maybe-install-gold: install-gold -install-libelf: +install-gold: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gold && \ + $(MAKE) $(FLAGS_TO_PASS) install) -@endif libelf +@endif gold -.PHONY: install-strip-libelf maybe-install-strip-libelf -maybe-install-strip-libelf: -@if libelf -maybe-install-strip-libelf: install-strip-libelf +.PHONY: install-strip-gold maybe-install-strip-gold +maybe-install-strip-gold: +@if gold +maybe-install-strip-gold: install-strip-gold -install-strip-libelf: +install-strip-gold: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gold && \ + $(MAKE) $(FLAGS_TO_PASS) install-strip) -@endif libelf +@endif gold # Other targets (info, dvi, pdf, etc.) -.PHONY: maybe-info-libelf info-libelf -maybe-info-libelf: -@if libelf -maybe-info-libelf: info-libelf +.PHONY: maybe-info-gold info-gold +maybe-info-gold: +@if gold +maybe-info-gold: info-gold -info-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +info-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing info in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing info in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18512,24 +18527,24 @@ info-libelf: \ info) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-dvi-libelf dvi-libelf -maybe-dvi-libelf: -@if libelf -maybe-dvi-libelf: dvi-libelf +.PHONY: maybe-dvi-gold dvi-gold +maybe-dvi-gold: +@if gold +maybe-dvi-gold: dvi-gold -dvi-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +dvi-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing dvi in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing dvi in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18537,24 +18552,24 @@ dvi-libelf: \ dvi) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-pdf-libelf pdf-libelf -maybe-pdf-libelf: -@if libelf -maybe-pdf-libelf: pdf-libelf +.PHONY: maybe-pdf-gold pdf-gold +maybe-pdf-gold: +@if gold +maybe-pdf-gold: pdf-gold -pdf-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +pdf-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing pdf in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing pdf in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18562,24 +18577,24 @@ pdf-libelf: \ pdf) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-html-libelf html-libelf -maybe-html-libelf: -@if libelf -maybe-html-libelf: html-libelf +.PHONY: maybe-html-gold html-gold +maybe-html-gold: +@if gold +maybe-html-gold: html-gold -html-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +html-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing html in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing html in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18587,24 +18602,24 @@ html-libelf: \ html) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-TAGS-libelf TAGS-libelf -maybe-TAGS-libelf: -@if libelf -maybe-TAGS-libelf: TAGS-libelf +.PHONY: maybe-TAGS-gold TAGS-gold +maybe-TAGS-gold: +@if gold +maybe-TAGS-gold: TAGS-gold -TAGS-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +TAGS-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing TAGS in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing TAGS in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18612,25 +18627,25 @@ TAGS-libelf: \ TAGS) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-install-info-libelf install-info-libelf -maybe-install-info-libelf: -@if libelf -maybe-install-info-libelf: install-info-libelf +.PHONY: maybe-install-info-gold install-info-gold +maybe-install-info-gold: +@if gold +maybe-install-info-gold: install-info-gold -install-info-libelf: \ - configure-libelf \ - info-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +install-info-gold: \ + configure-gold \ + info-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-info in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing install-info in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18638,25 +18653,25 @@ install-info-libelf: \ install-info) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-install-dvi-libelf install-dvi-libelf -maybe-install-dvi-libelf: -@if libelf -maybe-install-dvi-libelf: install-dvi-libelf +.PHONY: maybe-install-dvi-gold install-dvi-gold +maybe-install-dvi-gold: +@if gold +maybe-install-dvi-gold: install-dvi-gold -install-dvi-libelf: \ - configure-libelf \ - dvi-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +install-dvi-gold: \ + configure-gold \ + dvi-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-dvi in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing install-dvi in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18664,25 +18679,25 @@ install-dvi-libelf: \ install-dvi) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-install-pdf-libelf install-pdf-libelf -maybe-install-pdf-libelf: -@if libelf -maybe-install-pdf-libelf: install-pdf-libelf +.PHONY: maybe-install-pdf-gold install-pdf-gold +maybe-install-pdf-gold: +@if gold +maybe-install-pdf-gold: install-pdf-gold -install-pdf-libelf: \ - configure-libelf \ - pdf-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +install-pdf-gold: \ + configure-gold \ + pdf-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-pdf in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing install-pdf in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18690,25 +18705,25 @@ install-pdf-libelf: \ install-pdf) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-install-html-libelf install-html-libelf -maybe-install-html-libelf: -@if libelf -maybe-install-html-libelf: install-html-libelf +.PHONY: maybe-install-html-gold install-html-gold +maybe-install-html-gold: +@if gold +maybe-install-html-gold: install-html-gold -install-html-libelf: \ - configure-libelf \ - html-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +install-html-gold: \ + configure-gold \ + html-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-html in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing install-html in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18716,24 +18731,24 @@ install-html-libelf: \ install-html) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-installcheck-libelf installcheck-libelf -maybe-installcheck-libelf: -@if libelf -maybe-installcheck-libelf: installcheck-libelf +.PHONY: maybe-installcheck-gold installcheck-gold +maybe-installcheck-gold: +@if gold +maybe-installcheck-gold: installcheck-gold -installcheck-libelf: \ - configure-libelf - @[ -f ./libelf/Makefile ] || exit 0; \ +installcheck-gold: \ + configure-gold + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing installcheck in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing installcheck in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18741,47 +18756,47 @@ installcheck-libelf: \ installcheck) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-mostlyclean-libelf mostlyclean-libelf -maybe-mostlyclean-libelf: -@if libelf -maybe-mostlyclean-libelf: mostlyclean-libelf +.PHONY: maybe-mostlyclean-gold mostlyclean-gold +maybe-mostlyclean-gold: +@if gold +maybe-mostlyclean-gold: mostlyclean-gold -mostlyclean-libelf: - @[ -f ./libelf/Makefile ] || exit 0; \ +mostlyclean-gold: + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing mostlyclean in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + echo "Doing mostlyclean in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ mostlyclean) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-clean-libelf clean-libelf -maybe-clean-libelf: -@if libelf -maybe-clean-libelf: clean-libelf +.PHONY: maybe-clean-gold clean-gold +maybe-clean-gold: +@if gold +maybe-clean-gold: clean-gold -clean-libelf: - @[ -f ./libelf/Makefile ] || exit 0; \ +clean-gold: + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing clean in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing clean in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18789,23 +18804,23 @@ clean-libelf: clean) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-distclean-libelf distclean-libelf -maybe-distclean-libelf: -@if libelf -maybe-distclean-libelf: distclean-libelf +.PHONY: maybe-distclean-gold distclean-gold +maybe-distclean-gold: +@if gold +maybe-distclean-gold: distclean-gold -distclean-libelf: - @[ -f ./libelf/Makefile ] || exit 0; \ +distclean-gold: + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing distclean in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing distclean in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18813,23 +18828,23 @@ distclean-libelf: distclean) \ || exit 1 -@endif libelf +@endif gold -.PHONY: maybe-maintainer-clean-libelf maintainer-clean-libelf -maybe-maintainer-clean-libelf: -@if libelf -maybe-maintainer-clean-libelf: maintainer-clean-libelf +.PHONY: maybe-maintainer-clean-gold maintainer-clean-gold +maybe-maintainer-clean-gold: +@if gold +maybe-maintainer-clean-gold: maintainer-clean-gold -maintainer-clean-libelf: - @[ -f ./libelf/Makefile ] || exit 0; \ +maintainer-clean-gold: + @[ -f ./gold/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing maintainer-clean in libelf"; \ - (cd $(HOST_SUBDIR)/libelf && \ + echo "Doing maintainer-clean in gold"; \ + (cd $(HOST_SUBDIR)/gold && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -18837,1018 +18852,341 @@ maintainer-clean-libelf: maintainer-clean) \ || exit 1 -@endif libelf +@endif gold -.PHONY: configure-gold maybe-configure-gold -maybe-configure-gold: +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: @if gcc-bootstrap -configure-gold: stage_current +configure-gprof: stage_current @endif gcc-bootstrap -@if gold -maybe-configure-gold: configure-gold -configure-gold: +@if gprof +maybe-configure-gprof: configure-gprof +configure-gprof: + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ + test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof; \ $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/gold; \ - cd "$(HOST_SUBDIR)/gold" || exit 1; \ + echo Configuring in $(HOST_SUBDIR)/gprof; \ + cd "$(HOST_SUBDIR)/gprof" || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gprof/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=gold; \ + module_srcdir=gprof; \ $(SHELL) \ $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ || exit 1 -@endif gold +@endif gprof -.PHONY: configure-stage1-gold maybe-configure-stage1-gold -maybe-configure-stage1-gold: -@if gold-bootstrap -maybe-configure-stage1-gold: configure-stage1-gold -configure-stage1-gold: - @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE1_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 1 in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - \ - $(STAGE1_CONFIGURE_FLAGS) -@endif gold-bootstrap -.PHONY: configure-stage2-gold maybe-configure-stage2-gold -maybe-configure-stage2-gold: -@if gold-bootstrap -maybe-configure-stage2-gold: configure-stage2-gold -configure-stage2-gold: - @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE2_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 2 in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE2_CONFIGURE_FLAGS) -@endif gold-bootstrap -.PHONY: configure-stage3-gold maybe-configure-stage3-gold -maybe-configure-stage3-gold: -@if gold-bootstrap -maybe-configure-stage3-gold: configure-stage3-gold -configure-stage3-gold: - @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +@if gcc-bootstrap +all-gprof: stage_current +@endif gcc-bootstrap +@if gprof +TARGET-gprof=all +maybe-all-gprof: all-gprof +all-gprof: configure-gprof + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE3_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 3 in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE3_CONFIGURE_FLAGS) -@endif gold-bootstrap + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ + $(TARGET-gprof)) +@endif gprof -.PHONY: configure-stage4-gold maybe-configure-stage4-gold -maybe-configure-stage4-gold: -@if gold-bootstrap -maybe-configure-stage4-gold: configure-stage4-gold -configure-stage4-gold: - @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE4_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage 4 in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGE4_CONFIGURE_FLAGS) -@endif gold-bootstrap -.PHONY: configure-stageprofile-gold maybe-configure-stageprofile-gold -maybe-configure-stageprofile-gold: -@if gold-bootstrap -maybe-configure-stageprofile-gold: configure-stageprofile-gold -configure-stageprofile-gold: - @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEprofile_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage profile in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEprofile_CONFIGURE_FLAGS) -@endif gold-bootstrap -.PHONY: configure-stagetrain-gold maybe-configure-stagetrain-gold -maybe-configure-stagetrain-gold: -@if gold-bootstrap -maybe-configure-stagetrain-gold: configure-stagetrain-gold -configure-stagetrain-gold: - @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEtrain_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGEtrain_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGEtrain_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGEtrain_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage train in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEtrain_CONFIGURE_FLAGS) -@endif gold-bootstrap -.PHONY: configure-stagefeedback-gold maybe-configure-stagefeedback-gold -maybe-configure-stagefeedback-gold: -@if gold-bootstrap -maybe-configure-stagefeedback-gold: configure-stagefeedback-gold -configure-stagefeedback-gold: - @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: +@if gprof +maybe-check-gprof: check-gprof + +check-gprof: + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEfeedback_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage feedback in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEfeedback_CONFIGURE_FLAGS) -@endif gold-bootstrap + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(FLAGS_TO_PASS) check) -.PHONY: configure-stageautoprofile-gold maybe-configure-stageautoprofile-gold -maybe-configure-stageautoprofile-gold: -@if gold-bootstrap -maybe-configure-stageautoprofile-gold: configure-stageautoprofile-gold -configure-stageautoprofile-gold: - @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold +@endif gprof + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: +@if gprof +maybe-install-gprof: install-gprof + +install-gprof: installdirs + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGEautoprofile_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGEautoprofile_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage autoprofile in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautoprofile_CONFIGURE_FLAGS) -@endif gold-bootstrap + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(FLAGS_TO_PASS) install) -.PHONY: configure-stageautofeedback-gold maybe-configure-stageautofeedback-gold -maybe-configure-stageautofeedback-gold: -@if gold-bootstrap -maybe-configure-stageautofeedback-gold: configure-stageautofeedback-gold -configure-stageautofeedback-gold: - @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start - @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold +@endif gprof + +.PHONY: install-strip-gprof maybe-install-strip-gprof +maybe-install-strip-gprof: +@if gprof +maybe-install-strip-gprof: install-strip-gprof + +install-strip-gprof: installdirs + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ - test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \ $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - CFLAGS="$(STAGEautofeedback_CFLAGS)"; export CFLAGS; \ - CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)"; export CXXFLAGS; \ - LIBCFLAGS="$(STAGEautofeedback_CFLAGS)"; export LIBCFLAGS; \ - echo Configuring stage autofeedback in $(HOST_SUBDIR)/gold; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \ - cd $(HOST_SUBDIR)/gold || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gold/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gold; \ - $(SHELL) $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - --with-build-libsubdir=$(HOST_SUBDIR) \ - $(STAGEautofeedback_CONFIGURE_FLAGS) -@endif gold-bootstrap - + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(FLAGS_TO_PASS) install-strip) +@endif gprof +# Other targets (info, dvi, pdf, etc.) +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: +@if gprof +maybe-info-gprof: info-gprof -.PHONY: all-gold maybe-all-gold -maybe-all-gold: -@if gcc-bootstrap -all-gold: stage_current -@endif gcc-bootstrap -@if gold -TARGET-gold=all -maybe-all-gold: all-gold -all-gold: configure-gold - @r=`${PWD_COMMAND}`; export r; \ +info-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ - $(TARGET-gold)) -@endif gold + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 +@endif gprof +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: +@if gprof +maybe-dvi-gprof: dvi-gprof -.PHONY: all-stage1-gold maybe-all-stage1-gold -.PHONY: clean-stage1-gold maybe-clean-stage1-gold -maybe-all-stage1-gold: -maybe-clean-stage1-gold: -@if gold-bootstrap -maybe-all-stage1-gold: all-stage1-gold -all-stage1: all-stage1-gold -TARGET-stage1-gold = $(TARGET-gold) -all-stage1-gold: configure-stage1-gold - @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start - @r=`${PWD_COMMAND}`; export r; \ +dvi-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE1_TFLAGS)"; \ - $(HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGE1_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGE1_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGE1_CXXFLAGS)" \ - LIBCFLAGS="$(LIBCFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) \ - $(STAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGE1_TFLAGS)" \ - $(TARGET-stage1-gold) + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 -maybe-clean-stage1-gold: clean-stage1-gold -clean-stage1: clean-stage1-gold -clean-stage1-gold: - @if [ $(current_stage) = stage1 ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stage1-gold/Makefile ] || exit 0; \ - $(MAKE) stage1-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) \ - $(STAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap +@endif gprof +.PHONY: maybe-pdf-gprof pdf-gprof +maybe-pdf-gprof: +@if gprof +maybe-pdf-gprof: pdf-gprof -.PHONY: all-stage2-gold maybe-all-stage2-gold -.PHONY: clean-stage2-gold maybe-clean-stage2-gold -maybe-all-stage2-gold: -maybe-clean-stage2-gold: -@if gold-bootstrap -maybe-all-stage2-gold: all-stage2-gold -all-stage2: all-stage2-gold -TARGET-stage2-gold = $(TARGET-gold) -all-stage2-gold: configure-stage2-gold - @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE2_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGE2_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGE2_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGE2_CXXFLAGS)" \ - LIBCFLAGS="$(STAGE2_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGE2_TFLAGS)" \ - $(TARGET-stage2-gold) - -maybe-clean-stage2-gold: clean-stage2-gold -clean-stage2: clean-stage2-gold -clean-stage2-gold: - @if [ $(current_stage) = stage2 ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stage2-gold/Makefile ] || exit 0; \ - $(MAKE) stage2-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stage3-gold maybe-all-stage3-gold -.PHONY: clean-stage3-gold maybe-clean-stage3-gold -maybe-all-stage3-gold: -maybe-clean-stage3-gold: -@if gold-bootstrap -maybe-all-stage3-gold: all-stage3-gold -all-stage3: all-stage3-gold -TARGET-stage3-gold = $(TARGET-gold) -all-stage3-gold: configure-stage3-gold - @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE3_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGE3_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGE3_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGE3_CXXFLAGS)" \ - LIBCFLAGS="$(STAGE3_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGE3_TFLAGS)" \ - $(TARGET-stage3-gold) - -maybe-clean-stage3-gold: clean-stage3-gold -clean-stage3: clean-stage3-gold -clean-stage3-gold: - @if [ $(current_stage) = stage3 ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stage3-gold/Makefile ] || exit 0; \ - $(MAKE) stage3-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stage4-gold maybe-all-stage4-gold -.PHONY: clean-stage4-gold maybe-clean-stage4-gold -maybe-all-stage4-gold: -maybe-clean-stage4-gold: -@if gold-bootstrap -maybe-all-stage4-gold: all-stage4-gold -all-stage4: all-stage4-gold -TARGET-stage4-gold = $(TARGET-gold) -all-stage4-gold: configure-stage4-gold - @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGE4_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGE4_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGE4_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGE4_CXXFLAGS)" \ - LIBCFLAGS="$(STAGE4_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGE4_TFLAGS)" \ - $(TARGET-stage4-gold) - -maybe-clean-stage4-gold: clean-stage4-gold -clean-stage4: clean-stage4-gold -clean-stage4-gold: - @if [ $(current_stage) = stage4 ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stage4-gold/Makefile ] || exit 0; \ - $(MAKE) stage4-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stageprofile-gold maybe-all-stageprofile-gold -.PHONY: clean-stageprofile-gold maybe-clean-stageprofile-gold -maybe-all-stageprofile-gold: -maybe-clean-stageprofile-gold: -@if gold-bootstrap -maybe-all-stageprofile-gold: all-stageprofile-gold -all-stageprofile: all-stageprofile-gold -TARGET-stageprofile-gold = $(TARGET-gold) -all-stageprofile-gold: configure-stageprofile-gold - @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEprofile_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGEprofile_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGEprofile_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \ - LIBCFLAGS="$(STAGEprofile_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGEprofile_TFLAGS)" \ - $(TARGET-stageprofile-gold) - -maybe-clean-stageprofile-gold: clean-stageprofile-gold -clean-stageprofile: clean-stageprofile-gold -clean-stageprofile-gold: - @if [ $(current_stage) = stageprofile ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stageprofile-gold/Makefile ] || exit 0; \ - $(MAKE) stageprofile-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stagetrain-gold maybe-all-stagetrain-gold -.PHONY: clean-stagetrain-gold maybe-clean-stagetrain-gold -maybe-all-stagetrain-gold: -maybe-clean-stagetrain-gold: -@if gold-bootstrap -maybe-all-stagetrain-gold: all-stagetrain-gold -all-stagetrain: all-stagetrain-gold -TARGET-stagetrain-gold = $(TARGET-gold) -all-stagetrain-gold: configure-stagetrain-gold - @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEtrain_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGEtrain_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGEtrain_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGEtrain_CXXFLAGS)" \ - LIBCFLAGS="$(STAGEtrain_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGEtrain_TFLAGS)" \ - $(TARGET-stagetrain-gold) - -maybe-clean-stagetrain-gold: clean-stagetrain-gold -clean-stagetrain: clean-stagetrain-gold -clean-stagetrain-gold: - @if [ $(current_stage) = stagetrain ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stagetrain-gold/Makefile ] || exit 0; \ - $(MAKE) stagetrain-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stagefeedback-gold maybe-all-stagefeedback-gold -.PHONY: clean-stagefeedback-gold maybe-clean-stagefeedback-gold -maybe-all-stagefeedback-gold: -maybe-clean-stagefeedback-gold: -@if gold-bootstrap -maybe-all-stagefeedback-gold: all-stagefeedback-gold -all-stagefeedback: all-stagefeedback-gold -TARGET-stagefeedback-gold = $(TARGET-gold) -all-stagefeedback-gold: configure-stagefeedback-gold - @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEfeedback_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGEfeedback_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGEfeedback_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \ - LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGEfeedback_TFLAGS)" \ - $(TARGET-stagefeedback-gold) - -maybe-clean-stagefeedback-gold: clean-stagefeedback-gold -clean-stagefeedback: clean-stagefeedback-gold -clean-stagefeedback-gold: - @if [ $(current_stage) = stagefeedback ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stagefeedback-gold/Makefile ] || exit 0; \ - $(MAKE) stagefeedback-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stageautoprofile-gold maybe-all-stageautoprofile-gold -.PHONY: clean-stageautoprofile-gold maybe-clean-stageautoprofile-gold -maybe-all-stageautoprofile-gold: -maybe-clean-stageautoprofile-gold: -@if gold-bootstrap -maybe-all-stageautoprofile-gold: all-stageautoprofile-gold -all-stageautoprofile: all-stageautoprofile-gold -TARGET-stageautoprofile-gold = $(TARGET-gold) -all-stageautoprofile-gold: configure-stageautoprofile-gold - @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - $$s/gcc/config/i386/$(AUTO_PROFILE) \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGEautoprofile_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGEautoprofile_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)" \ - LIBCFLAGS="$(STAGEautoprofile_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGEautoprofile_TFLAGS)" \ - $(TARGET-stageautoprofile-gold) - -maybe-clean-stageautoprofile-gold: clean-stageautoprofile-gold -clean-stageautoprofile: clean-stageautoprofile-gold -clean-stageautoprofile-gold: - @if [ $(current_stage) = stageautoprofile ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stageautoprofile-gold/Makefile ] || exit 0; \ - $(MAKE) stageautoprofile-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - -.PHONY: all-stageautofeedback-gold maybe-all-stageautofeedback-gold -.PHONY: clean-stageautofeedback-gold maybe-clean-stageautofeedback-gold -maybe-all-stageautofeedback-gold: -maybe-clean-stageautofeedback-gold: -@if gold-bootstrap -maybe-all-stageautofeedback-gold: all-stageautofeedback-gold -all-stageautofeedback: all-stageautofeedback-gold -TARGET-stageautofeedback-gold = $(TARGET-gold) -all-stageautofeedback-gold: configure-stageautofeedback-gold - @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ - $(HOST_EXPORTS) \ - $(POSTSTAGE1_HOST_EXPORTS) \ - cd $(HOST_SUBDIR)/gold && \ - \ - $(MAKE) $(BASE_FLAGS_TO_PASS) \ - CFLAGS="$(STAGEautofeedback_CFLAGS)" \ - GENERATOR_CFLAGS="$(STAGEautofeedback_GENERATOR_CFLAGS)" \ - CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)" \ - LIBCFLAGS="$(STAGEautofeedback_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ - CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ - LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \ - TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ - $(TARGET-stageautofeedback-gold) - -maybe-clean-stageautofeedback-gold: clean-stageautofeedback-gold -clean-stageautofeedback: clean-stageautofeedback-gold -clean-stageautofeedback-gold: - @if [ $(current_stage) = stageautofeedback ]; then \ - [ -f $(HOST_SUBDIR)/gold/Makefile ] || exit 0; \ - else \ - [ -f $(HOST_SUBDIR)/stageautofeedback-gold/Makefile ] || exit 0; \ - $(MAKE) stageautofeedback-start; \ - fi; \ - cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean -@endif gold-bootstrap - - - - - -.PHONY: check-gold maybe-check-gold -maybe-check-gold: -@if gold -maybe-check-gold: check-gold - -check-gold: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) - -@endif gold - -.PHONY: install-gold maybe-install-gold -maybe-install-gold: -@if gold -maybe-install-gold: install-gold - -install-gold: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(FLAGS_TO_PASS) install) - -@endif gold - -.PHONY: install-strip-gold maybe-install-strip-gold -maybe-install-strip-gold: -@if gold -maybe-install-strip-gold: install-strip-gold - -install-strip-gold: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(FLAGS_TO_PASS) install-strip) - -@endif gold - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-gold info-gold -maybe-info-gold: -@if gold -maybe-info-gold: info-gold - -info-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +pdf-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing info in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing pdf in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ + pdf) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-dvi-gold dvi-gold -maybe-dvi-gold: -@if gold -maybe-dvi-gold: dvi-gold +.PHONY: maybe-html-gprof html-gprof +maybe-html-gprof: +@if gprof +maybe-html-gprof: html-gprof -dvi-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ +html-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing dvi in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing html in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ + html) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-pdf-gold pdf-gold -maybe-pdf-gold: -@if gold -maybe-pdf-gold: pdf-gold +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: +@if gprof +maybe-TAGS-gprof: TAGS-gprof -pdf-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ +TAGS-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing pdf in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing TAGS in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ + TAGS) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-html-gold html-gold -maybe-html-gold: -@if gold -maybe-html-gold: html-gold +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: +@if gprof +maybe-install-info-gprof: install-info-gprof -html-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ +install-info-gprof: \ + configure-gprof \ + info-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing html in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing install-info in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ + install-info) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-TAGS-gold TAGS-gold -maybe-TAGS-gold: -@if gold -maybe-TAGS-gold: TAGS-gold +.PHONY: maybe-install-dvi-gprof install-dvi-gprof +maybe-install-dvi-gprof: +@if gprof +maybe-install-dvi-gprof: install-dvi-gprof -TAGS-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ +install-dvi-gprof: \ + configure-gprof \ + dvi-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing TAGS in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing install-dvi in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ + install-dvi) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-install-info-gold install-info-gold -maybe-install-info-gold: -@if gold -maybe-install-info-gold: install-info-gold +.PHONY: maybe-install-pdf-gprof install-pdf-gprof +maybe-install-pdf-gprof: +@if gprof +maybe-install-pdf-gprof: install-pdf-gprof -install-info-gold: \ - configure-gold \ - info-gold - @[ -f ./gold/Makefile ] || exit 0; \ +install-pdf-gprof: \ + configure-gprof \ + pdf-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-info in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing install-pdf in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ + install-pdf) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-install-dvi-gold install-dvi-gold -maybe-install-dvi-gold: -@if gold -maybe-install-dvi-gold: install-dvi-gold - -install-dvi-gold: \ - configure-gold \ - dvi-gold - @[ -f ./gold/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-dvi in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-dvi) \ - || exit 1 - -@endif gold - -.PHONY: maybe-install-pdf-gold install-pdf-gold -maybe-install-pdf-gold: -@if gold -maybe-install-pdf-gold: install-pdf-gold - -install-pdf-gold: \ - configure-gold \ - pdf-gold - @[ -f ./gold/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-pdf in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-pdf) \ - || exit 1 - -@endif gold - -.PHONY: maybe-install-html-gold install-html-gold -maybe-install-html-gold: -@if gold -maybe-install-html-gold: install-html-gold +.PHONY: maybe-install-html-gprof install-html-gprof +maybe-install-html-gprof: +@if gprof +maybe-install-html-gprof: install-html-gprof -install-html-gold: \ - configure-gold \ - html-gold - @[ -f ./gold/Makefile ] || exit 0; \ +install-html-gprof: \ + configure-gprof \ + html-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-html in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing install-html in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19856,24 +19194,25 @@ install-html-gold: \ install-html) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-installcheck-gold installcheck-gold -maybe-installcheck-gold: -@if gold -maybe-installcheck-gold: installcheck-gold +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: +@if gprof +maybe-installcheck-gprof: installcheck-gprof -installcheck-gold: \ - configure-gold - @[ -f ./gold/Makefile ] || exit 0; \ +installcheck-gprof: \ + configure-gprof + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing installcheck in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing installcheck in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19881,23 +19220,24 @@ installcheck-gold: \ installcheck) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-mostlyclean-gold mostlyclean-gold -maybe-mostlyclean-gold: -@if gold -maybe-mostlyclean-gold: mostlyclean-gold +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: +@if gprof +maybe-mostlyclean-gprof: mostlyclean-gprof -mostlyclean-gold: - @[ -f ./gold/Makefile ] || exit 0; \ +mostlyclean-gprof: + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing mostlyclean in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing mostlyclean in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19905,23 +19245,24 @@ mostlyclean-gold: mostlyclean) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-clean-gold clean-gold -maybe-clean-gold: -@if gold -maybe-clean-gold: clean-gold +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: +@if gprof +maybe-clean-gprof: clean-gprof -clean-gold: - @[ -f ./gold/Makefile ] || exit 0; \ +clean-gprof: + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing clean in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing clean in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19929,23 +19270,24 @@ clean-gold: clean) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-distclean-gold distclean-gold -maybe-distclean-gold: -@if gold -maybe-distclean-gold: distclean-gold +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: +@if gprof +maybe-distclean-gprof: distclean-gprof -distclean-gold: - @[ -f ./gold/Makefile ] || exit 0; \ +distclean-gprof: + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing distclean in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing distclean in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19953,23 +19295,24 @@ distclean-gold: distclean) \ || exit 1 -@endif gold +@endif gprof -.PHONY: maybe-maintainer-clean-gold maintainer-clean-gold -maybe-maintainer-clean-gold: -@if gold -maybe-maintainer-clean-gold: maintainer-clean-gold +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: +@if gprof +maybe-maintainer-clean-gprof: maintainer-clean-gprof -maintainer-clean-gold: - @[ -f ./gold/Makefile ] || exit 0; \ +maintainer-clean-gprof: + @: $(MAKE); $(unstage) + @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing maintainer-clean in gold"; \ - (cd $(HOST_SUBDIR)/gold && \ + echo "Doing maintainer-clean in gprof"; \ + (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -19977,129 +19320,129 @@ maintainer-clean-gold: maintainer-clean) \ || exit 1 -@endif gold +@endif gprof -.PHONY: configure-gprof maybe-configure-gprof -maybe-configure-gprof: +.PHONY: configure-gprofng maybe-configure-gprofng +maybe-configure-gprofng: @if gcc-bootstrap -configure-gprof: stage_current +configure-gprofng: stage_current @endif gcc-bootstrap -@if gprof -maybe-configure-gprof: configure-gprof -configure-gprof: +@if gprofng +maybe-configure-gprofng: configure-gprofng +configure-gprofng: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof; \ + test ! -f $(HOST_SUBDIR)/gprofng/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprofng; \ $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/gprof; \ - cd "$(HOST_SUBDIR)/gprof" || exit 1; \ + echo Configuring in $(HOST_SUBDIR)/gprofng; \ + cd "$(HOST_SUBDIR)/gprofng" || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gprof/ | \ + *) topdir=`echo $(HOST_SUBDIR)/gprofng/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ - module_srcdir=gprof; \ + module_srcdir=gprofng; \ $(SHELL) \ $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ --target=${target_alias} \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: all-gprof maybe-all-gprof -maybe-all-gprof: +.PHONY: all-gprofng maybe-all-gprofng +maybe-all-gprofng: @if gcc-bootstrap -all-gprof: stage_current +all-gprofng: stage_current @endif gcc-bootstrap -@if gprof -TARGET-gprof=all -maybe-all-gprof: all-gprof -all-gprof: configure-gprof +@if gprofng +TARGET-gprofng=all +maybe-all-gprofng: all-gprofng +all-gprofng: configure-gprofng @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprof && \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ - $(TARGET-gprof)) -@endif gprof + $(TARGET-gprofng)) +@endif gprofng -.PHONY: check-gprof maybe-check-gprof -maybe-check-gprof: -@if gprof -maybe-check-gprof: check-gprof +.PHONY: check-gprofng maybe-check-gprofng +maybe-check-gprofng: +@if gprofng +maybe-check-gprofng: check-gprofng -check-gprof: +check-gprofng: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprof && \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(FLAGS_TO_PASS) check) -@endif gprof +@endif gprofng -.PHONY: install-gprof maybe-install-gprof -maybe-install-gprof: -@if gprof -maybe-install-gprof: install-gprof +.PHONY: install-gprofng maybe-install-gprofng +maybe-install-gprofng: +@if gprofng +maybe-install-gprofng: install-gprofng -install-gprof: installdirs +install-gprofng: installdirs @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprof && \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(FLAGS_TO_PASS) install) -@endif gprof +@endif gprofng -.PHONY: install-strip-gprof maybe-install-strip-gprof -maybe-install-strip-gprof: -@if gprof -maybe-install-strip-gprof: install-strip-gprof +.PHONY: install-strip-gprofng maybe-install-strip-gprofng +maybe-install-strip-gprofng: +@if gprofng +maybe-install-strip-gprofng: install-strip-gprofng -install-strip-gprof: installdirs +install-strip-gprofng: installdirs @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprof && \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(FLAGS_TO_PASS) install-strip) -@endif gprof +@endif gprofng # Other targets (info, dvi, pdf, etc.) -.PHONY: maybe-info-gprof info-gprof -maybe-info-gprof: -@if gprof -maybe-info-gprof: info-gprof +.PHONY: maybe-info-gprofng info-gprofng +maybe-info-gprofng: +@if gprofng +maybe-info-gprofng: info-gprofng -info-gprof: \ - configure-gprof +info-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing info in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20107,25 +19450,25 @@ info-gprof: \ info) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-dvi-gprof dvi-gprof -maybe-dvi-gprof: -@if gprof -maybe-dvi-gprof: dvi-gprof +.PHONY: maybe-dvi-gprofng dvi-gprofng +maybe-dvi-gprofng: +@if gprofng +maybe-dvi-gprofng: dvi-gprofng -dvi-gprof: \ - configure-gprof +dvi-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing dvi in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20133,25 +19476,25 @@ dvi-gprof: \ dvi) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-pdf-gprof pdf-gprof -maybe-pdf-gprof: -@if gprof -maybe-pdf-gprof: pdf-gprof +.PHONY: maybe-pdf-gprofng pdf-gprofng +maybe-pdf-gprofng: +@if gprofng +maybe-pdf-gprofng: pdf-gprofng -pdf-gprof: \ - configure-gprof +pdf-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing pdf in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20159,25 +19502,25 @@ pdf-gprof: \ pdf) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-html-gprof html-gprof -maybe-html-gprof: -@if gprof -maybe-html-gprof: html-gprof +.PHONY: maybe-html-gprofng html-gprofng +maybe-html-gprofng: +@if gprofng +maybe-html-gprofng: html-gprofng -html-gprof: \ - configure-gprof +html-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing html in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20185,25 +19528,25 @@ html-gprof: \ html) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-TAGS-gprof TAGS-gprof -maybe-TAGS-gprof: -@if gprof -maybe-TAGS-gprof: TAGS-gprof +.PHONY: maybe-TAGS-gprofng TAGS-gprofng +maybe-TAGS-gprofng: +@if gprofng +maybe-TAGS-gprofng: TAGS-gprofng -TAGS-gprof: \ - configure-gprof +TAGS-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing TAGS in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing TAGS in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20211,26 +19554,26 @@ TAGS-gprof: \ TAGS) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-install-info-gprof install-info-gprof -maybe-install-info-gprof: -@if gprof -maybe-install-info-gprof: install-info-gprof +.PHONY: maybe-install-info-gprofng install-info-gprofng +maybe-install-info-gprofng: +@if gprofng +maybe-install-info-gprofng: install-info-gprofng -install-info-gprof: \ - configure-gprof \ - info-gprof +install-info-gprofng: \ + configure-gprofng \ + info-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-info in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing install-info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20238,26 +19581,26 @@ install-info-gprof: \ install-info) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-install-dvi-gprof install-dvi-gprof -maybe-install-dvi-gprof: -@if gprof -maybe-install-dvi-gprof: install-dvi-gprof +.PHONY: maybe-install-dvi-gprofng install-dvi-gprofng +maybe-install-dvi-gprofng: +@if gprofng +maybe-install-dvi-gprofng: install-dvi-gprofng -install-dvi-gprof: \ - configure-gprof \ - dvi-gprof +install-dvi-gprofng: \ + configure-gprofng \ + dvi-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-dvi in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing install-dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20265,26 +19608,26 @@ install-dvi-gprof: \ install-dvi) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-install-pdf-gprof install-pdf-gprof -maybe-install-pdf-gprof: -@if gprof -maybe-install-pdf-gprof: install-pdf-gprof +.PHONY: maybe-install-pdf-gprofng install-pdf-gprofng +maybe-install-pdf-gprofng: +@if gprofng +maybe-install-pdf-gprofng: install-pdf-gprofng -install-pdf-gprof: \ - configure-gprof \ - pdf-gprof +install-pdf-gprofng: \ + configure-gprofng \ + pdf-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-pdf in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing install-pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20292,26 +19635,26 @@ install-pdf-gprof: \ install-pdf) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-install-html-gprof install-html-gprof -maybe-install-html-gprof: -@if gprof -maybe-install-html-gprof: install-html-gprof +.PHONY: maybe-install-html-gprofng install-html-gprofng +maybe-install-html-gprofng: +@if gprofng +maybe-install-html-gprofng: install-html-gprofng -install-html-gprof: \ - configure-gprof \ - html-gprof +install-html-gprofng: \ + configure-gprofng \ + html-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing install-html in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing install-html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20319,25 +19662,25 @@ install-html-gprof: \ install-html) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-installcheck-gprof installcheck-gprof -maybe-installcheck-gprof: -@if gprof -maybe-installcheck-gprof: installcheck-gprof +.PHONY: maybe-installcheck-gprofng installcheck-gprofng +maybe-installcheck-gprofng: +@if gprofng +maybe-installcheck-gprofng: installcheck-gprofng -installcheck-gprof: \ - configure-gprof +installcheck-gprofng: \ + configure-gprofng @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing installcheck in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing installcheck in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20345,24 +19688,24 @@ installcheck-gprof: \ installcheck) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof -maybe-mostlyclean-gprof: -@if gprof -maybe-mostlyclean-gprof: mostlyclean-gprof +.PHONY: maybe-mostlyclean-gprofng mostlyclean-gprofng +maybe-mostlyclean-gprofng: +@if gprofng +maybe-mostlyclean-gprofng: mostlyclean-gprofng -mostlyclean-gprof: +mostlyclean-gprofng: @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing mostlyclean in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing mostlyclean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20370,24 +19713,24 @@ mostlyclean-gprof: mostlyclean) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-clean-gprof clean-gprof -maybe-clean-gprof: -@if gprof -maybe-clean-gprof: clean-gprof +.PHONY: maybe-clean-gprofng clean-gprofng +maybe-clean-gprofng: +@if gprofng +maybe-clean-gprofng: clean-gprofng -clean-gprof: +clean-gprofng: @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ + @[ -f ./gprofng/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ for flag in $(EXTRA_HOST_FLAGS) ; do \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ done; \ - echo "Doing clean in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ + echo "Doing clean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "RANLIB=$${RANLIB}" \ @@ -20395,480 +19738,12 @@ clean-gprof: clean) \ || exit 1 -@endif gprof +@endif gprofng -.PHONY: maybe-distclean-gprof distclean-gprof -maybe-distclean-gprof: -@if gprof -maybe-distclean-gprof: distclean-gprof - -distclean-gprof: - @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing distclean in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - distclean) \ - || exit 1 - -@endif gprof - -.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof -maybe-maintainer-clean-gprof: -@if gprof -maybe-maintainer-clean-gprof: maintainer-clean-gprof - -maintainer-clean-gprof: - @: $(MAKE); $(unstage) - @[ -f ./gprof/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing maintainer-clean in gprof"; \ - (cd $(HOST_SUBDIR)/gprof && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - maintainer-clean) \ - || exit 1 - -@endif gprof - - - -.PHONY: configure-gprofng maybe-configure-gprofng -maybe-configure-gprofng: -@if gcc-bootstrap -configure-gprofng: stage_current -@endif gcc-bootstrap -@if gprofng -maybe-configure-gprofng: configure-gprofng -configure-gprofng: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/gprofng/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprofng; \ - $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/gprofng; \ - cd "$(HOST_SUBDIR)/gprofng" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/gprofng/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gprofng; \ - $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} \ - || exit 1 -@endif gprofng - - - - - -.PHONY: all-gprofng maybe-all-gprofng -maybe-all-gprofng: -@if gcc-bootstrap -all-gprofng: stage_current -@endif gcc-bootstrap -@if gprofng -TARGET-gprofng=all -maybe-all-gprofng: all-gprofng -all-gprofng: configure-gprofng - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ - $(TARGET-gprofng)) -@endif gprofng - - - - -.PHONY: check-gprofng maybe-check-gprofng -maybe-check-gprofng: -@if gprofng -maybe-check-gprofng: check-gprofng - -check-gprofng: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(FLAGS_TO_PASS) check) - -@endif gprofng - -.PHONY: install-gprofng maybe-install-gprofng -maybe-install-gprofng: -@if gprofng -maybe-install-gprofng: install-gprofng - -install-gprofng: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(FLAGS_TO_PASS) install) - -@endif gprofng - -.PHONY: install-strip-gprofng maybe-install-strip-gprofng -maybe-install-strip-gprofng: -@if gprofng -maybe-install-strip-gprofng: install-strip-gprofng - -install-strip-gprofng: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(FLAGS_TO_PASS) install-strip) - -@endif gprofng - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-gprofng info-gprofng -maybe-info-gprofng: -@if gprofng -maybe-info-gprofng: info-gprofng - -info-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing info in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-dvi-gprofng dvi-gprofng -maybe-dvi-gprofng: -@if gprofng -maybe-dvi-gprofng: dvi-gprofng - -dvi-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing dvi in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-pdf-gprofng pdf-gprofng -maybe-pdf-gprofng: -@if gprofng -maybe-pdf-gprofng: pdf-gprofng - -pdf-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing pdf in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-html-gprofng html-gprofng -maybe-html-gprofng: -@if gprofng -maybe-html-gprofng: html-gprofng - -html-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing html in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-TAGS-gprofng TAGS-gprofng -maybe-TAGS-gprofng: -@if gprofng -maybe-TAGS-gprofng: TAGS-gprofng - -TAGS-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing TAGS in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-install-info-gprofng install-info-gprofng -maybe-install-info-gprofng: -@if gprofng -maybe-install-info-gprofng: install-info-gprofng - -install-info-gprofng: \ - configure-gprofng \ - info-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-info in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-install-dvi-gprofng install-dvi-gprofng -maybe-install-dvi-gprofng: -@if gprofng -maybe-install-dvi-gprofng: install-dvi-gprofng - -install-dvi-gprofng: \ - configure-gprofng \ - dvi-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-dvi in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-dvi) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-install-pdf-gprofng install-pdf-gprofng -maybe-install-pdf-gprofng: -@if gprofng -maybe-install-pdf-gprofng: install-pdf-gprofng - -install-pdf-gprofng: \ - configure-gprofng \ - pdf-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-pdf in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-pdf) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-install-html-gprofng install-html-gprofng -maybe-install-html-gprofng: -@if gprofng -maybe-install-html-gprofng: install-html-gprofng - -install-html-gprofng: \ - configure-gprofng \ - html-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-html in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-html) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-installcheck-gprofng installcheck-gprofng -maybe-installcheck-gprofng: -@if gprofng -maybe-installcheck-gprofng: installcheck-gprofng - -installcheck-gprofng: \ - configure-gprofng - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing installcheck in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-mostlyclean-gprofng mostlyclean-gprofng -maybe-mostlyclean-gprofng: -@if gprofng -maybe-mostlyclean-gprofng: mostlyclean-gprofng - -mostlyclean-gprofng: - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing mostlyclean in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - mostlyclean) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-clean-gprofng clean-gprofng -maybe-clean-gprofng: -@if gprofng -maybe-clean-gprofng: clean-gprofng - -clean-gprofng: - @: $(MAKE); $(unstage) - @[ -f ./gprofng/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing clean in gprofng"; \ - (cd $(HOST_SUBDIR)/gprofng && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - clean) \ - || exit 1 - -@endif gprofng - -.PHONY: maybe-distclean-gprofng distclean-gprofng -maybe-distclean-gprofng: -@if gprofng -maybe-distclean-gprofng: distclean-gprofng +.PHONY: maybe-distclean-gprofng distclean-gprofng +maybe-distclean-gprofng: +@if gprofng +maybe-distclean-gprofng: distclean-gprofng distclean-gprofng: @: $(MAKE); $(unstage) @@ -31303,7 +30178,7 @@ configure-libiconv: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} --disable-shared \ + --target=${target_alias} --disable-shared @host_libs_picflag@ \ || exit 1 @endif libiconv @@ -31339,7 +30214,7 @@ configure-stage1-libiconv: --target=${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv @@ -31373,7 +30248,7 @@ configure-stage2-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv @@ -31407,7 +30282,7 @@ configure-stage3-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv @@ -31441,7 +30316,7 @@ configure-stage4-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv @@ -31475,7 +30350,7 @@ configure-stageprofile-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stagetrain-libiconv maybe-configure-stagetrain-libiconv @@ -31509,7 +30384,7 @@ configure-stagetrain-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv @@ -31543,7 +30418,7 @@ configure-stagefeedback-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stageautoprofile-libiconv maybe-configure-stageautoprofile-libiconv @@ -31577,7 +30452,7 @@ configure-stageautoprofile-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap .PHONY: configure-stageautofeedback-libiconv maybe-configure-stageautofeedback-libiconv @@ -31611,7 +30486,7 @@ configure-stageautofeedback-libiconv: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - --disable-shared + --disable-shared @host_libs_picflag@ @endif libiconv-bootstrap @@ -34675,7 +33550,7 @@ configure-zlib: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=${target_alias} @extra_host_zlib_configure_flags@ \ + --target=${target_alias} @extra_host_zlib_configure_flags@ @host_libs_picflag@ \ || exit 1 @endif zlib @@ -34711,7 +33586,7 @@ configure-stage1-zlib: --target=${target_alias} \ \ $(STAGE1_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stage2-zlib maybe-configure-stage2-zlib @@ -34745,7 +33620,7 @@ configure-stage2-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE2_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stage3-zlib maybe-configure-stage3-zlib @@ -34779,7 +33654,7 @@ configure-stage3-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE3_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stage4-zlib maybe-configure-stage4-zlib @@ -34813,7 +33688,7 @@ configure-stage4-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGE4_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib @@ -34847,7 +33722,7 @@ configure-stageprofile-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEprofile_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stagetrain-zlib maybe-configure-stagetrain-zlib @@ -34881,7 +33756,7 @@ configure-stagetrain-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEtrain_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib @@ -34915,7 +33790,7 @@ configure-stagefeedback-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEfeedback_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stageautoprofile-zlib maybe-configure-stageautoprofile-zlib @@ -34949,7 +33824,7 @@ configure-stageautoprofile-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautoprofile_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap .PHONY: configure-stageautofeedback-zlib maybe-configure-stageautofeedback-zlib @@ -34983,7 +33858,7 @@ configure-stageautofeedback-zlib: --target=${target_alias} \ --with-build-libsubdir=$(HOST_SUBDIR) \ $(STAGEautofeedback_CONFIGURE_FLAGS) \ - @extra_host_zlib_configure_flags@ + @extra_host_zlib_configure_flags@ @host_libs_picflag@ @endif zlib-bootstrap @@ -49023,491 +47898,6 @@ maintainer-clean-target-libvtv: -.PHONY: configure-target-liboffloadmic maybe-configure-target-liboffloadmic -maybe-configure-target-liboffloadmic: -@if gcc-bootstrap -configure-target-liboffloadmic: stage_current -@endif gcc-bootstrap -@if target-liboffloadmic -maybe-configure-target-liboffloadmic: configure-target-liboffloadmic -configure-target-liboffloadmic: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - echo "Checking multilib configuration for liboffloadmic..."; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/liboffloadmic; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp 2> /dev/null; \ - if test -r $(TARGET_SUBDIR)/liboffloadmic/multilib.out; then \ - if cmp -s $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; then \ - rm -f $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp; \ - else \ - rm -f $(TARGET_SUBDIR)/liboffloadmic/Makefile; \ - mv $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; \ - fi; \ - test ! -f $(TARGET_SUBDIR)/liboffloadmic/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/liboffloadmic; \ - $(NORMAL_TARGET_EXPORTS) \ - echo Configuring in $(TARGET_SUBDIR)/liboffloadmic; \ - cd "$(TARGET_SUBDIR)/liboffloadmic" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(TARGET_SUBDIR)/liboffloadmic/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=liboffloadmic; \ - rm -f no-such-file || : ; \ - CONFIG_SITE=no-such-file $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} @extra_liboffloadmic_configure_flags@ \ - || exit 1 -@endif target-liboffloadmic - - - - - -.PHONY: all-target-liboffloadmic maybe-all-target-liboffloadmic -maybe-all-target-liboffloadmic: -@if gcc-bootstrap -all-target-liboffloadmic: stage_current -@endif gcc-bootstrap -@if target-liboffloadmic -TARGET-target-liboffloadmic=all -maybe-all-target-liboffloadmic: all-target-liboffloadmic -all-target-liboffloadmic: configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ - $(TARGET-target-liboffloadmic)) -@endif target-liboffloadmic - - - - - -.PHONY: check-target-liboffloadmic maybe-check-target-liboffloadmic -maybe-check-target-liboffloadmic: -@if target-liboffloadmic -maybe-check-target-liboffloadmic: check-target-liboffloadmic - -check-target-liboffloadmic: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check) - -@endif target-liboffloadmic - -.PHONY: install-target-liboffloadmic maybe-install-target-liboffloadmic -maybe-install-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-target-liboffloadmic: install-target-liboffloadmic - -install-target-liboffloadmic: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install) - -@endif target-liboffloadmic - -.PHONY: install-strip-target-liboffloadmic maybe-install-strip-target-liboffloadmic -maybe-install-strip-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-strip-target-liboffloadmic: install-strip-target-liboffloadmic - -install-strip-target-liboffloadmic: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) - -@endif target-liboffloadmic - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-target-liboffloadmic info-target-liboffloadmic -maybe-info-target-liboffloadmic: -@if target-liboffloadmic -maybe-info-target-liboffloadmic: info-target-liboffloadmic - -info-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing info in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-dvi-target-liboffloadmic dvi-target-liboffloadmic -maybe-dvi-target-liboffloadmic: -@if target-liboffloadmic -maybe-dvi-target-liboffloadmic: dvi-target-liboffloadmic - -dvi-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing dvi in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-pdf-target-liboffloadmic pdf-target-liboffloadmic -maybe-pdf-target-liboffloadmic: -@if target-liboffloadmic -maybe-pdf-target-liboffloadmic: pdf-target-liboffloadmic - -pdf-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing pdf in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-html-target-liboffloadmic html-target-liboffloadmic -maybe-html-target-liboffloadmic: -@if target-liboffloadmic -maybe-html-target-liboffloadmic: html-target-liboffloadmic - -html-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing html in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-TAGS-target-liboffloadmic TAGS-target-liboffloadmic -maybe-TAGS-target-liboffloadmic: -@if target-liboffloadmic -maybe-TAGS-target-liboffloadmic: TAGS-target-liboffloadmic - -TAGS-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing TAGS in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-install-info-target-liboffloadmic install-info-target-liboffloadmic -maybe-install-info-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-info-target-liboffloadmic: install-info-target-liboffloadmic - -install-info-target-liboffloadmic: \ - configure-target-liboffloadmic \ - info-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-info in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-install-dvi-target-liboffloadmic install-dvi-target-liboffloadmic -maybe-install-dvi-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-dvi-target-liboffloadmic: install-dvi-target-liboffloadmic - -install-dvi-target-liboffloadmic: \ - configure-target-liboffloadmic \ - dvi-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-dvi in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-dvi) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-install-pdf-target-liboffloadmic install-pdf-target-liboffloadmic -maybe-install-pdf-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-pdf-target-liboffloadmic: install-pdf-target-liboffloadmic - -install-pdf-target-liboffloadmic: \ - configure-target-liboffloadmic \ - pdf-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-pdf in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-pdf) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-install-html-target-liboffloadmic install-html-target-liboffloadmic -maybe-install-html-target-liboffloadmic: -@if target-liboffloadmic -maybe-install-html-target-liboffloadmic: install-html-target-liboffloadmic - -install-html-target-liboffloadmic: \ - configure-target-liboffloadmic \ - html-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-html in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-html) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-installcheck-target-liboffloadmic installcheck-target-liboffloadmic -maybe-installcheck-target-liboffloadmic: -@if target-liboffloadmic -maybe-installcheck-target-liboffloadmic: installcheck-target-liboffloadmic - -installcheck-target-liboffloadmic: \ - configure-target-liboffloadmic - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing installcheck in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-mostlyclean-target-liboffloadmic mostlyclean-target-liboffloadmic -maybe-mostlyclean-target-liboffloadmic: -@if target-liboffloadmic -maybe-mostlyclean-target-liboffloadmic: mostlyclean-target-liboffloadmic - -mostlyclean-target-liboffloadmic: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing mostlyclean in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - mostlyclean) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-clean-target-liboffloadmic clean-target-liboffloadmic -maybe-clean-target-liboffloadmic: -@if target-liboffloadmic -maybe-clean-target-liboffloadmic: clean-target-liboffloadmic - -clean-target-liboffloadmic: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing clean in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - clean) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-distclean-target-liboffloadmic distclean-target-liboffloadmic -maybe-distclean-target-liboffloadmic: -@if target-liboffloadmic -maybe-distclean-target-liboffloadmic: distclean-target-liboffloadmic - -distclean-target-liboffloadmic: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing distclean in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - distclean) \ - || exit 1 - -@endif target-liboffloadmic - -.PHONY: maybe-maintainer-clean-target-liboffloadmic maintainer-clean-target-liboffloadmic -maybe-maintainer-clean-target-liboffloadmic: -@if target-liboffloadmic -maybe-maintainer-clean-target-liboffloadmic: maintainer-clean-target-liboffloadmic - -maintainer-clean-target-liboffloadmic: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing maintainer-clean in $(TARGET_SUBDIR)/liboffloadmic"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/liboffloadmic && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - maintainer-clean) \ - || exit 1 - -@endif target-liboffloadmic - - - - - .PHONY: configure-target-libssp maybe-configure-target-libssp maybe-configure-target-libssp: @if gcc-bootstrap @@ -51718,7 +50108,6 @@ configure-target-libbacktrace: stage_current @if target-libbacktrace maybe-configure-target-libbacktrace: configure-target-libbacktrace configure-target-libbacktrace: - @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ echo "Checking multilib configuration for libbacktrace..."; \ @@ -51756,245 +50145,1031 @@ configure-target-libbacktrace: - - -.PHONY: all-target-libbacktrace maybe-all-target-libbacktrace -maybe-all-target-libbacktrace: -@if gcc-bootstrap -all-target-libbacktrace: stage_current -@endif gcc-bootstrap -@if target-libbacktrace -TARGET-target-libbacktrace=all -maybe-all-target-libbacktrace: all-target-libbacktrace -all-target-libbacktrace: configure-target-libbacktrace - @: $(MAKE); $(unstage) +.PHONY: configure-stage1-target-libbacktrace maybe-configure-stage1-target-libbacktrace +maybe-configure-stage1-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stage1-target-libbacktrace: configure-stage1-target-libbacktrace +configure-stage1-target-libbacktrace: + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ - $(TARGET-target-libbacktrace)) -@endif target-libbacktrace - - - - - -.PHONY: check-target-libbacktrace maybe-check-target-libbacktrace -maybe-check-target-libbacktrace: -@if target-libbacktrace -maybe-check-target-libbacktrace: check-target-libbacktrace + TFLAGS="$(STAGE1_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 1 in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -check-target-libbacktrace: - @: $(MAKE); $(unstage) +.PHONY: configure-stage2-target-libbacktrace maybe-configure-stage2-target-libbacktrace +maybe-configure-stage2-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stage2-target-libbacktrace: configure-stage2-target-libbacktrace +configure-stage2-target-libbacktrace: + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check) - -@endif target-libbacktrace - -.PHONY: install-target-libbacktrace maybe-install-target-libbacktrace -maybe-install-target-libbacktrace: -@if target-libbacktrace -maybe-install-target-libbacktrace: install-target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 2 in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -install-target-libbacktrace: installdirs - @: $(MAKE); $(unstage) +.PHONY: configure-stage3-target-libbacktrace maybe-configure-stage3-target-libbacktrace +maybe-configure-stage3-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stage3-target-libbacktrace: configure-stage3-target-libbacktrace +configure-stage3-target-libbacktrace: + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install) - -@endif target-libbacktrace - -.PHONY: install-strip-target-libbacktrace maybe-install-strip-target-libbacktrace -maybe-install-strip-target-libbacktrace: -@if target-libbacktrace -maybe-install-strip-target-libbacktrace: install-strip-target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 3 in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -install-strip-target-libbacktrace: installdirs - @: $(MAKE); $(unstage) +.PHONY: configure-stage4-target-libbacktrace maybe-configure-stage4-target-libbacktrace +maybe-configure-stage4-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stage4-target-libbacktrace: configure-stage4-target-libbacktrace +configure-stage4-target-libbacktrace: + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) - -@endif target-libbacktrace - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-target-libbacktrace info-target-libbacktrace -maybe-info-target-libbacktrace: -@if target-libbacktrace -maybe-info-target-libbacktrace: info-target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 4 in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -info-target-libbacktrace: \ - configure-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stageprofile-target-libbacktrace maybe-configure-stageprofile-target-libbacktrace +maybe-configure-stageprofile-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stageprofile-target-libbacktrace: configure-stageprofile-target-libbacktrace +configure-stageprofile-target-libbacktrace: + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing info in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif target-libbacktrace - -.PHONY: maybe-dvi-target-libbacktrace dvi-target-libbacktrace -maybe-dvi-target-libbacktrace: -@if target-libbacktrace -maybe-dvi-target-libbacktrace: dvi-target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage profile in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -dvi-target-libbacktrace: \ - configure-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagetrain-target-libbacktrace maybe-configure-stagetrain-target-libbacktrace +maybe-configure-stagetrain-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stagetrain-target-libbacktrace: configure-stagetrain-target-libbacktrace +configure-stagetrain-target-libbacktrace: + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing dvi in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif target-libbacktrace - -.PHONY: maybe-pdf-target-libbacktrace pdf-target-libbacktrace -maybe-pdf-target-libbacktrace: -@if target-libbacktrace -maybe-pdf-target-libbacktrace: pdf-target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage train in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -pdf-target-libbacktrace: \ - configure-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagefeedback-target-libbacktrace maybe-configure-stagefeedback-target-libbacktrace +maybe-configure-stagefeedback-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stagefeedback-target-libbacktrace: configure-stagefeedback-target-libbacktrace +configure-stagefeedback-target-libbacktrace: + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing pdf in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif target-libbacktrace + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage feedback in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -.PHONY: maybe-html-target-libbacktrace html-target-libbacktrace -maybe-html-target-libbacktrace: -@if target-libbacktrace -maybe-html-target-libbacktrace: html-target-libbacktrace +.PHONY: configure-stageautoprofile-target-libbacktrace maybe-configure-stageautoprofile-target-libbacktrace +maybe-configure-stageautoprofile-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stageautoprofile-target-libbacktrace: configure-stageautoprofile-target-libbacktrace +configure-stageautoprofile-target-libbacktrace: + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autoprofile in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -html-target-libbacktrace: \ - configure-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stageautofeedback-target-libbacktrace maybe-configure-stageautofeedback-target-libbacktrace +maybe-configure-stageautofeedback-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-configure-stageautofeedback-target-libbacktrace: configure-stageautofeedback-target-libbacktrace +configure-stageautofeedback-target-libbacktrace: + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + echo "Checking multilib configuration for libbacktrace..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libbacktrace/Makefile; \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing html in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autofeedback in $(TARGET_SUBDIR)/libbacktrace; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \ + cd $(TARGET_SUBDIR)/libbacktrace || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libbacktrace; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif target-libbacktrace-bootstrap -@endif target-libbacktrace -.PHONY: maybe-TAGS-target-libbacktrace TAGS-target-libbacktrace -maybe-TAGS-target-libbacktrace: -@if target-libbacktrace -maybe-TAGS-target-libbacktrace: TAGS-target-libbacktrace -TAGS-target-libbacktrace: \ - configure-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing TAGS in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 -@endif target-libbacktrace -.PHONY: maybe-install-info-target-libbacktrace install-info-target-libbacktrace -maybe-install-info-target-libbacktrace: +.PHONY: all-target-libbacktrace maybe-all-target-libbacktrace +maybe-all-target-libbacktrace: +@if gcc-bootstrap +all-target-libbacktrace: stage_current +@endif gcc-bootstrap @if target-libbacktrace -maybe-install-info-target-libbacktrace: install-info-target-libbacktrace - -install-info-target-libbacktrace: \ - configure-target-libbacktrace \ - info-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +TARGET-target-libbacktrace=all +maybe-all-target-libbacktrace: all-target-libbacktrace +all-target-libbacktrace: configure-target-libbacktrace + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-info in $(TARGET_SUBDIR)/libbacktrace"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ + $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libbacktrace && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ + $(TARGET-target-libbacktrace)) @endif target-libbacktrace -.PHONY: maybe-install-dvi-target-libbacktrace install-dvi-target-libbacktrace -maybe-install-dvi-target-libbacktrace: -@if target-libbacktrace -maybe-install-dvi-target-libbacktrace: install-dvi-target-libbacktrace -install-dvi-target-libbacktrace: \ - configure-target-libbacktrace \ - dvi-target-libbacktrace - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ + +.PHONY: all-stage1-target-libbacktrace maybe-all-stage1-target-libbacktrace +.PHONY: clean-stage1-target-libbacktrace maybe-clean-stage1-target-libbacktrace +maybe-all-stage1-target-libbacktrace: +maybe-clean-stage1-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stage1-target-libbacktrace: all-stage1-target-libbacktrace +all-stage1: all-stage1-target-libbacktrace +TARGET-stage1-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stage1-target-libbacktrace: configure-stage1-target-libbacktrace + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + \ + TFLAGS="$(STAGE1_TFLAGS)" \ + $(TARGET-stage1-target-libbacktrace) + +maybe-clean-stage1-target-libbacktrace: clean-stage1-target-libbacktrace +clean-stage1: clean-stage1-target-libbacktrace +clean-stage1-target-libbacktrace: + @if [ $(current_stage) = stage1 ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage1-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stage1-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) \ + clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stage2-target-libbacktrace maybe-all-stage2-target-libbacktrace +.PHONY: clean-stage2-target-libbacktrace maybe-clean-stage2-target-libbacktrace +maybe-all-stage2-target-libbacktrace: +maybe-clean-stage2-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stage2-target-libbacktrace: all-stage2-target-libbacktrace +all-stage2: all-stage2-target-libbacktrace +TARGET-stage2-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stage2-target-libbacktrace: configure-stage2-target-libbacktrace + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE2_TFLAGS)" \ + $(TARGET-stage2-target-libbacktrace) + +maybe-clean-stage2-target-libbacktrace: clean-stage2-target-libbacktrace +clean-stage2: clean-stage2-target-libbacktrace +clean-stage2-target-libbacktrace: + @if [ $(current_stage) = stage2 ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage2-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stage2-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stage3-target-libbacktrace maybe-all-stage3-target-libbacktrace +.PHONY: clean-stage3-target-libbacktrace maybe-clean-stage3-target-libbacktrace +maybe-all-stage3-target-libbacktrace: +maybe-clean-stage3-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stage3-target-libbacktrace: all-stage3-target-libbacktrace +all-stage3: all-stage3-target-libbacktrace +TARGET-stage3-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stage3-target-libbacktrace: configure-stage3-target-libbacktrace + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE3_TFLAGS)" \ + $(TARGET-stage3-target-libbacktrace) + +maybe-clean-stage3-target-libbacktrace: clean-stage3-target-libbacktrace +clean-stage3: clean-stage3-target-libbacktrace +clean-stage3-target-libbacktrace: + @if [ $(current_stage) = stage3 ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage3-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stage3-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stage4-target-libbacktrace maybe-all-stage4-target-libbacktrace +.PHONY: clean-stage4-target-libbacktrace maybe-clean-stage4-target-libbacktrace +maybe-all-stage4-target-libbacktrace: +maybe-clean-stage4-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stage4-target-libbacktrace: all-stage4-target-libbacktrace +all-stage4: all-stage4-target-libbacktrace +TARGET-stage4-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stage4-target-libbacktrace: configure-stage4-target-libbacktrace + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE4_TFLAGS)" \ + $(TARGET-stage4-target-libbacktrace) + +maybe-clean-stage4-target-libbacktrace: clean-stage4-target-libbacktrace +clean-stage4: clean-stage4-target-libbacktrace +clean-stage4-target-libbacktrace: + @if [ $(current_stage) = stage4 ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage4-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stage4-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stageprofile-target-libbacktrace maybe-all-stageprofile-target-libbacktrace +.PHONY: clean-stageprofile-target-libbacktrace maybe-clean-stageprofile-target-libbacktrace +maybe-all-stageprofile-target-libbacktrace: +maybe-clean-stageprofile-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stageprofile-target-libbacktrace: all-stageprofile-target-libbacktrace +all-stageprofile: all-stageprofile-target-libbacktrace +TARGET-stageprofile-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stageprofile-target-libbacktrace: configure-stageprofile-target-libbacktrace + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEprofile_TFLAGS)" \ + $(TARGET-stageprofile-target-libbacktrace) + +maybe-clean-stageprofile-target-libbacktrace: clean-stageprofile-target-libbacktrace +clean-stageprofile: clean-stageprofile-target-libbacktrace +clean-stageprofile-target-libbacktrace: + @if [ $(current_stage) = stageprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageprofile-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stageprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stagetrain-target-libbacktrace maybe-all-stagetrain-target-libbacktrace +.PHONY: clean-stagetrain-target-libbacktrace maybe-clean-stagetrain-target-libbacktrace +maybe-all-stagetrain-target-libbacktrace: +maybe-clean-stagetrain-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stagetrain-target-libbacktrace: all-stagetrain-target-libbacktrace +all-stagetrain: all-stagetrain-target-libbacktrace +TARGET-stagetrain-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stagetrain-target-libbacktrace: configure-stagetrain-target-libbacktrace + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEtrain_TFLAGS)" \ + $(TARGET-stagetrain-target-libbacktrace) + +maybe-clean-stagetrain-target-libbacktrace: clean-stagetrain-target-libbacktrace +clean-stagetrain: clean-stagetrain-target-libbacktrace +clean-stagetrain-target-libbacktrace: + @if [ $(current_stage) = stagetrain ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagetrain-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stagetrain-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stagefeedback-target-libbacktrace maybe-all-stagefeedback-target-libbacktrace +.PHONY: clean-stagefeedback-target-libbacktrace maybe-clean-stagefeedback-target-libbacktrace +maybe-all-stagefeedback-target-libbacktrace: +maybe-clean-stagefeedback-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stagefeedback-target-libbacktrace: all-stagefeedback-target-libbacktrace +all-stagefeedback: all-stagefeedback-target-libbacktrace +TARGET-stagefeedback-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stagefeedback-target-libbacktrace: configure-stagefeedback-target-libbacktrace + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEfeedback_TFLAGS)" \ + $(TARGET-stagefeedback-target-libbacktrace) + +maybe-clean-stagefeedback-target-libbacktrace: clean-stagefeedback-target-libbacktrace +clean-stagefeedback: clean-stagefeedback-target-libbacktrace +clean-stagefeedback-target-libbacktrace: + @if [ $(current_stage) = stagefeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagefeedback-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stagefeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stageautoprofile-target-libbacktrace maybe-all-stageautoprofile-target-libbacktrace +.PHONY: clean-stageautoprofile-target-libbacktrace maybe-clean-stageautoprofile-target-libbacktrace +maybe-all-stageautoprofile-target-libbacktrace: +maybe-clean-stageautoprofile-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stageautoprofile-target-libbacktrace: all-stageautoprofile-target-libbacktrace +all-stageautoprofile: all-stageautoprofile-target-libbacktrace +TARGET-stageautoprofile-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stageautoprofile-target-libbacktrace: configure-stageautoprofile-target-libbacktrace + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $$s/gcc/config/i386/$(AUTO_PROFILE) \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautoprofile_TFLAGS)" \ + $(TARGET-stageautoprofile-target-libbacktrace) + +maybe-clean-stageautoprofile-target-libbacktrace: clean-stageautoprofile-target-libbacktrace +clean-stageautoprofile: clean-stageautoprofile-target-libbacktrace +clean-stageautoprofile-target-libbacktrace: + @if [ $(current_stage) = stageautoprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautoprofile-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stageautoprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + +.PHONY: all-stageautofeedback-target-libbacktrace maybe-all-stageautofeedback-target-libbacktrace +.PHONY: clean-stageautofeedback-target-libbacktrace maybe-clean-stageautofeedback-target-libbacktrace +maybe-all-stageautofeedback-target-libbacktrace: +maybe-clean-stageautofeedback-target-libbacktrace: +@if target-libbacktrace-bootstrap +maybe-all-stageautofeedback-target-libbacktrace: all-stageautofeedback-target-libbacktrace +all-stageautofeedback: all-stageautofeedback-target-libbacktrace +TARGET-stageautofeedback-target-libbacktrace = $(TARGET-target-libbacktrace) +all-stageautofeedback-target-libbacktrace: configure-stageautofeedback-target-libbacktrace + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ + $(TARGET-stageautofeedback-target-libbacktrace) + +maybe-clean-stageautofeedback-target-libbacktrace: clean-stageautofeedback-target-libbacktrace +clean-stageautofeedback: clean-stageautofeedback-target-libbacktrace +clean-stageautofeedback-target-libbacktrace: + @if [ $(current_stage) = stageautofeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautofeedback-libbacktrace/Makefile ] || exit 0; \ + $(MAKE) stageautofeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libbacktrace-bootstrap + + + + + + +.PHONY: check-target-libbacktrace maybe-check-target-libbacktrace +maybe-check-target-libbacktrace: +@if target-libbacktrace +maybe-check-target-libbacktrace: check-target-libbacktrace + +check-target-libbacktrace: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + +@endif target-libbacktrace + +.PHONY: install-target-libbacktrace maybe-install-target-libbacktrace +maybe-install-target-libbacktrace: +@if target-libbacktrace +maybe-install-target-libbacktrace: install-target-libbacktrace + +install-target-libbacktrace: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + +@endif target-libbacktrace + +.PHONY: install-strip-target-libbacktrace maybe-install-strip-target-libbacktrace +maybe-install-strip-target-libbacktrace: +@if target-libbacktrace +maybe-install-strip-target-libbacktrace: install-strip-target-libbacktrace + +install-strip-target-libbacktrace: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) + +@endif target-libbacktrace + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-target-libbacktrace info-target-libbacktrace +maybe-info-target-libbacktrace: +@if target-libbacktrace +maybe-info-target-libbacktrace: info-target-libbacktrace + +info-target-libbacktrace: \ + configure-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing info in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-dvi-target-libbacktrace dvi-target-libbacktrace +maybe-dvi-target-libbacktrace: +@if target-libbacktrace +maybe-dvi-target-libbacktrace: dvi-target-libbacktrace + +dvi-target-libbacktrace: \ + configure-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-pdf-target-libbacktrace pdf-target-libbacktrace +maybe-pdf-target-libbacktrace: +@if target-libbacktrace +maybe-pdf-target-libbacktrace: pdf-target-libbacktrace + +pdf-target-libbacktrace: \ + configure-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing pdf in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-html-target-libbacktrace html-target-libbacktrace +maybe-html-target-libbacktrace: +@if target-libbacktrace +maybe-html-target-libbacktrace: html-target-libbacktrace + +html-target-libbacktrace: \ + configure-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing html in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-TAGS-target-libbacktrace TAGS-target-libbacktrace +maybe-TAGS-target-libbacktrace: +@if target-libbacktrace +maybe-TAGS-target-libbacktrace: TAGS-target-libbacktrace + +TAGS-target-libbacktrace: \ + configure-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-install-info-target-libbacktrace install-info-target-libbacktrace +maybe-install-info-target-libbacktrace: +@if target-libbacktrace +maybe-install-info-target-libbacktrace: install-info-target-libbacktrace + +install-info-target-libbacktrace: \ + configure-target-libbacktrace \ + info-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libbacktrace"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libbacktrace && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif target-libbacktrace + +.PHONY: maybe-install-dvi-target-libbacktrace install-dvi-target-libbacktrace +maybe-install-dvi-target-libbacktrace: +@if target-libbacktrace +maybe-install-dvi-target-libbacktrace: install-dvi-target-libbacktrace + +install-dvi-target-libbacktrace: \ + configure-target-libbacktrace \ + dvi-target-libbacktrace + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ echo "Doing install-dvi in $(TARGET_SUBDIR)/libbacktrace"; \ @@ -54110,7 +53285,6 @@ configure-target-libphobos: stage_current @if target-libphobos maybe-configure-target-libphobos: configure-target-libphobos configure-target-libphobos: - @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ echo "Checking multilib configuration for libphobos..."; \ @@ -54148,245 +53322,1031 @@ configure-target-libphobos: - - -.PHONY: all-target-libphobos maybe-all-target-libphobos -maybe-all-target-libphobos: -@if gcc-bootstrap -all-target-libphobos: stage_current -@endif gcc-bootstrap -@if target-libphobos -TARGET-target-libphobos=all -maybe-all-target-libphobos: all-target-libphobos -all-target-libphobos: configure-target-libphobos - @: $(MAKE); $(unstage) +.PHONY: configure-stage1-target-libphobos maybe-configure-stage1-target-libphobos +maybe-configure-stage1-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stage1-target-libphobos: configure-stage1-target-libphobos +configure-stage1-target-libphobos: + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ - $(TARGET-target-libphobos)) -@endif target-libphobos - - - - - -.PHONY: check-target-libphobos maybe-check-target-libphobos -maybe-check-target-libphobos: -@if target-libphobos -maybe-check-target-libphobos: check-target-libphobos + TFLAGS="$(STAGE1_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 1 in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -check-target-libphobos: - @: $(MAKE); $(unstage) +.PHONY: configure-stage2-target-libphobos maybe-configure-stage2-target-libphobos +maybe-configure-stage2-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stage2-target-libphobos: configure-stage2-target-libphobos +configure-stage2-target-libphobos: + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check) - -@endif target-libphobos - -.PHONY: install-target-libphobos maybe-install-target-libphobos -maybe-install-target-libphobos: -@if target-libphobos -maybe-install-target-libphobos: install-target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 2 in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -install-target-libphobos: installdirs - @: $(MAKE); $(unstage) +.PHONY: configure-stage3-target-libphobos maybe-configure-stage3-target-libphobos +maybe-configure-stage3-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stage3-target-libphobos: configure-stage3-target-libphobos +configure-stage3-target-libphobos: + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install) - -@endif target-libphobos - -.PHONY: install-strip-target-libphobos maybe-install-strip-target-libphobos -maybe-install-strip-target-libphobos: -@if target-libphobos -maybe-install-strip-target-libphobos: install-strip-target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 3 in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -install-strip-target-libphobos: installdirs - @: $(MAKE); $(unstage) +.PHONY: configure-stage4-target-libphobos maybe-configure-stage4-target-libphobos +maybe-configure-stage4-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stage4-target-libphobos: configure-stage4-target-libphobos +configure-stage4-target-libphobos: + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) - -@endif target-libphobos - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-target-libphobos info-target-libphobos -maybe-info-target-libphobos: -@if target-libphobos -maybe-info-target-libphobos: info-target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 4 in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -info-target-libphobos: \ - configure-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stageprofile-target-libphobos maybe-configure-stageprofile-target-libphobos +maybe-configure-stageprofile-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stageprofile-target-libphobos: configure-stageprofile-target-libphobos +configure-stageprofile-target-libphobos: + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing info in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif target-libphobos - -.PHONY: maybe-dvi-target-libphobos dvi-target-libphobos -maybe-dvi-target-libphobos: -@if target-libphobos -maybe-dvi-target-libphobos: dvi-target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage profile in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -dvi-target-libphobos: \ - configure-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagetrain-target-libphobos maybe-configure-stagetrain-target-libphobos +maybe-configure-stagetrain-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stagetrain-target-libphobos: configure-stagetrain-target-libphobos +configure-stagetrain-target-libphobos: + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing dvi in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif target-libphobos - -.PHONY: maybe-pdf-target-libphobos pdf-target-libphobos -maybe-pdf-target-libphobos: -@if target-libphobos -maybe-pdf-target-libphobos: pdf-target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage train in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -pdf-target-libphobos: \ - configure-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagefeedback-target-libphobos maybe-configure-stagefeedback-target-libphobos +maybe-configure-stagefeedback-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stagefeedback-target-libphobos: configure-stagefeedback-target-libphobos +configure-stagefeedback-target-libphobos: + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing pdf in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif target-libphobos + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage feedback in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -.PHONY: maybe-html-target-libphobos html-target-libphobos -maybe-html-target-libphobos: -@if target-libphobos -maybe-html-target-libphobos: html-target-libphobos +.PHONY: configure-stageautoprofile-target-libphobos maybe-configure-stageautoprofile-target-libphobos +maybe-configure-stageautoprofile-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stageautoprofile-target-libphobos: configure-stageautoprofile-target-libphobos +configure-stageautoprofile-target-libphobos: + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autoprofile in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -html-target-libphobos: \ - configure-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stageautofeedback-target-libphobos maybe-configure-stageautofeedback-target-libphobos +maybe-configure-stageautofeedback-target-libphobos: +@if target-libphobos-bootstrap +maybe-configure-stageautofeedback-target-libphobos: configure-stageautofeedback-target-libphobos +configure-stageautofeedback-target-libphobos: + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + echo "Checking multilib configuration for libphobos..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libphobos/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libphobos/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libphobos/Makefile; \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libphobos/multilib.tmp $(TARGET_SUBDIR)/libphobos/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libphobos/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing html in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autofeedback in $(TARGET_SUBDIR)/libphobos; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libphobos; \ + cd $(TARGET_SUBDIR)/libphobos || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libphobos/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libphobos; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif target-libphobos-bootstrap -@endif target-libphobos -.PHONY: maybe-TAGS-target-libphobos TAGS-target-libphobos -maybe-TAGS-target-libphobos: -@if target-libphobos -maybe-TAGS-target-libphobos: TAGS-target-libphobos -TAGS-target-libphobos: \ - configure-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing TAGS in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 -@endif target-libphobos -.PHONY: maybe-install-info-target-libphobos install-info-target-libphobos -maybe-install-info-target-libphobos: +.PHONY: all-target-libphobos maybe-all-target-libphobos +maybe-all-target-libphobos: +@if gcc-bootstrap +all-target-libphobos: stage_current +@endif gcc-bootstrap @if target-libphobos -maybe-install-info-target-libphobos: install-info-target-libphobos - -install-info-target-libphobos: \ - configure-target-libphobos \ - info-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +TARGET-target-libphobos=all +maybe-all-target-libphobos: all-target-libphobos +all-target-libphobos: configure-target-libphobos + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-info in $(TARGET_SUBDIR)/libphobos"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ + $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libphobos && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ + $(TARGET-target-libphobos)) @endif target-libphobos -.PHONY: maybe-install-dvi-target-libphobos install-dvi-target-libphobos -maybe-install-dvi-target-libphobos: -@if target-libphobos -maybe-install-dvi-target-libphobos: install-dvi-target-libphobos -install-dvi-target-libphobos: \ - configure-target-libphobos \ - dvi-target-libphobos - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ + +.PHONY: all-stage1-target-libphobos maybe-all-stage1-target-libphobos +.PHONY: clean-stage1-target-libphobos maybe-clean-stage1-target-libphobos +maybe-all-stage1-target-libphobos: +maybe-clean-stage1-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stage1-target-libphobos: all-stage1-target-libphobos +all-stage1: all-stage1-target-libphobos +TARGET-stage1-target-libphobos = $(TARGET-target-libphobos) +all-stage1-target-libphobos: configure-stage1-target-libphobos + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + \ + TFLAGS="$(STAGE1_TFLAGS)" \ + $(TARGET-stage1-target-libphobos) + +maybe-clean-stage1-target-libphobos: clean-stage1-target-libphobos +clean-stage1: clean-stage1-target-libphobos +clean-stage1-target-libphobos: + @if [ $(current_stage) = stage1 ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage1-libphobos/Makefile ] || exit 0; \ + $(MAKE) stage1-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) \ + clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stage2-target-libphobos maybe-all-stage2-target-libphobos +.PHONY: clean-stage2-target-libphobos maybe-clean-stage2-target-libphobos +maybe-all-stage2-target-libphobos: +maybe-clean-stage2-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stage2-target-libphobos: all-stage2-target-libphobos +all-stage2: all-stage2-target-libphobos +TARGET-stage2-target-libphobos = $(TARGET-target-libphobos) +all-stage2-target-libphobos: configure-stage2-target-libphobos + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE2_TFLAGS)" \ + $(TARGET-stage2-target-libphobos) + +maybe-clean-stage2-target-libphobos: clean-stage2-target-libphobos +clean-stage2: clean-stage2-target-libphobos +clean-stage2-target-libphobos: + @if [ $(current_stage) = stage2 ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage2-libphobos/Makefile ] || exit 0; \ + $(MAKE) stage2-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stage3-target-libphobos maybe-all-stage3-target-libphobos +.PHONY: clean-stage3-target-libphobos maybe-clean-stage3-target-libphobos +maybe-all-stage3-target-libphobos: +maybe-clean-stage3-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stage3-target-libphobos: all-stage3-target-libphobos +all-stage3: all-stage3-target-libphobos +TARGET-stage3-target-libphobos = $(TARGET-target-libphobos) +all-stage3-target-libphobos: configure-stage3-target-libphobos + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE3_TFLAGS)" \ + $(TARGET-stage3-target-libphobos) + +maybe-clean-stage3-target-libphobos: clean-stage3-target-libphobos +clean-stage3: clean-stage3-target-libphobos +clean-stage3-target-libphobos: + @if [ $(current_stage) = stage3 ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage3-libphobos/Makefile ] || exit 0; \ + $(MAKE) stage3-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stage4-target-libphobos maybe-all-stage4-target-libphobos +.PHONY: clean-stage4-target-libphobos maybe-clean-stage4-target-libphobos +maybe-all-stage4-target-libphobos: +maybe-clean-stage4-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stage4-target-libphobos: all-stage4-target-libphobos +all-stage4: all-stage4-target-libphobos +TARGET-stage4-target-libphobos = $(TARGET-target-libphobos) +all-stage4-target-libphobos: configure-stage4-target-libphobos + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE4_TFLAGS)" \ + $(TARGET-stage4-target-libphobos) + +maybe-clean-stage4-target-libphobos: clean-stage4-target-libphobos +clean-stage4: clean-stage4-target-libphobos +clean-stage4-target-libphobos: + @if [ $(current_stage) = stage4 ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage4-libphobos/Makefile ] || exit 0; \ + $(MAKE) stage4-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stageprofile-target-libphobos maybe-all-stageprofile-target-libphobos +.PHONY: clean-stageprofile-target-libphobos maybe-clean-stageprofile-target-libphobos +maybe-all-stageprofile-target-libphobos: +maybe-clean-stageprofile-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stageprofile-target-libphobos: all-stageprofile-target-libphobos +all-stageprofile: all-stageprofile-target-libphobos +TARGET-stageprofile-target-libphobos = $(TARGET-target-libphobos) +all-stageprofile-target-libphobos: configure-stageprofile-target-libphobos + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEprofile_TFLAGS)" \ + $(TARGET-stageprofile-target-libphobos) + +maybe-clean-stageprofile-target-libphobos: clean-stageprofile-target-libphobos +clean-stageprofile: clean-stageprofile-target-libphobos +clean-stageprofile-target-libphobos: + @if [ $(current_stage) = stageprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageprofile-libphobos/Makefile ] || exit 0; \ + $(MAKE) stageprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stagetrain-target-libphobos maybe-all-stagetrain-target-libphobos +.PHONY: clean-stagetrain-target-libphobos maybe-clean-stagetrain-target-libphobos +maybe-all-stagetrain-target-libphobos: +maybe-clean-stagetrain-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stagetrain-target-libphobos: all-stagetrain-target-libphobos +all-stagetrain: all-stagetrain-target-libphobos +TARGET-stagetrain-target-libphobos = $(TARGET-target-libphobos) +all-stagetrain-target-libphobos: configure-stagetrain-target-libphobos + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEtrain_TFLAGS)" \ + $(TARGET-stagetrain-target-libphobos) + +maybe-clean-stagetrain-target-libphobos: clean-stagetrain-target-libphobos +clean-stagetrain: clean-stagetrain-target-libphobos +clean-stagetrain-target-libphobos: + @if [ $(current_stage) = stagetrain ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagetrain-libphobos/Makefile ] || exit 0; \ + $(MAKE) stagetrain-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stagefeedback-target-libphobos maybe-all-stagefeedback-target-libphobos +.PHONY: clean-stagefeedback-target-libphobos maybe-clean-stagefeedback-target-libphobos +maybe-all-stagefeedback-target-libphobos: +maybe-clean-stagefeedback-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stagefeedback-target-libphobos: all-stagefeedback-target-libphobos +all-stagefeedback: all-stagefeedback-target-libphobos +TARGET-stagefeedback-target-libphobos = $(TARGET-target-libphobos) +all-stagefeedback-target-libphobos: configure-stagefeedback-target-libphobos + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEfeedback_TFLAGS)" \ + $(TARGET-stagefeedback-target-libphobos) + +maybe-clean-stagefeedback-target-libphobos: clean-stagefeedback-target-libphobos +clean-stagefeedback: clean-stagefeedback-target-libphobos +clean-stagefeedback-target-libphobos: + @if [ $(current_stage) = stagefeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagefeedback-libphobos/Makefile ] || exit 0; \ + $(MAKE) stagefeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stageautoprofile-target-libphobos maybe-all-stageautoprofile-target-libphobos +.PHONY: clean-stageautoprofile-target-libphobos maybe-clean-stageautoprofile-target-libphobos +maybe-all-stageautoprofile-target-libphobos: +maybe-clean-stageautoprofile-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stageautoprofile-target-libphobos: all-stageautoprofile-target-libphobos +all-stageautoprofile: all-stageautoprofile-target-libphobos +TARGET-stageautoprofile-target-libphobos = $(TARGET-target-libphobos) +all-stageautoprofile-target-libphobos: configure-stageautoprofile-target-libphobos + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + $$s/gcc/config/i386/$(AUTO_PROFILE) \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautoprofile_TFLAGS)" \ + $(TARGET-stageautoprofile-target-libphobos) + +maybe-clean-stageautoprofile-target-libphobos: clean-stageautoprofile-target-libphobos +clean-stageautoprofile: clean-stageautoprofile-target-libphobos +clean-stageautoprofile-target-libphobos: + @if [ $(current_stage) = stageautoprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautoprofile-libphobos/Makefile ] || exit 0; \ + $(MAKE) stageautoprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + +.PHONY: all-stageautofeedback-target-libphobos maybe-all-stageautofeedback-target-libphobos +.PHONY: clean-stageautofeedback-target-libphobos maybe-clean-stageautofeedback-target-libphobos +maybe-all-stageautofeedback-target-libphobos: +maybe-clean-stageautofeedback-target-libphobos: +@if target-libphobos-bootstrap +maybe-all-stageautofeedback-target-libphobos: all-stageautofeedback-target-libphobos +all-stageautofeedback: all-stageautofeedback-target-libphobos +TARGET-stageautofeedback-target-libphobos = $(TARGET-target-libphobos) +all-stageautofeedback-target-libphobos: configure-stageautofeedback-target-libphobos + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libphobos && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ + $(TARGET-stageautofeedback-target-libphobos) + +maybe-clean-stageautofeedback-target-libphobos: clean-stageautofeedback-target-libphobos +clean-stageautofeedback: clean-stageautofeedback-target-libphobos +clean-stageautofeedback-target-libphobos: + @if [ $(current_stage) = stageautofeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautofeedback-libphobos/Makefile ] || exit 0; \ + $(MAKE) stageautofeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libphobos-bootstrap + + + + + + +.PHONY: check-target-libphobos maybe-check-target-libphobos +maybe-check-target-libphobos: +@if target-libphobos +maybe-check-target-libphobos: check-target-libphobos + +check-target-libphobos: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + +@endif target-libphobos + +.PHONY: install-target-libphobos maybe-install-target-libphobos +maybe-install-target-libphobos: +@if target-libphobos +maybe-install-target-libphobos: install-target-libphobos + +install-target-libphobos: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + +@endif target-libphobos + +.PHONY: install-strip-target-libphobos maybe-install-strip-target-libphobos +maybe-install-strip-target-libphobos: +@if target-libphobos +maybe-install-strip-target-libphobos: install-strip-target-libphobos + +install-strip-target-libphobos: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) + +@endif target-libphobos + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-target-libphobos info-target-libphobos +maybe-info-target-libphobos: +@if target-libphobos +maybe-info-target-libphobos: info-target-libphobos + +info-target-libphobos: \ + configure-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing info in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-dvi-target-libphobos dvi-target-libphobos +maybe-dvi-target-libphobos: +@if target-libphobos +maybe-dvi-target-libphobos: dvi-target-libphobos + +dvi-target-libphobos: \ + configure-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-pdf-target-libphobos pdf-target-libphobos +maybe-pdf-target-libphobos: +@if target-libphobos +maybe-pdf-target-libphobos: pdf-target-libphobos + +pdf-target-libphobos: \ + configure-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing pdf in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-html-target-libphobos html-target-libphobos +maybe-html-target-libphobos: +@if target-libphobos +maybe-html-target-libphobos: html-target-libphobos + +html-target-libphobos: \ + configure-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing html in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-TAGS-target-libphobos TAGS-target-libphobos +maybe-TAGS-target-libphobos: +@if target-libphobos +maybe-TAGS-target-libphobos: TAGS-target-libphobos + +TAGS-target-libphobos: \ + configure-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-install-info-target-libphobos install-info-target-libphobos +maybe-install-info-target-libphobos: +@if target-libphobos +maybe-install-info-target-libphobos: install-info-target-libphobos + +install-info-target-libphobos: \ + configure-target-libphobos \ + info-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libphobos"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libphobos && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif target-libphobos + +.PHONY: maybe-install-dvi-target-libphobos install-dvi-target-libphobos +maybe-install-dvi-target-libphobos: +@if target-libphobos +maybe-install-dvi-target-libphobos: install-dvi-target-libphobos + +install-dvi-target-libphobos: \ + configure-target-libphobos \ + dvi-target-libphobos + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libphobos/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ echo "Doing install-dvi in $(TARGET_SUBDIR)/libphobos"; \ @@ -56012,7 +55972,7 @@ configure-target-libffi: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ + --target=${target_alias} --disable-shared --with-pic \ || exit 1 @endif target-libffi @@ -56455,7 +56415,6 @@ configure-target-zlib: stage_current @if target-zlib maybe-configure-target-zlib: configure-target-zlib configure-target-zlib: - @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ echo "Checking multilib configuration for zlib..."; \ @@ -56493,6 +56452,412 @@ configure-target-zlib: +.PHONY: configure-stage1-target-zlib maybe-configure-stage1-target-zlib +maybe-configure-stage1-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stage1-target-zlib: configure-stage1-target-zlib +configure-stage1-target-zlib: + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 1 in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stage2-target-zlib maybe-configure-stage2-target-zlib +maybe-configure-stage2-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stage2-target-zlib: configure-stage2-target-zlib +configure-stage2-target-zlib: + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 2 in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stage3-target-zlib maybe-configure-stage3-target-zlib +maybe-configure-stage3-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stage3-target-zlib: configure-stage3-target-zlib +configure-stage3-target-zlib: + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 3 in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stage4-target-zlib maybe-configure-stage4-target-zlib +maybe-configure-stage4-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stage4-target-zlib: configure-stage4-target-zlib +configure-stage4-target-zlib: + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 4 in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stageprofile-target-zlib maybe-configure-stageprofile-target-zlib +maybe-configure-stageprofile-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stageprofile-target-zlib: configure-stageprofile-target-zlib +configure-stageprofile-target-zlib: + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage profile in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stagetrain-target-zlib maybe-configure-stagetrain-target-zlib +maybe-configure-stagetrain-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stagetrain-target-zlib: configure-stagetrain-target-zlib +configure-stagetrain-target-zlib: + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage train in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stagefeedback-target-zlib maybe-configure-stagefeedback-target-zlib +maybe-configure-stagefeedback-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stagefeedback-target-zlib: configure-stagefeedback-target-zlib +configure-stagefeedback-target-zlib: + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage feedback in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stageautoprofile-target-zlib maybe-configure-stageautoprofile-target-zlib +maybe-configure-stageautoprofile-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stageautoprofile-target-zlib: configure-stageautoprofile-target-zlib +configure-stageautoprofile-target-zlib: + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autoprofile in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + +.PHONY: configure-stageautofeedback-target-zlib maybe-configure-stageautofeedback-target-zlib +maybe-configure-stageautofeedback-target-zlib: +@if target-zlib-bootstrap +maybe-configure-stageautofeedback-target-zlib: configure-stageautofeedback-target-zlib +configure-stageautofeedback-target-zlib: + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + echo "Checking multilib configuration for zlib..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autofeedback in $(TARGET_SUBDIR)/zlib; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \ + cd $(TARGET_SUBDIR)/zlib || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=zlib; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif target-zlib-bootstrap + + + .PHONY: all-target-zlib maybe-all-target-zlib @@ -56504,7 +56869,6 @@ all-target-zlib: stage_current TARGET-target-zlib=all maybe-all-target-zlib: all-target-zlib all-target-zlib: configure-target-zlib - @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -56515,6 +56879,387 @@ all-target-zlib: configure-target-zlib +.PHONY: all-stage1-target-zlib maybe-all-stage1-target-zlib +.PHONY: clean-stage1-target-zlib maybe-clean-stage1-target-zlib +maybe-all-stage1-target-zlib: +maybe-clean-stage1-target-zlib: +@if target-zlib-bootstrap +maybe-all-stage1-target-zlib: all-stage1-target-zlib +all-stage1: all-stage1-target-zlib +TARGET-stage1-target-zlib = $(TARGET-target-zlib) +all-stage1-target-zlib: configure-stage1-target-zlib + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + \ + TFLAGS="$(STAGE1_TFLAGS)" \ + $(TARGET-stage1-target-zlib) + +maybe-clean-stage1-target-zlib: clean-stage1-target-zlib +clean-stage1: clean-stage1-target-zlib +clean-stage1-target-zlib: + @if [ $(current_stage) = stage1 ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage1-zlib/Makefile ] || exit 0; \ + $(MAKE) stage1-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) \ + clean +@endif target-zlib-bootstrap + + +.PHONY: all-stage2-target-zlib maybe-all-stage2-target-zlib +.PHONY: clean-stage2-target-zlib maybe-clean-stage2-target-zlib +maybe-all-stage2-target-zlib: +maybe-clean-stage2-target-zlib: +@if target-zlib-bootstrap +maybe-all-stage2-target-zlib: all-stage2-target-zlib +all-stage2: all-stage2-target-zlib +TARGET-stage2-target-zlib = $(TARGET-target-zlib) +all-stage2-target-zlib: configure-stage2-target-zlib + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE2_TFLAGS)" \ + $(TARGET-stage2-target-zlib) + +maybe-clean-stage2-target-zlib: clean-stage2-target-zlib +clean-stage2: clean-stage2-target-zlib +clean-stage2-target-zlib: + @if [ $(current_stage) = stage2 ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage2-zlib/Makefile ] || exit 0; \ + $(MAKE) stage2-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stage3-target-zlib maybe-all-stage3-target-zlib +.PHONY: clean-stage3-target-zlib maybe-clean-stage3-target-zlib +maybe-all-stage3-target-zlib: +maybe-clean-stage3-target-zlib: +@if target-zlib-bootstrap +maybe-all-stage3-target-zlib: all-stage3-target-zlib +all-stage3: all-stage3-target-zlib +TARGET-stage3-target-zlib = $(TARGET-target-zlib) +all-stage3-target-zlib: configure-stage3-target-zlib + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE3_TFLAGS)" \ + $(TARGET-stage3-target-zlib) + +maybe-clean-stage3-target-zlib: clean-stage3-target-zlib +clean-stage3: clean-stage3-target-zlib +clean-stage3-target-zlib: + @if [ $(current_stage) = stage3 ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage3-zlib/Makefile ] || exit 0; \ + $(MAKE) stage3-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stage4-target-zlib maybe-all-stage4-target-zlib +.PHONY: clean-stage4-target-zlib maybe-clean-stage4-target-zlib +maybe-all-stage4-target-zlib: +maybe-clean-stage4-target-zlib: +@if target-zlib-bootstrap +maybe-all-stage4-target-zlib: all-stage4-target-zlib +all-stage4: all-stage4-target-zlib +TARGET-stage4-target-zlib = $(TARGET-target-zlib) +all-stage4-target-zlib: configure-stage4-target-zlib + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE4_TFLAGS)" \ + $(TARGET-stage4-target-zlib) + +maybe-clean-stage4-target-zlib: clean-stage4-target-zlib +clean-stage4: clean-stage4-target-zlib +clean-stage4-target-zlib: + @if [ $(current_stage) = stage4 ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage4-zlib/Makefile ] || exit 0; \ + $(MAKE) stage4-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stageprofile-target-zlib maybe-all-stageprofile-target-zlib +.PHONY: clean-stageprofile-target-zlib maybe-clean-stageprofile-target-zlib +maybe-all-stageprofile-target-zlib: +maybe-clean-stageprofile-target-zlib: +@if target-zlib-bootstrap +maybe-all-stageprofile-target-zlib: all-stageprofile-target-zlib +all-stageprofile: all-stageprofile-target-zlib +TARGET-stageprofile-target-zlib = $(TARGET-target-zlib) +all-stageprofile-target-zlib: configure-stageprofile-target-zlib + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEprofile_TFLAGS)" \ + $(TARGET-stageprofile-target-zlib) + +maybe-clean-stageprofile-target-zlib: clean-stageprofile-target-zlib +clean-stageprofile: clean-stageprofile-target-zlib +clean-stageprofile-target-zlib: + @if [ $(current_stage) = stageprofile ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageprofile-zlib/Makefile ] || exit 0; \ + $(MAKE) stageprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stagetrain-target-zlib maybe-all-stagetrain-target-zlib +.PHONY: clean-stagetrain-target-zlib maybe-clean-stagetrain-target-zlib +maybe-all-stagetrain-target-zlib: +maybe-clean-stagetrain-target-zlib: +@if target-zlib-bootstrap +maybe-all-stagetrain-target-zlib: all-stagetrain-target-zlib +all-stagetrain: all-stagetrain-target-zlib +TARGET-stagetrain-target-zlib = $(TARGET-target-zlib) +all-stagetrain-target-zlib: configure-stagetrain-target-zlib + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEtrain_TFLAGS)" \ + $(TARGET-stagetrain-target-zlib) + +maybe-clean-stagetrain-target-zlib: clean-stagetrain-target-zlib +clean-stagetrain: clean-stagetrain-target-zlib +clean-stagetrain-target-zlib: + @if [ $(current_stage) = stagetrain ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagetrain-zlib/Makefile ] || exit 0; \ + $(MAKE) stagetrain-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stagefeedback-target-zlib maybe-all-stagefeedback-target-zlib +.PHONY: clean-stagefeedback-target-zlib maybe-clean-stagefeedback-target-zlib +maybe-all-stagefeedback-target-zlib: +maybe-clean-stagefeedback-target-zlib: +@if target-zlib-bootstrap +maybe-all-stagefeedback-target-zlib: all-stagefeedback-target-zlib +all-stagefeedback: all-stagefeedback-target-zlib +TARGET-stagefeedback-target-zlib = $(TARGET-target-zlib) +all-stagefeedback-target-zlib: configure-stagefeedback-target-zlib + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEfeedback_TFLAGS)" \ + $(TARGET-stagefeedback-target-zlib) + +maybe-clean-stagefeedback-target-zlib: clean-stagefeedback-target-zlib +clean-stagefeedback: clean-stagefeedback-target-zlib +clean-stagefeedback-target-zlib: + @if [ $(current_stage) = stagefeedback ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagefeedback-zlib/Makefile ] || exit 0; \ + $(MAKE) stagefeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stageautoprofile-target-zlib maybe-all-stageautoprofile-target-zlib +.PHONY: clean-stageautoprofile-target-zlib maybe-clean-stageautoprofile-target-zlib +maybe-all-stageautoprofile-target-zlib: +maybe-clean-stageautoprofile-target-zlib: +@if target-zlib-bootstrap +maybe-all-stageautoprofile-target-zlib: all-stageautoprofile-target-zlib +all-stageautoprofile: all-stageautoprofile-target-zlib +TARGET-stageautoprofile-target-zlib = $(TARGET-target-zlib) +all-stageautoprofile-target-zlib: configure-stageautoprofile-target-zlib + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + $$s/gcc/config/i386/$(AUTO_PROFILE) \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautoprofile_TFLAGS)" \ + $(TARGET-stageautoprofile-target-zlib) + +maybe-clean-stageautoprofile-target-zlib: clean-stageautoprofile-target-zlib +clean-stageautoprofile: clean-stageautoprofile-target-zlib +clean-stageautoprofile-target-zlib: + @if [ $(current_stage) = stageautoprofile ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautoprofile-zlib/Makefile ] || exit 0; \ + $(MAKE) stageautoprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + +.PHONY: all-stageautofeedback-target-zlib maybe-all-stageautofeedback-target-zlib +.PHONY: clean-stageautofeedback-target-zlib maybe-clean-stageautofeedback-target-zlib +maybe-all-stageautofeedback-target-zlib: +maybe-clean-stageautofeedback-target-zlib: +@if target-zlib-bootstrap +maybe-all-stageautofeedback-target-zlib: all-stageautofeedback-target-zlib +all-stageautofeedback: all-stageautofeedback-target-zlib +TARGET-stageautofeedback-target-zlib = $(TARGET-target-zlib) +all-stageautofeedback-target-zlib: configure-stageautofeedback-target-zlib + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/zlib && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ + $(TARGET-stageautofeedback-target-zlib) + +maybe-clean-stageautofeedback-target-zlib: clean-stageautofeedback-target-zlib +clean-stageautofeedback: clean-stageautofeedback-target-zlib +clean-stageautofeedback-target-zlib: + @if [ $(current_stage) = stageautofeedback ]; then \ + [ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautofeedback-zlib/Makefile ] || exit 0; \ + $(MAKE) stageautofeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-zlib-bootstrap + + + + .PHONY: check-target-zlib maybe-check-target-zlib @@ -57902,6 +58647,491 @@ maintainer-clean-target-libada: +.PHONY: configure-target-libgm2 maybe-configure-target-libgm2 +maybe-configure-target-libgm2: +@if gcc-bootstrap +configure-target-libgm2: stage_current +@endif gcc-bootstrap +@if target-libgm2 +maybe-configure-target-libgm2: configure-target-libgm2 +configure-target-libgm2: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libgm2..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \ + mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \ + $(NORMAL_TARGET_EXPORTS) \ + echo Configuring in $(TARGET_SUBDIR)/libgm2; \ + cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libgm2; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + || exit 1 +@endif target-libgm2 + + + + + +.PHONY: all-target-libgm2 maybe-all-target-libgm2 +maybe-all-target-libgm2: +@if gcc-bootstrap +all-target-libgm2: stage_current +@endif gcc-bootstrap +@if target-libgm2 +TARGET-target-libgm2=all +maybe-all-target-libgm2: all-target-libgm2 +all-target-libgm2: configure-target-libgm2 + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \ + $(TARGET-target-libgm2)) +@endif target-libgm2 + + + + + +.PHONY: check-target-libgm2 maybe-check-target-libgm2 +maybe-check-target-libgm2: +@if target-libgm2 +maybe-check-target-libgm2: check-target-libgm2 + +check-target-libgm2: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + +@endif target-libgm2 + +.PHONY: install-target-libgm2 maybe-install-target-libgm2 +maybe-install-target-libgm2: +@if target-libgm2 +maybe-install-target-libgm2: install-target-libgm2 + +install-target-libgm2: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + +@endif target-libgm2 + +.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2 +maybe-install-strip-target-libgm2: +@if target-libgm2 +maybe-install-strip-target-libgm2: install-strip-target-libgm2 + +install-strip-target-libgm2: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) + +@endif target-libgm2 + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-target-libgm2 info-target-libgm2 +maybe-info-target-libgm2: +@if target-libgm2 +maybe-info-target-libgm2: info-target-libgm2 + +info-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing info in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2 +maybe-dvi-target-libgm2: +@if target-libgm2 +maybe-dvi-target-libgm2: dvi-target-libgm2 + +dvi-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2 +maybe-pdf-target-libgm2: +@if target-libgm2 +maybe-pdf-target-libgm2: pdf-target-libgm2 + +pdf-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing pdf in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-html-target-libgm2 html-target-libgm2 +maybe-html-target-libgm2: +@if target-libgm2 +maybe-html-target-libgm2: html-target-libgm2 + +html-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing html in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2 +maybe-TAGS-target-libgm2: +@if target-libgm2 +maybe-TAGS-target-libgm2: TAGS-target-libgm2 + +TAGS-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2 +maybe-install-info-target-libgm2: +@if target-libgm2 +maybe-install-info-target-libgm2: install-info-target-libgm2 + +install-info-target-libgm2: \ + configure-target-libgm2 \ + info-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-install-dvi-target-libgm2 install-dvi-target-libgm2 +maybe-install-dvi-target-libgm2: +@if target-libgm2 +maybe-install-dvi-target-libgm2: install-dvi-target-libgm2 + +install-dvi-target-libgm2: \ + configure-target-libgm2 \ + dvi-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-dvi in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-dvi) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2 +maybe-install-pdf-target-libgm2: +@if target-libgm2 +maybe-install-pdf-target-libgm2: install-pdf-target-libgm2 + +install-pdf-target-libgm2: \ + configure-target-libgm2 \ + pdf-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-pdf) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2 +maybe-install-html-target-libgm2: +@if target-libgm2 +maybe-install-html-target-libgm2: install-html-target-libgm2 + +install-html-target-libgm2: \ + configure-target-libgm2 \ + html-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing install-html in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-html) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2 +maybe-installcheck-target-libgm2: +@if target-libgm2 +maybe-installcheck-target-libgm2: installcheck-target-libgm2 + +installcheck-target-libgm2: \ + configure-target-libgm2 + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + installcheck) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2 +maybe-mostlyclean-target-libgm2: +@if target-libgm2 +maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2 + +mostlyclean-target-libgm2: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-clean-target-libgm2 clean-target-libgm2 +maybe-clean-target-libgm2: +@if target-libgm2 +maybe-clean-target-libgm2: clean-target-libgm2 + +clean-target-libgm2: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2 +maybe-distclean-target-libgm2: +@if target-libgm2 +maybe-distclean-target-libgm2: distclean-target-libgm2 + +distclean-target-libgm2: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif target-libgm2 + +.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2 +maybe-maintainer-clean-target-libgm2: +@if target-libgm2 +maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2 + +maintainer-clean-target-libgm2: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgm2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif target-libgm2 + + + + + .PHONY: configure-target-libgomp maybe-configure-target-libgomp maybe-configure-target-libgomp: @if gcc-bootstrap @@ -59558,118 +60788,520 @@ maybe-mostlyclean-target-libitm: @if target-libitm maybe-mostlyclean-target-libitm: mostlyclean-target-libitm -mostlyclean-target-libitm: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +mostlyclean-target-libitm: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libitm"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libitm && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif target-libitm + +.PHONY: maybe-clean-target-libitm clean-target-libitm +maybe-clean-target-libitm: +@if target-libitm +maybe-clean-target-libitm: clean-target-libitm + +clean-target-libitm: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing clean in $(TARGET_SUBDIR)/libitm"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libitm && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif target-libitm + +.PHONY: maybe-distclean-target-libitm distclean-target-libitm +maybe-distclean-target-libitm: +@if target-libitm +maybe-distclean-target-libitm: distclean-target-libitm + +distclean-target-libitm: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libitm"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libitm && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif target-libitm + +.PHONY: maybe-maintainer-clean-target-libitm maintainer-clean-target-libitm +maybe-maintainer-clean-target-libitm: +@if target-libitm +maybe-maintainer-clean-target-libitm: maintainer-clean-target-libitm + +maintainer-clean-target-libitm: + @: $(MAKE); $(unstage) + @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(NORMAL_TARGET_EXPORTS) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libitm"; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libitm && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif target-libitm + + + + + +.PHONY: configure-target-libatomic maybe-configure-target-libatomic +maybe-configure-target-libatomic: +@if gcc-bootstrap +configure-target-libatomic: stage_current +@endif gcc-bootstrap +@if target-libatomic +maybe-configure-target-libatomic: configure-target-libatomic +configure-target-libatomic: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libatomic..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + $(NORMAL_TARGET_EXPORTS) \ + echo Configuring in $(TARGET_SUBDIR)/libatomic; \ + cd "$(TARGET_SUBDIR)/libatomic" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + || exit 1 +@endif target-libatomic + + + +.PHONY: configure-stage1-target-libatomic maybe-configure-stage1-target-libatomic +maybe-configure-stage1-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stage1-target-libatomic: configure-stage1-target-libatomic +configure-stage1-target-libatomic: + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 1 in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + \ + $(STAGE1_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap + +.PHONY: configure-stage2-target-libatomic maybe-configure-stage2-target-libatomic +maybe-configure-stage2-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stage2-target-libatomic: configure-stage2-target-libatomic +configure-stage2-target-libatomic: + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 2 in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE2_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap + +.PHONY: configure-stage3-target-libatomic maybe-configure-stage3-target-libatomic +maybe-configure-stage3-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stage3-target-libatomic: configure-stage3-target-libatomic +configure-stage3-target-libatomic: + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 3 in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE3_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap + +.PHONY: configure-stage4-target-libatomic maybe-configure-stage4-target-libatomic +maybe-configure-stage4-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stage4-target-libatomic: configure-stage4-target-libatomic +configure-stage4-target-libatomic: + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage 4 in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGE4_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap + +.PHONY: configure-stageprofile-target-libatomic maybe-configure-stageprofile-target-libatomic +maybe-configure-stageprofile-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stageprofile-target-libatomic: configure-stageprofile-target-libatomic +configure-stageprofile-target-libatomic: + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing mostlyclean in $(TARGET_SUBDIR)/libitm"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libitm && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - mostlyclean) \ - || exit 1 - -@endif target-libitm - -.PHONY: maybe-clean-target-libitm clean-target-libitm -maybe-clean-target-libitm: -@if target-libitm -maybe-clean-target-libitm: clean-target-libitm + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage profile in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEprofile_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap -clean-target-libitm: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagetrain-target-libatomic maybe-configure-stagetrain-target-libatomic +maybe-configure-stagetrain-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stagetrain-target-libatomic: configure-stagetrain-target-libatomic +configure-stagetrain-target-libatomic: + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing clean in $(TARGET_SUBDIR)/libitm"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libitm && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - clean) \ - || exit 1 - -@endif target-libitm - -.PHONY: maybe-distclean-target-libitm distclean-target-libitm -maybe-distclean-target-libitm: -@if target-libitm -maybe-distclean-target-libitm: distclean-target-libitm + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage train in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEtrain_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap -distclean-target-libitm: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stagefeedback-target-libatomic maybe-configure-stagefeedback-target-libatomic +maybe-configure-stagefeedback-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stagefeedback-target-libatomic: configure-stagefeedback-target-libatomic +configure-stagefeedback-target-libatomic: + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing distclean in $(TARGET_SUBDIR)/libitm"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libitm && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - distclean) \ - || exit 1 - -@endif target-libitm - -.PHONY: maybe-maintainer-clean-target-libitm maintainer-clean-target-libitm -maybe-maintainer-clean-target-libitm: -@if target-libitm -maybe-maintainer-clean-target-libitm: maintainer-clean-target-libitm + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage feedback in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEfeedback_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap -maintainer-clean-target-libitm: - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ +.PHONY: configure-stageautoprofile-target-libatomic maybe-configure-stageautoprofile-target-libatomic +maybe-configure-stageautoprofile-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stageautoprofile-target-libatomic: configure-stageautoprofile-target-libatomic +configure-stageautoprofile-target-libatomic: + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic + @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + echo "Checking multilib configuration for libatomic..."; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ + if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libatomic/Makefile; \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ + fi; \ + test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ - echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libitm"; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libitm && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - maintainer-clean) \ - || exit 1 - -@endif target-libitm - - - - + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autoprofile in $(TARGET_SUBDIR)/libatomic; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=libatomic; \ + $(SHELL) $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautoprofile_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap -.PHONY: configure-target-libatomic maybe-configure-target-libatomic -maybe-configure-target-libatomic: -@if gcc-bootstrap -configure-target-libatomic: stage_current -@endif gcc-bootstrap -@if target-libatomic -maybe-configure-target-libatomic: configure-target-libatomic -configure-target-libatomic: - @: $(MAKE); $(unstage) +.PHONY: configure-stageautofeedback-target-libatomic maybe-configure-stageautofeedback-target-libatomic +maybe-configure-stageautofeedback-target-libatomic: +@if target-libatomic-bootstrap +maybe-configure-stageautofeedback-target-libatomic: configure-stageautofeedback-target-libatomic +configure-stageautofeedback-target-libatomic: + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ echo "Checking multilib configuration for libatomic..."; \ - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \ if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \ if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \ @@ -59682,24 +61314,27 @@ configure-target-libatomic: mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \ fi; \ test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \ + echo Configuring stage autofeedback in $(TARGET_SUBDIR)/libatomic; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \ - $(NORMAL_TARGET_EXPORTS) \ - echo Configuring in $(TARGET_SUBDIR)/libatomic; \ - cd "$(TARGET_SUBDIR)/libatomic" || exit 1; \ + cd $(TARGET_SUBDIR)/libatomic || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ *) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ esac; \ module_srcdir=libatomic; \ - rm -f no-such-file || : ; \ - CONFIG_SITE=no-such-file $(SHELL) \ - $$s/$$module_srcdir/configure \ + $(SHELL) $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ - --target=${target_alias} \ - || exit 1 -@endif target-libatomic + --target=${target_alias} \ + --with-build-libsubdir=$(HOST_SUBDIR) \ + $(STAGEautofeedback_CONFIGURE_FLAGS) +@endif target-libatomic-bootstrap @@ -59714,7 +61349,6 @@ all-target-libatomic: stage_current TARGET-target-libatomic=all maybe-all-target-libatomic: all-target-libatomic all-target-libatomic: configure-target-libatomic - @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -59725,6 +61359,387 @@ all-target-libatomic: configure-target-libatomic +.PHONY: all-stage1-target-libatomic maybe-all-stage1-target-libatomic +.PHONY: clean-stage1-target-libatomic maybe-clean-stage1-target-libatomic +maybe-all-stage1-target-libatomic: +maybe-clean-stage1-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stage1-target-libatomic: all-stage1-target-libatomic +all-stage1: all-stage1-target-libatomic +TARGET-stage1-target-libatomic = $(TARGET-target-libatomic) +all-stage1-target-libatomic: configure-stage1-target-libatomic + @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE1_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + \ + TFLAGS="$(STAGE1_TFLAGS)" \ + $(TARGET-stage1-target-libatomic) + +maybe-clean-stage1-target-libatomic: clean-stage1-target-libatomic +clean-stage1: clean-stage1-target-libatomic +clean-stage1-target-libatomic: + @if [ $(current_stage) = stage1 ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage1-libatomic/Makefile ] || exit 0; \ + $(MAKE) stage1-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) \ + clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stage2-target-libatomic maybe-all-stage2-target-libatomic +.PHONY: clean-stage2-target-libatomic maybe-clean-stage2-target-libatomic +maybe-all-stage2-target-libatomic: +maybe-clean-stage2-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stage2-target-libatomic: all-stage2-target-libatomic +all-stage2: all-stage2-target-libatomic +TARGET-stage2-target-libatomic = $(TARGET-target-libatomic) +all-stage2-target-libatomic: configure-stage2-target-libatomic + @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE2_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE2_TFLAGS)" \ + $(TARGET-stage2-target-libatomic) + +maybe-clean-stage2-target-libatomic: clean-stage2-target-libatomic +clean-stage2: clean-stage2-target-libatomic +clean-stage2-target-libatomic: + @if [ $(current_stage) = stage2 ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage2-libatomic/Makefile ] || exit 0; \ + $(MAKE) stage2-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stage3-target-libatomic maybe-all-stage3-target-libatomic +.PHONY: clean-stage3-target-libatomic maybe-clean-stage3-target-libatomic +maybe-all-stage3-target-libatomic: +maybe-clean-stage3-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stage3-target-libatomic: all-stage3-target-libatomic +all-stage3: all-stage3-target-libatomic +TARGET-stage3-target-libatomic = $(TARGET-target-libatomic) +all-stage3-target-libatomic: configure-stage3-target-libatomic + @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE3_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE3_TFLAGS)" \ + $(TARGET-stage3-target-libatomic) + +maybe-clean-stage3-target-libatomic: clean-stage3-target-libatomic +clean-stage3: clean-stage3-target-libatomic +clean-stage3-target-libatomic: + @if [ $(current_stage) = stage3 ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage3-libatomic/Makefile ] || exit 0; \ + $(MAKE) stage3-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stage4-target-libatomic maybe-all-stage4-target-libatomic +.PHONY: clean-stage4-target-libatomic maybe-clean-stage4-target-libatomic +maybe-all-stage4-target-libatomic: +maybe-clean-stage4-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stage4-target-libatomic: all-stage4-target-libatomic +all-stage4: all-stage4-target-libatomic +TARGET-stage4-target-libatomic = $(TARGET-target-libatomic) +all-stage4-target-libatomic: configure-stage4-target-libatomic + @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGE4_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGE4_TFLAGS)" \ + $(TARGET-stage4-target-libatomic) + +maybe-clean-stage4-target-libatomic: clean-stage4-target-libatomic +clean-stage4: clean-stage4-target-libatomic +clean-stage4-target-libatomic: + @if [ $(current_stage) = stage4 ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stage4-libatomic/Makefile ] || exit 0; \ + $(MAKE) stage4-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stageprofile-target-libatomic maybe-all-stageprofile-target-libatomic +.PHONY: clean-stageprofile-target-libatomic maybe-clean-stageprofile-target-libatomic +maybe-all-stageprofile-target-libatomic: +maybe-clean-stageprofile-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stageprofile-target-libatomic: all-stageprofile-target-libatomic +all-stageprofile: all-stageprofile-target-libatomic +TARGET-stageprofile-target-libatomic = $(TARGET-target-libatomic) +all-stageprofile-target-libatomic: configure-stageprofile-target-libatomic + @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEprofile_TFLAGS)" \ + $(TARGET-stageprofile-target-libatomic) + +maybe-clean-stageprofile-target-libatomic: clean-stageprofile-target-libatomic +clean-stageprofile: clean-stageprofile-target-libatomic +clean-stageprofile-target-libatomic: + @if [ $(current_stage) = stageprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageprofile-libatomic/Makefile ] || exit 0; \ + $(MAKE) stageprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stagetrain-target-libatomic maybe-all-stagetrain-target-libatomic +.PHONY: clean-stagetrain-target-libatomic maybe-clean-stagetrain-target-libatomic +maybe-all-stagetrain-target-libatomic: +maybe-clean-stagetrain-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stagetrain-target-libatomic: all-stagetrain-target-libatomic +all-stagetrain: all-stagetrain-target-libatomic +TARGET-stagetrain-target-libatomic = $(TARGET-target-libatomic) +all-stagetrain-target-libatomic: configure-stagetrain-target-libatomic + @[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEtrain_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEtrain_TFLAGS)" \ + $(TARGET-stagetrain-target-libatomic) + +maybe-clean-stagetrain-target-libatomic: clean-stagetrain-target-libatomic +clean-stagetrain: clean-stagetrain-target-libatomic +clean-stagetrain-target-libatomic: + @if [ $(current_stage) = stagetrain ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagetrain-libatomic/Makefile ] || exit 0; \ + $(MAKE) stagetrain-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stagefeedback-target-libatomic maybe-all-stagefeedback-target-libatomic +.PHONY: clean-stagefeedback-target-libatomic maybe-clean-stagefeedback-target-libatomic +maybe-all-stagefeedback-target-libatomic: +maybe-clean-stagefeedback-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stagefeedback-target-libatomic: all-stagefeedback-target-libatomic +all-stagefeedback: all-stagefeedback-target-libatomic +TARGET-stagefeedback-target-libatomic = $(TARGET-target-libatomic) +all-stagefeedback-target-libatomic: configure-stagefeedback-target-libatomic + @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEfeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEfeedback_TFLAGS)" \ + $(TARGET-stagefeedback-target-libatomic) + +maybe-clean-stagefeedback-target-libatomic: clean-stagefeedback-target-libatomic +clean-stagefeedback: clean-stagefeedback-target-libatomic +clean-stagefeedback-target-libatomic: + @if [ $(current_stage) = stagefeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stagefeedback-libatomic/Makefile ] || exit 0; \ + $(MAKE) stagefeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stageautoprofile-target-libatomic maybe-all-stageautoprofile-target-libatomic +.PHONY: clean-stageautoprofile-target-libatomic maybe-clean-stageautoprofile-target-libatomic +maybe-all-stageautoprofile-target-libatomic: +maybe-clean-stageautoprofile-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stageautoprofile-target-libatomic: all-stageautoprofile-target-libatomic +all-stageautoprofile: all-stageautoprofile-target-libatomic +TARGET-stageautoprofile-target-libatomic = $(TARGET-target-libatomic) +all-stageautoprofile-target-libatomic: configure-stageautoprofile-target-libatomic + @[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautoprofile_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + $$s/gcc/config/i386/$(AUTO_PROFILE) \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautoprofile_TFLAGS)" \ + $(TARGET-stageautoprofile-target-libatomic) + +maybe-clean-stageautoprofile-target-libatomic: clean-stageautoprofile-target-libatomic +clean-stageautoprofile: clean-stageautoprofile-target-libatomic +clean-stageautoprofile-target-libatomic: + @if [ $(current_stage) = stageautoprofile ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautoprofile-libatomic/Makefile ] || exit 0; \ + $(MAKE) stageautoprofile-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + +.PHONY: all-stageautofeedback-target-libatomic maybe-all-stageautofeedback-target-libatomic +.PHONY: clean-stageautofeedback-target-libatomic maybe-clean-stageautofeedback-target-libatomic +maybe-all-stageautofeedback-target-libatomic: +maybe-clean-stageautofeedback-target-libatomic: +@if target-libatomic-bootstrap +maybe-all-stageautofeedback-target-libatomic: all-stageautofeedback-target-libatomic +all-stageautofeedback: all-stageautofeedback-target-libatomic +TARGET-stageautofeedback-target-libatomic = $(TARGET-target-libatomic) +all-stageautofeedback-target-libatomic: configure-stageautofeedback-target-libatomic + @[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + TFLAGS="$(STAGEautofeedback_TFLAGS)"; \ + $(NORMAL_TARGET_EXPORTS) \ + \ + cd $(TARGET_SUBDIR)/libatomic && \ + \ + $(MAKE) $(BASE_FLAGS_TO_PASS) \ + CFLAGS="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \ + CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ + $(EXTRA_TARGET_FLAGS) \ + TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \ + $(TARGET-stageautofeedback-target-libatomic) + +maybe-clean-stageautofeedback-target-libatomic: clean-stageautofeedback-target-libatomic +clean-stageautofeedback: clean-stageautofeedback-target-libatomic +clean-stageautofeedback-target-libatomic: + @if [ $(current_stage) = stageautofeedback ]; then \ + [ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \ + else \ + [ -f $(TARGET_SUBDIR)/stageautofeedback-libatomic/Makefile ] || exit 0; \ + $(MAKE) stageautofeedback-start; \ + fi; \ + cd $(TARGET_SUBDIR)/libatomic && \ + $(MAKE) $(EXTRA_TARGET_FLAGS) clean +@endif target-libatomic-bootstrap + + + + .PHONY: check-target-libatomic maybe-check-target-libatomic @@ -60234,6 +62249,14 @@ check-gcc-go: (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go); check-go: check-gcc-go check-target-libgo check-gotools +.PHONY: check-gcc-m2 check-m2 +check-gcc-m2: + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-m2); +check-m2: check-gcc-m2 check-target-libgm2 + .PHONY: check-gcc-d check-d check-gcc-d: r=`${PWD_COMMAND}`; export r; \ @@ -60250,6 +62273,14 @@ check-gcc-jit: (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-jit); check-jit: check-gcc-jit +.PHONY: check-gcc-rust check-rust +check-gcc-rust: + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-rust); +check-rust: check-gcc-rust + # The gcc part of install-no-fixedincludes, which relies on an intimate # knowledge of how a number of gcc internal targets (inter)operate. Delegate. @@ -60372,11 +62403,6 @@ stage1-start:: mkdir stage1-isl; \ mv stage1-isl isl @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stage1-libelf ] || \ - mkdir stage1-libelf; \ - mv stage1-libelf libelf -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stage1-gold ] || \ mkdir stage1-gold; \ @@ -60502,11 +62528,6 @@ stage1-end:: cd $(HOST_SUBDIR); mv isl stage1-isl; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stage1-libelf; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stage1-gold; \ @@ -60685,12 +62706,6 @@ stage2-start:: mv stage2-isl isl; \ mv stage1-isl prev-isl || test -f stage1-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stage2-libelf ] || \ - mkdir stage2-libelf; \ - mv stage2-libelf libelf; \ - mv stage1-libelf prev-libelf || test -f stage1-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stage2-gold ] || \ mkdir stage2-gold; \ @@ -60841,12 +62856,6 @@ stage2-end:: mv prev-isl stage1-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stage2-libelf; \ - mv prev-libelf stage1-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stage2-gold; \ @@ -61063,12 +63072,6 @@ stage3-start:: mv stage3-isl isl; \ mv stage2-isl prev-isl || test -f stage2-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stage3-libelf ] || \ - mkdir stage3-libelf; \ - mv stage3-libelf libelf; \ - mv stage2-libelf prev-libelf || test -f stage2-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stage3-gold ] || \ mkdir stage3-gold; \ @@ -61219,12 +63222,6 @@ stage3-end:: mv prev-isl stage2-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stage3-libelf; \ - mv prev-libelf stage2-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stage3-gold; \ @@ -61497,12 +63494,6 @@ stage4-start:: mv stage4-isl isl; \ mv stage3-isl prev-isl || test -f stage3-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stage4-libelf ] || \ - mkdir stage4-libelf; \ - mv stage4-libelf libelf; \ - mv stage3-libelf prev-libelf || test -f stage3-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stage4-gold ] || \ mkdir stage4-gold; \ @@ -61653,12 +63644,6 @@ stage4-end:: mv prev-isl stage3-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stage4-libelf; \ - mv prev-libelf stage3-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stage4-gold; \ @@ -61919,12 +63904,6 @@ stageprofile-start:: mv stageprofile-isl isl; \ mv stage1-isl prev-isl || test -f stage1-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stageprofile-libelf ] || \ - mkdir stageprofile-libelf; \ - mv stageprofile-libelf libelf; \ - mv stage1-libelf prev-libelf || test -f stage1-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stageprofile-gold ] || \ mkdir stageprofile-gold; \ @@ -62075,12 +64054,6 @@ stageprofile-end:: mv prev-isl stage1-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stageprofile-libelf; \ - mv prev-libelf stage1-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stageprofile-gold; \ @@ -62274,12 +64247,6 @@ stagetrain-start:: mv stagetrain-isl isl; \ mv stageprofile-isl prev-isl || test -f stageprofile-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stagetrain-libelf ] || \ - mkdir stagetrain-libelf; \ - mv stagetrain-libelf libelf; \ - mv stageprofile-libelf prev-libelf || test -f stageprofile-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stagetrain-gold ] || \ mkdir stagetrain-gold; \ @@ -62430,12 +64397,6 @@ stagetrain-end:: mv prev-isl stageprofile-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stagetrain-libelf; \ - mv prev-libelf stageprofile-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stagetrain-gold; \ @@ -62629,12 +64590,6 @@ stagefeedback-start:: mv stagefeedback-isl isl; \ mv stagetrain-isl prev-isl || test -f stagetrain-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stagefeedback-libelf ] || \ - mkdir stagefeedback-libelf; \ - mv stagefeedback-libelf libelf; \ - mv stagetrain-libelf prev-libelf || test -f stagetrain-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stagefeedback-gold ] || \ mkdir stagefeedback-gold; \ @@ -62785,12 +64740,6 @@ stagefeedback-end:: mv prev-isl stagetrain-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stagefeedback-libelf; \ - mv prev-libelf stagetrain-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stagefeedback-gold; \ @@ -63007,12 +64956,6 @@ stageautoprofile-start:: mv stageautoprofile-isl isl; \ mv stage1-isl prev-isl || test -f stage1-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stageautoprofile-libelf ] || \ - mkdir stageautoprofile-libelf; \ - mv stageautoprofile-libelf libelf; \ - mv stage1-libelf prev-libelf || test -f stage1-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stageautoprofile-gold ] || \ mkdir stageautoprofile-gold; \ @@ -63163,12 +65106,6 @@ stageautoprofile-end:: mv prev-isl stage1-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stageautoprofile-libelf; \ - mv prev-libelf stage1-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stageautoprofile-gold; \ @@ -63362,12 +65299,6 @@ stageautofeedback-start:: mv stageautofeedback-isl isl; \ mv stageautoprofile-isl prev-isl || test -f stageautoprofile-lean @endif isl -@if libelf - @cd $(HOST_SUBDIR); [ -d stageautofeedback-libelf ] || \ - mkdir stageautofeedback-libelf; \ - mv stageautofeedback-libelf libelf; \ - mv stageautoprofile-libelf prev-libelf || test -f stageautoprofile-lean -@endif libelf @if gold @cd $(HOST_SUBDIR); [ -d stageautofeedback-gold ] || \ mkdir stageautofeedback-gold; \ @@ -63518,12 +65449,6 @@ stageautofeedback-end:: mv prev-isl stageautoprofile-isl; : ; \ fi @endif isl -@if libelf - @if test -d $(HOST_SUBDIR)/libelf; then \ - cd $(HOST_SUBDIR); mv libelf stageautofeedback-libelf; \ - mv prev-libelf stageautoprofile-libelf; : ; \ - fi -@endif libelf @if gold @if test -d $(HOST_SUBDIR)/gold; then \ cd $(HOST_SUBDIR); mv gold stageautofeedback-gold; \ @@ -63742,7 +65667,6 @@ configure-stagetrain-target-libvtv: maybe-all-stagetrain-gcc configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-gcc configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-gcc configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-gcc -configure-target-liboffloadmic: stage_last configure-target-libssp: stage_last configure-target-newlib: stage_last configure-stage1-target-libgcc: maybe-all-stage1-gcc @@ -63754,19 +65678,44 @@ configure-stagetrain-target-libgcc: maybe-all-stagetrain-gcc configure-stagefeedback-target-libgcc: maybe-all-stagefeedback-gcc configure-stageautoprofile-target-libgcc: maybe-all-stageautoprofile-gcc configure-stageautofeedback-target-libgcc: maybe-all-stageautofeedback-gcc -configure-target-libbacktrace: stage_last +configure-stage1-target-libbacktrace: maybe-all-stage1-gcc +configure-stage2-target-libbacktrace: maybe-all-stage2-gcc +configure-stage3-target-libbacktrace: maybe-all-stage3-gcc +configure-stage4-target-libbacktrace: maybe-all-stage4-gcc +configure-stageprofile-target-libbacktrace: maybe-all-stageprofile-gcc +configure-stagetrain-target-libbacktrace: maybe-all-stagetrain-gcc +configure-stagefeedback-target-libbacktrace: maybe-all-stagefeedback-gcc +configure-stageautoprofile-target-libbacktrace: maybe-all-stageautoprofile-gcc +configure-stageautofeedback-target-libbacktrace: maybe-all-stageautofeedback-gcc configure-target-libquadmath: stage_last configure-target-libgfortran: stage_last configure-target-libobjc: stage_last configure-target-libgo: stage_last -configure-target-libphobos: stage_last +configure-stage1-target-libphobos: maybe-all-stage1-gcc +configure-stage2-target-libphobos: maybe-all-stage2-gcc +configure-stage3-target-libphobos: maybe-all-stage3-gcc +configure-stage4-target-libphobos: maybe-all-stage4-gcc +configure-stageprofile-target-libphobos: maybe-all-stageprofile-gcc +configure-stagetrain-target-libphobos: maybe-all-stagetrain-gcc +configure-stagefeedback-target-libphobos: maybe-all-stagefeedback-gcc +configure-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-gcc +configure-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-gcc configure-target-libtermcap: stage_last configure-target-winsup: stage_last configure-target-libgloss: stage_last configure-target-libffi: stage_last -configure-target-zlib: stage_last +configure-stage1-target-zlib: maybe-all-stage1-gcc +configure-stage2-target-zlib: maybe-all-stage2-gcc +configure-stage3-target-zlib: maybe-all-stage3-gcc +configure-stage4-target-zlib: maybe-all-stage4-gcc +configure-stageprofile-target-zlib: maybe-all-stageprofile-gcc +configure-stagetrain-target-zlib: maybe-all-stagetrain-gcc +configure-stagefeedback-target-zlib: maybe-all-stagefeedback-gcc +configure-stageautoprofile-target-zlib: maybe-all-stageautoprofile-gcc +configure-stageautofeedback-target-zlib: maybe-all-stageautofeedback-gcc configure-target-rda: stage_last configure-target-libada: stage_last +configure-target-libgm2: stage_last configure-stage1-target-libgomp: maybe-all-stage1-gcc configure-stage2-target-libgomp: maybe-all-stage2-gcc configure-stage3-target-libgomp: maybe-all-stage3-gcc @@ -63777,14 +65726,21 @@ configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-gcc configure-stageautoprofile-target-libgomp: maybe-all-stageautoprofile-gcc configure-stageautofeedback-target-libgomp: maybe-all-stageautofeedback-gcc configure-target-libitm: stage_last -configure-target-libatomic: stage_last +configure-stage1-target-libatomic: maybe-all-stage1-gcc +configure-stage2-target-libatomic: maybe-all-stage2-gcc +configure-stage3-target-libatomic: maybe-all-stage3-gcc +configure-stage4-target-libatomic: maybe-all-stage4-gcc +configure-stageprofile-target-libatomic: maybe-all-stageprofile-gcc +configure-stagetrain-target-libatomic: maybe-all-stagetrain-gcc +configure-stagefeedback-target-libatomic: maybe-all-stagefeedback-gcc +configure-stageautoprofile-target-libatomic: maybe-all-stageautoprofile-gcc +configure-stageautofeedback-target-libatomic: maybe-all-stageautofeedback-gcc @endif gcc-bootstrap @if gcc-no-bootstrap configure-target-libstdc++-v3: maybe-all-gcc configure-target-libsanitizer: maybe-all-gcc configure-target-libvtv: maybe-all-gcc -configure-target-liboffloadmic: maybe-all-gcc configure-target-libssp: maybe-all-gcc configure-target-newlib: maybe-all-gcc configure-target-libgcc: maybe-all-gcc @@ -63801,6 +65757,7 @@ configure-target-libffi: maybe-all-gcc configure-target-zlib: maybe-all-gcc configure-target-rda: maybe-all-gcc configure-target-libada: maybe-all-gcc +configure-target-libgm2: maybe-all-gcc configure-target-libgomp: maybe-all-gcc configure-target-libitm: maybe-all-gcc configure-target-libatomic: maybe-all-gcc @@ -63932,16 +65889,6 @@ configure-stagetrain-gcc: maybe-all-stagetrain-gold configure-stagefeedback-gcc: maybe-all-stagefeedback-gold configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gold configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gold -configure-gcc: maybe-all-libelf -configure-stage1-gcc: maybe-all-stage1-libelf -configure-stage2-gcc: maybe-all-stage2-libelf -configure-stage3-gcc: maybe-all-stage3-libelf -configure-stage4-gcc: maybe-all-stage4-libelf -configure-stageprofile-gcc: maybe-all-stageprofile-libelf -configure-stagetrain-gcc: maybe-all-stagetrain-libelf -configure-stagefeedback-gcc: maybe-all-stagefeedback-libelf -configure-stageautoprofile-gcc: maybe-all-stageautoprofile-libelf -configure-stageautofeedback-gcc: maybe-all-stageautofeedback-libelf configure-gcc: maybe-all-libiconv configure-stage1-gcc: maybe-all-stage1-libiconv configure-stage2-gcc: maybe-all-stage2-libiconv @@ -64549,13 +66496,14 @@ all-stageautoprofile-binutils: maybe-all-stageautoprofile-libsframe all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe install-binutils: maybe-install-opcodes install-strip-binutils: maybe-install-strip-opcodes -install-bfd: maybe-install-libsframe install-libctf: maybe-install-bfd install-ld: maybe-install-bfd install-ld: maybe-install-libctf install-strip-libctf: maybe-install-strip-bfd install-strip-ld: maybe-install-strip-bfd install-strip-ld: maybe-install-strip-libctf +install-bfd: maybe-install-libsframe +install-strip-bfd: maybe-install-strip-libsframe configure-opcodes: configure-bfd configure-stage1-opcodes: configure-stage1-bfd configure-stage2-opcodes: configure-stage2-bfd @@ -64943,17 +66891,58 @@ all-flex: maybe-all-build-bison all-flex: maybe-all-m4 all-flex: maybe-all-build-texinfo all-m4: maybe-all-build-texinfo -configure-target-fastjar: maybe-configure-target-zlib -all-target-fastjar: maybe-all-target-zlib configure-target-libgo: maybe-configure-target-libffi -all-target-libgo: maybe-all-target-libbacktrace all-target-libgo: maybe-all-target-libffi -all-target-libgo: maybe-all-target-libatomic configure-target-libphobos: maybe-configure-target-libbacktrace +configure-stage1-target-libphobos: maybe-configure-stage1-target-libbacktrace +configure-stage2-target-libphobos: maybe-configure-stage2-target-libbacktrace +configure-stage3-target-libphobos: maybe-configure-stage3-target-libbacktrace +configure-stage4-target-libphobos: maybe-configure-stage4-target-libbacktrace +configure-stageprofile-target-libphobos: maybe-configure-stageprofile-target-libbacktrace +configure-stagetrain-target-libphobos: maybe-configure-stagetrain-target-libbacktrace +configure-stagefeedback-target-libphobos: maybe-configure-stagefeedback-target-libbacktrace +configure-stageautoprofile-target-libphobos: maybe-configure-stageautoprofile-target-libbacktrace +configure-stageautofeedback-target-libphobos: maybe-configure-stageautofeedback-target-libbacktrace configure-target-libphobos: maybe-configure-target-zlib +configure-stage1-target-libphobos: maybe-configure-stage1-target-zlib +configure-stage2-target-libphobos: maybe-configure-stage2-target-zlib +configure-stage3-target-libphobos: maybe-configure-stage3-target-zlib +configure-stage4-target-libphobos: maybe-configure-stage4-target-zlib +configure-stageprofile-target-libphobos: maybe-configure-stageprofile-target-zlib +configure-stagetrain-target-libphobos: maybe-configure-stagetrain-target-zlib +configure-stagefeedback-target-libphobos: maybe-configure-stagefeedback-target-zlib +configure-stageautoprofile-target-libphobos: maybe-configure-stageautoprofile-target-zlib +configure-stageautofeedback-target-libphobos: maybe-configure-stageautofeedback-target-zlib all-target-libphobos: maybe-all-target-libbacktrace +all-stage1-target-libphobos: maybe-all-stage1-target-libbacktrace +all-stage2-target-libphobos: maybe-all-stage2-target-libbacktrace +all-stage3-target-libphobos: maybe-all-stage3-target-libbacktrace +all-stage4-target-libphobos: maybe-all-stage4-target-libbacktrace +all-stageprofile-target-libphobos: maybe-all-stageprofile-target-libbacktrace +all-stagetrain-target-libphobos: maybe-all-stagetrain-target-libbacktrace +all-stagefeedback-target-libphobos: maybe-all-stagefeedback-target-libbacktrace +all-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-target-libbacktrace +all-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-target-libbacktrace all-target-libphobos: maybe-all-target-zlib +all-stage1-target-libphobos: maybe-all-stage1-target-zlib +all-stage2-target-libphobos: maybe-all-stage2-target-zlib +all-stage3-target-libphobos: maybe-all-stage3-target-zlib +all-stage4-target-libphobos: maybe-all-stage4-target-zlib +all-stageprofile-target-libphobos: maybe-all-stageprofile-target-zlib +all-stagetrain-target-libphobos: maybe-all-stagetrain-target-zlib +all-stagefeedback-target-libphobos: maybe-all-stagefeedback-target-zlib +all-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-target-zlib +all-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-target-zlib all-target-libphobos: maybe-all-target-libatomic +all-stage1-target-libphobos: maybe-all-stage1-target-libatomic +all-stage2-target-libphobos: maybe-all-stage2-target-libatomic +all-stage3-target-libphobos: maybe-all-stage3-target-libatomic +all-stage4-target-libphobos: maybe-all-stage4-target-libatomic +all-stageprofile-target-libphobos: maybe-all-stageprofile-target-libatomic +all-stagetrain-target-libphobos: maybe-all-stagetrain-target-libatomic +all-stagefeedback-target-libphobos: maybe-all-stagefeedback-target-libatomic +all-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-target-libatomic +all-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-target-libatomic configure-target-libstdc++-v3: maybe-configure-target-libgomp configure-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp configure-stage2-target-libstdc++-v3: maybe-configure-stage2-target-libgomp @@ -65002,15 +66991,12 @@ install-target-libsanitizer: maybe-install-target-libstdc++-v3 install-target-libsanitizer: maybe-install-target-libgcc install-target-libvtv: maybe-install-target-libstdc++-v3 install-target-libvtv: maybe-install-target-libgcc -install-target-liboffloadmic: maybe-install-target-libstdc++-v3 -install-target-liboffloadmic: maybe-install-target-libgcc install-target-libitm: maybe-install-target-libgcc install-target-libobjc: maybe-install-target-libgcc install-target-libstdc++-v3: maybe-install-target-libgcc all-target-libgloss: maybe-all-target-newlib all-target-winsup: maybe-all-target-libtermcap configure-target-libgfortran: maybe-all-target-libquadmath -configure-target-libgfortran: maybe-all-target-libbacktrace @if gcc-bootstrap @@ -65037,6 +67023,8 @@ configure-libcc1: maybe-configure-gcc all-libcc1: maybe-all-gcc all-c++tools: maybe-all-gcc all-utils: maybe-all-libiberty +configure-gdb: maybe-all-gmp +configure-gdb: maybe-all-mpfr configure-gdb: maybe-all-intl configure-gdb: maybe-all-bfd configure-gdb: maybe-all-libiconv @@ -65074,12 +67062,17 @@ all-fastjar: maybe-all-libiberty all-bison: maybe-all-intl all-flex: maybe-all-intl all-m4: maybe-all-intl +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib configure-target-libgo: maybe-all-target-libstdc++-v3 -configure-target-libffi: maybe-all-target-libstdc++-v3 -configure-target-liboffloadmic: maybe-configure-target-libgomp -all-target-liboffloadmic: maybe-all-target-libgomp +all-target-libgo: maybe-all-target-libbacktrace +all-target-libgo: maybe-all-target-libatomic +configure-target-libgm2: maybe-all-target-libstdc++-v3 +all-target-libgm2: maybe-all-target-libatomic configure-target-newlib: maybe-all-binutils configure-target-newlib: maybe-all-ld +configure-target-libgfortran: maybe-all-target-libbacktrace +configure-target-libgo: maybe-all-target-libbacktrace @endunless gcc-bootstrap # Dependencies for target modules on other target modules are @@ -65115,6 +67108,33 @@ configure-stagetrain-target-libvtv: maybe-all-stagetrain-target-libgcc configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libgcc configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-target-libgcc configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-target-libgcc +configure-stage1-target-libbacktrace: maybe-all-stage1-target-libgcc +configure-stage2-target-libbacktrace: maybe-all-stage2-target-libgcc +configure-stage3-target-libbacktrace: maybe-all-stage3-target-libgcc +configure-stage4-target-libbacktrace: maybe-all-stage4-target-libgcc +configure-stageprofile-target-libbacktrace: maybe-all-stageprofile-target-libgcc +configure-stagetrain-target-libbacktrace: maybe-all-stagetrain-target-libgcc +configure-stagefeedback-target-libbacktrace: maybe-all-stagefeedback-target-libgcc +configure-stageautoprofile-target-libbacktrace: maybe-all-stageautoprofile-target-libgcc +configure-stageautofeedback-target-libbacktrace: maybe-all-stageautofeedback-target-libgcc +configure-stage1-target-libphobos: maybe-all-stage1-target-libgcc +configure-stage2-target-libphobos: maybe-all-stage2-target-libgcc +configure-stage3-target-libphobos: maybe-all-stage3-target-libgcc +configure-stage4-target-libphobos: maybe-all-stage4-target-libgcc +configure-stageprofile-target-libphobos: maybe-all-stageprofile-target-libgcc +configure-stagetrain-target-libphobos: maybe-all-stagetrain-target-libgcc +configure-stagefeedback-target-libphobos: maybe-all-stagefeedback-target-libgcc +configure-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-target-libgcc +configure-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-target-libgcc +configure-stage1-target-zlib: maybe-all-stage1-target-libgcc +configure-stage2-target-zlib: maybe-all-stage2-target-libgcc +configure-stage3-target-zlib: maybe-all-stage3-target-libgcc +configure-stage4-target-zlib: maybe-all-stage4-target-libgcc +configure-stageprofile-target-zlib: maybe-all-stageprofile-target-libgcc +configure-stagetrain-target-zlib: maybe-all-stagetrain-target-libgcc +configure-stagefeedback-target-zlib: maybe-all-stagefeedback-target-libgcc +configure-stageautoprofile-target-zlib: maybe-all-stageautoprofile-target-libgcc +configure-stageautofeedback-target-zlib: maybe-all-stageautofeedback-target-libgcc configure-stage1-target-libgomp: maybe-all-stage1-target-libgcc configure-stage2-target-libgomp: maybe-all-stage2-target-libgcc configure-stage3-target-libgomp: maybe-all-stage3-target-libgcc @@ -65124,13 +67144,21 @@ configure-stagetrain-target-libgomp: maybe-all-stagetrain-target-libgcc configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-target-libgcc configure-stageautoprofile-target-libgomp: maybe-all-stageautoprofile-target-libgcc configure-stageautofeedback-target-libgomp: maybe-all-stageautofeedback-target-libgcc +configure-stage1-target-libatomic: maybe-all-stage1-target-libgcc +configure-stage2-target-libatomic: maybe-all-stage2-target-libgcc +configure-stage3-target-libatomic: maybe-all-stage3-target-libgcc +configure-stage4-target-libatomic: maybe-all-stage4-target-libgcc +configure-stageprofile-target-libatomic: maybe-all-stageprofile-target-libgcc +configure-stagetrain-target-libatomic: maybe-all-stagetrain-target-libgcc +configure-stagefeedback-target-libatomic: maybe-all-stagefeedback-target-libgcc +configure-stageautoprofile-target-libatomic: maybe-all-stageautoprofile-target-libgcc +configure-stageautofeedback-target-libatomic: maybe-all-stageautofeedback-target-libgcc @endif gcc-bootstrap @if gcc-no-bootstrap configure-target-libstdc++-v3: maybe-all-target-libgcc configure-target-libsanitizer: maybe-all-target-libgcc configure-target-libvtv: maybe-all-target-libgcc -configure-target-liboffloadmic: maybe-all-target-libgcc configure-target-libssp: maybe-all-target-libgcc configure-target-newlib: maybe-all-target-libgcc configure-target-libbacktrace: maybe-all-target-libgcc @@ -65146,6 +67174,7 @@ configure-target-libffi: maybe-all-target-libgcc configure-target-zlib: maybe-all-target-libgcc configure-target-rda: maybe-all-target-libgcc configure-target-libada: maybe-all-target-libgcc +configure-target-libgm2: maybe-all-target-libgcc configure-target-libgomp: maybe-all-target-libgcc configure-target-libitm: maybe-all-target-libgcc configure-target-libatomic: maybe-all-target-libgcc @@ -65158,9 +67187,6 @@ configure-target-libsanitizer: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss -configure-target-liboffloadmic: maybe-all-target-newlib maybe-all-target-libgloss -configure-target-liboffloadmic: maybe-all-target-libstdc++-v3 - configure-target-libssp: maybe-all-target-newlib maybe-all-target-libgloss @@ -65191,6 +67217,8 @@ configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss +configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss + configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss diff --git a/Makefile.tpl b/Makefile.tpl index 88db8f44d..36fa20950 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -166,6 +166,8 @@ BUILD_EXPORTS = \ GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ GDC="$(GDC_FOR_BUILD)"; export GDC; \ GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \ + GM2="$(GM2_FOR_BUILD)"; export GM2; \ + GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \ LD="$(LD_FOR_BUILD)"; export LD; \ @@ -204,6 +206,7 @@ HOST_EXPORTS = \ GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \ GOC="$(GOC)"; export GOC; \ GDC="$(GDC)"; export GDC; \ + GM2="$(GM2)"; export GM2; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ @@ -226,7 +229,7 @@ HOST_EXPORTS = \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ DSYMUTIL_FOR_TARGET="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL_FOR_TARGET; \ - GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET) $$TFLAGS"; export GCC_FOR_TARGET; \ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ @@ -240,8 +243,6 @@ HOST_EXPORTS = \ GMPINC="$(HOST_GMPINC)"; export GMPINC; \ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \ ISLINC="$(HOST_ISLINC)"; export ISLINC; \ - LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \ - LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \ XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \ @if gcc-bootstrap $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ @@ -277,11 +278,14 @@ POSTSTAGE1_HOST_EXPORTS = \ $(POSTSTAGE1_CXX_EXPORT) \ $(LTO_EXPORTS) \ GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ - -B$(build_tooldir)/bin/ $(GDC_FLAGS_FOR_TARGET) \ + -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \ -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ -I$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime -I$$s/libphobos/libdruntime \ -L$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ - -L$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/.libs"; \ + -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \ export GDC; \ GDC_FOR_BUILD="$$GDC"; export GDC_FOR_BUILD; \ GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \ @@ -307,6 +311,7 @@ BASE_TARGET_EXPORTS = \ GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \ + GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ @@ -344,10 +349,6 @@ HOST_GMPINC = @gmpinc@ HOST_ISLLIBS = @isllibs@ HOST_ISLINC = @islinc@ -# Where to find libelf -HOST_LIBELFLIBS = @libelflibs@ -HOST_LIBELFINC = @libelfinc@ - # ---------------------------------------------- # Programs producing files for the BUILD machine # ---------------------------------------------- @@ -377,6 +378,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@ GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@ GOC_FOR_BUILD = @GOC_FOR_BUILD@ GDC_FOR_BUILD = @GDC_FOR_BUILD@ +GM2_FOR_BUILD = @GM2_FOR_BUILD@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LD_FOR_BUILD = @LD_FOR_BUILD@ NM_FOR_BUILD = @NM_FOR_BUILD@ @@ -406,7 +408,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 10000000 +AUTO_PROFILE = gcc-auto-profile --all -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still @@ -446,7 +448,8 @@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) -GDCFLAGS = $(CFLAGS) +GDCFLAGS = @GDCFLAGS@ +GM2FLAGS = $(CFLAGS) PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -494,6 +497,7 @@ PGO-TRAINING-TARGETS = binutils gas gdb ld sim PGO_BUILD_TRAINING = $(addprefix maybe-check-,$(PGO-TRAINING-TARGETS)) CREATE_GCOV = create_gcov +PROFILE_MERGER = profile_merger TFLAGS = @@ -533,6 +537,11 @@ STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ --disable-build-format-warnings +@if target-libphobos-bootstrap +STAGE1_CONFIGURE_FLAGS += --with-libphobos-druntime-only +STAGE2_CONFIGURE_FLAGS += --with-libphobos-druntime-only +@endif target-libphobos-bootstrap + # When using the slow stage1 compiler disable IL verification and forcefully # enable it when using the stage2 compiler instead. As we later compare # stage2 and stage3 we are merely avoid doing redundant work, plus we apply @@ -552,11 +561,14 @@ STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) -STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g +STAGEautoprofile_CFLAGS = $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g STAGEautoprofile_TFLAGS = $(STAGE2_TFLAGS) STAGEautofeedback_CFLAGS = $(STAGE3_CFLAGS) STAGEautofeedback_TFLAGS = $(STAGE3_TFLAGS) +# Disable warnings as errors since inlining decisions with -fauto-profile +# may result in additional warnings. +STAGEautofeedback_CONFIGURE_FLAGS = $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS)) do-compare = @do_compare@ do-compare3 = $(do-compare) @@ -579,6 +591,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@ +GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@ @@ -604,6 +617,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ +GM2FLAGS_FOR_TARGET = -O2 -g GOCFLAGS_FOR_TARGET = -O2 -g GDCFLAGS_FOR_TARGET = -O2 -g @@ -710,6 +724,7 @@ EXTRA_HOST_FLAGS = \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ 'GDC=$(GDC)' \ + 'GM2=$(GM2)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -720,7 +735,8 @@ EXTRA_HOST_FLAGS = \ 'STRIP=$(STRIP)' \ 'WINDRES=$(WINDRES)' \ 'WINDMC=$(WINDMC)' \ - 'CREATE_GCOV=$(CREATE_GCOV)' + 'CREATE_GCOV=$(CREATE_GCOV)' \ + 'PROFILE_MERGER=$(PROFILE_MERGER)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) @@ -736,6 +752,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \ GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \ + GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \ GNATBIND="$${GNATBIND}" \ LDFLAGS="$${LDFLAGS}" \ HOST_LIBS="$${HOST_LIBS}" \ @@ -771,6 +788,8 @@ EXTRA_TARGET_FLAGS = \ 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \ 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \ + 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ + 'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \ 'LD=$(COMPILER_LD_FOR_TARGET)' \ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ @@ -796,7 +815,8 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) # The BUILD_* variables are a special case, which are used for the gcc # cross-building scheme. EXTRA_GCC_FLAGS = \ - "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \ + "GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" diff --git a/SECURITY.txt b/SECURITY.txt new file mode 100644 index 000000000..a0879e3c3 --- /dev/null +++ b/SECURITY.txt @@ -0,0 +1,6 @@ + +For details on the Binutils security process please see +the SECURITY.txt file in the binutils sub-directory. + +For details on the GDB security process please see +the SECURITY.txt file in the gdb sub-directory. diff --git a/bfd/.gitignore b/bfd/.gitignore index e93eb6584..9eb73b148 100644 --- a/bfd/.gitignore +++ b/bfd/.gitignore @@ -30,7 +30,6 @@ /doc/elfcode.texi /doc/format.texi /doc/hash.texi -/doc/init.texi /doc/libbfd.texi /doc/linker.texi /doc/mmo.texi diff --git a/bfd/ChangeLog b/bfd/ChangeLog index da2a30a94..bf70a1da2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,361 @@ +2023-10-06 Nick Clifton + + PR 30940 + * elf64-alpha.c (elf64_alpha_check_relocs): Correct error message. + +2023-10-05 Nick Clifton + + PR 30904 + * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to + see if the gnuchains array has been successfully created. + +2023-10-02 Nick Clifton + + * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use + bfd_get_current_time when filing in the timestamp. + +2023-09-29 Nick Clifton + + PR 30906 + * elf.c (_bfd_elf_slurp_version_tables): Test that the verref + section header has been initialised before using it. + +2023-09-28 Nick Clifton + + PR 30886 + * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field. + * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end + of the string table. + Initialise the dt_strsz field. + (_bfd_elf_slurp_version_tables): Only free the contents if they + were malloc'ed. + Add checks before setting string pointers in the dt_strtab buffer. + +2023-09-27 Nick Clifton + + PR 30885 + * elfcode.h (elf_slurp_symbol_table): Compute the symcount for non + dynamic symbols in the same way as _bfd_elf_get_symtab_upper_bound. + +2023-09-13 Jacob Navia + + * elf.c (_bfd_elf_init_reloc_shdr): Don't segfault on alloc fail. + +2023-09-13 Alan Modra + + * elf-strtab.c (_bfd_elf_strtab_init): In the event of memory + allocation failure, make sure that the hash table is freed. + +2023-08-30 Tom Tromey + + PR binutils/30703 + * doc/webassembly.texi, doc/bfd.texi: Revert 8bb23cdb, adding + parameters back to @node. + +2023-08-04 Nick Clifton + + PR 15545 + * cache.c (bfd_cache_close_all): Extend description to note that + all files will be closed, even those that are not cacheable. + Add code to prevent a possible infinite loop. + +2023-08-02 Tom Tromey + + * pei-x86_64.c (PEI_HEADERS): Do not define. + * pei-loongarch64.c (PEI_HEADERS): Do not define. + * pei-aarch64.c (PEI_HEADERS): Do not define. + * pe-x86_64.c (PEI_HEADERS): Do not define. + * pe-aarch64.c (PEI_HEADERS): Do not define. + * libpei.h (_LIBPEI_H): Add include guard. + * coff-x86_64.c (PEI_HEADERS): Do not check. + * coff-loongarch64.c (PEI_HEADERS): Do not check. + * coff-aarch64.c (PEI_HEADERS): Do not check. + +2023-07-24 Johannes Schauer Marin Rodrigues + + * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a + timestamp, use the value held in the SOURCE_DATE_EPOCH environment + variable, if it is defined. + +2023-07-24 Jose E. Marchesi + + * reloc.c: New reloc BFD_RELOC_BPF_DISPCALL32. + * elf64-bpf.c (bpf_reloc_type_lookup): Handle the new reloc. + * libbfd.h (bfd_reloc_code_real_names): Regenerate. + +2023-07-09 Fangrui Song + + PR 30592 + * section.c: Define SEC_ELF_LARGE. + * bfd-in2.h: Regenerate. + * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, + elf_x86_64_copy_private_section_data): New. + +2023-07-03 Nick Clifton + + * version.m4: Update version number to 2.41.50. + * configure: Regenerate. + * bfd/po/bfd.pot: Regenerate. + +2023-07-03 Nick Clifton + + 2.41 Branch Point. + +2023-06-19 Nick Clifton + + PR 30560 + * elf64-x86-64.c (elf_x86_64_relocate_section): Add more checks + for a valid relocation offset. + +2023-06-07 Nick Clifton + + PR 30499 + * elflink.c (elf_link_add_object_symbols): Add a message + indicating that alignment and size discrepancies between the + definition of common symbols and normal symbols are serious and + should be investigated. + +2023-05-31 Tristan Gingold + + PR 30444 + * coffcode.h (coff_write_object_contents): Handle base64 encoding + on PE. Also check for too large string table. + * coffgen.c (extract_long_section_name): New function extracted + from ... + (make_a_section_from_file): ... here. Add support for base64 + long section names. + (decode_base64): New function. + +2023-05-17 Luca Bacci + + PR 30421 + * cofflink.c (_decoration_hash_newfunc): New function. + (_bfd_coff_link_hash_table_init): Call it. + * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash + field. + (struct decoration_hash_entry): Declare. + (_decoration_hash_newfunc): Prototype. + * libcoff.h: Regenerate. + +2023-05-16 Oleg Tolmatcev + + * libcoff-in.h (struct coff_tdata): Add section_by_index and + section_by_target_index hash tables. + * libcoff.h: Regenerate. + * coffcode.h (htab_hash_section_index): New function. + (htab_eq_section_index): New function. + (htab_hash_section_target_index): New function. + (htab_eq_section_target_index): New function. + (coff_mkobject_hool): Create the hash tables. + * peicode.h: Add the same new functions. + (pe_mkobject_hook): Create the hash tables. + * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to + speed up lookups. + * coffgen.c (coff_section_from_bfd_index): Likewise. + (_bfd_coff_close_and_cleanup): Delete the hash tables. + +2023-05-10 Luca Bonissi + + PR 30422 + * elf32-or1k.c (or1k_elf_relocate_section): Prescan for + R_OR1K_GOT_AHI16 relocs as they may occur after R_OR1K_GOT16 + relocs. + +2023-05-05 Nick Clifton + + PR 30354 + * elf32-arm.c (elf32_arm_gc_mark_extra_sections): If any debug + sections are marked then rerun the extra marking in order to pick + up any dependencies. + +2023-05-03 Oleg Tolmatcev + + * archive.c (_bfd_write_archive_contents): Use a larger buffer in + order to improve efficiency. + +2023-05-03 Oleg Tolmatcev + + * coffcode.h (coff_read_word_from_buffer): New function. + * coffcode.h (COFF_CHECKSUM_BUFFER_SIZE): New constant. + * coffcode.h (coff_compute_checksum): Improve speed by reducing + the number of seeks and reads used. + +2023-04-24 Nick Clifton + + * po/la.po: New Georgian translation. + +2023-04-17 Nick Clifton + + PR 30142 + * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc + section to be writeable. + +2023-03-30 Nick Clifton + + PR 30285 + * elf.c (_bfd_elf_slurp_version_tables): Fail if no version + definitions are allocated. + +2023-02-27 Felix Willgerodt + + * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for + elf_external_linux_prpsinfo32_ugid32. + +2023-02-23 Fangrui Song + + * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params. + (riscv_elfNN_set_options): New. + (riscv_info_to_howto_rela): Check relax_gp. + (_bfd_riscv_relax_section): Likewise. + * elfxx-riscv.h (struct riscv_elf_params): New. + (riscv_elf32_set_options): New. + (riscv_elf64_set_options): New. + +2023-02-23 Nick Clifton + Alan Modra + + PR 30150 + * dwarf2.c (comp_unit_contains_address): Renamed to ... + (comp_unit_may_contain_address): this, and added code to return + true if the CU's ranges have not yet been computed. + (_bfd_dwarf2_find_nearest_line_with_alt): Use the renamed + function, simplifying code in the process. + +2023-02-21 Nick Clifton + + * opncls.c (bfd_fill_in_gnu_debuglink_section): Update + description. + +2023-02-17 Tom Tromey + + * doc/doc.str (FUNCTION): Call func. + +2023-02-17 Tom Tromey + + * opncls.c: Hoist the SECTION comment. + +2023-02-17 Tom Tromey + + * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists) + (separate_alt_debug_file_exists, find_separate_debug_file) + (get_build_id, get_build_id_name, check_build_id_file): Don't use + chew comments. + +2023-02-17 Tom Tromey + + * doc/doc.str (SYNOPSIS): Use collapse_whitespace. + * doc/chew.c (collapse_whitespace): New function. + (main): Register collapse_whitespace. + +2023-02-07 Tom Tromey + + * bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from + documentation comments. + * doc/doc.str, doc/proto.str (RETURNS): Remove. + +2023-02-07 Tom Tromey + + * syms.c (bfd_decode_symclass, bfd_is_undefined_symclass) + (bfd_symbol_info): Reorder documentation comment. + * doc/doc.str (synopsis_seen): New variable. + (SYNOPSIS): Set synopsis_seen. Emit @deftypefn. + (DESCRIPTION): Use synopsis_seen. + * doc/chew.c (catstrif): New function. + (main): Add catstrif intrinsic. + (compile): Recognize "variable" command. + +2023-02-07 Tom Tromey + + * doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC): + Update. + * doc/chew.c (internalmode): Remove. + (add_intrinsic_variable): New function. + (main): Add internalmode as intrinsic. + (internal_mode): Remove global. + (maybecatstr): Update. + (free_words): Free variables. + +2023-02-07 Tom Tromey + + * doc/chew.c (pcu) : Now intptr_t. + (internal_mode, istack, isp): Likewise. + (bang, atsign): Use intptr_t. + +2023-02-07 Tom Tromey + + * doc/proto.str (SYNOPSIS): Don't use paramstuff. + * doc/chew.c (paramstuff): Remove. + (main): Don't add paramstuff intrinsic. + +2023-02-07 Tom Tromey + + * doc/doc.str, doc/proto.str: Add copyright header. + +2023-02-07 Tom Tromey + + * doc/webassembly.texi (File layout): Remove second argument from + @node. + * doc/bfd.texi: Use single-argument @node everywhere. + +2023-02-07 Tom Tromey + + * Makefile.in: Rebuild. + * doc/local.mk (%D%/chew.stamp): Don't use H_CFLAGS. + +2023-01-24 Nick Clifton + + PR 29998 + * cofflink.c (_bfd_coff_generic_relocate_section): Add an + assertion that the output section is set for defined, global + symbols. + +2023-01-17 Xianmiao Qu + + * elf32-csky.c (elf32_csky_merge_attributes): Don't save + and restore the ARCH attribute, it will actually clear + the ARCH attribute. + (csky_elf_merge_private_bfd_data): Store the machine flag + correctly. + +2023-01-13 Nick Clifton + + * po/ro.po: Updated Romainian translation. + +2023-01-11 Nick Clifton + + PR 29988 + * dwarf2.c (read_indexed_address): Fix check for an out of range + offset. + +2023-01-06 Nick Clifton + + * po/ru.po: Updated Russian translation. + +2023-01-03 Himal + + PR 29947 + * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows' + nul device filename. + +2023-01-03 Nick Clifton + + * po/fr.po: Updated French trabslation. + * po/uk.po: Updated Ukrainian trabslation. + +2022-12-31 Nick Clifton + + * 2.40 branch created. + +2022-12-23 Nick Clifton + + PR 29936 + * dwarf2.c (concat_filename): Fix check for a directory index off + the end of the directory table. + +2022-12-21 Nick Clifton + + * po/ro.po: Updated Romanian translation. + 2022-12-06 Nick Clifton PR 29852 @@ -2538,7 +2896,7 @@ For older changes see ChangeLog-2020 -Copyright (C) 2021-2022 Free Software Foundation, Inc. +Copyright (C) 2021-2023 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/bfd/MAINTAINERS b/bfd/MAINTAINERS index c89cb9adc..e044d9e4b 100644 --- a/bfd/MAINTAINERS +++ b/bfd/MAINTAINERS @@ -1,6 +1,6 @@ See ../binutils/MAINTAINERS -Copyright (C) 2012-2022 Free Software Foundation, Inc. +Copyright (C) 2012-2023 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 6d8722e0c..378c13198 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to generate Makefile.in # -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ BFD_H = bfd.h BFD32_LIBS = \ archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo \ coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo \ - hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \ + hash.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \ section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \ binary.lo ihex.lo srec.lo tekhex.lo verilog.lo @@ -86,7 +86,7 @@ BFD64_LIBS = archive64.lo BFD32_LIBS_CFILES = \ archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c \ compress.c corefile.c elf-properties.c format.c hash.c \ - init.c libbfd.c linker.c merge.c opncls.c reloc.c \ + libbfd.c linker.c merge.c opncls.c reloc.c \ section.c simple.c stab-syms.c stabs.c syms.c targets.c \ binary.c ihex.c srec.c tekhex.c verilog.c @@ -117,10 +117,11 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-hppa.lo \ cpu-i386.lo \ - cpu-iamcu.lo \ cpu-ia64.lo \ + cpu-iamcu.lo \ cpu-ip2k.lo \ cpu-iq2000.lo \ + cpu-kvx.lo \ cpu-lm32.lo \ cpu-loongarch.lo \ cpu-m10200.lo \ @@ -129,10 +130,9 @@ ALL_MACHINES = \ cpu-m32r.lo \ cpu-m68hc11.lo \ cpu-m68hc12.lo \ + cpu-m68k.lo \ cpu-m9s12x.lo \ - cpu-s12z.lo \ cpu-m9s12xg.lo \ - cpu-m68k.lo \ cpu-mcore.lo \ cpu-mep.lo \ cpu-metag.lo \ @@ -151,10 +151,11 @@ ALL_MACHINES = \ cpu-pj.lo \ cpu-powerpc.lo \ cpu-pru.lo \ - cpu-rs6000.lo \ cpu-riscv.lo \ cpu-rl78.lo \ + cpu-rs6000.lo \ cpu-rx.lo \ + cpu-s12z.lo \ cpu-s390.lo \ cpu-score.lo \ cpu-sh.lo \ @@ -200,10 +201,11 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-hppa.c \ cpu-i386.c \ - cpu-iamcu.c \ cpu-ia64.c \ + cpu-iamcu.c \ cpu-ip2k.c \ cpu-iq2000.c \ + cpu-kvx.c \ cpu-lm32.c \ cpu-loongarch.c \ cpu-m10200.c \ @@ -212,10 +214,9 @@ ALL_MACHINES_CFILES = \ cpu-m32r.c \ cpu-m68hc11.c \ cpu-m68hc12.c \ + cpu-m68k.c \ cpu-m9s12x.c \ - cpu-s12z.c \ cpu-m9s12xg.c \ - cpu-m68k.c \ cpu-mcore.c \ cpu-mep.c \ cpu-metag.c \ @@ -227,17 +228,18 @@ ALL_MACHINES_CFILES = \ cpu-mt.c \ cpu-nds32.c \ cpu-nfp.c \ - cpu-ns32k.c \ cpu-nios2.c \ + cpu-ns32k.c \ cpu-or1k.c \ cpu-pdp11.c \ cpu-pj.c \ cpu-powerpc.c \ cpu-pru.c \ - cpu-rs6000.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 \ @@ -286,11 +288,11 @@ BFD32_BACKENDS = \ ecofflink.lo \ elf-attrs.lo \ elf-eh-frame.lo \ - elf-sframe.lo \ elf-ifunc.lo \ elf-m10200.lo \ elf-m10300.lo \ elf-nacl.lo \ + elf-sframe.lo \ elf-strtab.lo \ elf-vxworks.lo \ elf.lo \ @@ -314,7 +316,6 @@ BFD32_BACKENDS = \ elf32-h8300.lo \ elf32-hppa.lo \ elf32-i386.lo \ - elfxx-x86.lo \ elf32-ip2k.lo \ elf32-iq2000.lo \ elf32-lm32.lo \ @@ -324,7 +325,6 @@ BFD32_BACKENDS = \ elf32-m68hc12.lo \ elf32-m68hc1x.lo \ elf32-m68k.lo \ - elf32-s12z.lo \ elf32-mcore.lo \ elf32-mep.lo \ elf32-metag.lo \ @@ -340,6 +340,7 @@ BFD32_BACKENDS = \ elf32-pru.lo \ elf32-rl78.lo \ elf32-rx.lo \ + elf32-s12z.lo \ elf32-s390.lo \ elf32-sh.lo \ elf32-sparc.lo \ @@ -359,13 +360,14 @@ BFD32_BACKENDS = \ elflink.lo \ elfxx-sparc.lo \ elfxx-tilegx.lo \ + elfxx-x86.lo \ i386aout.lo \ i386bsd.lo \ i386lynx.lo \ i386msdos.lo \ - mach-o.lo \ - mach-o-i386.lo \ mach-o-arm.lo \ + mach-o-i386.lo \ + mach-o.lo \ ns32knetbsd.lo \ pc532-mach.lo \ pdb.lo \ @@ -421,11 +423,11 @@ BFD32_BACKENDS_CFILES = \ ecofflink.c \ elf-attrs.c \ elf-eh-frame.c \ - elf-sframe.c \ elf-ifunc.c \ elf-m10200.c \ elf-m10300.c \ elf-nacl.c \ + elf-sframe.c \ elf-strtab.c \ elf-vxworks.c \ elf.c \ @@ -449,7 +451,6 @@ BFD32_BACKENDS_CFILES = \ elf32-h8300.c \ elf32-hppa.c \ elf32-i386.c \ - elfxx-x86.c \ elf32-ip2k.c \ elf32-iq2000.c \ elf32-lm32.c \ @@ -459,7 +460,6 @@ BFD32_BACKENDS_CFILES = \ elf32-m68hc12.c \ elf32-m68hc1x.c \ elf32-m68k.c \ - elf32-s12z.c \ elf32-mcore.c \ elf32-mep.c \ elf32-metag.c \ @@ -475,6 +475,7 @@ BFD32_BACKENDS_CFILES = \ elf32-pru.c \ elf32-rl78.c \ elf32-rx.c \ + elf32-s12z.c \ elf32-s390.c \ elf32-sh.c \ elf32-sparc.c \ @@ -494,13 +495,14 @@ BFD32_BACKENDS_CFILES = \ elflink.c \ elfxx-sparc.c \ elfxx-tilegx.c \ + elfxx-x86.c \ i386aout.c \ i386bsd.c \ i386lynx.c \ i386msdos.c \ - mach-o.c \ - mach-o-i386.c \ mach-o-arm.c \ + mach-o-i386.c \ + mach-o.c \ ns32knetbsd.c \ pc532-mach.c \ pdb.c \ @@ -537,52 +539,55 @@ BFD32_BACKENDS_CFILES = \ # elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in # BFD32_BACKENDS. BFD64_BACKENDS = \ - elf32-aarch64.lo \ - elf64-aarch64.lo \ - elfxx-aarch64.lo \ aix5ppc-core.lo \ aout64.lo \ coff-alpha.lo \ coff-x86_64.lo \ coff64-rs6000.lo \ + elf32-aarch64.lo \ elf32-ia64.lo \ + elf32-kvx.lo \ + elf32-loongarch.lo \ elf32-mips.lo \ + elf32-riscv.lo \ elf32-score.lo \ elf32-score7.lo \ + elf64-aarch64.lo \ elf64-alpha.lo \ elf64-amdgcn.lo \ + elf64-bpf.lo \ elf64-gen.lo \ elf64-hppa.lo \ - elf64-ia64.lo \ elf64-ia64-vms.lo \ - elfxx-ia64.lo \ - elf32-loongarch.lo \ + elf64-ia64.lo \ + elf64-kvx.lo \ elf64-loongarch.lo \ - elfxx-loongarch.lo \ - elfn32-mips.lo \ elf64-mips.lo \ - elfxx-mips.lo \ elf64-mmix.lo \ elf64-nfp.lo \ elf64-ppc.lo \ - elf32-riscv.lo \ elf64-riscv.lo \ - elfxx-riscv.lo \ elf64-s390.lo \ elf64-sparc.lo \ elf64-tilegx.lo \ elf64-x86-64.lo \ - elfxx-x86.lo \ - elf64-bpf.lo \ elf64.lo \ + elfn32-mips.lo \ + elfxx-aarch64.lo \ + elfxx-ia64.lo \ + elfxx-kvx.lo \ + elfxx-loongarch.lo \ + elfxx-mips.lo \ + elfxx-riscv.lo \ + elfxx-x86.lo \ mach-o-aarch64.lo \ mach-o-x86-64.lo \ mmo.lo \ + pe-aarch64.lo \ pe-aarch64igen.lo \ pe-loongarch64igen.lo \ pe-x86_64.lo \ pei-aarch64.lo \ - pe-aarch64.lo \ pei-ia64.lo \ pei-loongarch64.lo \ pei-x86_64.lo \ @@ -601,6 +606,7 @@ BFD64_BACKENDS_CFILES = \ elf32-score7.c \ elf64-alpha.c \ elf64-amdgcn.c \ + elf64-bpf.c \ elf64-gen.c \ elf64-hppa.c \ elf64-ia64-vms.c \ @@ -612,15 +618,15 @@ BFD64_BACKENDS_CFILES = \ elf64-sparc.c \ elf64-tilegx.c \ elf64-x86-64.c \ - elfxx-x86.c \ - elf64-bpf.c \ elf64.c \ elfn32-mips.c \ elfxx-aarch64.c \ elfxx-ia64.c \ + elfxx-kvx.c \ elfxx-loongarch.c \ elfxx-mips.c \ elfxx-riscv.c \ + elfxx-x86.c \ mach-o-aarch64.c \ mach-o-x86-64.c \ mmo.c \ @@ -633,7 +639,6 @@ BFD64_BACKENDS_CFILES = \ vms-alpha.c OPTIONAL_BACKENDS = \ - aix386-core.lo \ cisco-core.lo \ hpux-core.lo \ irix-core.lo \ @@ -641,11 +646,9 @@ OPTIONAL_BACKENDS = \ netbsd-core.lo \ osf-core.lo \ rs6000-core.lo \ - sco5-core.lo \ trad-core.lo OPTIONAL_BACKENDS_CFILES = \ - aix386-core.c \ cisco-core.c \ hpux-core.c \ irix-core.c \ @@ -653,7 +656,6 @@ OPTIONAL_BACKENDS_CFILES = \ netbsd-core.c \ osf-core.c \ rs6000-core.c \ - sco5-core.c \ trad-core.c # Reconfigure if config.bfd or configure.host changes. @@ -685,6 +687,7 @@ SOURCE_CFILES = \ BUILD_CFILES = \ elf32-aarch64.c elf64-aarch64.c \ + elf32-kvx.c elf64-kvx.c \ elf32-ia64.c elf64-ia64.c \ elf32-loongarch.c elf64-loongarch.c \ elf32-riscv.c elf64-riscv.c \ @@ -725,7 +728,7 @@ BUILD_HFILES = \ bfdver.h elf32-target.h elf64-target.h targmatch.h # Ensure they are built early: -BUILT_SOURCES = $(BUILD_HFILES) $(BUILD_CFILES) +BUILT_SOURCES = $(BUILD_HFILES) @MAINT@ $(BUILD_CFILES) HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) @@ -743,12 +746,12 @@ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) po/SRC-POTFILES.in: @MAINT@ Makefile for file in $(SRC_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.src \ + | LC_ALL=C sort | uniq > tmp.src \ && mv tmp.src $(srcdir)/po/SRC-POTFILES.in po/BLD-POTFILES.in: @MAINT@ Makefile for file in $(BLD_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.bld \ + | LC_ALL=C sort | uniq > tmp.bld \ && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in all diststuff: info @@ -785,25 +788,6 @@ libbfd_la_DEPENDENCIES = $(OFILES) ofiles ../libsframe/libsframe.la libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ -# libtool will build .libs/libbfd.a. We create libbfd.a in the build -# directory so that we don't have to convert all the programs that use -# libbfd.a simultaneously. This is a hack which should be removed if -# everything else starts using libtool. FIXME. - -noinst_LIBRARIES = libbfd.a -libbfd_a_SOURCES = - -stamp-lib: libbfd.la - libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \ - if [ -f $$libtooldir/libbfd.a ]; then \ - cp $$libtooldir/libbfd.a libbfd.tmp; \ - $(RANLIB) libbfd.tmp; \ - $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ - else true; fi - touch stamp-lib - -libbfd.a: stamp-lib ; @true - # This file holds an array associating configuration triplets and # vector names. It is built from config.bfd. It is not compiled by # itself, but is included by targets.c. @@ -858,55 +842,63 @@ elf64-target.h : elfxx-target.h $(AM_V_GEN)$(SED) -e s/NN/64/g < $< > $@ elf32-aarch64.c : elfnn-aarch64.c - $(AM_V_at)echo "#line 1 \"elfnn-aarch64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-aarch64.c : elfnn-aarch64.c - $(AM_V_at)echo "#line 1 \"elfnn-aarch64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-ia64.c : elfnn-ia64.c - $(AM_V_at)echo "#line 1 \"elfnn-ia64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-ia64.c : elfnn-ia64.c - $(AM_V_at)echo "#line 1 \"elfnn-ia64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ + $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ + +elf32-kvx.c : elfnn-kvx.c + $(AM_V_at)echo "#line 1 \"$<\"" > $@ + $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ + +elf64-kvx.c : elfnn-kvx.c + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-loongarch.c : elfnn-loongarch.c - $(AM_V_at)echo "#line 1 \"elfnn-loongarch.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-loongarch.c : elfnn-loongarch.c - $(AM_V_at)echo "#line 1 \"elfnn-loongarch.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-riscv.c : elfnn-riscv.c - $(AM_V_at)echo "#line 1 \"elfnn-riscv.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-riscv.c : elfnn-riscv.c - $(AM_V_at)echo "#line 1 \"elfnn-riscv.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ peigen.c : peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pe/g < $< >> $@ pepigen.c : peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pep/g < $< >> $@ pex64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pex64/g < $< >> $@ pe-aarch64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/peAArch64/g < $< >> $@ pe-loongarch64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/peLoongArch64/g < $< >> $@ host-aout.lo: Makefile @@ -927,13 +919,14 @@ stmp-bfd-h: bfd-in3.h rm -f bfd-tmp.h touch stmp-bfd-h -BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \ - bfdio.c bfdwin.c section.c archures.c reloc.c \ - syms.c bfd.c archive.c corefile.c targets.c format.c \ - linker.c simple.c compress.c +BFD_H_FILES = bfd-in.h libbfd.c hash.c section.c syms.c \ + archive.c archures.c bfd.c bfdio.c bfdwin.c \ + cache.c compress.c corefile.c format.c linker.c opncls.c \ + reloc.c simple.c stab-syms.c stabs.c targets.c BFD64_H_FILES = archive64.c -LIBBFD_H_FILES = libbfd-in.h libbfd.c bfd.c bfdio.c bfdwin.c \ - cache.c reloc.c section.c targets.c archures.c linker.c +LIBBFD_H_FILES = libbfd-in.h libbfd.c bfd.c bfdio.c \ + archive.c archures.c bfdwin.c cache.c hash.c linker.c opncls.c \ + reloc.c section.c stabs.c targets.c LIBCOFF_H_FILES = libcoff-in.h coffcode.h headers: stmp-bin2-h stmp-lbfd-h stmp-lcoff-h @@ -980,7 +973,7 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC) MOSTLYCLEANFILES += ofiles stamp-ofiles -CLEANFILES += bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ +CLEANFILES += bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 \ stmp-bin2-h stmp-lbfd-h stmp-lcoff-h DISTCLEANFILES += $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 5cd2f3752..8d09f6fa4 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,7 +33,6 @@ # - VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -143,16 +142,6 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = bfd-in3.h po/Makefile.in CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -libbfd_a_AR = $(AR) $(ARFLAGS) -libbfd_a_LIBADD = -am_libbfd_a_OBJECTS = -libbfd_a_OBJECTS = $(am_libbfd_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -186,10 +175,9 @@ LTLIBRARIES = $(bfdlib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo \ - format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo \ - opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo \ - syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo \ - verilog.lo + format.lo hash.lo libbfd.lo linker.lo merge.lo opncls.lo \ + reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo \ + targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo am_libbfd_la_OBJECTS = $(am__objects_1) libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -235,8 +223,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) \ - $(EXTRA_libbfd_la_SOURCES) +SOURCES = $(libbfd_la_SOURCES) $(EXTRA_libbfd_la_SOURCES) AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; @@ -502,8 +489,8 @@ zlibinc = @zlibinc@ AUTOMAKE_OPTIONS = no-dist foreign info-in-builddir no-texinfo.tex ACLOCAL_AMFLAGS = -I . -I .. -I ../config MOSTLYCLEANFILES = ofiles stamp-ofiles $(MKDOC) doc/*.o doc/*.stamp -CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a \ - stamp-lib stmp-bin2-h stmp-lbfd-h stmp-lcoff-h +CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 stmp-bin2-h \ + stmp-lbfd-h stmp-lcoff-h DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion \ doc/bfd.?? doc/bfd.??? texput.log MAINTAINERCLEANFILES = $(DOCFILES) doc/bfd.info @@ -546,7 +533,7 @@ BFD_H = bfd.h BFD32_LIBS = \ archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo \ coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo \ - hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \ + hash.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo \ section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo \ binary.lo ihex.lo srec.lo tekhex.lo verilog.lo @@ -554,7 +541,7 @@ BFD64_LIBS = archive64.lo BFD32_LIBS_CFILES = \ archive.c archures.c bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c \ compress.c corefile.c elf-properties.c format.c hash.c \ - init.c libbfd.c linker.c merge.c opncls.c reloc.c \ + libbfd.c linker.c merge.c opncls.c reloc.c \ section.c simple.c stab-syms.c stabs.c syms.c targets.c \ binary.c ihex.c srec.c tekhex.c verilog.c @@ -585,10 +572,11 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-hppa.lo \ cpu-i386.lo \ - cpu-iamcu.lo \ cpu-ia64.lo \ + cpu-iamcu.lo \ cpu-ip2k.lo \ cpu-iq2000.lo \ + cpu-kvx.lo \ cpu-lm32.lo \ cpu-loongarch.lo \ cpu-m10200.lo \ @@ -597,10 +585,9 @@ ALL_MACHINES = \ cpu-m32r.lo \ cpu-m68hc11.lo \ cpu-m68hc12.lo \ + cpu-m68k.lo \ cpu-m9s12x.lo \ - cpu-s12z.lo \ cpu-m9s12xg.lo \ - cpu-m68k.lo \ cpu-mcore.lo \ cpu-mep.lo \ cpu-metag.lo \ @@ -619,10 +606,11 @@ ALL_MACHINES = \ cpu-pj.lo \ cpu-powerpc.lo \ cpu-pru.lo \ - cpu-rs6000.lo \ cpu-riscv.lo \ cpu-rl78.lo \ + cpu-rs6000.lo \ cpu-rx.lo \ + cpu-s12z.lo \ cpu-s390.lo \ cpu-score.lo \ cpu-sh.lo \ @@ -668,10 +656,11 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-hppa.c \ cpu-i386.c \ - cpu-iamcu.c \ cpu-ia64.c \ + cpu-iamcu.c \ cpu-ip2k.c \ cpu-iq2000.c \ + cpu-kvx.c \ cpu-lm32.c \ cpu-loongarch.c \ cpu-m10200.c \ @@ -680,10 +669,9 @@ ALL_MACHINES_CFILES = \ cpu-m32r.c \ cpu-m68hc11.c \ cpu-m68hc12.c \ + cpu-m68k.c \ cpu-m9s12x.c \ - cpu-s12z.c \ cpu-m9s12xg.c \ - cpu-m68k.c \ cpu-mcore.c \ cpu-mep.c \ cpu-metag.c \ @@ -695,17 +683,18 @@ ALL_MACHINES_CFILES = \ cpu-mt.c \ cpu-nds32.c \ cpu-nfp.c \ - cpu-ns32k.c \ cpu-nios2.c \ + cpu-ns32k.c \ cpu-or1k.c \ cpu-pdp11.c \ cpu-pj.c \ cpu-powerpc.c \ cpu-pru.c \ - cpu-rs6000.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 \ @@ -755,11 +744,11 @@ BFD32_BACKENDS = \ ecofflink.lo \ elf-attrs.lo \ elf-eh-frame.lo \ - elf-sframe.lo \ elf-ifunc.lo \ elf-m10200.lo \ elf-m10300.lo \ elf-nacl.lo \ + elf-sframe.lo \ elf-strtab.lo \ elf-vxworks.lo \ elf.lo \ @@ -783,7 +772,6 @@ BFD32_BACKENDS = \ elf32-h8300.lo \ elf32-hppa.lo \ elf32-i386.lo \ - elfxx-x86.lo \ elf32-ip2k.lo \ elf32-iq2000.lo \ elf32-lm32.lo \ @@ -793,7 +781,6 @@ BFD32_BACKENDS = \ elf32-m68hc12.lo \ elf32-m68hc1x.lo \ elf32-m68k.lo \ - elf32-s12z.lo \ elf32-mcore.lo \ elf32-mep.lo \ elf32-metag.lo \ @@ -809,6 +796,7 @@ BFD32_BACKENDS = \ elf32-pru.lo \ elf32-rl78.lo \ elf32-rx.lo \ + elf32-s12z.lo \ elf32-s390.lo \ elf32-sh.lo \ elf32-sparc.lo \ @@ -828,13 +816,14 @@ BFD32_BACKENDS = \ elflink.lo \ elfxx-sparc.lo \ elfxx-tilegx.lo \ + elfxx-x86.lo \ i386aout.lo \ i386bsd.lo \ i386lynx.lo \ i386msdos.lo \ - mach-o.lo \ - mach-o-i386.lo \ mach-o-arm.lo \ + mach-o-i386.lo \ + mach-o.lo \ ns32knetbsd.lo \ pc532-mach.lo \ pdb.lo \ @@ -890,11 +879,11 @@ BFD32_BACKENDS_CFILES = \ ecofflink.c \ elf-attrs.c \ elf-eh-frame.c \ - elf-sframe.c \ elf-ifunc.c \ elf-m10200.c \ elf-m10300.c \ elf-nacl.c \ + elf-sframe.c \ elf-strtab.c \ elf-vxworks.c \ elf.c \ @@ -918,7 +907,6 @@ BFD32_BACKENDS_CFILES = \ elf32-h8300.c \ elf32-hppa.c \ elf32-i386.c \ - elfxx-x86.c \ elf32-ip2k.c \ elf32-iq2000.c \ elf32-lm32.c \ @@ -928,7 +916,6 @@ BFD32_BACKENDS_CFILES = \ elf32-m68hc12.c \ elf32-m68hc1x.c \ elf32-m68k.c \ - elf32-s12z.c \ elf32-mcore.c \ elf32-mep.c \ elf32-metag.c \ @@ -944,6 +931,7 @@ BFD32_BACKENDS_CFILES = \ elf32-pru.c \ elf32-rl78.c \ elf32-rx.c \ + elf32-s12z.c \ elf32-s390.c \ elf32-sh.c \ elf32-sparc.c \ @@ -963,13 +951,14 @@ BFD32_BACKENDS_CFILES = \ elflink.c \ elfxx-sparc.c \ elfxx-tilegx.c \ + elfxx-x86.c \ i386aout.c \ i386bsd.c \ i386lynx.c \ i386msdos.c \ - mach-o.c \ - mach-o-i386.c \ mach-o-arm.c \ + mach-o-i386.c \ + mach-o.c \ ns32knetbsd.c \ pc532-mach.c \ pdb.c \ @@ -1007,52 +996,55 @@ BFD32_BACKENDS_CFILES = \ # elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in # BFD32_BACKENDS. BFD64_BACKENDS = \ - elf32-aarch64.lo \ - elf64-aarch64.lo \ - elfxx-aarch64.lo \ aix5ppc-core.lo \ aout64.lo \ coff-alpha.lo \ coff-x86_64.lo \ coff64-rs6000.lo \ + elf32-aarch64.lo \ elf32-ia64.lo \ + elf32-kvx.lo \ + elf32-loongarch.lo \ elf32-mips.lo \ + elf32-riscv.lo \ elf32-score.lo \ elf32-score7.lo \ + elf64-aarch64.lo \ elf64-alpha.lo \ elf64-amdgcn.lo \ + elf64-bpf.lo \ elf64-gen.lo \ elf64-hppa.lo \ - elf64-ia64.lo \ elf64-ia64-vms.lo \ - elfxx-ia64.lo \ - elf32-loongarch.lo \ + elf64-ia64.lo \ + elf64-kvx.lo \ elf64-loongarch.lo \ - elfxx-loongarch.lo \ - elfn32-mips.lo \ elf64-mips.lo \ - elfxx-mips.lo \ elf64-mmix.lo \ elf64-nfp.lo \ elf64-ppc.lo \ - elf32-riscv.lo \ elf64-riscv.lo \ - elfxx-riscv.lo \ elf64-s390.lo \ elf64-sparc.lo \ elf64-tilegx.lo \ elf64-x86-64.lo \ - elfxx-x86.lo \ - elf64-bpf.lo \ elf64.lo \ + elfn32-mips.lo \ + elfxx-aarch64.lo \ + elfxx-ia64.lo \ + elfxx-kvx.lo \ + elfxx-loongarch.lo \ + elfxx-mips.lo \ + elfxx-riscv.lo \ + elfxx-x86.lo \ mach-o-aarch64.lo \ mach-o-x86-64.lo \ mmo.lo \ + pe-aarch64.lo \ pe-aarch64igen.lo \ pe-loongarch64igen.lo \ pe-x86_64.lo \ pei-aarch64.lo \ - pe-aarch64.lo \ pei-ia64.lo \ pei-loongarch64.lo \ pei-x86_64.lo \ @@ -1071,6 +1063,7 @@ BFD64_BACKENDS_CFILES = \ elf32-score7.c \ elf64-alpha.c \ elf64-amdgcn.c \ + elf64-bpf.c \ elf64-gen.c \ elf64-hppa.c \ elf64-ia64-vms.c \ @@ -1082,15 +1075,15 @@ BFD64_BACKENDS_CFILES = \ elf64-sparc.c \ elf64-tilegx.c \ elf64-x86-64.c \ - elfxx-x86.c \ - elf64-bpf.c \ elf64.c \ elfn32-mips.c \ elfxx-aarch64.c \ elfxx-ia64.c \ + elfxx-kvx.c \ elfxx-loongarch.c \ elfxx-mips.c \ elfxx-riscv.c \ + elfxx-x86.c \ mach-o-aarch64.c \ mach-o-x86-64.c \ mmo.c \ @@ -1103,7 +1096,6 @@ BFD64_BACKENDS_CFILES = \ vms-alpha.c OPTIONAL_BACKENDS = \ - aix386-core.lo \ cisco-core.lo \ hpux-core.lo \ irix-core.lo \ @@ -1111,11 +1103,9 @@ OPTIONAL_BACKENDS = \ netbsd-core.lo \ osf-core.lo \ rs6000-core.lo \ - sco5-core.lo \ trad-core.lo OPTIONAL_BACKENDS_CFILES = \ - aix386-core.c \ cisco-core.c \ hpux-core.c \ irix-core.c \ @@ -1123,7 +1113,6 @@ OPTIONAL_BACKENDS_CFILES = \ netbsd-core.c \ osf-core.c \ rs6000-core.c \ - sco5-core.c \ trad-core.c @@ -1154,6 +1143,7 @@ SOURCE_CFILES = \ BUILD_CFILES = \ elf32-aarch64.c elf64-aarch64.c \ + elf32-kvx.c elf64-kvx.c \ elf32-ia64.c elf64-ia64.c \ elf32-loongarch.c elf64-loongarch.c \ elf32-riscv.c elf64-riscv.c \ @@ -1191,7 +1181,7 @@ BUILD_HFILES = \ # Ensure they are built early: -BUILT_SOURCES = $(BUILD_HFILES) $(BUILD_CFILES) +BUILT_SOURCES = $(BUILD_HFILES) @MAINT@ $(BUILD_CFILES) HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/diagnostics.h LOCAL_H_DEPS = libbfd.h sysdep.h config.h @@ -1213,21 +1203,15 @@ libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) EXTRA_libbfd_la_SOURCES = $(CFILES) libbfd_la_DEPENDENCIES = $(OFILES) ofiles ../libsframe/libsframe.la libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) $(ZSTD_LIBS) ../libsframe/libsframe.la - -# libtool will build .libs/libbfd.a. We create libbfd.a in the build -# directory so that we don't have to convert all the programs that use -# libbfd.a simultaneously. This is a hack which should be removed if -# everything else starts using libtool. FIXME. -noinst_LIBRARIES = libbfd.a -libbfd_a_SOURCES = -BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \ - bfdio.c bfdwin.c section.c archures.c reloc.c \ - syms.c bfd.c archive.c corefile.c targets.c format.c \ - linker.c simple.c compress.c +BFD_H_FILES = bfd-in.h libbfd.c hash.c section.c syms.c \ + archive.c archures.c bfd.c bfdio.c bfdwin.c \ + cache.c compress.c corefile.c format.c linker.c opncls.c \ + reloc.c simple.c stab-syms.c stabs.c targets.c BFD64_H_FILES = archive64.c -LIBBFD_H_FILES = libbfd-in.h libbfd.c bfd.c bfdio.c bfdwin.c \ - cache.c reloc.c section.c targets.c archures.c linker.c +LIBBFD_H_FILES = libbfd-in.h libbfd.c bfd.c bfdio.c \ + archive.c archures.c bfdwin.c cache.c hash.c linker.c opncls.c \ + reloc.c section.c stabs.c targets.c LIBCOFF_H_FILES = libcoff-in.h coffcode.h @@ -1267,7 +1251,6 @@ DOCFILES = \ doc/elf.texi \ doc/format.texi \ doc/hash.texi \ - doc/init.texi \ doc/libbfd.texi \ doc/linker.texi \ doc/mmo.texi \ @@ -1300,13 +1283,12 @@ SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ $(srcdir)/opncls.c $(srcdir)/reloc.c \ $(srcdir)/section.c $(srcdir)/syms.c \ - $(srcdir)/targets.c $(srcdir)/init.c + $(srcdir)/targets.c SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ $(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \ - $(srcdir)/cpu-i960.c $(srcdir)/archures.c \ - $(srcdir)/init.c + $(srcdir)/archures.c TEXIDIR = $(srcdir)/../texinfo/fsf info_TEXINFOS = doc/bfd.texi @@ -1393,9 +1375,6 @@ bfd-in3.h: $(top_builddir)/config.status $(srcdir)/bfd-in2.h po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in cd $(top_builddir) && $(SHELL) ./config.status $@ -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) - install-bfdlibLTLIBRARIES: $(bfdlib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \ @@ -1451,7 +1430,6 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aix386-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aix5ppc-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-cris.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-ns32k.Plo@am__quote@ @@ -1512,6 +1490,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-iamcu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ip2k.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-iq2000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-kvx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-lm32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-loongarch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m10200.Plo@am__quote@ @@ -1606,6 +1585,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ia64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ip2k.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-iq2000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-kvx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-lm32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-loongarch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m32c.Plo@am__quote@ @@ -1658,6 +1638,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-hppa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ia64-vms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-kvx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-loongarch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mmix.Plo@am__quote@ @@ -1673,6 +1654,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfn32-mips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-aarch64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-kvx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-loongarch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-mips.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-riscv.Plo@am__quote@ @@ -1687,7 +1669,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386lynx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386msdos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ihex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/irix-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linker.Plo@am__quote@ @@ -1733,7 +1714,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs6000-core.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco5-core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/som.Plo@am__quote@ @@ -2053,8 +2033,7 @@ distclean-tags: check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) \ - config.h +all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bfdlibdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(bfdincludedir)"; do \ @@ -2100,8 +2079,7 @@ maintainer-clean-generic: clean: clean-recursive clean-am: clean-aminfo clean-bfdlibLTLIBRARIES clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - mostlyclean-am + clean-libtool clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -2273,24 +2251,23 @@ uninstall-am: uninstall-bfdincludeHEADERS uninstall-bfdlibLTLIBRARIES \ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-aminfo \ clean-bfdlibLTLIBRARIES clean-cscope clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - cscope cscopelist-am ctags ctags-am dist-info distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags dvi dvi-am html html-am \ - html-local info info-am install install-am \ - install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-bfdincludeHEADERS uninstall-bfdlibLTLIBRARIES \ - uninstall-dvi-am uninstall-html-am uninstall-info-am \ - uninstall-pdf-am uninstall-ps-am + clean-libtool clean-noinstLTLIBRARIES cscope cscopelist-am \ + ctags ctags-am dist-info distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags dvi dvi-am html html-am html-local info info-am \ + install install-am install-bfdincludeHEADERS \ + install-bfdlibLTLIBRARIES install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-bfdincludeHEADERS \ + uninstall-bfdlibLTLIBRARIES uninstall-dvi-am uninstall-html-am \ + uninstall-info-am uninstall-pdf-am uninstall-ps-am .PRECIOUS: Makefile @@ -2303,12 +2280,12 @@ $(BFD32_LIBS) \ po/SRC-POTFILES.in: @MAINT@ Makefile for file in $(SRC_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.src \ + | LC_ALL=C sort | uniq > tmp.src \ && mv tmp.src $(srcdir)/po/SRC-POTFILES.in po/BLD-POTFILES.in: @MAINT@ Makefile for file in $(BLD_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.bld \ + | LC_ALL=C sort | uniq > tmp.bld \ && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in all diststuff: info @@ -2328,17 +2305,6 @@ stamp-ofiles: Makefile ofiles: stamp-ofiles ; @true -stamp-lib: libbfd.la - libtooldir=`$(LIBTOOL) --config | $(SED) -n -e 's/^objdir=//p'`; \ - if [ -f $$libtooldir/libbfd.a ]; then \ - cp $$libtooldir/libbfd.a libbfd.tmp; \ - $(RANLIB) libbfd.tmp; \ - $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ - else true; fi - touch stamp-lib - -libbfd.a: stamp-lib ; @true - # This file holds an array associating configuration triplets and # vector names. It is built from config.bfd. It is not compiled by # itself, but is included by targets.c. @@ -2378,55 +2344,63 @@ elf64-target.h : elfxx-target.h $(AM_V_GEN)$(SED) -e s/NN/64/g < $< > $@ elf32-aarch64.c : elfnn-aarch64.c - $(AM_V_at)echo "#line 1 \"elfnn-aarch64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-aarch64.c : elfnn-aarch64.c - $(AM_V_at)echo "#line 1 \"elfnn-aarch64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-ia64.c : elfnn-ia64.c - $(AM_V_at)echo "#line 1 \"elfnn-ia64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-ia64.c : elfnn-ia64.c - $(AM_V_at)echo "#line 1 \"elfnn-ia64.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ + $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ + +elf32-kvx.c : elfnn-kvx.c + $(AM_V_at)echo "#line 1 \"$<\"" > $@ + $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ + +elf64-kvx.c : elfnn-kvx.c + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-loongarch.c : elfnn-loongarch.c - $(AM_V_at)echo "#line 1 \"elfnn-loongarch.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-loongarch.c : elfnn-loongarch.c - $(AM_V_at)echo "#line 1 \"elfnn-loongarch.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ elf32-riscv.c : elfnn-riscv.c - $(AM_V_at)echo "#line 1 \"elfnn-riscv.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/32/g < $< >> $@ elf64-riscv.c : elfnn-riscv.c - $(AM_V_at)echo "#line 1 \"elfnn-riscv.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/NN/64/g < $< >> $@ peigen.c : peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pe/g < $< >> $@ pepigen.c : peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pep/g < $< >> $@ pex64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/pex64/g < $< >> $@ pe-aarch64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/peAArch64/g < $< >> $@ pe-loongarch64igen.c: peXXigen.c - $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@ + $(AM_V_at)echo "#line 1 \"$<\"" > $@ $(AM_V_GEN)$(SED) -e s/XX/peLoongArch64/g < $< >> $@ host-aout.lo: Makefile @@ -2506,7 +2480,7 @@ coff-tic54x.lo: coff-tic54x.c $(MKDOC): doc/chew.stamp ; @true doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp) $(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ - $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \ + $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ -I. -I$(srcdir) -Idoc -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ $(srcdir)/doc/chew.c && \ $(SHELL) $(srcdir)/../move-if-change \ @@ -2515,10 +2489,10 @@ doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp) .PRECIOUS: doc/%.stamp doc/%.texi: doc/%.stamp ; @true -doc/%.stamp: $(srcdir)/%.h $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) - $(AM_V_GEN)$(REGEN_TEXI) doc/%.stamp: $(srcdir)/%.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) $(AM_V_GEN)$(REGEN_TEXI) +doc/%.stamp: $(srcdir)/%.h $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) + $(AM_V_GEN)$(REGEN_TEXI) # Avoid the %.stamp generating a builddir/bfd.texi that overrides the # srcdir/ as well as regenerating doc/bfd.info for each make run. diff --git a/bfd/PORTING b/bfd/PORTING index 06d05d855..af3436c46 100644 --- a/bfd/PORTING +++ b/bfd/PORTING @@ -82,7 +82,7 @@ TARGETNAME The name of the target, for run-time lookups. Usually "a.out-" -Copyright (C) 2012-2022 Free Software Foundation, Inc. +Copyright (C) 2012-2023 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/bfd/README b/bfd/README index 09e25b4ab..c42a26a7e 100644 --- a/bfd/README +++ b/bfd/README @@ -48,7 +48,7 @@ gcc manual. Bug reports without patches will be remembered, but they may never get fixed until somebody volunteers to fix them. -Copyright (C) 2012-2022 Free Software Foundation, Inc. +Copyright (C) 2012-2023 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/bfd/TODO b/bfd/TODO index b6e34bac8..36024bfb4 100644 --- a/bfd/TODO +++ b/bfd/TODO @@ -20,7 +20,7 @@ Things that still need to be done: -*- Text -*- o - upgrade the reloc handling as per Steve's suggestion. -Copyright (C) 2012-2022 Free Software Foundation, Inc. +Copyright (C) 2012-2023 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4 index 61a31ef4d..74f200337 100644 --- a/bfd/acinclude.m4 +++ b/bfd/acinclude.m4 @@ -1,5 +1,5 @@ dnl -dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2023 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c deleted file mode 100644 index 977a6bd1f..000000000 --- a/bfd/aix386-core.c +++ /dev/null @@ -1,282 +0,0 @@ -/* BFD back-end for AIX on PS/2 core files. - This was based on trad-core.c, which was written by John Gilmore of - Cygnus Support. - Copyright (C) 1988-2022 Free Software Foundation, Inc. - Written by Minh Tran-Le . - Converted to back end form by Ian Lance Taylor . - - This file is part of BFD, the Binary File Descriptor library. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - -#include "sysdep.h" -#include "bfd.h" -#include "libbfd.h" -#include "coff/i386.h" -#include "coff/internal.h" -#include "libcoff.h" - -#include - -#if defined (_AIX) && defined (_I386) -#define NOCHECKS /* This is for coredump.h. */ -#define _h_USER /* Avoid including user.h from coredump.h. */ -#include -#include -#endif /* _AIX && _I386 */ - -/* Maybe this could work on some other i386 but I have not tried it - * mtranle@paris - Tue Sep 24 12:49:35 1991 - */ - -#ifndef COR_MAGIC -# define COR_MAGIC "core" -#endif - -/* Need this cast because ptr is really void *. */ -#define core_hdr(bfd) \ - (((bfd->tdata.trad_core_data))->hdr) -#define core_section(bfd,n) \ - (((bfd)->tdata.trad_core_data)->sections[n]) -#define core_regsec(bfd) \ - (((bfd)->tdata.trad_core_data)->reg_section) -#define core_reg2sec(bfd) \ - (((bfd)->tdata.trad_core_data)->reg2_section) - -/* These are stored in the bfd's tdata. */ -struct trad_core_struct -{ - struct corehdr *hdr; /* core file header */ - asection *reg_section; - asection *reg2_section; - asection *sections[MAX_CORE_SEGS]; -}; - -static bfd_cleanup -aix386_core_file_p (bfd *abfd) -{ - int i, n; - unsigned char longbuf[4]; /* Raw bytes of various header fields */ - bfd_size_type core_size = sizeof (struct corehdr); - size_t amt; - struct corehdr *core; - struct mergem - { - struct trad_core_struct coredata; - struct corehdr internal_core; - } *mergem; - flagword flags; - - amt = sizeof (longbuf); - if (bfd_bread (longbuf, amt, abfd) != amt) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return 0; - } - - if (strncmp (longbuf, COR_MAGIC, 4)) - return 0; - - if (bfd_seek (abfd, (file_ptr) 0, 0) != 0) - return 0; - - amt = sizeof (struct mergem); - mergem = (struct mergem *) bfd_zalloc (abfd, amt); - if (mergem == NULL) - return 0; - - core = &mergem->internal_core; - - if ((bfd_bread (core, core_size, abfd)) != core_size) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - loser: - bfd_release (abfd, (char *) mergem); - abfd->tdata.any = NULL; - bfd_section_list_clear (abfd); - return 0; - } - - set_tdata (abfd, &mergem->coredata); - core_hdr (abfd) = core; - - /* Create the sections. */ - flags = SEC_HAS_CONTENTS; - core_regsec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg", - flags); - if (core_regsec (abfd) == NULL) - goto loser; - - core_regsec (abfd)->size = sizeof (core->cd_regs); - core_regsec (abfd)->vma = (bfd_vma) -1; - - /* We'll access the regs afresh in the core file, like any section. */ - core_regsec (abfd)->filepos = - (file_ptr) offsetof (struct corehdr, cd_regs[0]); - - flags = SEC_HAS_CONTENTS; - core_reg2sec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg2", - flags); - if (core_reg2sec (abfd) == NULL) - /* bfd_release frees everything allocated after it's arg. */ - goto loser; - - core_reg2sec (abfd)->size = sizeof (core->cd_fpregs); - core_reg2sec (abfd)->vma = (bfd_vma) -1; - core_reg2sec (abfd)->filepos = - (file_ptr) offsetof (struct corehdr, cd_fpregs); - - for (i = 0, n = 0; (i < MAX_CORE_SEGS) && (core->cd_segs[i].cs_type); i++) - { - const char *sname; - flagword flags; - - if (core->cd_segs[i].cs_offset == 0) - continue; - - switch (core->cd_segs[i].cs_type) - { - case COR_TYPE_DATA: - sname = ".data"; - flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; - break; - case COR_TYPE_STACK: - sname = ".stack"; - flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; - break; - case COR_TYPE_LIBDATA: - sname = ".libdata"; - flags = SEC_ALLOC + SEC_HAS_CONTENTS; - break; - case COR_TYPE_WRITE: - sname = ".writeable"; - flags = SEC_ALLOC + SEC_HAS_CONTENTS; - break; - case COR_TYPE_MSC: - sname = ".misc"; - flags = SEC_ALLOC + SEC_HAS_CONTENTS; - break; - default: - sname = ".unknown"; - flags = SEC_ALLOC + SEC_HAS_CONTENTS; - break; - } - core_section (abfd, n) = bfd_make_section_anyway_with_flags (abfd, - sname, - flags); - if (core_section (abfd, n) == NULL) - goto loser; - - core_section (abfd, n)->size = core->cd_segs[i].cs_len; - core_section (abfd, n)->vma = core->cd_segs[i].cs_address; - core_section (abfd, n)->filepos = core->cd_segs[i].cs_offset; - core_section (abfd, n)->alignment_power = 2; - n++; - } - - return _bfd_no_cleanup; -} - -static char * -aix386_core_file_failing_command (bfd *abfd) -{ - return core_hdr (abfd)->cd_comm; -} - -static int -aix386_core_file_failing_signal (bfd *abfd) -{ - return core_hdr (abfd)->cd_cursig; -} - -#define aix386_core_file_matches_executable_p generic_core_file_matches_executable_p - -#define aix386_core_file_pid _bfd_nocore_core_file_pid - -/* If somebody calls any byte-swapping routines, shoot them. */ - -static void -swap_abort (void) -{ - /* This way doesn't require any declaration for ANSI to fuck up. */ - abort (); -} - -#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) -#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) -#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) -#define NO_GET64 ((uint64_t (*) (const void *)) swap_abort) -#define NO_PUT64 ((void (*) (uint64_t, void *)) swap_abort) -#define NO_GETS64 ((int64_t (*) (const void *)) swap_abort) - -const bfd_target core_aix386_vec = -{ - "aix386-core", - bfd_target_unknown_flavour, - BFD_ENDIAN_BIG, /* target byte order */ - BFD_ENDIAN_BIG, /* target headers byte order */ - (HAS_RELOC | EXEC_P | /* object flags */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ - 0, /* leading underscore */ - ' ', /* ar_pad_char */ - 16, /* ar_max_namelen */ - 0, /* match priority. */ - TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols. */ - NO_GET64, NO_GETS64, NO_PUT64, - NO_GET, NO_GETS, NO_PUT, - NO_GET, NO_GETS, NO_PUT, /* data */ - NO_GET64, NO_GETS64, NO_PUT64, - NO_GET, NO_GETS, NO_PUT, - NO_GET, NO_GETS, NO_PUT, /* hdrs */ - - { /* bfd_check_format */ - _bfd_dummy_target, - _bfd_dummy_target, - _bfd_dummy_target, - aix386_core_file_p - }, - { /* bfd_create_object */ - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error - }, - { /* bfd_write_contents */ - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error, - _bfd_bool_bfd_false_error - }, - - BFD_JUMP_TABLE_GENERIC (_bfd_generic), - BFD_JUMP_TABLE_COPY (_bfd_generic), - BFD_JUMP_TABLE_CORE (aix386), - BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), - BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), - BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), - BFD_JUMP_TABLE_WRITE (_bfd_generic), - BFD_JUMP_TABLE_LINK (_bfd_nolink), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - NULL, - - NULL -}; diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c index b10b89389..a441b3b42 100644 --- a/bfd/aix5ppc-core.c +++ b/bfd/aix5ppc-core.c @@ -1,5 +1,5 @@ /* IBM RS/6000 "XCOFF" back-end for BFD. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Written by Tom Rix Contributed by Red Hat Inc. @@ -67,7 +67,7 @@ xcoff64_core_p (bfd *abfd) goto xcoff64_core_p_error; if (sizeof (struct core_dumpxx) - != bfd_bread (&core, sizeof (struct core_dumpxx), abfd)) + != bfd_read (&core, sizeof (struct core_dumpxx), abfd)) goto xcoff64_core_p_error; if (bfd_stat (abfd, &statbuf) < 0) @@ -142,6 +142,27 @@ xcoff64_core_p (bfd *abfd) sec->filepos = 0; sec->contents = (bfd_byte *)&new_core_hdr->c_flt.r64; + if (core.c_extctx) + { + /* vmx section. */ + flags = SEC_HAS_CONTENTS; + sec = bfd_make_section_anyway_with_flags (abfd, ".aix-vmx", flags); + if (sec == NULL) + return NULL; + sec->size = 560; + sec->vma = 0; + sec->filepos = core.c_extctx; + + /* vmx section. */ + flags = SEC_HAS_CONTENTS; + sec = bfd_make_section_anyway_with_flags (abfd, ".aix-vsx", flags); + if (sec == NULL) + return NULL; + sec->size = 256; + sec->vma = 0; + sec->filepos = core.c_extctx + 584; + } + /* .ldinfo section. To actually find out how long this section is in this particular core dump would require going down the whole list of struct @@ -178,7 +199,7 @@ xcoff64_core_p (bfd *abfd) return NULL; if (sizeof (struct __ld_info64) != - bfd_bread (&ldinfo, sizeof (struct __ld_info64), abfd)) + bfd_read (&ldinfo, sizeof (struct __ld_info64), abfd)) return NULL; if (ldinfo.ldinfo_core) @@ -206,7 +227,7 @@ xcoff64_core_p (bfd *abfd) for (i = 0; i < core.c_vmregions; i++) if (sizeof (struct vm_infox) != - bfd_bread (&vminfo, sizeof (struct vm_infox), abfd)) + bfd_read (&vminfo, sizeof (struct vm_infox), abfd)) return NULL; if (vminfo.vminfo_offset) @@ -252,7 +273,7 @@ xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) return return_value; if (sizeof (struct core_dumpxx) != - bfd_bread (&core, sizeof (struct core_dumpxx), core_bfd)) + bfd_read (&core, sizeof (struct core_dumpxx), core_bfd)) return return_value; if (bfd_seek (core_bfd, core.c_loader, SEEK_SET) != 0) @@ -267,7 +288,7 @@ xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) while (1) { - if (bfd_bread (s, 1, core_bfd) != 1) + if (bfd_read (s, 1, core_bfd) != 1) goto xcoff64_core_file_matches_executable_p_end_1; if (*s == '\0') diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c index 0f97bd5f7..556c1c4de 100644 --- a/bfd/aout-cris.c +++ b/bfd/aout-cris.c @@ -1,5 +1,5 @@ /* BFD backend for CRIS a.out binaries. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Axis Communications AB. Written by Hans-Peter Nilsson. diff --git a/bfd/aout-ns32k.c b/bfd/aout-ns32k.c index f4c447dcc..a6865674b 100644 --- a/bfd/aout-ns32k.c +++ b/bfd/aout-ns32k.c @@ -1,5 +1,5 @@ /* BFD back-end for ns32k a.out-ish binaries. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Contributed by Ian Dall (idall@eleceng.adelaide.edu.au). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/aout-target.h b/bfd/aout-target.h index 1b8c2f13f..f427ffcb5 100644 --- a/bfd/aout-target.h +++ b/bfd/aout-target.h @@ -1,5 +1,5 @@ /* Define a target vector and some small routines for a variant of a.out. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -136,7 +136,7 @@ MY (object_p) (bfd *abfd) bfd_cleanup cleanup; size_t amt = EXEC_BYTES_SIZE; - if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt) + if (bfd_read (&exec_bytes, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -598,18 +598,7 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) #endif #ifndef MY_close_and_cleanup - -/* Handle closing of a BFD including the resource-releasing parts. */ - -static bool -MY_close_and_cleanup (bfd *abfd) -{ - if (!MY_bfd_free_cached_info (abfd)) - return false; - - return _bfd_generic_close_and_cleanup (abfd); -} - +#define MY_close_and_cleanup _bfd_generic_close_and_cleanup #endif #ifndef MY_get_dynamic_symtab_upper_bound diff --git a/bfd/aout32.c b/bfd/aout32.c index 2ebb3c78b..baf1c6ed8 100644 --- a/bfd/aout32.c +++ b/bfd/aout32.c @@ -1,5 +1,5 @@ /* BFD back-end for 32-bit a.out files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/aout64.c b/bfd/aout64.c index 346fd9205..bae6d0768 100644 --- a/bfd/aout64.c +++ b/bfd/aout64.c @@ -1,5 +1,5 @@ /* BFD back-end for 64-bit a.out files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 38e304315..0c0e3977b 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -1,5 +1,5 @@ /* BFD semi-generic back-end for a.out binaries. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -1272,7 +1272,7 @@ NAME (aout, set_section_contents) (bfd *abfd, if (count != 0) { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 - || bfd_bwrite (location, count, abfd) != count) + || bfd_write (location, count, abfd) != count) return false; } @@ -1324,7 +1324,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) + || bfd_read (string_chars, amt, abfd) != amt) return false; stringsize = GET_WORD (abfd, string_chars); if (stringsize == 0) @@ -1354,7 +1354,7 @@ aout_get_external_symbols (bfd *abfd) if (stringsize >= BYTES_IN_WORD) { amt = stringsize - BYTES_IN_WORD; - if (bfd_bread (strings + BYTES_IN_WORD, amt, abfd) != amt) + if (bfd_read (strings + BYTES_IN_WORD, amt, abfd) != amt) { free (strings); return false; @@ -1850,7 +1850,7 @@ 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) + if (bfd_write (buffer, amt, abfd) != amt) return false; return _bfd_stringtab_emit (abfd, tab); @@ -1896,7 +1896,7 @@ NAME (aout, write_syms) (bfd *abfd) goto error_return; amt = EXTERNAL_NLIST_SIZE; - if (bfd_bwrite ((void *) &nsp, amt, abfd) != amt) + if (bfd_write (&nsp, amt, abfd) != amt) goto error_return; /* NB: `KEEPIT' currently overlays `udata.p', so set this only @@ -2431,7 +2431,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) } } - if (bfd_bwrite ((void *) native, natsize, abfd) != natsize) + if (bfd_write (native, natsize, abfd) != natsize) { bfd_release (abfd, native); return false; @@ -2896,34 +2896,33 @@ NAME (aout, sizeof_headers) (bfd *abfd, return adata (abfd).exec_bytes_size; } -/* Free all information we have cached for this BFD. We can always - read it again later if we need it. */ +/* Throw away most malloc'd and alloc'd information for this BFD. */ 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; - + if ((bfd_get_format (abfd) == bfd_object + || bfd_get_format (abfd) == bfd_core) + && abfd->tdata.aout_data != NULL) + { #define BFCI_FREE(x) do { free (x); x = NULL; } while (0) - BFCI_FREE (obj_aout_symbols (abfd)); + BFCI_FREE (adata (abfd).line_buf); + BFCI_FREE (obj_aout_symbols (abfd)); #ifdef USE_MMAP - obj_aout_external_syms (abfd) = 0; - bfd_free_window (&obj_aout_sym_window (abfd)); - bfd_free_window (&obj_aout_string_window (abfd)); - obj_aout_external_strings (abfd) = 0; + obj_aout_external_syms (abfd) = 0; + bfd_free_window (&obj_aout_sym_window (abfd)); + bfd_free_window (&obj_aout_string_window (abfd)); + obj_aout_external_strings (abfd) = 0; #else - BFCI_FREE (obj_aout_external_syms (abfd)); - BFCI_FREE (obj_aout_external_strings (abfd)); + BFCI_FREE (obj_aout_external_syms (abfd)); + BFCI_FREE (obj_aout_external_strings (abfd)); #endif - for (o = abfd->sections; o != NULL; o = o->next) - BFCI_FREE (o->relocation); + for (asection *o = abfd->sections; o != NULL; o = o->next) + BFCI_FREE (o->relocation); #undef BFCI_FREE + } - return true; + return _bfd_generic_bfd_free_cached_info (abfd); } /* a.out link code. */ @@ -3730,7 +3729,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) amt = EXTERNAL_NLIST_SIZE; if (bfd_seek (output_bfd, flaginfo->symoff, SEEK_SET) != 0 - || bfd_bwrite ((void *) &outsym, amt, output_bfd) != amt) + || bfd_write (&outsym, amt, output_bfd) != amt) /* FIXME: No way to handle errors. */ abort (); @@ -3943,7 +3942,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) + || bfd_write (rel_ptr, amt, flaginfo->output_bfd) != amt) return false; *reloff_ptr += obj_reloc_entry_size (flaginfo->output_bfd); @@ -4767,7 +4766,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, if (rel_size > 0) { if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 - || bfd_bread (relocs, rel_size, input_bfd) != rel_size) + || bfd_read (relocs, rel_size, input_bfd) != rel_size) return false; } } @@ -4802,7 +4801,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, { if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0) return false; - if (bfd_bwrite (relocs, rel_size, flaginfo->output_bfd) != rel_size) + if (bfd_write (relocs, rel_size, flaginfo->output_bfd) != rel_size) return false; *reloff_ptr += rel_size; @@ -5294,7 +5293,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) return false; outsym_size = outsym - flaginfo->output_syms; outsym_size *= EXTERNAL_NLIST_SIZE; - if (bfd_bwrite ((void *) flaginfo->output_syms, outsym_size, output_bfd) + if (bfd_write (flaginfo->output_syms, outsym_size, output_bfd) != outsym_size) return false; flaginfo->symoff += outsym_size; @@ -5664,7 +5663,7 @@ NAME (aout, final_link) (bfd *abfd, bfd_byte b[BYTES_IN_WORD]; memset (b, 0, BYTES_IN_WORD); - if (bfd_bwrite (b, (bfd_size_type) BYTES_IN_WORD, abfd) != BYTES_IN_WORD) + if (bfd_write (b, BYTES_IN_WORD, abfd) != BYTES_IN_WORD) goto error_return; } diff --git a/bfd/arc-got.h b/bfd/arc-got.h index 0d9b9a18f..dfa3f5b4f 100644 --- a/bfd/arc-got.h +++ b/bfd/arc-got.h @@ -1,5 +1,5 @@ /* ARC-specific support for 32-bit ELF - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by Cupertino Miranda (cmiranda@synopsys.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/arc-plt.def b/bfd/arc-plt.def index b2f825b06..2b602c476 100644 --- a/bfd/arc-plt.def +++ b/bfd/arc-plt.def @@ -1,5 +1,5 @@ /* Arc V2 Related PLT entries. - Copyright (C) 2016-2022 Free Software Foundation, Inc. + Copyright (C) 2016-2023 Free Software Foundation, Inc. Contributed by Cupertino Miranda (cmiranda@synopsys.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/arc-plt.h b/bfd/arc-plt.h index 8dc31fb5b..e11b72eea 100644 --- a/bfd/arc-plt.h +++ b/bfd/arc-plt.h @@ -1,5 +1,5 @@ /* ARC-specific header file for PLT support. - Copyright (C) 2016-2022 Free Software Foundation, Inc. + Copyright (C) 2016-2023 Free Software Foundation, Inc. Contributed by Cupertino Miranda (cmiranda@synopsys.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/archive.c b/bfd/archive.c index 19d167112..4869056ac 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -1,5 +1,5 @@ /* BFD back-end for archive files (libraries). - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. This file is part of BFD, the Binary File Descriptor library. @@ -146,6 +146,37 @@ SUBSECTION extern int errno; #endif +/* +EXTERNAL +.{* A canonical archive symbol. *} +.{* This is a type pun with struct symdef/struct ranlib on purpose! *} +.typedef struct carsym +.{ +. const char *name; +. file_ptr file_offset; {* Look here to find the file. *} +.} +.carsym; +. +.{* A count of carsyms (canonical archive symbols). *} +. typedef unsigned long symindex; +.#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) +. + +INTERNAL +.{* Used in generating armaps (archive tables of contents). *} +.struct orl {* Output ranlib. *} +.{ +. char **name; {* Symbol name. *} +. union +. { +. file_ptr pos; +. bfd *abfd; +. } u; {* bfd* or file position. *} +. int namidx; {* Index into string table. *} +.}; +. +*/ + /* We keep a cache of archive filepointers to archive elements to speed up searching the archive by filepos. We only add an entry to the cache when we actually read one. We also don't sort the cache; @@ -215,18 +246,7 @@ _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; - - /* Already cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache = NULL; - bfd_ardata (abfd)->archive_head = NULL; - bfd_ardata (abfd)->symdefs = NULL; - bfd_ardata (abfd)->extended_names = NULL; - bfd_ardata (abfd)->extended_names_size = 0; - bfd_ardata (abfd)->tdata = NULL; */ - - return true; + return bfd_ardata (abfd) != NULL; } /* @@ -497,7 +517,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) char fmag_save; int scan; - if (bfd_bread (hdrp, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr)) + if (bfd_read (hdrp, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr)) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_no_more_archived_files); @@ -557,7 +577,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) filename = (allocptr + sizeof (struct areltdata) + sizeof (struct ar_hdr)); - if (bfd_bread (filename, namelen, abfd) != namelen) + if (bfd_read (filename, namelen, abfd) != namelen) { free (allocptr); if (bfd_get_error () != bfd_error_system_call) @@ -878,7 +898,7 @@ bfd_generic_archive_p (bfd *abfd) char armag[SARMAG + 1]; size_t amt; - if (bfd_bread (armag, SARMAG, abfd) != SARMAG) + if (bfd_read (armag, SARMAG, abfd) != SARMAG) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -905,13 +925,6 @@ bfd_generic_archive_p (bfd *abfd) } bfd_ardata (abfd)->first_file_filepos = SARMAG; - /* Cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache = NULL; - bfd_ardata (abfd)->archive_head = NULL; - bfd_ardata (abfd)->symdefs = NULL; - bfd_ardata (abfd)->extended_names = NULL; - bfd_ardata (abfd)->extended_names_size = 0; - bfd_ardata (abfd)->tdata = NULL; */ if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)) || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd))) @@ -1085,7 +1098,7 @@ do_slurp_coff_armap (bfd *abfd) parsed_size = mapdata->parsed_size; free (mapdata); - if (bfd_bread (int_buf, 4, abfd) != 4) + if (bfd_read (int_buf, 4, abfd) != 4) return false; /* It seems that all numeric information in a coff archive is always @@ -1132,7 +1145,7 @@ do_slurp_coff_armap (bfd *abfd) carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; - if (bfd_bread (stringbase, stringsize, abfd) != stringsize) + if (bfd_read (stringbase, stringsize, abfd) != stringsize) goto release_symdefs; /* OK, build the carsyms. */ @@ -1186,14 +1199,14 @@ bool bfd_slurp_armap (bfd *abfd) { char nextname[17]; - int i = bfd_bread (nextname, 16, abfd); + int i = bfd_read (nextname, 16, abfd); if (i == 0) return true; if (i != 16) return false; - if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) + if (bfd_seek (abfd, -16, SEEK_CUR) != 0) return false; if (startswith (nextname, "__.SYMDEF ") @@ -1219,10 +1232,10 @@ bfd_slurp_armap (bfd *abfd) struct ar_hdr hdr; char extname[21]; - if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr)) + if (bfd_read (&hdr, sizeof (hdr), abfd) != sizeof (hdr)) return false; /* Read the extended name. We know its length. */ - if (bfd_bread (extname, 20, abfd) != 20) + if (bfd_read (extname, 20, abfd) != 20) return false; if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0) return false; @@ -1258,13 +1271,13 @@ _bfd_slurp_extended_name_table (bfd *abfd) if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0) return false; - if (bfd_bread (nextname, 16, abfd) == 16) + if (bfd_read (nextname, 16, abfd) == 16) { struct areltdata *namedata; bfd_size_type amt; ufile_ptr filesize; - if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) + if (bfd_seek (abfd, -16, SEEK_CUR) != 0) return false; if (! startswith (nextname, "ARFILENAMES/ ") @@ -1298,7 +1311,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) return false; } - if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt) + if (bfd_read (bfd_ardata (abfd)->extended_names, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_malformed_archive); @@ -1791,7 +1804,7 @@ _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)) + if (bfd_write (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) return false; return true; } @@ -1816,10 +1829,10 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) arch_eltdata (abfd)->parsed_size + padded_len)) return false; - if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) + if (bfd_write (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) return false; - if (bfd_bwrite (fullname, len, archive) != len) + if (bfd_write (fullname, len, archive) != len) return false; if (len & 3) @@ -1827,13 +1840,13 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) static const char pad[3] = { 0, 0, 0 }; len = 4 - (len & 3); - if (bfd_bwrite (pad, len, archive) != len) + if (bfd_write (pad, len, archive) != len) return false; } } else { - if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) + if (bfd_write (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) return false; } return true; @@ -1880,7 +1893,7 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member) { /* Assume we just "made" the member, and fake it. */ struct bfd_in_memory *bim = (struct bfd_in_memory *) member->iostream; - time (&status.st_mtime); + status.st_mtime = bfd_get_current_time (0); status.st_uid = getuid (); status.st_gid = getgid (); status.st_mode = 0644; @@ -1891,6 +1904,15 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member) bfd_set_error (bfd_error_system_call); return NULL; } + else + { + /* The call to stat() above has filled in the st_mtime field + with the real time that the object was modified. But if + we are trying to generate deterministic archives based upon + the SOURCE_DATE_EPOCH environment variable then we want to + override that. */ + status.st_mtime = bfd_get_current_time (status.st_mtime); + } /* If the caller requested that the BFD generate deterministic output, fake values for modification time, UID, GID, and file mode. */ @@ -2129,6 +2151,7 @@ _bfd_write_archive_contents (bfd *arch) bfd_size_type wrote; int tries; char *armag; + char *buffer = NULL; /* Verify the viability of all entries; if any of them live in the filesystem (as opposed to living in an archive open for input) @@ -2172,12 +2195,12 @@ _bfd_write_archive_contents (bfd *arch) (arch, &etable, &elength, &ename))) return false; - if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0) + if (bfd_seek (arch, 0, SEEK_SET) != 0) return false; armag = ARMAG; if (bfd_is_thin_archive (arch)) armag = ARMAGT; - wrote = bfd_bwrite (armag, SARMAG, arch); + wrote = bfd_write (armag, SARMAG, arch); if (wrote != SARMAG) return false; @@ -2198,53 +2221,62 @@ _bfd_write_archive_contents (bfd *arch) (elength + 1) & ~(bfd_size_type) 1)) return false; memcpy (hdr.ar_fmag, ARFMAG, 2); - if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) + if ((bfd_write (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) - || bfd_bwrite (etable, elength, arch) != elength) + || bfd_write (etable, elength, arch) != elength) return false; if ((elength % 2) == 1) { - if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) + if (bfd_write (&ARFMAG[1], 1, arch) != 1) return false; } } +#define AR_WRITE_BUFFERSIZE (8 * 1024 * 1024) + + /* FIXME: Find a way to test link_info.reduce_memory_overheads + and change the buffer size. */ + buffer = bfd_malloc (AR_WRITE_BUFFERSIZE); + if (buffer == NULL) + goto input_err; + for (current = arch->archive_head; current != NULL; current = current->archive_next) { - char buffer[DEFAULT_BUFFERSIZE]; bfd_size_type remaining = arelt_size (current); /* Write ar header. */ if (!_bfd_write_ar_hdr (arch, current)) - return false; + goto input_err; if (bfd_is_thin_archive (arch)) continue; - if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) + if (bfd_seek (current, 0, SEEK_SET) != 0) goto input_err; while (remaining) { - size_t amt = DEFAULT_BUFFERSIZE; + size_t amt = AR_WRITE_BUFFERSIZE; if (amt > remaining) amt = remaining; errno = 0; - if (bfd_bread (buffer, amt, current) != amt) + if (bfd_read (buffer, amt, current) != amt) + goto input_err; + if (bfd_write (buffer, amt, arch) != amt) goto input_err; - if (bfd_bwrite (buffer, amt, arch) != amt) - return false; remaining -= amt; } if ((arelt_size (current) % 2) == 1) { - if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) - return false; + if (bfd_write (&ARFMAG[1], 1, arch) != 1) + goto input_err; } } + free (buffer); + if (makemap && hasobjects) { /* Verify the timestamp in the archive file. If it would not be @@ -2268,6 +2300,7 @@ _bfd_write_archive_contents (bfd *arch) input_err: bfd_set_input_error (current, bfd_get_error ()); + free (buffer); return false; } @@ -2505,8 +2538,13 @@ _bfd_bsd_write_armap (bfd *arch, struct stat statbuf; if (stat (bfd_get_filename (arch), &statbuf) == 0) - bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime - + ARMAP_TIME_OFFSET); + { + /* If asked, replace the time with a deterministic value. */ + statbuf.st_mtime = bfd_get_current_time (statbuf.st_mtime); + + bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime + + ARMAP_TIME_OFFSET); + } uid = getuid(); gid = getgid(); } @@ -2522,11 +2560,11 @@ _bfd_bsd_write_armap (bfd *arch, if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) return false; memcpy (hdr.ar_fmag, ARFMAG, 2); - if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) + if (bfd_write (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) return false; H_PUT_32 (arch, ranlibsize, temp); - if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) + if (bfd_write (temp, sizeof (temp), arch) != sizeof (temp)) return false; firstreal = first; @@ -2564,20 +2602,20 @@ _bfd_bsd_write_armap (bfd *arch, last_elt = current; H_PUT_32 (arch, map[count].namidx, buf); H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE); - if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch) + if (bfd_write (buf, BSD_SYMDEF_SIZE, arch) != BSD_SYMDEF_SIZE) return false; } /* Now write the strings themselves. */ H_PUT_32 (arch, stringsize, temp); - if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) + if (bfd_write (temp, sizeof (temp), arch) != sizeof (temp)) 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) + if (bfd_write (*map[count].name, len, arch) != len) return false; } @@ -2585,7 +2623,7 @@ _bfd_bsd_write_armap (bfd *arch, bug-compatible for sun's ar we use a null. */ if (padit) { - if (bfd_bwrite ("", 1, arch) != 1) + if (bfd_write ("", 1, arch) != 1) return false; } @@ -2593,7 +2631,8 @@ _bfd_bsd_write_armap (bfd *arch, } /* At the end of archive file handling, update the timestamp in the - file, so the linker will accept it. + file, so older linkers will accept it. (This does not apply to + ld.bfd or ld.gold). Return TRUE if the timestamp was OK, or an unusual problem happened. Return FALSE if we updated the timestamp. */ @@ -2618,10 +2657,17 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) /* Can't read mod time for some reason. */ return true; } + if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp) /* OK by the linker's rules. */ return true; + if (getenv ("SOURCE_DATE_EPOCH") != NULL + && bfd_ardata (arch)->armap_timestamp == bfd_get_current_time (0) + ARMAP_TIME_OFFSET) + /* If the archive's timestamp has been set to SOURCE_DATE_EPOCH + then leave it as-is. */ + return true; + /* Update the timestamp. */ bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET; @@ -2634,7 +2680,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) bfd_ardata (arch)->armap_datepos = (SARMAG + offsetof (struct ar_hdr, ar_date[0])); if (bfd_seek (arch, bfd_ardata (arch)->armap_datepos, SEEK_SET) != 0 - || (bfd_bwrite (hdr.ar_date, sizeof (hdr.ar_date), arch) + || (bfd_write (hdr.ar_date, sizeof (hdr.ar_date), arch) != sizeof (hdr.ar_date))) { bfd_perror (_("Writing updated armap timestamp")); @@ -2734,7 +2780,7 @@ _bfd_coff_write_armap (bfd *arch, memcpy (hdr.ar_fmag, ARFMAG, 2); /* Write the ar header for this item and the number of symbols. */ - if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) + if (bfd_write (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) return false; @@ -2785,7 +2831,7 @@ _bfd_coff_write_armap (bfd *arch, { size_t len = strlen (*map[count].name) + 1; - if (bfd_bwrite (*map[count].name, len, arch) != len) + if (bfd_write (*map[count].name, len, arch) != len) return false; } @@ -2793,7 +2839,7 @@ _bfd_coff_write_armap (bfd *arch, bug-compatible for arc960 we use a null. */ if (padit) { - if (bfd_bwrite ("", 1, arch) != 1) + if (bfd_write ("", 1, arch) != 1) return false; } diff --git a/bfd/archive64.c b/bfd/archive64.c index a84be953d..b80f3e8c4 100644 --- a/bfd/archive64.c +++ b/bfd/archive64.c @@ -1,5 +1,5 @@ /* Support for 64-bit archives. - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Ian Lance Taylor, Cygnus Support Linker support added by Mark Mitchell, CodeSourcery, LLC. @@ -52,13 +52,13 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) ardata->symdefs = NULL; /* Get the name of the first element. */ - i = bfd_bread (nextname, 16, abfd); + i = bfd_read (nextname, 16, abfd); if (i == 0) return true; if (i != 16) return false; - if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0) + if (bfd_seek (abfd, -16, SEEK_CUR) != 0) return false; /* Archives with traditional armaps are still permitted. */ @@ -84,7 +84,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) return false; } - if (bfd_bread (int_buf, 8, abfd) != 8) + if (bfd_read (int_buf, 8, abfd) != 8) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_malformed_archive); @@ -118,7 +118,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) raw_armap = (bfd_byte *) _bfd_alloc_and_read (abfd, ptrsize, ptrsize); if (raw_armap == NULL - || bfd_bread (stringbase, stringsize, abfd) != stringsize) + || bfd_read (stringbase, stringsize, abfd) != stringsize) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_malformed_archive); @@ -186,8 +186,16 @@ _bfd_archive_64_bit_write_armap (bfd *arch, memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) return false; - _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", - time (NULL)); + + time_t date; + + if (arch->flags & BFD_DETERMINISTIC_OUTPUT) + date = 0; + else + date = bfd_get_current_time (0); + + _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", (long) date); + /* This, at least, is what Intel coff sets the values to.: */ _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); @@ -196,12 +204,12 @@ _bfd_archive_64_bit_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) + if (bfd_write (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) return false; bfd_putb64 ((bfd_vma) symbol_count, buf); - if (bfd_bwrite (buf, 8, arch) != 8) + if (bfd_write (buf, 8, arch) != 8) return false; /* Two passes, first write the file offsets for each symbol - @@ -222,7 +230,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch, count++) { bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf); - if (bfd_bwrite (buf, 8, arch) != 8) + if (bfd_write (buf, 8, arch) != 8) return false; } @@ -239,7 +247,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) + if (bfd_write (*map[count].name, len, arch) != len) return false; } @@ -247,7 +255,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch, However, the Irix 6.2 tools do not appear to do this. */ while (padding != 0) { - if (bfd_bwrite ("", 1, arch) != 1) + if (bfd_write ("", 1, arch) != 1) return false; --padding; } diff --git a/bfd/archures.c b/bfd/archures.c index e817bb0a4..b59979e60 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -1,5 +1,5 @@ /* BFD library support routines for architectures. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -173,6 +173,7 @@ DESCRIPTION .#define bfd_mach_mips16000 16000 .#define bfd_mach_mips16 16 .#define bfd_mach_mips5 5 +.#define bfd_mach_mips_allegrex 10111431 {* octal 'AL', 31. *} .#define bfd_mach_mips_loongson_2e 3001 .#define bfd_mach_mips_loongson_2f 3002 .#define bfd_mach_mips_gs464 3003 @@ -514,6 +515,17 @@ DESCRIPTION . bfd_arch_lm32, {* Lattice Mico32. *} .#define bfd_mach_lm32 1 . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} +. bfd_arch_kvx, {* Kalray VLIW core of the MPPA processor family *} +.#define bfd_mach_kv3_unknown 0 +.#define bfd_mach_kv3_1 1 +.#define bfd_mach_kv3_1_64 2 +.#define bfd_mach_kv3_1_usr 3 +.#define bfd_mach_kv3_2 4 +.#define bfd_mach_kv3_2_64 5 +.#define bfd_mach_kv3_2_usr 6 +.#define bfd_mach_kv4_1 7 +.#define bfd_mach_kv4_1_64 8 +.#define bfd_mach_kv4_1_usr 9 . bfd_arch_tilepro, {* Tilera TILEPro. *} . bfd_arch_tilegx, {* Tilera TILE-Gx. *} .#define bfd_mach_tilepro 1 @@ -641,6 +653,7 @@ extern const bfd_arch_info_type bfd_iamcu_arch; extern const bfd_arch_info_type bfd_ia64_arch; extern const bfd_arch_info_type bfd_ip2k_arch; extern const bfd_arch_info_type bfd_iq2000_arch; +extern const bfd_arch_info_type bfd_kvx_arch; extern const bfd_arch_info_type bfd_lm32_arch; extern const bfd_arch_info_type bfd_loongarch_arch; extern const bfd_arch_info_type bfd_m32c_arch; @@ -729,6 +742,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_ia64_arch, &bfd_ip2k_arch, &bfd_iq2000_arch, + &bfd_kvx_arch, &bfd_lm32_arch, &bfd_loongarch_arch, &bfd_m32c_arch, @@ -947,6 +961,7 @@ DESCRIPTION architecture of the file. .extern const bfd_arch_info_type bfd_default_arch_struct; +. */ const bfd_arch_info_type bfd_default_arch_struct = diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index dac88acd6..14760396d 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,6 +1,6 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -75,9 +75,6 @@ extern "C" { #define BFD64 #endif -/* Forward declaration. */ -typedef struct bfd bfd; - /* Boolean type used in bfd. General rule: Functions which are bfd_boolean return TRUE on success and FALSE on failure (unless they're a predicate). */ @@ -115,10 +112,10 @@ typedef uint64_t symvalue; #else /* not BFD64 */ -typedef unsigned long bfd_vma; -typedef long bfd_signed_vma; -typedef unsigned long symvalue; -typedef unsigned long bfd_size_type; +typedef uint32_t bfd_vma; +typedef int32_t bfd_signed_vma; +typedef uint32_t bfd_size_type; +typedef uint32_t symvalue; #endif /* not BFD64 */ @@ -130,69 +127,16 @@ typedef unsigned long bfd_size_type; typedef @bfd_file_ptr@ file_ptr; typedef @bfd_ufile_ptr@ ufile_ptr; -extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); -extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); - -#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) - -typedef unsigned int flagword; /* 32 bits of flags */ -typedef unsigned char bfd_byte; - -/* File formats. */ - -typedef enum bfd_format -{ - bfd_unknown = 0, /* File format is unknown. */ - bfd_object, /* Linker/assembler/compiler output. */ - bfd_archive, /* Object archive file. */ - bfd_core, /* Core dump. */ - bfd_type_end /* Marks the end; don't use it! */ -} -bfd_format; - -/* Symbols and relocation. */ +typedef uint32_t flagword; /* 32 bits of flags */ +typedef uint8_t bfd_byte; -/* A count of carsyms (canonical archive symbols). */ -typedef unsigned long symindex; - -#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) - -/* A canonical archive symbol. */ -/* This is a type pun with struct ranlib on purpose! */ -typedef struct carsym -{ - const char *name; - file_ptr file_offset; /* Look here to find the file. */ -} -carsym; /* To make these you call a carsymogen. */ - -/* Used in generating armaps (archive tables of contents). - Perhaps just a forward definition would do? */ -struct orl /* Output ranlib. */ -{ - char **name; /* Symbol name. */ - union - { - file_ptr pos; - bfd *abfd; - } u; /* bfd* or file position. */ - int namidx; /* Index into string table. */ -}; - -/* Linenumber stuff. */ -typedef struct lineno_cache_entry -{ - unsigned int line_number; /* Linenumber from start of function. */ - union - { - struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ - } u; -} -alent; - -/* Object and core file sections. */ +/* Forward declarations. */ +typedef struct bfd bfd; +struct bfd_link_info; +struct bfd_link_hash_entry; typedef struct bfd_section *sec_ptr; +typedef struct reloc_cache_entry arelent; +struct orl; #define align_power(addr, align) \ (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) @@ -205,274 +149,6 @@ typedef struct bfd_section *sec_ptr; ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \ ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \ : ~ (bfd_vma) 0) - -typedef enum bfd_print_symbol -{ - bfd_print_symbol_name, - bfd_print_symbol_more, - bfd_print_symbol_all -} bfd_print_symbol_type; - -/* Information about a symbol that nm needs. */ - -typedef struct _symbol_info -{ - symvalue value; - char type; - const char *name; /* Symbol name. */ - unsigned char stab_type; /* Stab type. */ - char stab_other; /* Stab other. */ - short stab_desc; /* Stab desc. */ - const char *stab_name; /* String for stab type. */ -} symbol_info; - -/* Get the name of a stabs type code. */ - -extern const char *bfd_get_stab_name (int); - -/* Hash table routines. There is no way to free up a hash table. */ - -/* An element in the hash table. Most uses will actually use a larger - structure, and an instance of this will be the first field. */ - -struct bfd_hash_entry -{ - /* Next entry for this hash code. */ - struct bfd_hash_entry *next; - /* String being hashed. */ - const char *string; - /* Hash code. This is the full hash code, not the index into the - table. */ - unsigned long hash; -}; - -/* A hash table. */ - -struct bfd_hash_table -{ - /* The hash array. */ - struct bfd_hash_entry **table; - /* A function used to create new elements in the hash table. The - first entry is itself a pointer to an element. When this - function is first invoked, this pointer will be NULL. However, - having the pointer permits a hierarchy of method functions to be - built each of which calls the function in the superclass. Thus - each function should be written to allocate a new block of memory - only if the argument is NULL. */ - struct bfd_hash_entry *(*newfunc) - (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); - /* An objalloc for this hash table. This is a struct objalloc *, - but we use void * to avoid requiring the inclusion of objalloc.h. */ - void *memory; - /* The number of slots in the hash table. */ - unsigned int size; - /* The number of entries in the hash table. */ - unsigned int count; - /* The size of elements. */ - unsigned int entsize; - /* If non-zero, don't grow the hash table. */ - unsigned int frozen:1; -}; - -/* Initialize a hash table. */ -extern bool bfd_hash_table_init - (struct bfd_hash_table *, - struct bfd_hash_entry *(*) (struct bfd_hash_entry *, - struct bfd_hash_table *, - const char *), - unsigned int); - -/* Initialize a hash table specifying a size. */ -extern bool bfd_hash_table_init_n - (struct bfd_hash_table *, - struct bfd_hash_entry *(*) (struct bfd_hash_entry *, - struct bfd_hash_table *, - const char *), - unsigned int, unsigned int); - -/* Free up a hash table. */ -extern void bfd_hash_table_free - (struct bfd_hash_table *); - -/* Look up a string in a hash table. If CREATE is TRUE, a new entry - will be created for this string if one does not already exist. The - 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 *, bool create, bool copy); - -/* Insert an entry in a hash table. */ -extern struct bfd_hash_entry *bfd_hash_insert - (struct bfd_hash_table *, const char *, unsigned long); - -/* Rename an entry in a hash table. */ -extern void bfd_hash_rename - (struct bfd_hash_table *, const char *, struct bfd_hash_entry *); - -/* Replace an entry in a hash table. */ -extern void bfd_hash_replace - (struct bfd_hash_table *, struct bfd_hash_entry *old, - struct bfd_hash_entry *nw); - -/* Base method for creating a hash table entry. */ -extern struct bfd_hash_entry *bfd_hash_newfunc - (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); - -/* Grab some space for a hash table entry. */ -extern void *bfd_hash_allocate - (struct bfd_hash_table *, unsigned int); - -/* Traverse a hash table in a random order, calling a function on each - element. If the function returns FALSE, the traversal stops. The - INFO argument is passed to the function. */ -extern void bfd_hash_traverse - (struct bfd_hash_table *, - bool (*) (struct bfd_hash_entry *, void *), - void *info); - -/* Allows the default size of a hash table to be configured. New hash - tables allocated using bfd_hash_table_init will be created with - this size. */ -extern unsigned long bfd_hash_set_default_size (unsigned long); - -/* This structure is used to keep track of stabs in sections - information while linking. */ - -struct stab_info -{ - /* A hash table used to hold stabs strings. */ - struct bfd_strtab_hash *strings; - /* The header file hash table. */ - struct bfd_hash_table includes; - /* The first .stabstr section. */ - struct bfd_section *stabstr; -}; - -#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table - -/* User program access to BFD facilities. */ - -/* Direct I/O routines, for programs which know more about the object - file than BFD does. Use higher level routines if possible. */ - -extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *); -extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *); -extern int bfd_seek (bfd *, file_ptr, int); -extern file_ptr bfd_tell (bfd *); -extern int bfd_flush (bfd *); -extern int bfd_stat (bfd *, struct stat *); - -/* Deprecated old routines. */ -#if __GNUC__ -#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ - bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ - bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#else -#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ - bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ - bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#endif -extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); - -extern bool bfd_cache_close - (bfd *abfd); -/* NB: This declaration should match the autogenerated one in libbfd.h. */ - -extern bool bfd_cache_close_all (void); - -extern bool bfd_record_phdr - (bfd *, unsigned long, bool, flagword, bool, bfd_vma, - bool, bool, unsigned int, struct bfd_section **); - -/* Byte swapping routines. */ - -uint64_t bfd_getb64 (const void *); -uint64_t bfd_getl64 (const void *); -int64_t bfd_getb_signed_64 (const void *); -int64_t bfd_getl_signed_64 (const void *); -bfd_vma bfd_getb32 (const void *); -bfd_vma bfd_getl32 (const void *); -bfd_signed_vma bfd_getb_signed_32 (const void *); -bfd_signed_vma bfd_getl_signed_32 (const void *); -bfd_vma bfd_getb16 (const void *); -bfd_vma bfd_getl16 (const void *); -bfd_signed_vma bfd_getb_signed_16 (const void *); -bfd_signed_vma bfd_getl_signed_16 (const void *); -void bfd_putb64 (uint64_t, void *); -void bfd_putl64 (uint64_t, void *); -void bfd_putb32 (bfd_vma, void *); -void bfd_putl32 (bfd_vma, void *); -void bfd_putb24 (bfd_vma, void *); -void bfd_putl24 (bfd_vma, void *); -void bfd_putb16 (bfd_vma, void *); -void bfd_putl16 (bfd_vma, void *); - -/* Byte swapping routines which take size and endiannes as arguments. */ - -uint64_t bfd_get_bits (const void *, int, bool); -void bfd_put_bits (uint64_t, void *, int, bool); - - -/* mmap hacks */ - -struct _bfd_window_internal; -typedef struct _bfd_window_internal bfd_window_internal; - -typedef struct _bfd_window -{ - /* What the user asked for. */ - void *data; - bfd_size_type size; - /* The actual window used by BFD. Small user-requested read-only - regions sharing a page may share a single window into the object - file. Read-write versions shouldn't until I've fixed things to - keep track of which portions have been claimed by the - application; don't want to give the same region back when the - application wants two writable copies! */ - struct _bfd_window_internal *i; -} -bfd_window; - -extern void bfd_init_window - (bfd_window *); -extern void bfd_free_window - (bfd_window *); -extern bool bfd_get_file_window - (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); - -/* Externally visible ELF routines. */ - -/* Create a new BFD as if by bfd_openr. Rather than opening a file, - reconstruct an ELF file by reading the segments out of remote - memory based on the ELF file header at EHDR_VMA and the ELF program - headers it points to. If non-zero, SIZE is the known extent of the - object. If not null, *LOADBASEP is filled in with the difference - between the VMAs from which the segments were read, and the VMAs - the file headers (and hence BFD's idea of each section's VMA) put - them at. - - The function TARGET_READ_MEMORY is called to copy LEN bytes from - the remote memory at target address VMA into the local buffer at - MYADDR; it should return zero on success or an `errno' code on - failure. TEMPL must be a BFD for a target with the word size and - byte order found in the remote memory. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -/* Forward declarations. */ -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_link_info; -struct bfd_link_hash_entry; /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ @@ -481,3 +157,4 @@ 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 f4d531f5b..eddb9902f 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1,13 +1,14 @@ /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically - generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", - "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c", - "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c", - "linker.c", "simple.c" and "compress.c". + generated from "bfd-in.h", "libbfd.c", "hash.c", "section.c", + "syms.c", "archive.c", "archures.c", "bfd.c", "bfdio.c", "bfdwin.c", + "cache.c", "compress.c", "corefile.c", "format.c", "linker.c", + "opncls.c", "reloc.c", "simple.c", "stab-syms.c", "stabs.c" and + "targets.c". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -82,9 +83,6 @@ extern "C" { #define BFD64 #endif -/* Forward declaration. */ -typedef struct bfd bfd; - /* Boolean type used in bfd. General rule: Functions which are bfd_boolean return TRUE on success and FALSE on failure (unless they're a predicate). */ @@ -122,10 +120,10 @@ typedef uint64_t symvalue; #else /* not BFD64 */ -typedef unsigned long bfd_vma; -typedef long bfd_signed_vma; -typedef unsigned long symvalue; -typedef unsigned long bfd_size_type; +typedef uint32_t bfd_vma; +typedef int32_t bfd_signed_vma; +typedef uint32_t bfd_size_type; +typedef uint32_t symvalue; #endif /* not BFD64 */ @@ -137,69 +135,16 @@ typedef unsigned long bfd_size_type; typedef @bfd_file_ptr@ file_ptr; typedef @bfd_ufile_ptr@ ufile_ptr; -extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); -extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); - -#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x) - -typedef unsigned int flagword; /* 32 bits of flags */ -typedef unsigned char bfd_byte; - -/* File formats. */ - -typedef enum bfd_format -{ - bfd_unknown = 0, /* File format is unknown. */ - bfd_object, /* Linker/assembler/compiler output. */ - bfd_archive, /* Object archive file. */ - bfd_core, /* Core dump. */ - bfd_type_end /* Marks the end; don't use it! */ -} -bfd_format; - -/* Symbols and relocation. */ - -/* A count of carsyms (canonical archive symbols). */ -typedef unsigned long symindex; - -#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) - -/* A canonical archive symbol. */ -/* This is a type pun with struct ranlib on purpose! */ -typedef struct carsym -{ - const char *name; - file_ptr file_offset; /* Look here to find the file. */ -} -carsym; /* To make these you call a carsymogen. */ - -/* Used in generating armaps (archive tables of contents). - Perhaps just a forward definition would do? */ -struct orl /* Output ranlib. */ -{ - char **name; /* Symbol name. */ - union - { - file_ptr pos; - bfd *abfd; - } u; /* bfd* or file position. */ - int namidx; /* Index into string table. */ -}; +typedef uint32_t flagword; /* 32 bits of flags */ +typedef uint8_t bfd_byte; -/* Linenumber stuff. */ -typedef struct lineno_cache_entry -{ - unsigned int line_number; /* Linenumber from start of function. */ - union - { - struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ - } u; -} -alent; - -/* Object and core file sections. */ +/* Forward declarations. */ +typedef struct bfd bfd; +struct bfd_link_info; +struct bfd_link_hash_entry; typedef struct bfd_section *sec_ptr; +typedef struct reloc_cache_entry arelent; +struct orl; #define align_power(addr, align) \ (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) @@ -212,274 +157,6 @@ typedef struct bfd_section *sec_ptr; ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \ ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \ : ~ (bfd_vma) 0) - -typedef enum bfd_print_symbol -{ - bfd_print_symbol_name, - bfd_print_symbol_more, - bfd_print_symbol_all -} bfd_print_symbol_type; - -/* Information about a symbol that nm needs. */ - -typedef struct _symbol_info -{ - symvalue value; - char type; - const char *name; /* Symbol name. */ - unsigned char stab_type; /* Stab type. */ - char stab_other; /* Stab other. */ - short stab_desc; /* Stab desc. */ - const char *stab_name; /* String for stab type. */ -} symbol_info; - -/* Get the name of a stabs type code. */ - -extern const char *bfd_get_stab_name (int); - -/* Hash table routines. There is no way to free up a hash table. */ - -/* An element in the hash table. Most uses will actually use a larger - structure, and an instance of this will be the first field. */ - -struct bfd_hash_entry -{ - /* Next entry for this hash code. */ - struct bfd_hash_entry *next; - /* String being hashed. */ - const char *string; - /* Hash code. This is the full hash code, not the index into the - table. */ - unsigned long hash; -}; - -/* A hash table. */ - -struct bfd_hash_table -{ - /* The hash array. */ - struct bfd_hash_entry **table; - /* A function used to create new elements in the hash table. The - first entry is itself a pointer to an element. When this - function is first invoked, this pointer will be NULL. However, - having the pointer permits a hierarchy of method functions to be - built each of which calls the function in the superclass. Thus - each function should be written to allocate a new block of memory - only if the argument is NULL. */ - struct bfd_hash_entry *(*newfunc) - (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); - /* An objalloc for this hash table. This is a struct objalloc *, - but we use void * to avoid requiring the inclusion of objalloc.h. */ - void *memory; - /* The number of slots in the hash table. */ - unsigned int size; - /* The number of entries in the hash table. */ - unsigned int count; - /* The size of elements. */ - unsigned int entsize; - /* If non-zero, don't grow the hash table. */ - unsigned int frozen:1; -}; - -/* Initialize a hash table. */ -extern bool bfd_hash_table_init - (struct bfd_hash_table *, - struct bfd_hash_entry *(*) (struct bfd_hash_entry *, - struct bfd_hash_table *, - const char *), - unsigned int); - -/* Initialize a hash table specifying a size. */ -extern bool bfd_hash_table_init_n - (struct bfd_hash_table *, - struct bfd_hash_entry *(*) (struct bfd_hash_entry *, - struct bfd_hash_table *, - const char *), - unsigned int, unsigned int); - -/* Free up a hash table. */ -extern void bfd_hash_table_free - (struct bfd_hash_table *); - -/* Look up a string in a hash table. If CREATE is TRUE, a new entry - will be created for this string if one does not already exist. The - 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 *, bool create, bool copy); - -/* Insert an entry in a hash table. */ -extern struct bfd_hash_entry *bfd_hash_insert - (struct bfd_hash_table *, const char *, unsigned long); - -/* Rename an entry in a hash table. */ -extern void bfd_hash_rename - (struct bfd_hash_table *, const char *, struct bfd_hash_entry *); - -/* Replace an entry in a hash table. */ -extern void bfd_hash_replace - (struct bfd_hash_table *, struct bfd_hash_entry *old, - struct bfd_hash_entry *nw); - -/* Base method for creating a hash table entry. */ -extern struct bfd_hash_entry *bfd_hash_newfunc - (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); - -/* Grab some space for a hash table entry. */ -extern void *bfd_hash_allocate - (struct bfd_hash_table *, unsigned int); - -/* Traverse a hash table in a random order, calling a function on each - element. If the function returns FALSE, the traversal stops. The - INFO argument is passed to the function. */ -extern void bfd_hash_traverse - (struct bfd_hash_table *, - bool (*) (struct bfd_hash_entry *, void *), - void *info); - -/* Allows the default size of a hash table to be configured. New hash - tables allocated using bfd_hash_table_init will be created with - this size. */ -extern unsigned long bfd_hash_set_default_size (unsigned long); - -/* This structure is used to keep track of stabs in sections - information while linking. */ - -struct stab_info -{ - /* A hash table used to hold stabs strings. */ - struct bfd_strtab_hash *strings; - /* The header file hash table. */ - struct bfd_hash_table includes; - /* The first .stabstr section. */ - struct bfd_section *stabstr; -}; - -#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table - -/* User program access to BFD facilities. */ - -/* Direct I/O routines, for programs which know more about the object - file than BFD does. Use higher level routines if possible. */ - -extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *); -extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *); -extern int bfd_seek (bfd *, file_ptr, int); -extern file_ptr bfd_tell (bfd *); -extern int bfd_flush (bfd *); -extern int bfd_stat (bfd *, struct stat *); - -/* Deprecated old routines. */ -#if __GNUC__ -#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ - bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ - bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#else -#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ - bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ - bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) -#endif -extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); - -extern bool bfd_cache_close - (bfd *abfd); -/* NB: This declaration should match the autogenerated one in libbfd.h. */ - -extern bool bfd_cache_close_all (void); - -extern bool bfd_record_phdr - (bfd *, unsigned long, bool, flagword, bool, bfd_vma, - bool, bool, unsigned int, struct bfd_section **); - -/* Byte swapping routines. */ - -uint64_t bfd_getb64 (const void *); -uint64_t bfd_getl64 (const void *); -int64_t bfd_getb_signed_64 (const void *); -int64_t bfd_getl_signed_64 (const void *); -bfd_vma bfd_getb32 (const void *); -bfd_vma bfd_getl32 (const void *); -bfd_signed_vma bfd_getb_signed_32 (const void *); -bfd_signed_vma bfd_getl_signed_32 (const void *); -bfd_vma bfd_getb16 (const void *); -bfd_vma bfd_getl16 (const void *); -bfd_signed_vma bfd_getb_signed_16 (const void *); -bfd_signed_vma bfd_getl_signed_16 (const void *); -void bfd_putb64 (uint64_t, void *); -void bfd_putl64 (uint64_t, void *); -void bfd_putb32 (bfd_vma, void *); -void bfd_putl32 (bfd_vma, void *); -void bfd_putb24 (bfd_vma, void *); -void bfd_putl24 (bfd_vma, void *); -void bfd_putb16 (bfd_vma, void *); -void bfd_putl16 (bfd_vma, void *); - -/* Byte swapping routines which take size and endiannes as arguments. */ - -uint64_t bfd_get_bits (const void *, int, bool); -void bfd_put_bits (uint64_t, void *, int, bool); - - -/* mmap hacks */ - -struct _bfd_window_internal; -typedef struct _bfd_window_internal bfd_window_internal; - -typedef struct _bfd_window -{ - /* What the user asked for. */ - void *data; - bfd_size_type size; - /* The actual window used by BFD. Small user-requested read-only - regions sharing a page may share a single window into the object - file. Read-write versions shouldn't until I've fixed things to - keep track of which portions have been claimed by the - application; don't want to give the same region back when the - application wants two writable copies! */ - struct _bfd_window_internal *i; -} -bfd_window; - -extern void bfd_init_window - (bfd_window *); -extern void bfd_free_window - (bfd_window *); -extern bool bfd_get_file_window - (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); - -/* Externally visible ELF routines. */ - -/* Create a new BFD as if by bfd_openr. Rather than opening a file, - reconstruct an ELF file by reading the segments out of remote - memory based on the ELF file header at EHDR_VMA and the ELF program - headers it points to. If non-zero, SIZE is the known extent of the - object. If not null, *LOADBASEP is filled in with the difference - between the VMAs from which the segments were read, and the VMAs - the file headers (and hence BFD's idea of each section's VMA) put - them at. - - The function TARGET_READ_MEMORY is called to copy LEN bytes from - the remote memory at target address VMA into the local buffer at - MYADDR; it should return zero on success or an `errno' code on - failure. TEMPL must be a BFD for a target with the word size and - byte order found in the remote memory. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -/* Forward declarations. */ -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_link_info; -struct bfd_link_hash_entry; /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ @@ -488,94 +165,25 @@ startswith (const char *str, const char *prefix) { return strncmp (str, prefix, strlen (prefix)) == 0; } -/* Extracted from init.c. */ -unsigned int bfd_init (void); - - -/* Value returned by bfd_init. */ - -#define BFD_INIT_MAGIC (sizeof (struct bfd_section)) -/* Extracted from opncls.c. */ -/* Set to N to open the next N BFDs using an alternate id space. */ -extern unsigned int bfd_use_reserved_id; -bfd *bfd_fopen (const char *filename, const char *target, - const char *mode, int fd); - -bfd *bfd_openr (const char *filename, const char *target); - -bfd *bfd_fdopenr (const char *filename, const char *target, int fd); - -bfd *bfd_fdopenw (const char *filename, const char *target, int fd); - -bfd *bfd_openstreamr (const char * filename, const char * target, - void * stream); - -bfd *bfd_openr_iovec (const char *filename, const char *target, - void *(*open_func) (struct bfd *nbfd, - void *open_closure), - void *open_closure, - file_ptr (*pread_func) (struct bfd *nbfd, - void *stream, - void *buf, - file_ptr nbytes, - file_ptr offset), - int (*close_func) (struct bfd *nbfd, - void *stream), - int (*stat_func) (struct bfd *abfd, - void *stream, - struct stat *sb)); - -bfd *bfd_openw (const char *filename, const char *target); - -bool bfd_close (bfd *abfd); - -bool bfd_close_all_done (bfd *); - -bfd *bfd_create (const char *filename, bfd *templ); - -bool bfd_make_writable (bfd *abfd); - -bool bfd_make_readable (bfd *abfd); +/* Extracted from libbfd.c. */ void *bfd_alloc (bfd *abfd, bfd_size_type wanted); void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); -unsigned long bfd_calc_gnu_debuglink_crc32 - (unsigned long crc, const unsigned char *buf, bfd_size_type len); - -char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out); - -char *bfd_get_alt_debug_link_info (bfd * abfd, - bfd_size_type *buildid_len, - bfd_byte **buildid_out); - -char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); - -char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); - -struct bfd_section *bfd_create_gnu_debuglink_section - (bfd *abfd, const char *filename); - -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); - -const char *bfd_set_filename (bfd *abfd, const char *filename); +void bfd_release (bfd *, void *); -/* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ #define bfd_put_8(abfd, val, ptr) \ - ((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) + ((void) (*((bfd_byte *) (ptr)) = (val) & 0xff)) #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const bfd_byte *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const bfd_byte *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -691,19 +299,130 @@ bfd_vma bfd_getl24 (const void *p); #define H_GET_S8 bfd_h_get_signed_8 -/* Extracted from bfdio.c. */ -long bfd_get_mtime (bfd *abfd); +uint64_t bfd_getb64 (const void *); +uint64_t bfd_getl64 (const void *); +int64_t bfd_getb_signed_64 (const void *); +int64_t bfd_getl_signed_64 (const void *); +bfd_vma bfd_getb32 (const void *); +bfd_vma bfd_getl32 (const void *); +bfd_signed_vma bfd_getb_signed_32 (const void *); +bfd_signed_vma bfd_getl_signed_32 (const void *); +bfd_vma bfd_getb16 (const void *); +bfd_vma bfd_getl16 (const void *); +bfd_signed_vma bfd_getb_signed_16 (const void *); +bfd_signed_vma bfd_getl_signed_16 (const void *); +void bfd_putb64 (uint64_t, void *); +void bfd_putl64 (uint64_t, void *); +void bfd_putb32 (bfd_vma, void *); +void bfd_putl32 (bfd_vma, void *); +void bfd_putb24 (bfd_vma, void *); +void bfd_putl24 (bfd_vma, void *); +void bfd_putb16 (bfd_vma, void *); +void bfd_putl16 (bfd_vma, void *); +uint64_t bfd_get_bits (const void *, int, bool); +void bfd_put_bits (uint64_t, void *, int, bool); -ufile_ptr bfd_get_size (bfd *abfd); +/* Extracted from hash.c. */ +/* An element in the hash table. Most uses will actually use a larger + structure, and an instance of this will be the first field. */ -ufile_ptr bfd_get_file_size (bfd *abfd); +struct bfd_hash_entry +{ + /* Next entry for this hash code. */ + struct bfd_hash_entry *next; + /* String being hashed. */ + const char *string; + /* Hash code. This is the full hash code, not the index into the + table. */ + unsigned long hash; +}; -void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, - int prot, int flags, file_ptr offset, - void **map_addr, bfd_size_type *map_len); +/* A hash table. */ + +struct bfd_hash_table +{ + /* The hash array. */ + struct bfd_hash_entry **table; + /* A function used to create new elements in the hash table. The + first entry is itself a pointer to an element. When this + function is first invoked, this pointer will be NULL. However, + having the pointer permits a hierarchy of method functions to be + built each of which calls the function in the superclass. Thus + each function should be written to allocate a new block of memory + only if the argument is NULL. */ + struct bfd_hash_entry *(*newfunc) + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); + /* An objalloc for this hash table. This is a struct objalloc *, + but we use void * to avoid requiring the inclusion of objalloc.h. */ + void *memory; + /* The number of slots in the hash table. */ + unsigned int size; + /* The number of entries in the hash table. */ + unsigned int count; + /* The size of elements. */ + unsigned int entsize; + /* If non-zero, don't grow the hash table. */ + unsigned int frozen:1; +}; + +bool bfd_hash_table_init_n + (struct bfd_hash_table *, + struct bfd_hash_entry *(* /*newfunc*/) + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), + unsigned int /*entsize*/, unsigned int /*size*/); + +bool bfd_hash_table_init + (struct bfd_hash_table *, + struct bfd_hash_entry *(* /*newfunc*/) + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), + unsigned int /*entsize*/); + +void bfd_hash_table_free (struct bfd_hash_table *); + +struct bfd_hash_entry *bfd_hash_lookup + (struct bfd_hash_table *, const char *, + bool /*create*/, bool /*copy*/); + +struct bfd_hash_entry *bfd_hash_insert + (struct bfd_hash_table *, + const char *, + unsigned long /*hash*/); + +void bfd_hash_rename (struct bfd_hash_table *, + const char *, + struct bfd_hash_entry *); + +void bfd_hash_replace (struct bfd_hash_table *, + struct bfd_hash_entry * /*old*/, + struct bfd_hash_entry * /*new*/); + +void *bfd_hash_allocate (struct bfd_hash_table *, + unsigned int /*size*/); + +struct bfd_hash_entry *bfd_hash_newfunc + (struct bfd_hash_entry *, + struct bfd_hash_table *, + const char *); + +void bfd_hash_traverse + (struct bfd_hash_table *, + bool (*) (struct bfd_hash_entry *, void *), + void *); + +unsigned int bfd_hash_set_default_size (unsigned int); -/* Extracted from bfdwin.c. */ /* Extracted from section.c. */ +/* Linenumber stuff. */ +typedef struct lineno_cache_entry +{ + unsigned int line_number; /* Linenumber from start of function. */ + union + { + struct bfd_symbol *sym; /* Function name. */ + bfd_vma offset; /* Offset into section. */ + } u; +} +alent; typedef struct bfd_section { @@ -906,6 +625,9 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section has the SHF_X86_64_LARGE flag. This is ELF x86-64 only. */ +#define SEC_ELF_LARGE 0x10000000 + /* Conditionally link this section; do not link if there are no references found to any symbol in the section. This is for TI TMS320C54X only. */ @@ -1053,7 +775,7 @@ typedef struct bfd_section /* If the SEC_IN_MEMORY flag is set, this points to the actual contents. */ - unsigned char *contents; + bfd_byte *contents; /* Attached line number information. */ alent *lineno; @@ -1232,8 +954,8 @@ static inline bool bfd_is_const_section (const asection *sec) { return (sec >= _bfd_std_section - && sec < _bfd_std_section + (sizeof (_bfd_std_section) - / sizeof (_bfd_std_section[0]))); + && sec < _bfd_std_section + (sizeof (_bfd_std_section) + / sizeof (_bfd_std_section[0]))); } /* Return TRUE if input section SEC has been discarded. */ @@ -1241,48 +963,48 @@ static inline bool discarded_section (const asection *sec) { return (!bfd_is_abs_section (sec) - && bfd_is_abs_section (sec->output_section) - && sec->sec_info_type != SEC_INFO_TYPE_MERGE - && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS); + && bfd_is_abs_section (sec->output_section) + && sec->sec_info_type != SEC_INFO_TYPE_MERGE + && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS); } #define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \ /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \ { NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \ - \ + \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ - \ + \ /* segment_mark, sec_info_type, use_rela_p, */ \ 0, 0, 0, \ - \ + \ /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \ 0, 0, 0, 0, 0, 0, \ - \ + \ /* vma, lma, size, rawsize, compressed_size, */ \ 0, 0, 0, 0, 0, \ - \ + \ /* output_offset, output_section, relocation, orelocation, */ \ 0, &SEC, NULL, NULL, \ - \ + \ /* reloc_count, alignment_power, filepos, rel_filepos, */ \ 0, 0, 0, 0, \ - \ + \ /* line_filepos, userdata, contents, lineno, lineno_count, */ \ 0, NULL, NULL, NULL, 0, \ - \ + \ /* entsize, kept_section, moving_line_filepos, */ \ 0, NULL, 0, \ - \ + \ /* target_index, used_by_bfd, constructor_chain, owner, */ \ 0, NULL, NULL, NULL, \ - \ + \ /* symbol, symbol_ptr_ptr, */ \ (struct bfd_symbol *) SYM, &SEC.symbol, \ - \ + \ /* map_head, map_tail, already_assigned, type */ \ { NULL }, { NULL }, NULL, 0 \ - \ + \ } /* We use a macro to initialize the static asymbol structures because @@ -1359,201 +1081,434 @@ bool bfd_copy_private_section_data #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + (ibfd, isection, obfd, osection)) bool bfd_generic_is_group_section (bfd *, const asection *sec); const char *bfd_generic_group_name (bfd *, const asection *sec); bool bfd_generic_discard_group (bfd *abfd, asection *group); -/* Extracted from archures.c. */ -enum bfd_architecture +/* Extracted from syms.c. */ +typedef struct bfd_symbol { - bfd_arch_unknown, /* File arch not known. */ - bfd_arch_obscure, /* Arch known, not one of these. */ - bfd_arch_m68k, /* Motorola 68xxx. */ -#define bfd_mach_m68000 1 -#define bfd_mach_m68008 2 -#define bfd_mach_m68010 3 -#define bfd_mach_m68020 4 -#define bfd_mach_m68030 5 -#define bfd_mach_m68040 6 -#define bfd_mach_m68060 7 -#define bfd_mach_cpu32 8 -#define bfd_mach_fido 9 -#define bfd_mach_mcf_isa_a_nodiv 10 -#define bfd_mach_mcf_isa_a 11 -#define bfd_mach_mcf_isa_a_mac 12 -#define bfd_mach_mcf_isa_a_emac 13 -#define bfd_mach_mcf_isa_aplus 14 -#define bfd_mach_mcf_isa_aplus_mac 15 -#define bfd_mach_mcf_isa_aplus_emac 16 -#define bfd_mach_mcf_isa_b_nousp 17 -#define bfd_mach_mcf_isa_b_nousp_mac 18 -#define bfd_mach_mcf_isa_b_nousp_emac 19 -#define bfd_mach_mcf_isa_b 20 -#define bfd_mach_mcf_isa_b_mac 21 -#define bfd_mach_mcf_isa_b_emac 22 -#define bfd_mach_mcf_isa_b_float 23 -#define bfd_mach_mcf_isa_b_float_mac 24 -#define bfd_mach_mcf_isa_b_float_emac 25 -#define bfd_mach_mcf_isa_c 26 -#define bfd_mach_mcf_isa_c_mac 27 -#define bfd_mach_mcf_isa_c_emac 28 -#define bfd_mach_mcf_isa_c_nodiv 29 -#define bfd_mach_mcf_isa_c_nodiv_mac 30 -#define bfd_mach_mcf_isa_c_nodiv_emac 31 - bfd_arch_vax, /* DEC Vax. */ + /* A pointer to the BFD which owns the symbol. This information + is necessary so that a back end can work out what additional + information (invisible to the application writer) is carried + with the symbol. - bfd_arch_or1k, /* OpenRISC 1000. */ -#define bfd_mach_or1k 1 -#define bfd_mach_or1knd 2 + This field is *almost* redundant, since you can use section->owner + instead, except that some symbols point to the global sections + bfd_{abs,com,und}_section. This could be fixed by making + these globals be per-bfd (or per-target-flavor). FIXME. */ + struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ - bfd_arch_sparc, /* SPARC. */ -#define bfd_mach_sparc 1 -/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ -#define bfd_mach_sparc_sparclet 2 -#define bfd_mach_sparc_sparclite 3 -#define bfd_mach_sparc_v8plus 4 -#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */ -#define bfd_mach_sparc_sparclite_le 6 -#define bfd_mach_sparc_v9 7 -#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */ -#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */ -#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */ -#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */ -#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */ -#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */ -#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */ -#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */ -#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */ -#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */ -#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */ -#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */ -#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */ -#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */ -#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */ -/* Nonzero if MACH has the v9 instruction set. */ -#define bfd_mach_sparc_v9_p(mach) \ - ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \ - && (mach) != bfd_mach_sparc_sparclite_le) -/* Nonzero if MACH is a 64 bit sparc architecture. */ -#define bfd_mach_sparc_64bit_p(mach) \ - ((mach) >= bfd_mach_sparc_v9 \ - && (mach) != bfd_mach_sparc_v8plusb \ - && (mach) != bfd_mach_sparc_v8plusc \ - && (mach) != bfd_mach_sparc_v8plusd \ - && (mach) != bfd_mach_sparc_v8pluse \ - && (mach) != bfd_mach_sparc_v8plusv \ - && (mach) != bfd_mach_sparc_v8plusm \ - && (mach) != bfd_mach_sparc_v8plusm8) - bfd_arch_spu, /* PowerPC SPU. */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx. */ -#define bfd_mach_mips3000 3000 -#define bfd_mach_mips3900 3900 -#define bfd_mach_mips4000 4000 -#define bfd_mach_mips4010 4010 -#define bfd_mach_mips4100 4100 -#define bfd_mach_mips4111 4111 -#define bfd_mach_mips4120 4120 -#define bfd_mach_mips4300 4300 -#define bfd_mach_mips4400 4400 -#define bfd_mach_mips4600 4600 -#define bfd_mach_mips4650 4650 -#define bfd_mach_mips5000 5000 -#define bfd_mach_mips5400 5400 -#define bfd_mach_mips5500 5500 -#define bfd_mach_mips5900 5900 -#define bfd_mach_mips6000 6000 -#define bfd_mach_mips7000 7000 -#define bfd_mach_mips8000 8000 -#define bfd_mach_mips9000 9000 -#define bfd_mach_mips10000 10000 -#define bfd_mach_mips12000 12000 -#define bfd_mach_mips14000 14000 -#define bfd_mach_mips16000 16000 -#define bfd_mach_mips16 16 -#define bfd_mach_mips5 5 -#define bfd_mach_mips_loongson_2e 3001 -#define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_gs464 3003 -#define bfd_mach_mips_gs464e 3004 -#define bfd_mach_mips_gs264e 3005 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */ -#define bfd_mach_mips_octeon 6501 -#define bfd_mach_mips_octeonp 6601 -#define bfd_mach_mips_octeon2 6502 -#define bfd_mach_mips_octeon3 6503 -#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */ -#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */ -#define bfd_mach_mipsisa32 32 -#define bfd_mach_mipsisa32r2 33 -#define bfd_mach_mipsisa32r3 34 -#define bfd_mach_mipsisa32r5 36 -#define bfd_mach_mipsisa32r6 37 -#define bfd_mach_mipsisa64 64 -#define bfd_mach_mipsisa64r2 65 -#define bfd_mach_mipsisa64r3 66 -#define bfd_mach_mipsisa64r5 68 -#define bfd_mach_mipsisa64r6 69 -#define bfd_mach_mips_micromips 96 - bfd_arch_i386, /* Intel 386. */ -#define bfd_mach_i386_intel_syntax (1 << 0) -#define bfd_mach_i386_i8086 (1 << 1) -#define bfd_mach_i386_i386 (1 << 2) -#define bfd_mach_x86_64 (1 << 3) -#define bfd_mach_x64_32 (1 << 4) -#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax) -#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax) -#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax) - bfd_arch_iamcu, /* Intel MCU. */ -#define bfd_mach_iamcu (1 << 8) -#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu) -#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax) - bfd_arch_romp, /* IBM ROMP PC/RT. */ - bfd_arch_convex, /* Convex. */ - bfd_arch_m98k, /* Motorola 98xxx. */ - bfd_arch_pyramid, /* Pyramid Technology. */ - bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */ -#define bfd_mach_h8300 1 -#define bfd_mach_h8300h 2 -#define bfd_mach_h8300s 3 -#define bfd_mach_h8300hn 4 -#define bfd_mach_h8300sn 5 -#define bfd_mach_h8300sx 6 -#define bfd_mach_h8300sxn 7 - bfd_arch_pdp11, /* DEC PDP-11. */ - bfd_arch_powerpc, /* PowerPC. */ -#define bfd_mach_ppc 32 -#define bfd_mach_ppc64 64 -#define bfd_mach_ppc_403 403 -#define bfd_mach_ppc_403gc 4030 -#define bfd_mach_ppc_405 405 -#define bfd_mach_ppc_505 505 -#define bfd_mach_ppc_601 601 -#define bfd_mach_ppc_602 602 -#define bfd_mach_ppc_603 603 -#define bfd_mach_ppc_ec603e 6031 -#define bfd_mach_ppc_604 604 -#define bfd_mach_ppc_620 620 -#define bfd_mach_ppc_630 630 -#define bfd_mach_ppc_750 750 -#define bfd_mach_ppc_860 860 -#define bfd_mach_ppc_a35 35 -#define bfd_mach_ppc_rs64ii 642 -#define bfd_mach_ppc_rs64iii 643 -#define bfd_mach_ppc_7400 7400 -#define bfd_mach_ppc_e500 500 -#define bfd_mach_ppc_e500mc 5001 -#define bfd_mach_ppc_e500mc64 5005 -#define bfd_mach_ppc_e5500 5006 -#define bfd_mach_ppc_e6500 5007 -#define bfd_mach_ppc_titan 83 -#define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000. */ -#define bfd_mach_rs6k 6000 -#define bfd_mach_rs6k_rs1 6001 + /* The text of the symbol. The name is left alone, and not copied; the + application may not alter it. */ + const char *name; + + /* The value of the symbol. This really should be a union of a + numeric value with a pointer, since some flags indicate that + a pointer to another symbol is stored here. */ + symvalue value; + + /* Attributes of a symbol. */ +#define BSF_NO_FLAGS 0 + + /* The symbol has local scope; <> in <>. The value + is the offset into the section of the data. */ +#define BSF_LOCAL (1 << 0) + + /* The symbol has global scope; initialized data in <>. The + value is the offset into the section of the data. */ +#define BSF_GLOBAL (1 << 1) + + /* The symbol has global scope and is exported. The value is + the offset into the section of the data. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ + + /* A normal C symbol would be one of: + <>, <> or <>. */ + + /* The symbol is a debugging record. The value has an arbitrary + meaning, unless BSF_DEBUGGING_RELOC is also set. */ +#define BSF_DEBUGGING (1 << 2) + + /* The symbol denotes a function entry point. Used in ELF, + perhaps others someday. */ +#define BSF_FUNCTION (1 << 3) + + /* Used by the linker. */ +#define BSF_KEEP (1 << 5) + + /* An ELF common symbol. */ +#define BSF_ELF_COMMON (1 << 6) + + /* A weak global symbol, overridable without warnings by + a regular global symbol of the same name. */ +#define BSF_WEAK (1 << 7) + + /* This symbol was created to point to a section, e.g. ELF's + STT_SECTION symbols. */ +#define BSF_SECTION_SYM (1 << 8) + + /* The symbol used to be a common symbol, but now it is + allocated. */ +#define BSF_OLD_COMMON (1 << 9) + + /* In some files the type of a symbol sometimes alters its + location in an output file - ie in coff a <> symbol + which is also <> symbol appears where it was + declared and not at the end of a section. This bit is set + by the target BFD part to convey this information. */ +#define BSF_NOT_AT_END (1 << 10) + + /* Signal that the symbol is the label of constructor section. */ +#define BSF_CONSTRUCTOR (1 << 11) + + /* Signal that the symbol is a warning symbol. The name is a + warning. The name of the next symbol is the one to warn about; + if a reference is made to a symbol with the same name as the next + symbol, a warning is issued by the linker. */ +#define BSF_WARNING (1 << 12) + + /* Signal that the symbol is indirect. This symbol is an indirect + pointer to the symbol with the same name as the next symbol. */ +#define BSF_INDIRECT (1 << 13) + + /* BSF_FILE marks symbols that contain a file name. This is used + for ELF STT_FILE symbols. */ +#define BSF_FILE (1 << 14) + + /* Symbol is from dynamic linking information. */ +#define BSF_DYNAMIC (1 << 15) + + /* The symbol denotes a data object. Used in ELF, and perhaps + others someday. */ +#define BSF_OBJECT (1 << 16) + + /* This symbol is a debugging symbol. The value is the offset + into the section of the data. BSF_DEBUGGING should be set + as well. */ +#define BSF_DEBUGGING_RELOC (1 << 17) + + /* This symbol is thread local. Used in ELF. */ +#define BSF_THREAD_LOCAL (1 << 18) + + /* This symbol represents a complex relocation expression, + with the expression tree serialized in the symbol name. */ +#define BSF_RELC (1 << 19) + + /* This symbol represents a signed complex relocation expression, + with the expression tree serialized in the symbol name. */ +#define BSF_SRELC (1 << 20) + + /* This symbol was created by bfd_get_synthetic_symtab. */ +#define BSF_SYNTHETIC (1 << 21) + + /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT. + The dynamic linker will compute the value of this symbol by + calling the function that it points to. BSF_FUNCTION must + also be also set. */ +#define BSF_GNU_INDIRECT_FUNCTION (1 << 22) + /* This symbol is a globally unique data object. The dynamic linker + will make sure that in the entire process there is just one symbol + with this name and type in use. BSF_OBJECT must also be set. */ +#define BSF_GNU_UNIQUE (1 << 23) + + /* This section symbol should be included in the symbol table. */ +#define BSF_SECTION_SYM_USED (1 << 24) + + flagword flags; + + /* A pointer to the section to which this symbol is + relative. This will always be non NULL, there are special + sections for undefined and absolute symbols. */ + struct bfd_section *section; + + /* Back end special data. */ + union + { + void *p; + bfd_vma i; + } + udata; +} +asymbol; + +typedef enum bfd_print_symbol +{ + bfd_print_symbol_name, + bfd_print_symbol_more, + bfd_print_symbol_all +} bfd_print_symbol_type; + +/* Information about a symbol that nm needs. */ + +typedef struct _symbol_info +{ + symvalue value; + char type; + const char *name; /* Symbol name. */ + unsigned char stab_type; /* Stab type. */ + char stab_other; /* Stab other. */ + short stab_desc; /* Stab desc. */ + const char *stab_name; /* String for stab type. */ +} symbol_info; + +#define bfd_get_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + +bool bfd_is_local_label (bfd *abfd, asymbol *sym); + +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)) + +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)) + +#define bfd_canonicalize_symtab(abfd, location) \ + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + +bool bfd_set_symtab + (bfd *abfd, asymbol **location, unsigned int count); + +void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); + +#define bfd_make_empty_symbol(abfd) \ + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) + +asymbol *_bfd_generic_make_empty_symbol (bfd *); + +#define bfd_make_debug_symbol(abfd) \ + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd)) + +int bfd_decode_symclass (asymbol *symbol); + +bool bfd_is_undefined_symclass (int symclass); + +void bfd_symbol_info (asymbol *symbol, symbol_info *ret); + +bool bfd_copy_private_symbol_data + (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); + +#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) + +/* Extracted from archive.c. */ +/* A canonical archive symbol. */ +/* This is a type pun with struct symdef/struct ranlib on purpose! */ +typedef struct carsym +{ + const char *name; + file_ptr file_offset; /* Look here to find the file. */ +} +carsym; + +/* A count of carsyms (canonical archive symbols). */ + typedef unsigned long symindex; +#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) + +symindex bfd_get_next_mapent + (bfd *abfd, symindex previous, carsym **sym); + +bool bfd_set_archive_head (bfd *output, bfd *new_head); + +bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); + +/* Extracted from archures.c. */ +enum bfd_architecture +{ + bfd_arch_unknown, /* File arch not known. */ + bfd_arch_obscure, /* Arch known, not one of these. */ + bfd_arch_m68k, /* Motorola 68xxx. */ +#define bfd_mach_m68000 1 +#define bfd_mach_m68008 2 +#define bfd_mach_m68010 3 +#define bfd_mach_m68020 4 +#define bfd_mach_m68030 5 +#define bfd_mach_m68040 6 +#define bfd_mach_m68060 7 +#define bfd_mach_cpu32 8 +#define bfd_mach_fido 9 +#define bfd_mach_mcf_isa_a_nodiv 10 +#define bfd_mach_mcf_isa_a 11 +#define bfd_mach_mcf_isa_a_mac 12 +#define bfd_mach_mcf_isa_a_emac 13 +#define bfd_mach_mcf_isa_aplus 14 +#define bfd_mach_mcf_isa_aplus_mac 15 +#define bfd_mach_mcf_isa_aplus_emac 16 +#define bfd_mach_mcf_isa_b_nousp 17 +#define bfd_mach_mcf_isa_b_nousp_mac 18 +#define bfd_mach_mcf_isa_b_nousp_emac 19 +#define bfd_mach_mcf_isa_b 20 +#define bfd_mach_mcf_isa_b_mac 21 +#define bfd_mach_mcf_isa_b_emac 22 +#define bfd_mach_mcf_isa_b_float 23 +#define bfd_mach_mcf_isa_b_float_mac 24 +#define bfd_mach_mcf_isa_b_float_emac 25 +#define bfd_mach_mcf_isa_c 26 +#define bfd_mach_mcf_isa_c_mac 27 +#define bfd_mach_mcf_isa_c_emac 28 +#define bfd_mach_mcf_isa_c_nodiv 29 +#define bfd_mach_mcf_isa_c_nodiv_mac 30 +#define bfd_mach_mcf_isa_c_nodiv_emac 31 + bfd_arch_vax, /* DEC Vax. */ + + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 + + bfd_arch_sparc, /* SPARC. */ +#define bfd_mach_sparc 1 +/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ +#define bfd_mach_sparc_sparclet 2 +#define bfd_mach_sparc_sparclite 3 +#define bfd_mach_sparc_v8plus 4 +#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */ +#define bfd_mach_sparc_sparclite_le 6 +#define bfd_mach_sparc_v9 7 +#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */ +#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */ +#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */ +#define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */ +#define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */ +#define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */ +#define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */ +#define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */ +#define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */ +#define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */ +#define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */ +#define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */ +#define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */ +#define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */ +#define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */ +/* Nonzero if MACH has the v9 instruction set. */ +#define bfd_mach_sparc_v9_p(mach) \ + ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \ + && (mach) != bfd_mach_sparc_sparclite_le) +/* Nonzero if MACH is a 64 bit sparc architecture. */ +#define bfd_mach_sparc_64bit_p(mach) \ + ((mach) >= bfd_mach_sparc_v9 \ + && (mach) != bfd_mach_sparc_v8plusb \ + && (mach) != bfd_mach_sparc_v8plusc \ + && (mach) != bfd_mach_sparc_v8plusd \ + && (mach) != bfd_mach_sparc_v8pluse \ + && (mach) != bfd_mach_sparc_v8plusv \ + && (mach) != bfd_mach_sparc_v8plusm \ + && (mach) != bfd_mach_sparc_v8plusm8) + bfd_arch_spu, /* PowerPC SPU. */ +#define bfd_mach_spu 256 + bfd_arch_mips, /* MIPS Rxxxx. */ +#define bfd_mach_mips3000 3000 +#define bfd_mach_mips3900 3900 +#define bfd_mach_mips4000 4000 +#define bfd_mach_mips4010 4010 +#define bfd_mach_mips4100 4100 +#define bfd_mach_mips4111 4111 +#define bfd_mach_mips4120 4120 +#define bfd_mach_mips4300 4300 +#define bfd_mach_mips4400 4400 +#define bfd_mach_mips4600 4600 +#define bfd_mach_mips4650 4650 +#define bfd_mach_mips5000 5000 +#define bfd_mach_mips5400 5400 +#define bfd_mach_mips5500 5500 +#define bfd_mach_mips5900 5900 +#define bfd_mach_mips6000 6000 +#define bfd_mach_mips7000 7000 +#define bfd_mach_mips8000 8000 +#define bfd_mach_mips9000 9000 +#define bfd_mach_mips10000 10000 +#define bfd_mach_mips12000 12000 +#define bfd_mach_mips14000 14000 +#define bfd_mach_mips16000 16000 +#define bfd_mach_mips16 16 +#define bfd_mach_mips5 5 +#define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31. */ +#define bfd_mach_mips_loongson_2e 3001 +#define bfd_mach_mips_loongson_2f 3002 +#define bfd_mach_mips_gs464 3003 +#define bfd_mach_mips_gs464e 3004 +#define bfd_mach_mips_gs264e 3005 +#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */ +#define bfd_mach_mips_octeon 6501 +#define bfd_mach_mips_octeonp 6601 +#define bfd_mach_mips_octeon2 6502 +#define bfd_mach_mips_octeon3 6503 +#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */ +#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */ +#define bfd_mach_mipsisa32 32 +#define bfd_mach_mipsisa32r2 33 +#define bfd_mach_mipsisa32r3 34 +#define bfd_mach_mipsisa32r5 36 +#define bfd_mach_mipsisa32r6 37 +#define bfd_mach_mipsisa64 64 +#define bfd_mach_mipsisa64r2 65 +#define bfd_mach_mipsisa64r3 66 +#define bfd_mach_mipsisa64r5 68 +#define bfd_mach_mipsisa64r6 69 +#define bfd_mach_mips_micromips 96 + bfd_arch_i386, /* Intel 386. */ +#define bfd_mach_i386_intel_syntax (1 << 0) +#define bfd_mach_i386_i8086 (1 << 1) +#define bfd_mach_i386_i386 (1 << 2) +#define bfd_mach_x86_64 (1 << 3) +#define bfd_mach_x64_32 (1 << 4) +#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax) +#define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax) +#define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax) + bfd_arch_iamcu, /* Intel MCU. */ +#define bfd_mach_iamcu (1 << 8) +#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu) +#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax) + bfd_arch_romp, /* IBM ROMP PC/RT. */ + bfd_arch_convex, /* Convex. */ + bfd_arch_m98k, /* Motorola 98xxx. */ + bfd_arch_pyramid, /* Pyramid Technology. */ + bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */ +#define bfd_mach_h8300 1 +#define bfd_mach_h8300h 2 +#define bfd_mach_h8300s 3 +#define bfd_mach_h8300hn 4 +#define bfd_mach_h8300sn 5 +#define bfd_mach_h8300sx 6 +#define bfd_mach_h8300sxn 7 + bfd_arch_pdp11, /* DEC PDP-11. */ + bfd_arch_powerpc, /* PowerPC. */ +#define bfd_mach_ppc 32 +#define bfd_mach_ppc64 64 +#define bfd_mach_ppc_403 403 +#define bfd_mach_ppc_403gc 4030 +#define bfd_mach_ppc_405 405 +#define bfd_mach_ppc_505 505 +#define bfd_mach_ppc_601 601 +#define bfd_mach_ppc_602 602 +#define bfd_mach_ppc_603 603 +#define bfd_mach_ppc_ec603e 6031 +#define bfd_mach_ppc_604 604 +#define bfd_mach_ppc_620 620 +#define bfd_mach_ppc_630 630 +#define bfd_mach_ppc_750 750 +#define bfd_mach_ppc_860 860 +#define bfd_mach_ppc_a35 35 +#define bfd_mach_ppc_rs64ii 642 +#define bfd_mach_ppc_rs64iii 643 +#define bfd_mach_ppc_7400 7400 +#define bfd_mach_ppc_e500 500 +#define bfd_mach_ppc_e500mc 5001 +#define bfd_mach_ppc_e500mc64 5005 +#define bfd_mach_ppc_e5500 5006 +#define bfd_mach_ppc_e6500 5007 +#define bfd_mach_ppc_titan 83 +#define bfd_mach_ppc_vle 84 + bfd_arch_rs6000, /* IBM RS/6000. */ +#define bfd_mach_rs6k 6000 +#define bfd_mach_rs6k_rs1 6001 #define bfd_mach_rs6k_rsc 6003 #define bfd_mach_rs6k_rs2 6002 bfd_arch_hppa, /* HP PA RISC. */ @@ -1816,6 +1771,17 @@ enum bfd_architecture bfd_arch_lm32, /* Lattice Mico32. */ #define bfd_mach_lm32 1 bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ +#define bfd_mach_kv3_unknown 0 +#define bfd_mach_kv3_1 1 +#define bfd_mach_kv3_1_64 2 +#define bfd_mach_kv3_1_usr 3 +#define bfd_mach_kv3_2 4 +#define bfd_mach_kv3_2_64 5 +#define bfd_mach_kv3_2_usr 6 +#define bfd_mach_kv4_1 7 +#define bfd_mach_kv4_1_64 8 +#define bfd_mach_kv4_1_usr 9 bfd_arch_tilepro, /* Tilera TILEPro. */ bfd_arch_tilegx, /* Tilera TILE-Gx. */ #define bfd_mach_tilepro 1 @@ -1883,7 +1849,7 @@ typedef struct bfd_arch_info all the entries for that arch can be accessed via <>. */ bool the_default; const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, - const struct bfd_arch_info *); + const struct bfd_arch_info *); bool (*scan) (const struct bfd_arch_info *, const char *); @@ -1942,5345 +1908,5619 @@ unsigned int bfd_octets_per_byte (const bfd *abfd, unsigned int bfd_arch_mach_octets_per_byte (enum bfd_architecture arch, unsigned long machine); -/* Extracted from reloc.c. */ - -typedef enum bfd_reloc_status -{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* Target specific meaning. */ - bfd_reloc_other, - - /* The symbol to relocate against was undefined. */ - bfd_reloc_undefined, - - /* The relocation was performed, but may not be ok. If this type is - returned, the error_message argument to bfd_perform_relocation - will be set. */ - bfd_reloc_dangerous - } - bfd_reloc_status_type; - -typedef const struct reloc_howto_struct reloc_howto_type; - -typedef struct reloc_cache_entry -{ - /* A pointer into the canonical table of pointers. */ - struct bfd_symbol **sym_ptr_ptr; - - /* offset in section. */ - bfd_size_type address; - - /* addend for relocation value. */ - bfd_vma addend; - - /* Pointer to how to perform the required relocation. */ - reloc_howto_type *howto; - -} -arelent; - - -enum complain_overflow -{ - /* Do not complain on overflow. */ - complain_overflow_dont, - - /* Complain if the value overflows when considered as a signed - number one bit larger than the field. ie. A bitfield of N bits - is allowed to represent -2**n to 2**n-1. */ - complain_overflow_bitfield, - - /* Complain if the value overflows when considered as a signed - number. */ - complain_overflow_signed, - - /* Complain if the value overflows when considered as an - unsigned number. */ - complain_overflow_unsigned -}; -struct reloc_howto_struct -{ - /* The type field has mainly a documentary use - the back end can - do what it wants with it, though normally the back end's idea of - an external reloc number is stored in this field. */ - unsigned int type; - - /* The size of the item to be relocated in bytes. */ - unsigned int size:4; - - /* The number of bits in the field to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize:7; - - /* The value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift:6; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos:6; - - /* What type of overflow error should be checked for when - relocating. */ - ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - - /* The relocation value should be negated before applying. */ - unsigned int negate:1; - - /* The relocation is relative to the item being relocated. */ - unsigned int pc_relative:1; +/* Extracted from bfd.c. */ +typedef enum bfd_format + { + bfd_unknown = 0, /* File format is unknown. */ + bfd_object, /* Linker/assembler/compiler output. */ + bfd_archive, /* Object archive file. */ + bfd_core, /* Core dump. */ + bfd_type_end /* Marks the end; don't use it! */ + } +bfd_format; - /* Some formats record a relocation addend in the section contents - rather than with the relocation. For ELF formats this is the - distinction between USE_REL and USE_RELA (though the code checks - for USE_REL == 1/0). The value of this field is TRUE if the - addend is recorded with the section contents; when performing a - partial link (ld -r) the section contents (the data) will be - modified. The value of this field is FALSE if addends are - recorded with the relocation (in arelent.addend); when performing - a partial link the relocation will be modified. - All relocations for all ELF USE_RELA targets should set this field - to FALSE (values of TRUE should be looked on with suspicion). - However, the converse is not true: not all relocations of all ELF - USE_REL targets set this field to TRUE. Why this is so is peculiar - to each particular target. For relocs that aren't used in partial - links (e.g. GOT stuff) it doesn't matter what this is set to. */ - unsigned int partial_inplace:1; +enum bfd_direction + { + no_direction = 0, + read_direction = 1, + write_direction = 2, + both_direction = 3 + }; - /* When some formats create PC relative instructions, they leave - the value of the pc of the place being relocated in the offset - slot of the instruction, so that a PC relative relocation can - be made just by adding in an ordinary offset (e.g., sun3 a.out). - Some formats leave the displacement part of an instruction - empty (e.g., ELF); this flag signals the fact. */ - unsigned int pcrel_offset:1; +enum bfd_last_io + { + bfd_io_seek = 0, + bfd_io_read = 1, + bfd_io_write = 2, + bfd_io_force = 3 + }; - /* src_mask selects the part of the instruction (or data) to be used - in the relocation sum. If the target relocations don't have an - addend in the reloc, eg. ELF USE_REL, src_mask will normally equal - dst_mask to extract the addend from the section contents. If - relocations do have an addend in the reloc, eg. ELF USE_RELA, this - field should normally be zero. Non-zero values for ELF USE_RELA - targets should be viewed with suspicion as normally the value in - the dst_mask part of the section contents should be ignored. */ - bfd_vma src_mask; +enum bfd_plugin_format + { + bfd_plugin_unknown = 0, + bfd_plugin_yes = 1, + bfd_plugin_no = 2 + }; - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; +struct bfd_build_id + { + bfd_size_type size; + bfd_byte data[1]; + }; - /* If this field is non null, then the supplied function is - called rather than the normal function. This allows really - strange relocation methods to be accommodated. */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); +struct bfd +{ + /* The filename the application opened the BFD with. */ + const char *filename; - /* The textual name of the relocation type. */ - const char *name; -}; + /* A pointer to the target jump table. */ + const struct bfd_target *xvec; -#define HOWTO_RSIZE(sz) ((sz) < 0 ? -(sz) : (sz)) -#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ - inplace, src_mask, dst_mask, pcrel_off) \ - { (unsigned) type, HOWTO_RSIZE (size), bits, right, left, ovf, \ - size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } -#define EMPTY_HOWTO(C) \ - HOWTO ((C), 0, 1, 0, false, 0, complain_overflow_dont, NULL, \ - NULL, false, 0, 0, false) + /* The IOSTREAM, and corresponding IO vector that provide access + to the file backing the BFD. */ + void *iostream; + const struct bfd_iovec *iovec; -static inline unsigned int -bfd_get_reloc_size (reloc_howto_type *howto) -{ - return howto->size; -} + /* The caching routines use these to maintain a + least-recently-used list of BFDs. */ + struct bfd *lru_prev, *lru_next; -typedef struct relent_chain -{ - arelent relent; - struct relent_chain *next; -} -arelent_chain; + /* Track current file position (or current buffer offset for + in-memory BFDs). When a file is closed by the caching routines, + BFD retains state information on the file here. */ + ufile_ptr where; -bfd_reloc_status_type bfd_check_overflow - (enum complain_overflow how, - unsigned int bitsize, - unsigned int rightshift, - unsigned int addrsize, - bfd_vma relocation); + /* File modified time, if mtime_set is TRUE. */ + long mtime; -bool bfd_reloc_offset_in_range - (reloc_howto_type *howto, - bfd *abfd, - asection *section, - bfd_size_type offset); + /* A unique identifier of the BFD */ + unsigned int id; -bfd_reloc_status_type bfd_perform_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, - asection *input_section, - bfd *output_bfd, - char **error_message); + /* Format_specific flags. */ + flagword flags; -bfd_reloc_status_type bfd_install_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, bfd_vma data_start, - asection *input_section, - char **error_message); + /* Values that may appear in the flags field of a BFD. These also + appear in the object_flags field of the bfd_target structure, where + they indicate the set of flags used by that backend (not all flags + are meaningful for all object file formats) (FIXME: at the moment, + the object_flags values have mostly just been copied from backend + to another, and are not necessarily correct). */ -enum bfd_reloc_code_real { - _dummy_first_bfd_reloc_code_real, +#define BFD_NO_FLAGS 0x0 + /* BFD contains relocation entries. */ +#define HAS_RELOC 0x1 -/* Basic absolute relocations of N bits. */ - BFD_RELOC_64, - BFD_RELOC_32, - BFD_RELOC_26, - BFD_RELOC_24, - BFD_RELOC_16, - BFD_RELOC_14, - BFD_RELOC_8, + /* BFD is directly executable. */ +#define EXEC_P 0x2 -/* PC-relative relocations. Sometimes these are relative to the address -of the relocation itself; sometimes they are relative to the start of -the section containing the relocation. It depends on the specific target. */ - BFD_RELOC_64_PCREL, - BFD_RELOC_32_PCREL, - BFD_RELOC_24_PCREL, - BFD_RELOC_16_PCREL, - BFD_RELOC_12_PCREL, - BFD_RELOC_8_PCREL, + /* BFD has line number information (basically used for F_LNNO in a + COFF header). */ +#define HAS_LINENO 0x4 -/* Section relative relocations. Some targets need this for DWARF2. */ - BFD_RELOC_32_SECREL, - BFD_RELOC_16_SECIDX, + /* BFD has debugging information. */ +#define HAS_DEBUG 0x08 -/* For ELF. */ - BFD_RELOC_32_GOT_PCREL, - BFD_RELOC_16_GOT_PCREL, - BFD_RELOC_8_GOT_PCREL, - BFD_RELOC_32_GOTOFF, - BFD_RELOC_16_GOTOFF, - BFD_RELOC_LO16_GOTOFF, - BFD_RELOC_HI16_GOTOFF, - BFD_RELOC_HI16_S_GOTOFF, - BFD_RELOC_8_GOTOFF, - BFD_RELOC_64_PLT_PCREL, - BFD_RELOC_32_PLT_PCREL, - BFD_RELOC_24_PLT_PCREL, - BFD_RELOC_16_PLT_PCREL, - BFD_RELOC_8_PLT_PCREL, - BFD_RELOC_64_PLTOFF, - BFD_RELOC_32_PLTOFF, - BFD_RELOC_16_PLTOFF, - BFD_RELOC_LO16_PLTOFF, - BFD_RELOC_HI16_PLTOFF, - BFD_RELOC_HI16_S_PLTOFF, - BFD_RELOC_8_PLTOFF, + /* BFD has symbols. */ +#define HAS_SYMS 0x10 -/* Size relocations. */ - BFD_RELOC_SIZE32, - BFD_RELOC_SIZE64, + /* BFD has local symbols (basically used for F_LSYMS in a COFF + header). */ +#define HAS_LOCALS 0x20 -/* Relocations used by 68K ELF. */ - BFD_RELOC_68K_GLOB_DAT, - BFD_RELOC_68K_JMP_SLOT, - BFD_RELOC_68K_RELATIVE, - BFD_RELOC_68K_TLS_GD32, - BFD_RELOC_68K_TLS_GD16, - BFD_RELOC_68K_TLS_GD8, - BFD_RELOC_68K_TLS_LDM32, - BFD_RELOC_68K_TLS_LDM16, - BFD_RELOC_68K_TLS_LDM8, - BFD_RELOC_68K_TLS_LDO32, - BFD_RELOC_68K_TLS_LDO16, - BFD_RELOC_68K_TLS_LDO8, - BFD_RELOC_68K_TLS_IE32, - BFD_RELOC_68K_TLS_IE16, - BFD_RELOC_68K_TLS_IE8, - BFD_RELOC_68K_TLS_LE32, - BFD_RELOC_68K_TLS_LE16, - BFD_RELOC_68K_TLS_LE8, + /* BFD is a dynamic object. */ +#define DYNAMIC 0x40 -/* Linkage-table relative. */ - BFD_RELOC_32_BASEREL, - BFD_RELOC_16_BASEREL, - BFD_RELOC_LO16_BASEREL, - BFD_RELOC_HI16_BASEREL, - BFD_RELOC_HI16_S_BASEREL, - BFD_RELOC_8_BASEREL, - BFD_RELOC_RVA, + /* Text section is write protected (if D_PAGED is not set, this is + like an a.out NMAGIC file) (the linker sets this by default, but + clears it for -r or -N). */ +#define WP_TEXT 0x80 -/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */ - BFD_RELOC_8_FFnn, + /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the + linker sets this by default, but clears it for -r or -n or -N). */ +#define D_PAGED 0x100 -/* These PC-relative relocations are stored as word displacements -- -i.e., byte displacements shifted right two bits. The 30-bit word -displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the -SPARC. (SPARC tools generally refer to this as <>.) The -signed 16-bit displacement is used on the MIPS, and the 23-bit -displacement is used on the Alpha. */ - BFD_RELOC_32_PCREL_S2, - BFD_RELOC_16_PCREL_S2, - BFD_RELOC_23_PCREL_S2, + /* BFD is relaxable (this means that bfd_relax_section may be able to + do something) (sometimes bfd_relax_section can do something even if + this is not set). */ +#define BFD_IS_RELAXABLE 0x200 -/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of -the target word. These are used on the SPARC. */ - BFD_RELOC_HI22, - BFD_RELOC_LO10, + /* This may be set before writing out a BFD to request using a + traditional format. For example, this is used to request that when + writing out an a.out object the symbols not be hashed to eliminate + duplicates. */ +#define BFD_TRADITIONAL_FORMAT 0x400 -/* For systems that allocate a Global Pointer register, these are -displacements off that register. These relocation types are -handled specially, because the value the register will have is -decided relatively late. */ - BFD_RELOC_GPREL16, - BFD_RELOC_GPREL32, + /* This flag indicates that the BFD contents are actually cached + in memory. If this is set, iostream points to a bfd_in_memory + struct. */ +#define BFD_IN_MEMORY 0x800 -/* SPARC ELF relocations. There is probably some overlap with other -relocation types already defined. */ - BFD_RELOC_NONE, - BFD_RELOC_SPARC_WDISP22, - BFD_RELOC_SPARC22, - BFD_RELOC_SPARC13, - BFD_RELOC_SPARC_GOT10, - BFD_RELOC_SPARC_GOT13, - BFD_RELOC_SPARC_GOT22, - BFD_RELOC_SPARC_PC10, - BFD_RELOC_SPARC_PC22, - BFD_RELOC_SPARC_WPLT30, - BFD_RELOC_SPARC_COPY, - BFD_RELOC_SPARC_GLOB_DAT, - BFD_RELOC_SPARC_JMP_SLOT, - BFD_RELOC_SPARC_RELATIVE, - BFD_RELOC_SPARC_UA16, - BFD_RELOC_SPARC_UA32, - BFD_RELOC_SPARC_UA64, - BFD_RELOC_SPARC_GOTDATA_HIX22, - BFD_RELOC_SPARC_GOTDATA_LOX10, - BFD_RELOC_SPARC_GOTDATA_OP_HIX22, - BFD_RELOC_SPARC_GOTDATA_OP_LOX10, - BFD_RELOC_SPARC_GOTDATA_OP, - BFD_RELOC_SPARC_JMP_IREL, - BFD_RELOC_SPARC_IRELATIVE, + /* This BFD has been created by the linker and doesn't correspond + to any input file. */ +#define BFD_LINKER_CREATED 0x1000 + + /* This may be set before writing out a BFD to request that it + be written using values for UIDs, GIDs, timestamps, etc. that + will be consistent from run to run. */ +#define BFD_DETERMINISTIC_OUTPUT 0x2000 + + /* Compress sections in this BFD. */ +#define BFD_COMPRESS 0x4000 -/* I think these are specific to SPARC a.out (e.g., Sun 4). */ - BFD_RELOC_SPARC_BASE13, - BFD_RELOC_SPARC_BASE22, + /* Decompress sections in this BFD. */ +#define BFD_DECOMPRESS 0x8000 -/* SPARC64 relocations */ -#define BFD_RELOC_SPARC_64 BFD_RELOC_64 - BFD_RELOC_SPARC_10, - BFD_RELOC_SPARC_11, - BFD_RELOC_SPARC_OLO10, - BFD_RELOC_SPARC_HH22, - BFD_RELOC_SPARC_HM10, - BFD_RELOC_SPARC_LM22, - BFD_RELOC_SPARC_PC_HH22, - BFD_RELOC_SPARC_PC_HM10, - BFD_RELOC_SPARC_PC_LM22, - BFD_RELOC_SPARC_WDISP16, - BFD_RELOC_SPARC_WDISP19, - BFD_RELOC_SPARC_7, - BFD_RELOC_SPARC_6, - BFD_RELOC_SPARC_5, -#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL - BFD_RELOC_SPARC_PLT32, - BFD_RELOC_SPARC_PLT64, - BFD_RELOC_SPARC_HIX22, - BFD_RELOC_SPARC_LOX10, - BFD_RELOC_SPARC_H44, - BFD_RELOC_SPARC_M44, - BFD_RELOC_SPARC_L44, - BFD_RELOC_SPARC_REGISTER, - BFD_RELOC_SPARC_H34, - BFD_RELOC_SPARC_SIZE32, - BFD_RELOC_SPARC_SIZE64, - BFD_RELOC_SPARC_WDISP10, + /* BFD is a dummy, for plugins. */ +#define BFD_PLUGIN 0x10000 -/* SPARC little endian relocation */ - BFD_RELOC_SPARC_REV32, + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 -/* SPARC TLS relocations */ - BFD_RELOC_SPARC_TLS_GD_HI22, - BFD_RELOC_SPARC_TLS_GD_LO10, - BFD_RELOC_SPARC_TLS_GD_ADD, - BFD_RELOC_SPARC_TLS_GD_CALL, - BFD_RELOC_SPARC_TLS_LDM_HI22, - BFD_RELOC_SPARC_TLS_LDM_LO10, - BFD_RELOC_SPARC_TLS_LDM_ADD, - BFD_RELOC_SPARC_TLS_LDM_CALL, - BFD_RELOC_SPARC_TLS_LDO_HIX22, - BFD_RELOC_SPARC_TLS_LDO_LOX10, - BFD_RELOC_SPARC_TLS_LDO_ADD, - BFD_RELOC_SPARC_TLS_IE_HI22, - BFD_RELOC_SPARC_TLS_IE_LO10, - BFD_RELOC_SPARC_TLS_IE_LD, - BFD_RELOC_SPARC_TLS_IE_LDX, - BFD_RELOC_SPARC_TLS_IE_ADD, - BFD_RELOC_SPARC_TLS_LE_HIX22, - BFD_RELOC_SPARC_TLS_LE_LOX10, - BFD_RELOC_SPARC_TLS_DTPMOD32, - BFD_RELOC_SPARC_TLS_DTPMOD64, - BFD_RELOC_SPARC_TLS_DTPOFF32, - BFD_RELOC_SPARC_TLS_DTPOFF64, - BFD_RELOC_SPARC_TLS_TPOFF32, - BFD_RELOC_SPARC_TLS_TPOFF64, + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 -/* SPU Relocations. */ - BFD_RELOC_SPU_IMM7, - BFD_RELOC_SPU_IMM8, - BFD_RELOC_SPU_IMM10, - BFD_RELOC_SPU_IMM10W, - BFD_RELOC_SPU_IMM16, - BFD_RELOC_SPU_IMM16W, - BFD_RELOC_SPU_IMM18, - BFD_RELOC_SPU_PCREL9a, - BFD_RELOC_SPU_PCREL9b, - BFD_RELOC_SPU_PCREL16, - BFD_RELOC_SPU_LO16, - BFD_RELOC_SPU_HI16, - BFD_RELOC_SPU_PPU32, - BFD_RELOC_SPU_PPU64, - BFD_RELOC_SPU_ADD_PIC, + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 -/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or -"addend" in some special way. -For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when -writing; when reading, it will be the absolute section symbol. The -addend is the displacement in bytes of the "lda" instruction from -the "ldah" instruction (which is at the address of this reloc). */ - BFD_RELOC_ALPHA_GPDISP_HI16, + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 -/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as -with GPDISP_HI16 relocs. The addend is ignored when writing the -relocations out, and is filled in with the file's GP value on -reading, for convenience. */ - BFD_RELOC_ALPHA_GPDISP_LO16, +#define BFD_CLOSED_BY_CACHE 0x200000 + /* Compress sections in this BFD with SHF_COMPRESSED zstd. */ +#define BFD_COMPRESS_ZSTD 0x400000 -/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 -relocation except that there is no accompanying GPDISP_LO16 -relocation. */ - BFD_RELOC_ALPHA_GPDISP, + /* Don't generate ELF section header. */ +#define BFD_NO_SECTION_HEADER 0x800000 -/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; -the assembler turns it into a LDQ instruction to load the address of -the symbol, and then fills in a register in the real instruction. + /* Flags bits which are for BFD use only. */ +#define BFD_FLAGS_FOR_BFD_USE_MASK \ + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON \ + | BFD_NO_SECTION_HEADER) -The LITERAL reloc, at the LDQ instruction, refers to the .lita -section symbol. The addend is ignored when writing, but is filled -in with the file's GP value on reading, for convenience, as with the -GPDISP_LO16 reloc. + /* The format which belongs to the BFD. (object, core, etc.) */ + ENUM_BITFIELD (bfd_format) format : 3; -The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16. -It should refer to the symbol to be referenced, as with 16_GOTOFF, -but it generates output not based on the position within the .got -section, but relative to the GP value chosen for the file during the -final link stage. + /* The direction with which the BFD was opened. */ + ENUM_BITFIELD (bfd_direction) direction : 2; -The LITUSE reloc, on the instruction using the loaded address, gives -information to the linker that it might be able to use to optimize -away some literal section references. The symbol is ignored (read -as the absolute section symbol), and the "addend" indicates the type -of instruction using the register: -1 - "memory" fmt insn -2 - byte-manipulation (byte offset reg) -3 - jsr (target of branch) */ - BFD_RELOC_ALPHA_LITERAL, - BFD_RELOC_ALPHA_ELF_LITERAL, - BFD_RELOC_ALPHA_LITUSE, + /* POSIX.1-2017 (IEEE Std 1003.1) says of fopen : "When a file is + opened with update mode ('+' as the second or third character in + the mode argument), both input and output may be performed on + the associated stream. However, the application shall ensure + that output is not directly followed by input without an + intervening call to fflush() or to a file positioning function + (fseek(), fsetpos(), or rewind()), and input is not directly + followed by output without an intervening call to a file + positioning function, unless the input operation encounters + end-of-file." + This field tracks the last IO operation, so that bfd can insert + a seek when IO direction changes. */ + ENUM_BITFIELD (bfd_last_io) last_io : 2; -/* The HINT relocation indicates a value that should be filled into the -"hint" field of a jmp/jsr/ret instruction, for possible branch- -prediction logic which may be provided on some processors. */ - BFD_RELOC_ALPHA_HINT, + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; -/* The LINKAGE relocation outputs a linkage pair in the object file, -which is filled by the linker. */ - BFD_RELOC_ALPHA_LINKAGE, + /* Marks whether there was a default target specified when the + BFD was opened. This is used to select which matching algorithm + to use to choose the back end. */ + unsigned int target_defaulted : 1; -/* The CODEADDR relocation outputs a STO_CA in the object file, -which is filled by the linker. */ - BFD_RELOC_ALPHA_CODEADDR, + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; -/* The GPREL_HI/LO relocations together form a 32-bit offset from the -GP register. */ - BFD_RELOC_ALPHA_GPREL_HI16, - BFD_RELOC_ALPHA_GPREL_LO16, + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; -/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must -share a common GP, and the target address is adjusted for -STO_ALPHA_STD_GPLOAD. */ - BFD_RELOC_ALPHA_BRSGP, + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; -/* The NOP relocation outputs a NOP if the longword displacement -between two procedure entry points is < 2^21. */ - BFD_RELOC_ALPHA_NOP, + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; -/* The BSR relocation outputs a BSR if the longword displacement -between two procedure entry points is < 2^21. */ - BFD_RELOC_ALPHA_BSR, + /* Have archive map. */ + unsigned int has_armap : 1; -/* The LDA relocation outputs a LDA if the longword displacement -between two procedure entry points is < 2^16. */ - BFD_RELOC_ALPHA_LDA, + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; -/* The BOH relocation outputs a BSR if the longword displacement -between two procedure entry points is < 2^21, or else a hint. */ - BFD_RELOC_ALPHA_BOH, + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; -/* Alpha thread-local storage relocations. */ - BFD_RELOC_ALPHA_TLSGD, - BFD_RELOC_ALPHA_TLSLDM, - BFD_RELOC_ALPHA_DTPMOD64, - BFD_RELOC_ALPHA_GOTDTPREL16, - BFD_RELOC_ALPHA_DTPREL64, - BFD_RELOC_ALPHA_DTPREL_HI16, - BFD_RELOC_ALPHA_DTPREL_LO16, - BFD_RELOC_ALPHA_DTPREL16, - BFD_RELOC_ALPHA_GOTTPREL16, - BFD_RELOC_ALPHA_TPREL64, - BFD_RELOC_ALPHA_TPREL_HI16, - BFD_RELOC_ALPHA_TPREL_LO16, - BFD_RELOC_ALPHA_TPREL16, + /* Set if only required symbols should be added in the link hash table for + this object. Used by VMS linkers. */ + unsigned int selective_search : 1; -/* The MIPS jump instruction. */ - BFD_RELOC_MIPS_JMP, - BFD_RELOC_MICROMIPS_JMP, + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; -/* The MIPS16 jump instruction. */ - BFD_RELOC_MIPS16_JMP, + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; -/* MIPS16 GP relative reloc. */ - BFD_RELOC_MIPS16_GPREL, + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; -/* High 16 bits of 32-bit value; simple reloc. */ - BFD_RELOC_HI16, + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; -/* High 16 bits of 32-bit value but the low 16 bits will be sign -extended and added to form the final result. If the low 16 -bits form a negative number, we need to add one to the high value -to compensate for the borrow when the low bits are added. */ - BFD_RELOC_HI16_S, + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; -/* Low 16 bits. */ - BFD_RELOC_LO16, + /* Do not attempt to modify this file. Set when detecting errors + that BFD is not prepared to handle for objcopy/strip. */ + unsigned int read_only : 1; -/* High 16 bits of 32-bit pc-relative value */ - BFD_RELOC_HI16_PCREL, + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; + + /* The offset of this bfd in the file, typically 0 if it is not + contained in an archive. */ + ufile_ptr origin; + + /* The origin in the archive of the proxy entry. This will + normally be the same as origin, except for thin archives, + when it will contain the current offset of the proxy in the + thin archive rather than the offset of the bfd in its actual + container. */ + ufile_ptr proxy_origin; + + /* A hash table for section names. */ + struct bfd_hash_table section_htab; -/* High 16 bits of 32-bit pc-relative value, adjusted */ - BFD_RELOC_HI16_S_PCREL, + /* Pointer to linked list of sections. */ + struct bfd_section *sections; -/* Low 16 bits of pc-relative value */ - BFD_RELOC_LO16_PCREL, + /* The last section on the section list. */ + struct bfd_section *section_last; -/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of -16-bit immediate fields */ - BFD_RELOC_MIPS16_GOT16, - BFD_RELOC_MIPS16_CALL16, + /* The number of sections. */ + unsigned int section_count; -/* MIPS16 high 16 bits of 32-bit value. */ - BFD_RELOC_MIPS16_HI16, + /* The archive plugin file descriptor. */ + int archive_plugin_fd; -/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign -extended and added to form the final result. If the low 16 -bits form a negative number, we need to add one to the high value -to compensate for the borrow when the low bits are added. */ - BFD_RELOC_MIPS16_HI16_S, + /* The number of opens on the archive plugin file descriptor. */ + unsigned int archive_plugin_fd_open_count; -/* MIPS16 low 16 bits. */ - BFD_RELOC_MIPS16_LO16, + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; -/* MIPS16 TLS relocations */ - BFD_RELOC_MIPS16_TLS_GD, - BFD_RELOC_MIPS16_TLS_LDM, - BFD_RELOC_MIPS16_TLS_DTPREL_HI16, - BFD_RELOC_MIPS16_TLS_DTPREL_LO16, - BFD_RELOC_MIPS16_TLS_GOTTPREL, - BFD_RELOC_MIPS16_TLS_TPREL_HI16, - BFD_RELOC_MIPS16_TLS_TPREL_LO16, + /* The total size of memory from bfd_alloc. */ + bfd_size_type alloc_size; -/* Relocation against a MIPS literal section. */ - BFD_RELOC_MIPS_LITERAL, - BFD_RELOC_MICROMIPS_LITERAL, + /* Stuff only useful for object files: + The start address. */ + bfd_vma start_address; -/* microMIPS PC-relative relocations. */ - BFD_RELOC_MICROMIPS_7_PCREL_S1, - BFD_RELOC_MICROMIPS_10_PCREL_S1, - BFD_RELOC_MICROMIPS_16_PCREL_S1, + /* Symbol table for output BFD (with symcount entries). + Also used by the linker to cache input BFD symbols. */ + struct bfd_symbol **outsymbols; -/* MIPS16 PC-relative relocation. */ - BFD_RELOC_MIPS16_16_PCREL_S1, + /* Used for input and output. */ + unsigned int symcount; -/* MIPS PC-relative relocations. */ - BFD_RELOC_MIPS_21_PCREL_S2, - BFD_RELOC_MIPS_26_PCREL_S2, - BFD_RELOC_MIPS_18_PCREL_S3, - BFD_RELOC_MIPS_19_PCREL_S2, + /* Used for slurped dynamic symbol tables. */ + unsigned int dynsymcount; -/* microMIPS versions of generic BFD relocs. */ - BFD_RELOC_MICROMIPS_GPREL16, - BFD_RELOC_MICROMIPS_HI16, - BFD_RELOC_MICROMIPS_HI16_S, - BFD_RELOC_MICROMIPS_LO16, + /* Pointer to structure which contains architecture information. */ + const struct bfd_arch_info *arch_info; -/* MIPS ELF relocations. */ - BFD_RELOC_MIPS_GOT16, - BFD_RELOC_MICROMIPS_GOT16, - BFD_RELOC_MIPS_CALL16, - BFD_RELOC_MICROMIPS_CALL16, - BFD_RELOC_MIPS_GOT_HI16, - BFD_RELOC_MICROMIPS_GOT_HI16, - BFD_RELOC_MIPS_GOT_LO16, - BFD_RELOC_MICROMIPS_GOT_LO16, - BFD_RELOC_MIPS_CALL_HI16, - BFD_RELOC_MICROMIPS_CALL_HI16, - BFD_RELOC_MIPS_CALL_LO16, - BFD_RELOC_MICROMIPS_CALL_LO16, - BFD_RELOC_MIPS_SUB, - BFD_RELOC_MICROMIPS_SUB, - BFD_RELOC_MIPS_GOT_PAGE, - BFD_RELOC_MICROMIPS_GOT_PAGE, - BFD_RELOC_MIPS_GOT_OFST, - BFD_RELOC_MICROMIPS_GOT_OFST, - BFD_RELOC_MIPS_GOT_DISP, - BFD_RELOC_MICROMIPS_GOT_DISP, - BFD_RELOC_MIPS_SHIFT5, - BFD_RELOC_MIPS_SHIFT6, - BFD_RELOC_MIPS_INSERT_A, - BFD_RELOC_MIPS_INSERT_B, - BFD_RELOC_MIPS_DELETE, - BFD_RELOC_MIPS_HIGHEST, - BFD_RELOC_MICROMIPS_HIGHEST, - BFD_RELOC_MIPS_HIGHER, - BFD_RELOC_MICROMIPS_HIGHER, - BFD_RELOC_MIPS_SCN_DISP, - BFD_RELOC_MICROMIPS_SCN_DISP, - BFD_RELOC_MIPS_16, - BFD_RELOC_MIPS_RELGOT, - BFD_RELOC_MIPS_JALR, - BFD_RELOC_MICROMIPS_JALR, - BFD_RELOC_MIPS_TLS_DTPMOD32, - BFD_RELOC_MIPS_TLS_DTPREL32, - BFD_RELOC_MIPS_TLS_DTPMOD64, - BFD_RELOC_MIPS_TLS_DTPREL64, - BFD_RELOC_MIPS_TLS_GD, - BFD_RELOC_MICROMIPS_TLS_GD, - BFD_RELOC_MIPS_TLS_LDM, - BFD_RELOC_MICROMIPS_TLS_LDM, - BFD_RELOC_MIPS_TLS_DTPREL_HI16, - BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16, - BFD_RELOC_MIPS_TLS_DTPREL_LO16, - BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16, - BFD_RELOC_MIPS_TLS_GOTTPREL, - BFD_RELOC_MICROMIPS_TLS_GOTTPREL, - BFD_RELOC_MIPS_TLS_TPREL32, - BFD_RELOC_MIPS_TLS_TPREL64, - BFD_RELOC_MIPS_TLS_TPREL_HI16, - BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, - BFD_RELOC_MIPS_TLS_TPREL_LO16, - BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, - BFD_RELOC_MIPS_EH, + /* Cached length of file for bfd_get_size. 0 until bfd_get_size is + called, 1 if stat returns an error or the file size is too large to + return in ufile_ptr. Both 0 and 1 should be treated as "unknown". */ + ufile_ptr size; + /* Stuff only useful for archives. */ + void *arelt_data; + struct bfd *my_archive; /* The containing archive BFD. */ + struct bfd *archive_next; /* The next BFD in the archive. */ + struct bfd *archive_head; /* The first BFD in the archive. */ + struct bfd *nested_archives; /* List of nested archive in a flattened + thin archive. */ -/* MIPS ELF relocations (VxWorks and PLT extensions). */ - BFD_RELOC_MIPS_COPY, - BFD_RELOC_MIPS_JUMP_SLOT, + union { + /* For input BFDs, a chain of BFDs involved in a link. */ + struct bfd *next; + /* For output BFD, the linker hash table. */ + struct bfd_link_hash_table *hash; + } link; + /* Used by the back end to hold private data. */ + union + { + struct aout_data_struct *aout_data; + struct artdata *aout_ar_data; + struct coff_tdata *coff_obj_data; + struct pe_tdata *pe_obj_data; + struct xcoff_tdata *xcoff_obj_data; + struct ecoff_tdata *ecoff_obj_data; + struct srec_data_struct *srec_data; + struct verilog_data_struct *verilog_data; + struct ihex_data_struct *ihex_data; + struct tekhex_data_struct *tekhex_data; + struct elf_obj_tdata *elf_obj_data; + struct mmo_data_struct *mmo_data; + struct trad_core_struct *trad_core_data; + struct som_data_struct *som_data; + struct hpux_core_struct *hpux_core_data; + struct hppabsd_core_struct *hppabsd_core_data; + struct sgi_core_struct *sgi_core_data; + struct lynx_core_struct *lynx_core_data; + struct osf_core_struct *osf_core_data; + struct cisco_core_struct *cisco_core_data; + struct netbsd_core_struct *netbsd_core_data; + struct mach_o_data_struct *mach_o_data; + struct mach_o_fat_data_struct *mach_o_fat_data; + struct plugin_data_struct *plugin_data; + struct bfd_pef_data_struct *pef_data; + struct bfd_pef_xlib_data_struct *pef_xlib_data; + struct bfd_sym_data_struct *sym_data; + void *any; + } + tdata; -/* Moxie ELF relocations. */ - BFD_RELOC_MOXIE_10_PCREL, + /* Used by the application to hold private data. */ + void *usrdata; + /* Where all the allocated stuff under this BFD goes. This is a + struct objalloc *, but we use void * to avoid requiring the inclusion + of objalloc.h. */ + void *memory; -/* FT32 ELF relocations. */ - BFD_RELOC_FT32_10, - BFD_RELOC_FT32_20, - BFD_RELOC_FT32_17, - BFD_RELOC_FT32_18, - BFD_RELOC_FT32_RELAX, - BFD_RELOC_FT32_SC0, - BFD_RELOC_FT32_SC1, - BFD_RELOC_FT32_15, - BFD_RELOC_FT32_DIFF32, + /* For input BFDs, the build ID, if the object has one. */ + const struct bfd_build_id *build_id; +}; +static inline const char * +bfd_get_filename (const bfd *abfd) +{ + return abfd->filename; +} -/* Fujitsu Frv Relocations. */ - BFD_RELOC_FRV_LABEL16, - BFD_RELOC_FRV_LABEL24, - BFD_RELOC_FRV_LO16, - BFD_RELOC_FRV_HI16, - BFD_RELOC_FRV_GPREL12, - BFD_RELOC_FRV_GPRELU12, - BFD_RELOC_FRV_GPREL32, - BFD_RELOC_FRV_GPRELHI, - BFD_RELOC_FRV_GPRELLO, - BFD_RELOC_FRV_GOT12, - BFD_RELOC_FRV_GOTHI, - BFD_RELOC_FRV_GOTLO, - BFD_RELOC_FRV_FUNCDESC, - BFD_RELOC_FRV_FUNCDESC_GOT12, - BFD_RELOC_FRV_FUNCDESC_GOTHI, - BFD_RELOC_FRV_FUNCDESC_GOTLO, - BFD_RELOC_FRV_FUNCDESC_VALUE, - BFD_RELOC_FRV_FUNCDESC_GOTOFF12, - BFD_RELOC_FRV_FUNCDESC_GOTOFFHI, - BFD_RELOC_FRV_FUNCDESC_GOTOFFLO, - BFD_RELOC_FRV_GOTOFF12, - BFD_RELOC_FRV_GOTOFFHI, - BFD_RELOC_FRV_GOTOFFLO, - BFD_RELOC_FRV_GETTLSOFF, - BFD_RELOC_FRV_TLSDESC_VALUE, - BFD_RELOC_FRV_GOTTLSDESC12, - BFD_RELOC_FRV_GOTTLSDESCHI, - BFD_RELOC_FRV_GOTTLSDESCLO, - BFD_RELOC_FRV_TLSMOFF12, - BFD_RELOC_FRV_TLSMOFFHI, - BFD_RELOC_FRV_TLSMOFFLO, - BFD_RELOC_FRV_GOTTLSOFF12, - BFD_RELOC_FRV_GOTTLSOFFHI, - BFD_RELOC_FRV_GOTTLSOFFLO, - BFD_RELOC_FRV_TLSOFF, - BFD_RELOC_FRV_TLSDESC_RELAX, - BFD_RELOC_FRV_GETTLSOFF_RELAX, - BFD_RELOC_FRV_TLSOFF_RELAX, - BFD_RELOC_FRV_TLSMOFF, +static inline bool +bfd_get_cacheable (const bfd *abfd) +{ + return abfd->cacheable; +} + +static inline enum bfd_format +bfd_get_format (const bfd *abfd) +{ + return abfd->format; +} +static inline flagword +bfd_get_file_flags (const bfd *abfd) +{ + return abfd->flags; +} -/* This is a 24bit GOT-relative reloc for the mn10300. */ - BFD_RELOC_MN10300_GOTOFF24, +static inline bfd_vma +bfd_get_start_address (const bfd *abfd) +{ + return abfd->start_address; +} -/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes -in the instruction. */ - BFD_RELOC_MN10300_GOT32, +static inline unsigned int +bfd_get_symcount (const bfd *abfd) +{ + return abfd->symcount; +} -/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes -in the instruction. */ - BFD_RELOC_MN10300_GOT24, +static inline unsigned int +bfd_get_dynamic_symcount (const bfd *abfd) +{ + return abfd->dynsymcount; +} -/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes -in the instruction. */ - BFD_RELOC_MN10300_GOT16, +static inline struct bfd_symbol ** +bfd_get_outsymbols (const bfd *abfd) +{ + return abfd->outsymbols; +} -/* Copy symbol at runtime. */ - BFD_RELOC_MN10300_COPY, +static inline unsigned int +bfd_count_sections (const bfd *abfd) +{ + return abfd->section_count; +} -/* Create GOT entry. */ - BFD_RELOC_MN10300_GLOB_DAT, +static inline bool +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} -/* Create PLT entry. */ - BFD_RELOC_MN10300_JMP_SLOT, +static inline bool +bfd_is_thin_archive (const bfd *abfd) +{ + return abfd->is_thin_archive; +} -/* Adjust by program base. */ - BFD_RELOC_MN10300_RELATIVE, +static inline void * +bfd_usrdata (const bfd *abfd) +{ + return abfd->usrdata; +} -/* Together with another reloc targeted at the same location, -allows for a value that is the difference of two symbols -in the same section. */ - BFD_RELOC_MN10300_SYM_DIFF, +/* See note beside bfd_set_section_userdata. */ +static inline bool +bfd_set_cacheable (bfd * abfd, bool val) +{ + abfd->cacheable = val; + return true; +} -/* The addend of this reloc is an alignment power that must -be honoured at the offset's location, regardless of linker -relaxation. */ - BFD_RELOC_MN10300_ALIGN, +static inline void +bfd_set_thin_archive (bfd *abfd, bool val) +{ + abfd->is_thin_archive = val; +} -/* Various TLS-related relocations. */ - BFD_RELOC_MN10300_TLS_GD, - BFD_RELOC_MN10300_TLS_LD, - BFD_RELOC_MN10300_TLS_LDO, - BFD_RELOC_MN10300_TLS_GOTIE, - BFD_RELOC_MN10300_TLS_IE, - BFD_RELOC_MN10300_TLS_LE, - BFD_RELOC_MN10300_TLS_DTPMOD, - BFD_RELOC_MN10300_TLS_DTPOFF, - BFD_RELOC_MN10300_TLS_TPOFF, +static inline void +bfd_set_usrdata (bfd *abfd, void *val) +{ + abfd->usrdata = val; +} -/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the -instruction. */ - BFD_RELOC_MN10300_32_PCREL, +static inline asection * +bfd_asymbol_section (const asymbol *sy) +{ + return sy->section; +} -/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the -instruction. */ - BFD_RELOC_MN10300_16_PCREL, +static inline bfd_vma +bfd_asymbol_value (const asymbol *sy) +{ + return sy->section->vma + sy->value; +} +static inline const char * +bfd_asymbol_name (const asymbol *sy) +{ + return sy->name; +} -/* i386/elf relocations */ - BFD_RELOC_386_GOT32, - BFD_RELOC_386_PLT32, - BFD_RELOC_386_COPY, - BFD_RELOC_386_GLOB_DAT, - BFD_RELOC_386_JUMP_SLOT, - BFD_RELOC_386_RELATIVE, - BFD_RELOC_386_GOTOFF, - BFD_RELOC_386_GOTPC, - BFD_RELOC_386_TLS_TPOFF, - BFD_RELOC_386_TLS_IE, - BFD_RELOC_386_TLS_GOTIE, - BFD_RELOC_386_TLS_LE, - BFD_RELOC_386_TLS_GD, - BFD_RELOC_386_TLS_LDM, - BFD_RELOC_386_TLS_LDO_32, - BFD_RELOC_386_TLS_IE_32, - BFD_RELOC_386_TLS_LE_32, - BFD_RELOC_386_TLS_DTPMOD32, - BFD_RELOC_386_TLS_DTPOFF32, - BFD_RELOC_386_TLS_TPOFF32, - BFD_RELOC_386_TLS_GOTDESC, - BFD_RELOC_386_TLS_DESC_CALL, - BFD_RELOC_386_TLS_DESC, - BFD_RELOC_386_IRELATIVE, - BFD_RELOC_386_GOT32X, +static inline struct bfd * +bfd_asymbol_bfd (const asymbol *sy) +{ + return sy->the_bfd; +} -/* x86-64/elf relocations */ - BFD_RELOC_X86_64_GOT32, - BFD_RELOC_X86_64_PLT32, - BFD_RELOC_X86_64_COPY, - BFD_RELOC_X86_64_GLOB_DAT, - BFD_RELOC_X86_64_JUMP_SLOT, - BFD_RELOC_X86_64_RELATIVE, - BFD_RELOC_X86_64_GOTPCREL, - BFD_RELOC_X86_64_32S, - BFD_RELOC_X86_64_DTPMOD64, - BFD_RELOC_X86_64_DTPOFF64, - BFD_RELOC_X86_64_TPOFF64, - BFD_RELOC_X86_64_TLSGD, - BFD_RELOC_X86_64_TLSLD, - BFD_RELOC_X86_64_DTPOFF32, - BFD_RELOC_X86_64_GOTTPOFF, - BFD_RELOC_X86_64_TPOFF32, - BFD_RELOC_X86_64_GOTOFF64, - BFD_RELOC_X86_64_GOTPC32, - BFD_RELOC_X86_64_GOT64, - BFD_RELOC_X86_64_GOTPCREL64, - BFD_RELOC_X86_64_GOTPC64, - BFD_RELOC_X86_64_GOTPLT64, - BFD_RELOC_X86_64_PLTOFF64, - BFD_RELOC_X86_64_GOTPC32_TLSDESC, - BFD_RELOC_X86_64_TLSDESC_CALL, - BFD_RELOC_X86_64_TLSDESC, - BFD_RELOC_X86_64_IRELATIVE, - BFD_RELOC_X86_64_PC32_BND, - BFD_RELOC_X86_64_PLT32_BND, - BFD_RELOC_X86_64_GOTPCRELX, - BFD_RELOC_X86_64_REX_GOTPCRELX, +static inline void +bfd_set_asymbol_name (asymbol *sy, const char *name) +{ + sy->name = name; +} + +/* For input sections return the original size on disk of the + section. For output sections return the current size. */ +static inline bfd_size_type +bfd_get_section_limit_octets (const bfd *abfd, const asection *sec) +{ + if (abfd->direction != write_direction && sec->rawsize != 0) + return sec->rawsize; + return sec->size; +} + +/* Find the address one past the end of SEC. */ +static inline bfd_size_type +bfd_get_section_limit (const bfd *abfd, const asection *sec) +{ + return (bfd_get_section_limit_octets (abfd, sec) + / bfd_octets_per_byte (abfd, sec)); +} + +/* For input sections return the larger of the current size and the + original size on disk of the section. For output sections return + the current size. */ +static inline bfd_size_type +bfd_get_section_alloc_size (const bfd *abfd, const asection *sec) +{ + if (abfd->direction != write_direction && sec->rawsize > sec->size) + return sec->rawsize; + return sec->size; +} + +/* Functions to handle insertion and deletion of a bfd's sections. These + only handle the list pointers, ie. do not adjust section_count, + target_index etc. */ +static inline void +bfd_section_list_remove (bfd *abfd, asection *s) +{ + asection *next = s->next; + asection *prev = s->prev; + if (prev) + prev->next = next; + else + abfd->sections = next; + if (next) + next->prev = prev; + else + abfd->section_last = prev; +} + +static inline void +bfd_section_list_append (bfd *abfd, asection *s) +{ + s->next = 0; + if (abfd->section_last) + { + s->prev = abfd->section_last; + abfd->section_last->next = s; + } + else + { + s->prev = 0; + abfd->sections = s; + } + abfd->section_last = s; +} + +static inline void +bfd_section_list_prepend (bfd *abfd, asection *s) +{ + s->prev = 0; + if (abfd->sections) + { + s->next = abfd->sections; + abfd->sections->prev = s; + } + else + { + s->next = 0; + abfd->section_last = s; + } + abfd->sections = s; +} -/* ns32k relocations */ - BFD_RELOC_NS32K_IMM_8, - BFD_RELOC_NS32K_IMM_16, - BFD_RELOC_NS32K_IMM_32, - BFD_RELOC_NS32K_IMM_8_PCREL, - BFD_RELOC_NS32K_IMM_16_PCREL, - BFD_RELOC_NS32K_IMM_32_PCREL, - BFD_RELOC_NS32K_DISP_8, - BFD_RELOC_NS32K_DISP_16, - BFD_RELOC_NS32K_DISP_32, - BFD_RELOC_NS32K_DISP_8_PCREL, - BFD_RELOC_NS32K_DISP_16_PCREL, - BFD_RELOC_NS32K_DISP_32_PCREL, +static inline void +bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s) +{ + asection *next = a->next; + s->next = next; + s->prev = a; + a->next = s; + if (next) + next->prev = s; + else + abfd->section_last = s; +} -/* PDP11 relocations */ - BFD_RELOC_PDP11_DISP_8_PCREL, - BFD_RELOC_PDP11_DISP_6_PCREL, +static inline void +bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s) +{ + asection *prev = b->prev; + s->prev = prev; + s->next = b; + b->prev = s; + if (prev) + prev->next = s; + else + abfd->sections = s; +} -/* Picojava relocs. Not all of these appear in object files. */ - BFD_RELOC_PJ_CODE_HI16, - BFD_RELOC_PJ_CODE_LO16, - BFD_RELOC_PJ_CODE_DIR16, - BFD_RELOC_PJ_CODE_DIR32, - BFD_RELOC_PJ_CODE_REL16, - BFD_RELOC_PJ_CODE_REL32, +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; +} -/* Power(rs6000) and PowerPC relocations. */ - BFD_RELOC_PPC_B26, - BFD_RELOC_PPC_BA26, - BFD_RELOC_PPC_TOC16, - BFD_RELOC_PPC_TOC16_LO, - BFD_RELOC_PPC_TOC16_HI, - BFD_RELOC_PPC_B16, - BFD_RELOC_PPC_B16_BRTAKEN, - BFD_RELOC_PPC_B16_BRNTAKEN, - BFD_RELOC_PPC_BA16, - BFD_RELOC_PPC_BA16_BRTAKEN, - BFD_RELOC_PPC_BA16_BRNTAKEN, - BFD_RELOC_PPC_COPY, - BFD_RELOC_PPC_GLOB_DAT, - BFD_RELOC_PPC_JMP_SLOT, - BFD_RELOC_PPC_RELATIVE, - BFD_RELOC_PPC_LOCAL24PC, - BFD_RELOC_PPC_EMB_NADDR32, - BFD_RELOC_PPC_EMB_NADDR16, - BFD_RELOC_PPC_EMB_NADDR16_LO, - BFD_RELOC_PPC_EMB_NADDR16_HI, - BFD_RELOC_PPC_EMB_NADDR16_HA, - BFD_RELOC_PPC_EMB_SDAI16, - BFD_RELOC_PPC_EMB_SDA2I16, - BFD_RELOC_PPC_EMB_SDA2REL, - BFD_RELOC_PPC_EMB_SDA21, - BFD_RELOC_PPC_EMB_MRKREF, - BFD_RELOC_PPC_EMB_RELSEC16, - BFD_RELOC_PPC_EMB_RELST_LO, - BFD_RELOC_PPC_EMB_RELST_HI, - BFD_RELOC_PPC_EMB_RELST_HA, - BFD_RELOC_PPC_EMB_BIT_FLD, - BFD_RELOC_PPC_EMB_RELSDA, - BFD_RELOC_PPC_VLE_REL8, - BFD_RELOC_PPC_VLE_REL15, - BFD_RELOC_PPC_VLE_REL24, - BFD_RELOC_PPC_VLE_LO16A, - BFD_RELOC_PPC_VLE_LO16D, - BFD_RELOC_PPC_VLE_HI16A, - BFD_RELOC_PPC_VLE_HI16D, - BFD_RELOC_PPC_VLE_HA16A, - BFD_RELOC_PPC_VLE_HA16D, - BFD_RELOC_PPC_VLE_SDA21, - BFD_RELOC_PPC_VLE_SDA21_LO, - BFD_RELOC_PPC_VLE_SDAREL_LO16A, - BFD_RELOC_PPC_VLE_SDAREL_LO16D, - BFD_RELOC_PPC_VLE_SDAREL_HI16A, - BFD_RELOC_PPC_VLE_SDAREL_HI16D, - BFD_RELOC_PPC_VLE_SDAREL_HA16A, - BFD_RELOC_PPC_VLE_SDAREL_HA16D, - BFD_RELOC_PPC_16DX_HA, - BFD_RELOC_PPC_REL16DX_HA, - BFD_RELOC_PPC_NEG, - BFD_RELOC_PPC64_HIGHER, - BFD_RELOC_PPC64_HIGHER_S, - BFD_RELOC_PPC64_HIGHEST, - BFD_RELOC_PPC64_HIGHEST_S, - BFD_RELOC_PPC64_TOC16_LO, - BFD_RELOC_PPC64_TOC16_HI, - BFD_RELOC_PPC64_TOC16_HA, - BFD_RELOC_PPC64_TOC, - BFD_RELOC_PPC64_PLTGOT16, - BFD_RELOC_PPC64_PLTGOT16_LO, - BFD_RELOC_PPC64_PLTGOT16_HI, - BFD_RELOC_PPC64_PLTGOT16_HA, - BFD_RELOC_PPC64_ADDR16_DS, - BFD_RELOC_PPC64_ADDR16_LO_DS, - BFD_RELOC_PPC64_GOT16_DS, - BFD_RELOC_PPC64_GOT16_LO_DS, - BFD_RELOC_PPC64_PLT16_LO_DS, - BFD_RELOC_PPC64_SECTOFF_DS, - BFD_RELOC_PPC64_SECTOFF_LO_DS, - BFD_RELOC_PPC64_TOC16_DS, - BFD_RELOC_PPC64_TOC16_LO_DS, - BFD_RELOC_PPC64_PLTGOT16_DS, - BFD_RELOC_PPC64_PLTGOT16_LO_DS, - BFD_RELOC_PPC64_ADDR16_HIGH, - BFD_RELOC_PPC64_ADDR16_HIGHA, - BFD_RELOC_PPC64_REL16_HIGH, - BFD_RELOC_PPC64_REL16_HIGHA, - BFD_RELOC_PPC64_REL16_HIGHER, - BFD_RELOC_PPC64_REL16_HIGHERA, - BFD_RELOC_PPC64_REL16_HIGHEST, - BFD_RELOC_PPC64_REL16_HIGHESTA, - BFD_RELOC_PPC64_ADDR64_LOCAL, - BFD_RELOC_PPC64_ENTRY, - BFD_RELOC_PPC64_REL24_NOTOC, - BFD_RELOC_PPC64_REL24_P9NOTOC, - BFD_RELOC_PPC64_D34, - BFD_RELOC_PPC64_D34_LO, - BFD_RELOC_PPC64_D34_HI30, - BFD_RELOC_PPC64_D34_HA30, - BFD_RELOC_PPC64_PCREL34, - BFD_RELOC_PPC64_GOT_PCREL34, - BFD_RELOC_PPC64_PLT_PCREL34, - BFD_RELOC_PPC64_ADDR16_HIGHER34, - BFD_RELOC_PPC64_ADDR16_HIGHERA34, - BFD_RELOC_PPC64_ADDR16_HIGHEST34, - BFD_RELOC_PPC64_ADDR16_HIGHESTA34, - BFD_RELOC_PPC64_REL16_HIGHER34, - BFD_RELOC_PPC64_REL16_HIGHERA34, - BFD_RELOC_PPC64_REL16_HIGHEST34, - BFD_RELOC_PPC64_REL16_HIGHESTA34, - BFD_RELOC_PPC64_D28, - BFD_RELOC_PPC64_PCREL28, +typedef enum bfd_error +{ + bfd_error_no_error = 0, + bfd_error_system_call, + bfd_error_invalid_target, + bfd_error_wrong_format, + bfd_error_wrong_object_format, + bfd_error_invalid_operation, + bfd_error_no_memory, + bfd_error_no_symbols, + bfd_error_no_armap, + bfd_error_no_more_archived_files, + bfd_error_malformed_archive, + bfd_error_missing_dso, + bfd_error_file_not_recognized, + bfd_error_file_ambiguously_recognized, + bfd_error_no_contents, + bfd_error_nonrepresentable_section, + bfd_error_no_debug_section, + bfd_error_bad_value, + bfd_error_file_truncated, + bfd_error_file_too_big, + bfd_error_sorry, + bfd_error_on_input, + bfd_error_invalid_error_code +} +bfd_error_type; -/* PowerPC and PowerPC64 thread-local storage relocations. */ - BFD_RELOC_PPC_TLS, - BFD_RELOC_PPC_TLSGD, - BFD_RELOC_PPC_TLSLD, - BFD_RELOC_PPC_TLSLE, - BFD_RELOC_PPC_TLSIE, - BFD_RELOC_PPC_TLSM, - BFD_RELOC_PPC_TLSML, - BFD_RELOC_PPC_DTPMOD, - BFD_RELOC_PPC_TPREL16, - BFD_RELOC_PPC_TPREL16_LO, - BFD_RELOC_PPC_TPREL16_HI, - BFD_RELOC_PPC_TPREL16_HA, - BFD_RELOC_PPC_TPREL, - BFD_RELOC_PPC_DTPREL16, - BFD_RELOC_PPC_DTPREL16_LO, - BFD_RELOC_PPC_DTPREL16_HI, - BFD_RELOC_PPC_DTPREL16_HA, - BFD_RELOC_PPC_DTPREL, - BFD_RELOC_PPC_GOT_TLSGD16, - BFD_RELOC_PPC_GOT_TLSGD16_LO, - BFD_RELOC_PPC_GOT_TLSGD16_HI, - BFD_RELOC_PPC_GOT_TLSGD16_HA, - BFD_RELOC_PPC_GOT_TLSLD16, - BFD_RELOC_PPC_GOT_TLSLD16_LO, - BFD_RELOC_PPC_GOT_TLSLD16_HI, - BFD_RELOC_PPC_GOT_TLSLD16_HA, - BFD_RELOC_PPC_GOT_TPREL16, - BFD_RELOC_PPC_GOT_TPREL16_LO, - BFD_RELOC_PPC_GOT_TPREL16_HI, - BFD_RELOC_PPC_GOT_TPREL16_HA, - BFD_RELOC_PPC_GOT_DTPREL16, - BFD_RELOC_PPC_GOT_DTPREL16_LO, - BFD_RELOC_PPC_GOT_DTPREL16_HI, - BFD_RELOC_PPC_GOT_DTPREL16_HA, - BFD_RELOC_PPC64_TLSGD, - BFD_RELOC_PPC64_TLSLD, - BFD_RELOC_PPC64_TLSLE, - BFD_RELOC_PPC64_TLSIE, - BFD_RELOC_PPC64_TLSM, - BFD_RELOC_PPC64_TLSML, - BFD_RELOC_PPC64_TPREL16_DS, - BFD_RELOC_PPC64_TPREL16_LO_DS, - BFD_RELOC_PPC64_TPREL16_HIGH, - BFD_RELOC_PPC64_TPREL16_HIGHA, - BFD_RELOC_PPC64_TPREL16_HIGHER, - BFD_RELOC_PPC64_TPREL16_HIGHERA, - BFD_RELOC_PPC64_TPREL16_HIGHEST, - BFD_RELOC_PPC64_TPREL16_HIGHESTA, - BFD_RELOC_PPC64_DTPREL16_DS, - BFD_RELOC_PPC64_DTPREL16_LO_DS, - BFD_RELOC_PPC64_DTPREL16_HIGH, - BFD_RELOC_PPC64_DTPREL16_HIGHA, - BFD_RELOC_PPC64_DTPREL16_HIGHER, - BFD_RELOC_PPC64_DTPREL16_HIGHERA, - BFD_RELOC_PPC64_DTPREL16_HIGHEST, - BFD_RELOC_PPC64_DTPREL16_HIGHESTA, - BFD_RELOC_PPC64_TPREL34, - BFD_RELOC_PPC64_DTPREL34, - BFD_RELOC_PPC64_GOT_TLSGD_PCREL34, - BFD_RELOC_PPC64_GOT_TLSLD_PCREL34, - BFD_RELOC_PPC64_GOT_TPREL_PCREL34, - BFD_RELOC_PPC64_GOT_DTPREL_PCREL34, - BFD_RELOC_PPC64_TLS_PCREL, +bfd_error_type bfd_get_error (void); -/* IBM 370/390 relocations */ - BFD_RELOC_I370_D12, +void bfd_set_error (bfd_error_type error_tag); -/* The type of reloc used to build a constructor table - at the moment -probably a 32 bit wide absolute relocation, but the target can choose. -It generally does map to one of the other relocation types. */ - BFD_RELOC_CTOR, +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); -/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. */ - BFD_RELOC_ARM_PCREL_BRANCH, +const char *bfd_errmsg (bfd_error_type error_tag); -/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is -not stored in the instruction. The 2nd lowest bit comes from a 1 bit -field in the instruction. */ - BFD_RELOC_ARM_PCREL_BLX, +void bfd_perror (const char *message); -/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is -not stored in the instruction. The 2nd lowest bit comes from a 1 bit -field in the instruction. */ - BFD_RELOC_THUMB_PCREL_BLX, +typedef void (*bfd_error_handler_type) (const char *, va_list); -/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */ - BFD_RELOC_ARM_PCREL_CALL, +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; -/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ - BFD_RELOC_ARM_PCREL_JUMP, +bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); -/* ARM 5-bit pc-relative branch for Branch Future instructions. */ - BFD_RELOC_THUMB_PCREL_BRANCH5, +void bfd_set_error_program_name (const char *); -/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ - BFD_RELOC_THUMB_PCREL_BFCSEL, +typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, + const char *bfd_version, + const char *bfd_file, + int bfd_line); -/* ARM 17-bit pc-relative branch for Branch Future instructions. */ - BFD_RELOC_ARM_THUMB_BF17, +bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ - BFD_RELOC_ARM_THUMB_BF13, +unsigned int bfd_init (void); -/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ - BFD_RELOC_ARM_THUMB_BF19, +/* Value returned by bfd_init. */ +#define BFD_INIT_MAGIC (sizeof (struct bfd_section)) -/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ - BFD_RELOC_ARM_THUMB_LOOP12, +long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); -/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches. -The lowest bit must be zero and is not stored in the instruction. -Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an -"nn" one smaller in all cases. Note further that BRANCH23 -corresponds to R_ARM_THM_CALL. */ - BFD_RELOC_THUMB_PCREL_BRANCH7, - BFD_RELOC_THUMB_PCREL_BRANCH9, - BFD_RELOC_THUMB_PCREL_BRANCH12, - BFD_RELOC_THUMB_PCREL_BRANCH20, - BFD_RELOC_THUMB_PCREL_BRANCH23, - BFD_RELOC_THUMB_PCREL_BRANCH25, +long bfd_canonicalize_reloc + (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); -/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */ - BFD_RELOC_ARM_OFFSET_IMM, +void bfd_set_reloc + (bfd *abfd, asection *sec, arelent **rel, unsigned int count); -/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */ - BFD_RELOC_ARM_THUMB_OFFSET, +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) +bool bfd_set_file_flags (bfd *abfd, flagword flags); -/* Pc-relative or absolute relocation depending on target. Used for -entries in .init_array sections. */ - BFD_RELOC_ARM_TARGET1, +int bfd_get_arch_size (bfd *abfd); -/* Read-only segment base relative address. */ - BFD_RELOC_ARM_ROSEGREL32, +int bfd_get_sign_extend_vma (bfd *abfd); -/* Data segment base relative address. */ - BFD_RELOC_ARM_SBREL32, +bool bfd_set_start_address (bfd *abfd, bfd_vma vma); -/* This reloc is used for references to RTTI data from exception handling -tables. The actual definition depends on the target. It may be a -pc-relative or some form of GOT-indirect relocation. */ - BFD_RELOC_ARM_TARGET2, +unsigned int bfd_get_gp_size (bfd *abfd); -/* 31-bit PC relative address. */ - BFD_RELOC_ARM_PREL31, +void bfd_set_gp_size (bfd *abfd, unsigned int i); -/* Low and High halfword relocations for MOVW and MOVT instructions. */ - BFD_RELOC_ARM_MOVW, - BFD_RELOC_ARM_MOVT, - BFD_RELOC_ARM_MOVW_PCREL, - BFD_RELOC_ARM_MOVT_PCREL, - BFD_RELOC_ARM_THUMB_MOVW, - BFD_RELOC_ARM_THUMB_MOVT, - BFD_RELOC_ARM_THUMB_MOVW_PCREL, - BFD_RELOC_ARM_THUMB_MOVT_PCREL, +void bfd_set_gp_value (bfd *abfd, bfd_vma v); -/* ARM FDPIC specific relocations. */ - BFD_RELOC_ARM_GOTFUNCDESC, - BFD_RELOC_ARM_GOTOFFFUNCDESC, - BFD_RELOC_ARM_FUNCDESC, - BFD_RELOC_ARM_FUNCDESC_VALUE, - BFD_RELOC_ARM_TLS_GD32_FDPIC, - BFD_RELOC_ARM_TLS_LDM32_FDPIC, - BFD_RELOC_ARM_TLS_IE32_FDPIC, +bfd_vma bfd_scan_vma (const char *string, const char **end, int base); -/* Relocations for setting up GOTs and PLTs for shared libraries. */ - BFD_RELOC_ARM_JUMP_SLOT, - BFD_RELOC_ARM_GLOB_DAT, - BFD_RELOC_ARM_GOT32, - BFD_RELOC_ARM_PLT32, - BFD_RELOC_ARM_RELATIVE, - BFD_RELOC_ARM_GOTOFF, - BFD_RELOC_ARM_GOTPC, - BFD_RELOC_ARM_GOT_PREL, +bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); -/* ARM thread-local storage relocations. */ - BFD_RELOC_ARM_TLS_GD32, - BFD_RELOC_ARM_TLS_LDO32, - BFD_RELOC_ARM_TLS_LDM32, - BFD_RELOC_ARM_TLS_DTPOFF32, - BFD_RELOC_ARM_TLS_DTPMOD32, - BFD_RELOC_ARM_TLS_TPOFF32, - BFD_RELOC_ARM_TLS_IE32, - BFD_RELOC_ARM_TLS_LE32, - BFD_RELOC_ARM_TLS_GOTDESC, - BFD_RELOC_ARM_TLS_CALL, - BFD_RELOC_ARM_THM_TLS_CALL, - BFD_RELOC_ARM_TLS_DESCSEQ, - BFD_RELOC_ARM_THM_TLS_DESCSEQ, - BFD_RELOC_ARM_TLS_DESC, +#define bfd_copy_private_header_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) +bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); -/* ARM group relocations. */ - BFD_RELOC_ARM_ALU_PC_G0_NC, - BFD_RELOC_ARM_ALU_PC_G0, - BFD_RELOC_ARM_ALU_PC_G1_NC, - BFD_RELOC_ARM_ALU_PC_G1, - BFD_RELOC_ARM_ALU_PC_G2, - BFD_RELOC_ARM_LDR_PC_G0, - BFD_RELOC_ARM_LDR_PC_G1, - BFD_RELOC_ARM_LDR_PC_G2, - BFD_RELOC_ARM_LDRS_PC_G0, - BFD_RELOC_ARM_LDRS_PC_G1, - BFD_RELOC_ARM_LDRS_PC_G2, - BFD_RELOC_ARM_LDC_PC_G0, - BFD_RELOC_ARM_LDC_PC_G1, - BFD_RELOC_ARM_LDC_PC_G2, - BFD_RELOC_ARM_ALU_SB_G0_NC, - BFD_RELOC_ARM_ALU_SB_G0, - BFD_RELOC_ARM_ALU_SB_G1_NC, - BFD_RELOC_ARM_ALU_SB_G1, - BFD_RELOC_ARM_ALU_SB_G2, - BFD_RELOC_ARM_LDR_SB_G0, - BFD_RELOC_ARM_LDR_SB_G1, - BFD_RELOC_ARM_LDR_SB_G2, - BFD_RELOC_ARM_LDRS_SB_G0, - BFD_RELOC_ARM_LDRS_SB_G1, - BFD_RELOC_ARM_LDRS_SB_G2, - BFD_RELOC_ARM_LDC_SB_G0, - BFD_RELOC_ARM_LDC_SB_G1, - BFD_RELOC_ARM_LDC_SB_G2, +#define bfd_copy_private_bfd_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) +bool bfd_set_private_flags (bfd *abfd, flagword flags); -/* Annotation of BX instructions. */ - BFD_RELOC_ARM_V4BX, +#define bfd_set_private_flags(abfd, flags) \ + BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) +#define bfd_sizeof_headers(abfd, info) \ + BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info)) -/* ARM support for STT_GNU_IFUNC. */ - BFD_RELOC_ARM_IRELATIVE, +#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ + BFD_SEND (abfd, _bfd_find_nearest_line, \ + (abfd, syms, sec, off, file, func, line, NULL)) -/* Thumb1 relocations to support execute-only code. */ - BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC, - BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC, - BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC, - BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC, +#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \ + file, func, line, disc) \ + BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \ + (abfd, alt_filename, syms, sec, off, file, func, line, disc)) -/* These relocs are only used within the ARM assembler. They are not -(at present) written to any object files. */ - BFD_RELOC_ARM_IMMEDIATE, - BFD_RELOC_ARM_ADRL_IMMEDIATE, - BFD_RELOC_ARM_T32_IMMEDIATE, - BFD_RELOC_ARM_T32_ADD_IMM, - BFD_RELOC_ARM_T32_IMM12, - BFD_RELOC_ARM_T32_ADD_PC12, - BFD_RELOC_ARM_SHIFT_IMM, - BFD_RELOC_ARM_SMC, - BFD_RELOC_ARM_HVC, - BFD_RELOC_ARM_SWI, - BFD_RELOC_ARM_MULTI, - BFD_RELOC_ARM_CP_OFF_IMM, - BFD_RELOC_ARM_CP_OFF_IMM_S2, - BFD_RELOC_ARM_T32_CP_OFF_IMM, - BFD_RELOC_ARM_T32_CP_OFF_IMM_S2, - BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM, - BFD_RELOC_ARM_ADR_IMM, - BFD_RELOC_ARM_LDR_IMM, - BFD_RELOC_ARM_LITERAL, - BFD_RELOC_ARM_IN_POOL, - BFD_RELOC_ARM_OFFSET_IMM8, - BFD_RELOC_ARM_T32_OFFSET_U8, - BFD_RELOC_ARM_T32_OFFSET_IMM, - BFD_RELOC_ARM_HWLITERAL, - BFD_RELOC_ARM_THUMB_ADD, - BFD_RELOC_ARM_THUMB_IMM, - BFD_RELOC_ARM_THUMB_SHIFT, +#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ + line, disc) \ + BFD_SEND (abfd, _bfd_find_nearest_line, \ + (abfd, syms, sec, off, file, func, line, disc)) + +#define bfd_find_line(abfd, syms, sym, file, line) \ + BFD_SEND (abfd, _bfd_find_line, \ + (abfd, syms, sym, file, line)) + +#define bfd_find_inliner_info(abfd, file, func, line) \ + BFD_SEND (abfd, _bfd_find_inliner_info, \ + (abfd, file, func, line)) + +#define bfd_debug_info_start(abfd) \ + BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) + +#define bfd_debug_info_end(abfd) \ + BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) + +#define bfd_debug_info_accumulate(abfd, section) \ + BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) + +#define bfd_stat_arch_elt(abfd, stat) \ + BFD_SEND (abfd->my_archive ? abfd->my_archive : abfd, \ + _bfd_stat_arch_elt, (abfd, stat)) + +#define bfd_update_armap_timestamp(abfd) \ + BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) + +#define bfd_set_arch_mach(abfd, arch, mach)\ + BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) + +#define bfd_relax_section(abfd, section, link_info, again) \ + BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) + +#define bfd_gc_sections(abfd, link_info) \ + BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) + +#define bfd_lookup_section_flags(link_info, flag_info, section) \ + BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section)) + +#define bfd_merge_sections(abfd, link_info) \ + BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) + +#define bfd_is_group_section(abfd, sec) \ + BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec)) + +#define bfd_group_name(abfd, sec) \ + BFD_SEND (abfd, _bfd_group_name, (abfd, sec)) -/* Renesas / SuperH SH relocs. Not all of these appear in object files. */ - BFD_RELOC_SH_PCDISP8BY2, - BFD_RELOC_SH_PCDISP12BY2, - BFD_RELOC_SH_IMM3, - BFD_RELOC_SH_IMM3U, - BFD_RELOC_SH_DISP12, - BFD_RELOC_SH_DISP12BY2, - BFD_RELOC_SH_DISP12BY4, - BFD_RELOC_SH_DISP12BY8, - BFD_RELOC_SH_DISP20, - BFD_RELOC_SH_DISP20BY8, - BFD_RELOC_SH_IMM4, - BFD_RELOC_SH_IMM4BY2, - BFD_RELOC_SH_IMM4BY4, - BFD_RELOC_SH_IMM8, - BFD_RELOC_SH_IMM8BY2, - BFD_RELOC_SH_IMM8BY4, - BFD_RELOC_SH_PCRELIMM8BY2, - BFD_RELOC_SH_PCRELIMM8BY4, - BFD_RELOC_SH_SWITCH16, - BFD_RELOC_SH_SWITCH32, - BFD_RELOC_SH_USES, - BFD_RELOC_SH_COUNT, - BFD_RELOC_SH_ALIGN, - BFD_RELOC_SH_CODE, - BFD_RELOC_SH_DATA, - BFD_RELOC_SH_LABEL, - BFD_RELOC_SH_LOOP_START, - BFD_RELOC_SH_LOOP_END, - BFD_RELOC_SH_COPY, - BFD_RELOC_SH_GLOB_DAT, - BFD_RELOC_SH_JMP_SLOT, - BFD_RELOC_SH_RELATIVE, - BFD_RELOC_SH_GOTPC, - BFD_RELOC_SH_GOT_LOW16, - BFD_RELOC_SH_GOT_MEDLOW16, - BFD_RELOC_SH_GOT_MEDHI16, - BFD_RELOC_SH_GOT_HI16, - BFD_RELOC_SH_GOTPLT_LOW16, - BFD_RELOC_SH_GOTPLT_MEDLOW16, - BFD_RELOC_SH_GOTPLT_MEDHI16, - BFD_RELOC_SH_GOTPLT_HI16, - BFD_RELOC_SH_PLT_LOW16, - BFD_RELOC_SH_PLT_MEDLOW16, - BFD_RELOC_SH_PLT_MEDHI16, - BFD_RELOC_SH_PLT_HI16, - BFD_RELOC_SH_GOTOFF_LOW16, - BFD_RELOC_SH_GOTOFF_MEDLOW16, - BFD_RELOC_SH_GOTOFF_MEDHI16, - BFD_RELOC_SH_GOTOFF_HI16, - BFD_RELOC_SH_GOTPC_LOW16, - BFD_RELOC_SH_GOTPC_MEDLOW16, - BFD_RELOC_SH_GOTPC_MEDHI16, - BFD_RELOC_SH_GOTPC_HI16, - BFD_RELOC_SH_COPY64, - BFD_RELOC_SH_GLOB_DAT64, - BFD_RELOC_SH_JMP_SLOT64, - BFD_RELOC_SH_RELATIVE64, - BFD_RELOC_SH_GOT10BY4, - BFD_RELOC_SH_GOT10BY8, - BFD_RELOC_SH_GOTPLT10BY4, - BFD_RELOC_SH_GOTPLT10BY8, - BFD_RELOC_SH_GOTPLT32, - BFD_RELOC_SH_SHMEDIA_CODE, - BFD_RELOC_SH_IMMU5, - BFD_RELOC_SH_IMMS6, - BFD_RELOC_SH_IMMS6BY32, - BFD_RELOC_SH_IMMU6, - BFD_RELOC_SH_IMMS10, - BFD_RELOC_SH_IMMS10BY2, - BFD_RELOC_SH_IMMS10BY4, - BFD_RELOC_SH_IMMS10BY8, - BFD_RELOC_SH_IMMS16, - BFD_RELOC_SH_IMMU16, - BFD_RELOC_SH_IMM_LOW16, - BFD_RELOC_SH_IMM_LOW16_PCREL, - BFD_RELOC_SH_IMM_MEDLOW16, - BFD_RELOC_SH_IMM_MEDLOW16_PCREL, - BFD_RELOC_SH_IMM_MEDHI16, - BFD_RELOC_SH_IMM_MEDHI16_PCREL, - BFD_RELOC_SH_IMM_HI16, - BFD_RELOC_SH_IMM_HI16_PCREL, - BFD_RELOC_SH_PT_16, - BFD_RELOC_SH_TLS_GD_32, - BFD_RELOC_SH_TLS_LD_32, - BFD_RELOC_SH_TLS_LDO_32, - BFD_RELOC_SH_TLS_IE_32, - BFD_RELOC_SH_TLS_LE_32, - BFD_RELOC_SH_TLS_DTPMOD32, - BFD_RELOC_SH_TLS_DTPOFF32, - BFD_RELOC_SH_TLS_TPOFF32, - BFD_RELOC_SH_GOT20, - BFD_RELOC_SH_GOTOFF20, - BFD_RELOC_SH_GOTFUNCDESC, - BFD_RELOC_SH_GOTFUNCDESC20, - BFD_RELOC_SH_GOTOFFFUNCDESC, - BFD_RELOC_SH_GOTOFFFUNCDESC20, - BFD_RELOC_SH_FUNCDESC, +#define bfd_discard_group(abfd, sec) \ + BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) -/* ARC relocs. */ - BFD_RELOC_ARC_NONE, - BFD_RELOC_ARC_8, - BFD_RELOC_ARC_16, - BFD_RELOC_ARC_24, - BFD_RELOC_ARC_32, - BFD_RELOC_ARC_N8, - BFD_RELOC_ARC_N16, - BFD_RELOC_ARC_N24, - BFD_RELOC_ARC_N32, - BFD_RELOC_ARC_SDA, - BFD_RELOC_ARC_SECTOFF, - BFD_RELOC_ARC_S21H_PCREL, - BFD_RELOC_ARC_S21W_PCREL, - BFD_RELOC_ARC_S25H_PCREL, - BFD_RELOC_ARC_S25W_PCREL, - BFD_RELOC_ARC_SDA32, - BFD_RELOC_ARC_SDA_LDST, - BFD_RELOC_ARC_SDA_LDST1, - BFD_RELOC_ARC_SDA_LDST2, - BFD_RELOC_ARC_SDA16_LD, - BFD_RELOC_ARC_SDA16_LD1, - BFD_RELOC_ARC_SDA16_LD2, - BFD_RELOC_ARC_S13_PCREL, - BFD_RELOC_ARC_W, - BFD_RELOC_ARC_32_ME, - BFD_RELOC_ARC_32_ME_S, - BFD_RELOC_ARC_N32_ME, - BFD_RELOC_ARC_SECTOFF_ME, - BFD_RELOC_ARC_SDA32_ME, - BFD_RELOC_ARC_W_ME, - BFD_RELOC_AC_SECTOFF_U8, - BFD_RELOC_AC_SECTOFF_U8_1, - BFD_RELOC_AC_SECTOFF_U8_2, - BFD_RELOC_AC_SECTOFF_S9, - BFD_RELOC_AC_SECTOFF_S9_1, - BFD_RELOC_AC_SECTOFF_S9_2, - BFD_RELOC_ARC_SECTOFF_ME_1, - BFD_RELOC_ARC_SECTOFF_ME_2, - BFD_RELOC_ARC_SECTOFF_1, - BFD_RELOC_ARC_SECTOFF_2, - BFD_RELOC_ARC_SDA_12, - BFD_RELOC_ARC_SDA16_ST2, - BFD_RELOC_ARC_32_PCREL, - BFD_RELOC_ARC_PC32, - BFD_RELOC_ARC_GOT32, - BFD_RELOC_ARC_GOTPC32, - BFD_RELOC_ARC_PLT32, - BFD_RELOC_ARC_COPY, - BFD_RELOC_ARC_GLOB_DAT, - BFD_RELOC_ARC_JMP_SLOT, - BFD_RELOC_ARC_RELATIVE, - BFD_RELOC_ARC_GOTOFF, - BFD_RELOC_ARC_GOTPC, - BFD_RELOC_ARC_S21W_PCREL_PLT, - BFD_RELOC_ARC_S25H_PCREL_PLT, - BFD_RELOC_ARC_TLS_DTPMOD, - BFD_RELOC_ARC_TLS_TPOFF, - BFD_RELOC_ARC_TLS_GD_GOT, - BFD_RELOC_ARC_TLS_GD_LD, - BFD_RELOC_ARC_TLS_GD_CALL, - BFD_RELOC_ARC_TLS_IE_GOT, - BFD_RELOC_ARC_TLS_DTPOFF, - BFD_RELOC_ARC_TLS_DTPOFF_S9, - BFD_RELOC_ARC_TLS_LE_S9, - BFD_RELOC_ARC_TLS_LE_32, - BFD_RELOC_ARC_S25W_PCREL_PLT, - BFD_RELOC_ARC_S21H_PCREL_PLT, - BFD_RELOC_ARC_NPS_CMEM16, - BFD_RELOC_ARC_JLI_SECTOFF, +#define bfd_link_hash_table_create(abfd) \ + BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -/* ADI Blackfin 16 bit immediate absolute reloc. */ - BFD_RELOC_BFIN_16_IMM, +#define bfd_link_add_symbols(abfd, info) \ + BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) -/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */ - BFD_RELOC_BFIN_16_HIGH, +#define bfd_link_just_syms(abfd, sec, info) \ + BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) -/* ADI Blackfin 'a' part of LSETUP. */ - BFD_RELOC_BFIN_4_PCREL, +#define bfd_final_link(abfd, info) \ + BFD_SEND (abfd, _bfd_final_link, (abfd, info)) -/* ADI Blackfin. */ - BFD_RELOC_BFIN_5_PCREL, +#define bfd_free_cached_info(abfd) \ + BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) -/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */ - BFD_RELOC_BFIN_16_LOW, +#define bfd_get_dynamic_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) -/* ADI Blackfin. */ - BFD_RELOC_BFIN_10_PCREL, +#define bfd_print_private_bfd_data(abfd, file)\ + BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) -/* ADI Blackfin 'b' part of LSETUP. */ - BFD_RELOC_BFIN_11_PCREL, +#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ + BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) -/* ADI Blackfin. */ - BFD_RELOC_BFIN_12_PCREL_JUMP, +#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ + BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ + dyncount, dynsyms, ret)) -/* ADI Blackfin Short jump, pcrel. */ - BFD_RELOC_BFIN_12_PCREL_JUMP_S, +#define bfd_get_dynamic_reloc_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) -/* ADI Blackfin Call.x not implemented. */ - BFD_RELOC_BFIN_24_PCREL_CALL_X, +#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ + BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) -/* ADI Blackfin Long Jump pcrel. */ - BFD_RELOC_BFIN_24_PCREL_JUMP_L, +bfd_byte *bfd_get_relocated_section_contents + (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, + bool, asymbol **); -/* ADI Blackfin FD-PIC relocations. */ - BFD_RELOC_BFIN_GOT17M4, - BFD_RELOC_BFIN_GOTHI, - BFD_RELOC_BFIN_GOTLO, - BFD_RELOC_BFIN_FUNCDESC, - BFD_RELOC_BFIN_FUNCDESC_GOT17M4, - BFD_RELOC_BFIN_FUNCDESC_GOTHI, - BFD_RELOC_BFIN_FUNCDESC_GOTLO, - BFD_RELOC_BFIN_FUNCDESC_VALUE, - BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, - BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, - BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, - BFD_RELOC_BFIN_GOTOFF17M4, - BFD_RELOC_BFIN_GOTOFFHI, - BFD_RELOC_BFIN_GOTOFFLO, +bool bfd_record_phdr + (bfd *, unsigned long, bool, flagword, bool, bfd_vma, + bool, bool, unsigned int, struct bfd_section **); -/* ADI Blackfin GOT relocation. */ - BFD_RELOC_BFIN_GOT, +void bfd_sprintf_vma (bfd *, char *, bfd_vma); +void bfd_fprintf_vma (bfd *, void *, bfd_vma); -/* ADI Blackfin PLTPC relocation. */ - BFD_RELOC_BFIN_PLTPC, +#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd, stdout, x) -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_PUSH, +bool bfd_alt_mach_code (bfd *abfd, int alternative); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_CONST, +bfd_vma bfd_emul_get_maxpagesize (const char *); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_ADD, +bfd_vma bfd_emul_get_commonpagesize (const char *); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_SUB, +char *bfd_demangle (bfd *, const char *, int); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_MULT, +/* Extracted from bfdio.c. */ +bfd_size_type bfd_read (void *, bfd_size_type, bfd *) +ATTRIBUTE_WARN_UNUSED_RESULT; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_DIV, +bfd_size_type bfd_write (const void *, bfd_size_type, bfd *) +ATTRIBUTE_WARN_UNUSED_RESULT; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_MOD, +file_ptr bfd_tell (bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; + +int bfd_flush (bfd *); + +int bfd_stat (bfd *, struct stat *) ATTRIBUTE_WARN_UNUSED_RESULT; + +int bfd_seek (bfd *, file_ptr, int) ATTRIBUTE_WARN_UNUSED_RESULT; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_LSHIFT, +long bfd_get_mtime (bfd *abfd); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_RSHIFT, +ufile_ptr bfd_get_size (bfd *abfd); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_AND, +ufile_ptr bfd_get_file_size (bfd *abfd); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_OR, +void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset, + void **map_addr, bfd_size_type *map_len) +ATTRIBUTE_WARN_UNUSED_RESULT; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_XOR, +time_t bfd_get_current_time (time_t now); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_LAND, +/* Extracted from bfdwin.c. */ +struct _bfd_window_internal; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_LOR, +typedef struct _bfd_window +{ + /* What the user asked for. */ + void *data; + bfd_size_type size; + /* The actual window used by BFD. Small user-requested read-only + regions sharing a page may share a single window into the object + file. Read-write versions shouldn't until I've fixed things to + keep track of which portions have been claimed by the + application; don't want to give the same region back when the + application wants two writable copies! */ + struct _bfd_window_internal *i; +} +bfd_window; -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_LEN, +void bfd_init_window (bfd_window *); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_NEG, +void bfd_free_window (bfd_window *); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_COMP, +bool bfd_get_file_window + (bfd *, file_ptr, bfd_size_type, bfd_window *, bool /*writable*/); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_PAGE, +/* Extracted from cache.c. */ +bool bfd_cache_close (bfd *abfd); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_HWPAGE, +bool bfd_cache_close_all (void); -/* ADI Blackfin arithmetic relocation. */ - BFD_ARELOC_BFIN_ADDR, +/* Extracted from compress.c. */ +/* Types of compressed DWARF debug sections. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG_GNU_ZLIB = 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = 1 << 2, + COMPRESS_DEBUG_ZSTD = 1 << 3, + COMPRESS_UNKNOWN = 1 << 4 +}; -/* Mitsubishi D10V relocs. -This is a 10-bit reloc with the right 2 bits -assumed to be 0. */ - BFD_RELOC_D10V_10_PCREL_R, +/* Tuple for compressed_debug_section_type and their name. */ +struct compressed_type_tuple +{ + enum compressed_debug_section_type type; + const char *name; +}; -/* Mitsubishi D10V relocs. -This is a 10-bit reloc with the right 2 bits -assumed to be 0. This is the same as the previous reloc -except it is in the left container, i.e., -shifted left 15 bits. */ - BFD_RELOC_D10V_10_PCREL_L, +/* Compression header ch_type values. */ +enum compression_type +{ + ch_none = 0, + ch_compress_zlib = 1 , /* Compressed with zlib. */ + ch_compress_zstd = 2 /* Compressed with zstd (www.zstandard.org). */ +}; -/* This is an 18-bit reloc with the right 2 bits -assumed to be 0. */ - BFD_RELOC_D10V_18, +static inline char * +bfd_debug_name_to_zdebug (bfd *abfd, const char *name) +{ + size_t len = strlen (name); + char *new_name = (char *) bfd_alloc (abfd, len + 2); + if (new_name == NULL) + return NULL; + new_name[0] = '.'; + new_name[1] = 'z'; + memcpy (new_name + 2, name + 1, len); + return new_name; +} -/* This is an 18-bit reloc with the right 2 bits -assumed to be 0. */ - BFD_RELOC_D10V_18_PCREL, +static inline char * +bfd_zdebug_name_to_debug (bfd *abfd, const char *name) +{ + size_t len = strlen (name); + char *new_name = (char *) bfd_alloc (abfd, len); + if (new_name == NULL) + return NULL; + new_name[0] = '.'; + memcpy (new_name + 1, name + 2, len - 1); + return new_name; +} -/* Mitsubishi D30V relocs. -This is a 6-bit absolute reloc. */ - BFD_RELOC_D30V_6, +enum compressed_debug_section_type +bfd_get_compression_algorithm (const char *name); -/* This is a 6-bit pc-relative reloc with -the right 3 bits assumed to be 0. */ - BFD_RELOC_D30V_9_PCREL, +const char *bfd_get_compression_algorithm_name + (enum compressed_debug_section_type type); -/* This is a 6-bit pc-relative reloc with -the right 3 bits assumed to be 0. Same -as the previous reloc but on the right side -of the container. */ - BFD_RELOC_D30V_9_PCREL_R, +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); -/* This is a 12-bit absolute reloc with the -right 3 bitsassumed to be 0. */ - BFD_RELOC_D30V_15, +int bfd_get_compression_header_size (bfd *abfd, asection *sec); -/* This is a 12-bit pc-relative reloc with -the right 3 bits assumed to be 0. */ - BFD_RELOC_D30V_15_PCREL, +bool bfd_convert_section_setup + (bfd *ibfd, asection *isec, bfd *obfd, + const char **new_name, bfd_size_type *new_size); -/* This is a 12-bit pc-relative reloc with -the right 3 bits assumed to be 0. Same -as the previous reloc but on the right side -of the container. */ - BFD_RELOC_D30V_15_PCREL_R, +bool bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); -/* This is an 18-bit absolute reloc with -the right 3 bits assumed to be 0. */ - BFD_RELOC_D30V_21, +bool bfd_get_full_section_contents + (bfd *abfd, asection *section, bfd_byte **ptr); -/* This is an 18-bit pc-relative reloc with -the right 3 bits assumed to be 0. */ - BFD_RELOC_D30V_21_PCREL, +bool bfd_is_section_compressed_info + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p, + enum compression_type *ch_type); -/* This is an 18-bit pc-relative reloc with -the right 3 bits assumed to be 0. Same -as the previous reloc but on the right side -of the container. */ - BFD_RELOC_D30V_21_PCREL_R, +bool bfd_is_section_compressed + (bfd *abfd, asection *section); -/* This is a 32-bit absolute reloc. */ - BFD_RELOC_D30V_32, +bool bfd_init_section_decompress_status + (bfd *abfd, asection *section); -/* This is a 32-bit pc-relative reloc. */ - BFD_RELOC_D30V_32_PCREL, +bool bfd_init_section_compress_status + (bfd *abfd, asection *section); -/* DLX relocs */ - BFD_RELOC_DLX_HI16_S, +bool bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); -/* DLX relocs */ - BFD_RELOC_DLX_LO16, +/* Extracted from corefile.c. */ +const char *bfd_core_file_failing_command (bfd *abfd); -/* DLX relocs */ - BFD_RELOC_DLX_JMP26, +int bfd_core_file_failing_signal (bfd *abfd); -/* Renesas M16C/M32C Relocations. */ - BFD_RELOC_M32C_HI8, - BFD_RELOC_M32C_RL_JUMP, - BFD_RELOC_M32C_RL_1ADDR, - BFD_RELOC_M32C_RL_2ADDR, +int bfd_core_file_pid (bfd *abfd); -/* Renesas M32R (formerly Mitsubishi M32R) relocs. -This is a 24 bit absolute address. */ - BFD_RELOC_M32R_24, +bool core_file_matches_executable_p + (bfd *core_bfd, bfd *exec_bfd); -/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */ - BFD_RELOC_M32R_10_PCREL, +bool generic_core_file_matches_executable_p + (bfd *core_bfd, bfd *exec_bfd); -/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */ - BFD_RELOC_M32R_18_PCREL, +/* Extracted from format.c. */ +bool bfd_check_format (bfd *abfd, bfd_format format); -/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */ - BFD_RELOC_M32R_26_PCREL, +bool bfd_check_format_matches + (bfd *abfd, bfd_format format, char ***matching); -/* This is a 16-bit reloc containing the high 16 bits of an address -used when the lower 16 bits are treated as unsigned. */ - BFD_RELOC_M32R_HI16_ULO, +bool bfd_set_format (bfd *abfd, bfd_format format); -/* This is a 16-bit reloc containing the high 16 bits of an address -used when the lower 16 bits are treated as signed. */ - BFD_RELOC_M32R_HI16_SLO, +const char *bfd_format_string (bfd_format format); -/* This is a 16-bit reloc containing the lower 16 bits of an address. */ - BFD_RELOC_M32R_LO16, +/* Extracted from linker.c. */ +/* Return TRUE if the symbol described by a linker hash entry H + is going to be absolute. Linker-script defined symbols can be + converted from absolute to section-relative ones late in the + link. Use this macro to correctly determine whether the symbol + will actually end up absolute in output. */ +#define bfd_is_abs_symbol(H) \ + (((H)->type == bfd_link_hash_defined \ + || (H)->type == bfd_link_hash_defweak) \ + && bfd_is_abs_section ((H)->u.def.section) \ + && !(H)->rel_from_abs) -/* This is a 16-bit reloc containing the small data area offset for use in -add3, load, and store instructions. */ - BFD_RELOC_M32R_SDA16, +bool bfd_link_split_section (bfd *abfd, asection *sec); -/* For PIC. */ - BFD_RELOC_M32R_GOT24, - BFD_RELOC_M32R_26_PLTREL, - BFD_RELOC_M32R_COPY, - BFD_RELOC_M32R_GLOB_DAT, - BFD_RELOC_M32R_JMP_SLOT, - BFD_RELOC_M32R_RELATIVE, - BFD_RELOC_M32R_GOTOFF, - BFD_RELOC_M32R_GOTOFF_HI_ULO, - BFD_RELOC_M32R_GOTOFF_HI_SLO, - BFD_RELOC_M32R_GOTOFF_LO, - BFD_RELOC_M32R_GOTPC24, - BFD_RELOC_M32R_GOT16_HI_ULO, - BFD_RELOC_M32R_GOT16_HI_SLO, - BFD_RELOC_M32R_GOT16_LO, - BFD_RELOC_M32R_GOTPC_HI_ULO, - BFD_RELOC_M32R_GOTPC_HI_SLO, - BFD_RELOC_M32R_GOTPC_LO, +#define bfd_link_split_section(abfd, sec) \ + BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) + +bool bfd_section_already_linked (bfd *abfd, + asection *sec, + struct bfd_link_info *info); -/* NDS32 relocs. -This is a 20 bit absolute address. */ - BFD_RELOC_NDS32_20, +#define bfd_section_already_linked(abfd, sec, info) \ + BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) -/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_9_PCREL, +bool bfd_generic_define_common_symbol + (bfd *output_bfd, struct bfd_link_info *info, + struct bfd_link_hash_entry *h); -/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_WORD_9_PCREL, +#define bfd_define_common_symbol(output_bfd, info, h) \ + BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) -/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_15_PCREL, +void _bfd_generic_link_hide_symbol + (bfd *output_bfd, struct bfd_link_info *info, + struct bfd_link_hash_entry *h); -/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_17_PCREL, +#define bfd_link_hide_symbol(output_bfd, info, h) \ + BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h)) -/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_25_PCREL, +struct bfd_link_hash_entry *bfd_generic_define_start_stop + (struct bfd_link_info *info, + const char *symbol, asection *sec); -/* This is a 20-bit reloc containing the high 20 bits of an address -used with the lower 12 bits */ - BFD_RELOC_NDS32_HI20, +#define bfd_define_start_stop(output_bfd, info, symbol, sec) \ + BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec)) -/* This is a 12-bit reloc containing the lower 12 bits of an address -then shift right by 3. This is used with ldi,sdi... */ - BFD_RELOC_NDS32_LO12S3, +struct bfd_elf_version_tree * bfd_find_version_for_sym + (struct bfd_elf_version_tree *verdefs, + const char *sym_name, bool *hide); -/* This is a 12-bit reloc containing the lower 12 bits of an address -then shift left by 2. This is used with lwi,swi... */ - BFD_RELOC_NDS32_LO12S2, +bool bfd_hide_sym_by_version + (struct bfd_elf_version_tree *verdefs, const char *sym_name); -/* This is a 12-bit reloc containing the lower 12 bits of an address -then shift left by 1. This is used with lhi,shi... */ - BFD_RELOC_NDS32_LO12S1, +bool bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); -/* This is a 12-bit reloc containing the lower 12 bits of an address -then shift left by 0. This is used with lbisbi... */ - BFD_RELOC_NDS32_LO12S0, +bool _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); -/* This is a 12-bit reloc containing the lower 12 bits of an address -then shift left by 0. This is only used with branch relaxations */ - BFD_RELOC_NDS32_LO12S0_ORI, +bool bfd_merge_private_bfd_data + (bfd *ibfd, struct bfd_link_info *info); -/* This is a 15-bit reloc containing the small data area 18-bit signed offset -and shift left by 3 for use in ldi, sdi... */ - BFD_RELOC_NDS32_SDA15S3, +#define bfd_merge_private_bfd_data(ibfd, info) \ + BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \ + (ibfd, info)) -/* This is a 15-bit reloc containing the small data area 17-bit signed offset -and shift left by 2 for use in lwi, swi... */ - BFD_RELOC_NDS32_SDA15S2, +/* Extracted from opncls.c. */ +/* Set to N to open the next N BFDs using an alternate id space. */ +extern unsigned int bfd_use_reserved_id; -/* This is a 15-bit reloc containing the small data area 16-bit signed offset -and shift left by 1 for use in lhi, shi... */ - BFD_RELOC_NDS32_SDA15S1, +bfd *bfd_fopen (const char *filename, const char *target, + const char *mode, int fd); -/* This is a 15-bit reloc containing the small data area 15-bit signed offset -and shift left by 0 for use in lbi, sbi... */ - BFD_RELOC_NDS32_SDA15S0, +bfd *bfd_openr (const char *filename, const char *target); -/* This is a 16-bit reloc containing the small data area 16-bit signed offset -and shift left by 3 */ - BFD_RELOC_NDS32_SDA16S3, +bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -/* This is a 17-bit reloc containing the small data area 17-bit signed offset -and shift left by 2 for use in lwi.gp, swi.gp... */ - BFD_RELOC_NDS32_SDA17S2, +bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -/* This is a 18-bit reloc containing the small data area 18-bit signed offset -and shift left by 1 for use in lhi.gp, shi.gp... */ - BFD_RELOC_NDS32_SDA18S1, +bfd *bfd_openstreamr (const char * filename, const char * target, + void * stream); -/* This is a 19-bit reloc containing the small data area 19-bit signed offset -and shift left by 0 for use in lbi.gp, sbi.gp... */ - BFD_RELOC_NDS32_SDA19S0, +bfd *bfd_openr_iovec (const char *filename, const char *target, + void *(*open_func) (struct bfd *nbfd, + void *open_closure), + void *open_closure, + file_ptr (*pread_func) (struct bfd *nbfd, + void *stream, + void *buf, + file_ptr nbytes, + file_ptr offset), + int (*close_func) (struct bfd *nbfd, + void *stream), + int (*stat_func) (struct bfd *abfd, + void *stream, + struct stat *sb)); -/* for PIC */ - BFD_RELOC_NDS32_GOT20, - BFD_RELOC_NDS32_9_PLTREL, - BFD_RELOC_NDS32_25_PLTREL, - BFD_RELOC_NDS32_COPY, - BFD_RELOC_NDS32_GLOB_DAT, - BFD_RELOC_NDS32_JMP_SLOT, - BFD_RELOC_NDS32_RELATIVE, - BFD_RELOC_NDS32_GOTOFF, - BFD_RELOC_NDS32_GOTOFF_HI20, - BFD_RELOC_NDS32_GOTOFF_LO12, - BFD_RELOC_NDS32_GOTPC20, - BFD_RELOC_NDS32_GOT_HI20, - BFD_RELOC_NDS32_GOT_LO12, - BFD_RELOC_NDS32_GOTPC_HI20, - BFD_RELOC_NDS32_GOTPC_LO12, +bfd *bfd_openw (const char *filename, const char *target); -/* for relax */ - BFD_RELOC_NDS32_INSN16, - BFD_RELOC_NDS32_LABEL, - BFD_RELOC_NDS32_LONGCALL1, - BFD_RELOC_NDS32_LONGCALL2, - BFD_RELOC_NDS32_LONGCALL3, - BFD_RELOC_NDS32_LONGJUMP1, - BFD_RELOC_NDS32_LONGJUMP2, - BFD_RELOC_NDS32_LONGJUMP3, - BFD_RELOC_NDS32_LOADSTORE, - BFD_RELOC_NDS32_9_FIXED, - BFD_RELOC_NDS32_15_FIXED, - BFD_RELOC_NDS32_17_FIXED, - BFD_RELOC_NDS32_25_FIXED, - BFD_RELOC_NDS32_LONGCALL4, - BFD_RELOC_NDS32_LONGCALL5, - BFD_RELOC_NDS32_LONGCALL6, - BFD_RELOC_NDS32_LONGJUMP4, - BFD_RELOC_NDS32_LONGJUMP5, - BFD_RELOC_NDS32_LONGJUMP6, - BFD_RELOC_NDS32_LONGJUMP7, +bfd *bfd_elf_bfd_from_remote_memory + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, + int (*target_read_memory) + (bfd_vma vma, bfd_byte *myaddr, bfd_size_type len)); -/* for PIC */ - BFD_RELOC_NDS32_PLTREL_HI20, - BFD_RELOC_NDS32_PLTREL_LO12, - BFD_RELOC_NDS32_PLT_GOTREL_HI20, - BFD_RELOC_NDS32_PLT_GOTREL_LO12, +bool bfd_close (bfd *abfd); -/* for floating point */ - BFD_RELOC_NDS32_SDA12S2_DP, - BFD_RELOC_NDS32_SDA12S2_SP, - BFD_RELOC_NDS32_LO12S2_DP, - BFD_RELOC_NDS32_LO12S2_SP, +bool bfd_close_all_done (bfd *); -/* for dwarf2 debug_line. */ - BFD_RELOC_NDS32_DWARF2_OP1, - BFD_RELOC_NDS32_DWARF2_OP2, - BFD_RELOC_NDS32_DWARF2_LEB, +bfd *bfd_create (const char *filename, bfd *templ); -/* for eliminate 16-bit instructions */ - BFD_RELOC_NDS32_UPDATE_TA, +bool bfd_make_writable (bfd *abfd); -/* for PIC object relaxation */ - BFD_RELOC_NDS32_PLT_GOTREL_LO20, - BFD_RELOC_NDS32_PLT_GOTREL_LO15, - BFD_RELOC_NDS32_PLT_GOTREL_LO19, - BFD_RELOC_NDS32_GOT_LO15, - BFD_RELOC_NDS32_GOT_LO19, - BFD_RELOC_NDS32_GOTOFF_LO15, - BFD_RELOC_NDS32_GOTOFF_LO19, - BFD_RELOC_NDS32_GOT15S2, - BFD_RELOC_NDS32_GOT17S2, +bool bfd_make_readable (bfd *abfd); -/* NDS32 relocs. -This is a 5 bit absolute address. */ - BFD_RELOC_NDS32_5, +uint32_t bfd_calc_gnu_debuglink_crc32 + (uint32_t crc, const bfd_byte *buf, bfd_size_type len); -/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ - BFD_RELOC_NDS32_10_UPCREL, +char *bfd_get_debug_link_info (bfd *abfd, uint32_t *crc32_out); -/* If fp were omitted, fp can used as another gp. */ - BFD_RELOC_NDS32_SDA_FP7U2_RELA, +char *bfd_get_alt_debug_link_info (bfd * abfd, + bfd_size_type *buildid_len, + bfd_byte **buildid_out); -/* relaxation relative relocation types */ - BFD_RELOC_NDS32_RELAX_ENTRY, - BFD_RELOC_NDS32_GOT_SUFF, - BFD_RELOC_NDS32_GOTOFF_SUFF, - BFD_RELOC_NDS32_PLT_GOT_SUFF, - BFD_RELOC_NDS32_MULCALL_SUFF, - BFD_RELOC_NDS32_PTR, - BFD_RELOC_NDS32_PTR_COUNT, - BFD_RELOC_NDS32_PTR_RESOLVED, - BFD_RELOC_NDS32_PLTBLOCK, - BFD_RELOC_NDS32_RELAX_REGION_BEGIN, - BFD_RELOC_NDS32_RELAX_REGION_END, - BFD_RELOC_NDS32_MINUEND, - BFD_RELOC_NDS32_SUBTRAHEND, - BFD_RELOC_NDS32_DIFF8, - BFD_RELOC_NDS32_DIFF16, - BFD_RELOC_NDS32_DIFF32, - BFD_RELOC_NDS32_DIFF_ULEB128, - BFD_RELOC_NDS32_EMPTY, +char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); -/* This is a 25 bit absolute address. */ - BFD_RELOC_NDS32_25_ABS, +char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); -/* For ex9 and ifc using. */ - BFD_RELOC_NDS32_DATA, - BFD_RELOC_NDS32_TRAN, - BFD_RELOC_NDS32_17IFC_PCREL, - BFD_RELOC_NDS32_10IFCU_PCREL, +struct bfd_section *bfd_create_gnu_debuglink_section + (bfd *abfd, const char *filename); -/* For TLS. */ - BFD_RELOC_NDS32_TPOFF, - BFD_RELOC_NDS32_GOTTPOFF, - BFD_RELOC_NDS32_TLS_LE_HI20, - BFD_RELOC_NDS32_TLS_LE_LO12, - BFD_RELOC_NDS32_TLS_LE_20, - BFD_RELOC_NDS32_TLS_LE_15S0, - BFD_RELOC_NDS32_TLS_LE_15S1, - BFD_RELOC_NDS32_TLS_LE_15S2, - BFD_RELOC_NDS32_TLS_LE_ADD, - BFD_RELOC_NDS32_TLS_LE_LS, - BFD_RELOC_NDS32_TLS_IE_HI20, - BFD_RELOC_NDS32_TLS_IE_LO12, - BFD_RELOC_NDS32_TLS_IE_LO12S2, - BFD_RELOC_NDS32_TLS_IEGP_HI20, - BFD_RELOC_NDS32_TLS_IEGP_LO12, - BFD_RELOC_NDS32_TLS_IEGP_LO12S2, - BFD_RELOC_NDS32_TLS_IEGP_LW, - BFD_RELOC_NDS32_TLS_DESC, - BFD_RELOC_NDS32_TLS_DESC_HI20, - BFD_RELOC_NDS32_TLS_DESC_LO12, - BFD_RELOC_NDS32_TLS_DESC_20, - BFD_RELOC_NDS32_TLS_DESC_SDA17S2, - BFD_RELOC_NDS32_TLS_DESC_ADD, - BFD_RELOC_NDS32_TLS_DESC_FUNC, - BFD_RELOC_NDS32_TLS_DESC_CALL, - BFD_RELOC_NDS32_TLS_DESC_MEM, - BFD_RELOC_NDS32_REMOVE, - BFD_RELOC_NDS32_GROUP, +bool bfd_fill_in_gnu_debuglink_section + (bfd *abfd, struct bfd_section *sect, const char *filename); -/* For floating load store relaxation. */ - BFD_RELOC_NDS32_LSI, +char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); + +const char *bfd_set_filename (bfd *abfd, const char *filename); + +/* Extracted from reloc.c. */ +typedef enum bfd_reloc_status +{ + /* No errors detected. Note - the value 2 is used so that it + will not be mistaken for the boolean TRUE or FALSE values. */ + bfd_reloc_ok = 2, + + /* The relocation was performed, but there was an overflow. */ + bfd_reloc_overflow, -/* This is a 9-bit reloc */ - BFD_RELOC_V850_9_PCREL, + /* The address to relocate was not within the section supplied. */ + bfd_reloc_outofrange, -/* This is a 22-bit reloc */ - BFD_RELOC_V850_22_PCREL, + /* Used by special functions. */ + bfd_reloc_continue, -/* This is a 16 bit offset from the short data area pointer. */ - BFD_RELOC_V850_SDA_16_16_OFFSET, + /* Unsupported relocation size requested. */ + bfd_reloc_notsupported, -/* This is a 16 bit offset (of which only 15 bits are used) from the -short data area pointer. */ - BFD_RELOC_V850_SDA_15_16_OFFSET, + /* Target specific meaning. */ + bfd_reloc_other, -/* This is a 16 bit offset from the zero data area pointer. */ - BFD_RELOC_V850_ZDA_16_16_OFFSET, + /* The symbol to relocate against was undefined. */ + bfd_reloc_undefined, -/* This is a 16 bit offset (of which only 15 bits are used) from the -zero data area pointer. */ - BFD_RELOC_V850_ZDA_15_16_OFFSET, + /* The relocation was performed, but may not be ok. If this type is + returned, the error_message argument to bfd_perform_relocation + will be set. */ + bfd_reloc_dangerous + } + bfd_reloc_status_type; -/* This is an 8 bit offset (of which only 6 bits are used) from the -tiny data area pointer. */ - BFD_RELOC_V850_TDA_6_8_OFFSET, +typedef const struct reloc_howto_struct reloc_howto_type; -/* This is an 8bit offset (of which only 7 bits are used) from the tiny -data area pointer. */ - BFD_RELOC_V850_TDA_7_8_OFFSET, +struct reloc_cache_entry +{ + /* A pointer into the canonical table of pointers. */ + struct bfd_symbol **sym_ptr_ptr; -/* This is a 7 bit offset from the tiny data area pointer. */ - BFD_RELOC_V850_TDA_7_7_OFFSET, + /* offset in section. */ + bfd_size_type address; -/* This is a 16 bit offset from the tiny data area pointer. */ - BFD_RELOC_V850_TDA_16_16_OFFSET, + /* addend for relocation value. */ + bfd_vma addend; -/* This is a 5 bit offset (of which only 4 bits are used) from the tiny -data area pointer. */ - BFD_RELOC_V850_TDA_4_5_OFFSET, + /* Pointer to how to perform the required relocation. */ + reloc_howto_type *howto; -/* This is a 4 bit offset from the tiny data area pointer. */ - BFD_RELOC_V850_TDA_4_4_OFFSET, +}; -/* This is a 16 bit offset from the short data area pointer, with the -bits placed non-contiguously in the instruction. */ - BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, +enum complain_overflow +{ + /* Do not complain on overflow. */ + complain_overflow_dont, -/* This is a 16 bit offset from the zero data area pointer, with the -bits placed non-contiguously in the instruction. */ - BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, + /* Complain if the value overflows when considered as a signed + number one bit larger than the field. ie. A bitfield of N bits + is allowed to represent -2**n to 2**n-1. */ + complain_overflow_bitfield, -/* This is a 6 bit offset from the call table base pointer. */ - BFD_RELOC_V850_CALLT_6_7_OFFSET, + /* Complain if the value overflows when considered as a signed + number. */ + complain_overflow_signed, -/* This is a 16 bit offset from the call table base pointer. */ - BFD_RELOC_V850_CALLT_16_16_OFFSET, + /* Complain if the value overflows when considered as an + unsigned number. */ + complain_overflow_unsigned +}; -/* Used for relaxing indirect function calls. */ - BFD_RELOC_V850_LONGCALL, +struct reloc_howto_struct +{ + /* The type field has mainly a documentary use - the back end can + do what it wants with it, though normally the back end's idea of + an external reloc number is stored in this field. */ + unsigned int type; -/* Used for relaxing indirect jumps. */ - BFD_RELOC_V850_LONGJUMP, + /* The size of the item to be relocated in bytes. */ + unsigned int size:4; -/* Used to maintain alignment whilst relaxing. */ - BFD_RELOC_V850_ALIGN, + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; -/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu -instructions. */ - BFD_RELOC_V850_LO16_SPLIT_OFFSET, + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; -/* This is a 16-bit reloc. */ - BFD_RELOC_V850_16_PCREL, + /* The bit position of the reloc value in the destination. + The relocated value is left shifted by this amount. */ + unsigned int bitpos:6; -/* This is a 17-bit reloc. */ - BFD_RELOC_V850_17_PCREL, + /* What type of overflow error should be checked for when + relocating. */ + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; -/* This is a 23-bit reloc. */ - BFD_RELOC_V850_23, + /* The relocation value should be negated before applying. */ + unsigned int negate:1; -/* This is a 32-bit reloc. */ - BFD_RELOC_V850_32_PCREL, + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; -/* This is a 32-bit reloc. */ - BFD_RELOC_V850_32_ABS, + /* Some formats record a relocation addend in the section contents + rather than with the relocation. For ELF formats this is the + distinction between USE_REL and USE_RELA (though the code checks + for USE_REL == 1/0). The value of this field is TRUE if the + addend is recorded with the section contents; when performing a + partial link (ld -r) the section contents (the data) will be + modified. The value of this field is FALSE if addends are + recorded with the relocation (in arelent.addend); when performing + a partial link the relocation will be modified. + All relocations for all ELF USE_RELA targets should set this field + to FALSE (values of TRUE should be looked on with suspicion). + However, the converse is not true: not all relocations of all ELF + USE_REL targets set this field to TRUE. Why this is so is peculiar + to each particular target. For relocs that aren't used in partial + links (e.g. GOT stuff) it doesn't matter what this is set to. */ + unsigned int partial_inplace:1; -/* This is a 16-bit reloc. */ - BFD_RELOC_V850_16_SPLIT_OFFSET, + /* When some formats create PC relative instructions, they leave + the value of the pc of the place being relocated in the offset + slot of the instruction, so that a PC relative relocation can + be made just by adding in an ordinary offset (e.g., sun3 a.out). + Some formats leave the displacement part of an instruction + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset:1; -/* This is a 16-bit reloc. */ - BFD_RELOC_V850_16_S1, + /* Whether bfd_install_relocation should just install the addend, + or should follow the practice of some older object formats and + install a value including the symbol. */ + unsigned int install_addend:1; -/* Low 16 bits. 16 bit shifted by 1. */ - BFD_RELOC_V850_LO16_S1, + /* src_mask selects the part of the instruction (or data) to be used + in the relocation sum. If the target relocations don't have an + addend in the reloc, eg. ELF USE_REL, src_mask will normally equal + dst_mask to extract the addend from the section contents. If + relocations do have an addend in the reloc, eg. ELF USE_RELA, this + field should normally be zero. Non-zero values for ELF USE_RELA + targets should be viewed with suspicion as normally the value in + the dst_mask part of the section contents should be ignored. */ + bfd_vma src_mask; -/* This is a 16 bit offset from the call table base pointer. */ - BFD_RELOC_V850_CALLT_15_16_OFFSET, + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; -/* DSO relocations. */ - BFD_RELOC_V850_32_GOTPCREL, + /* If this field is non null, then the supplied function is + called rather than the normal function. This allows really + strange relocation methods to be accommodated. */ + bfd_reloc_status_type (*special_function) + (bfd *, arelent *, struct bfd_symbol *, void *, asection *, + bfd *, char **); -/* DSO relocations. */ - BFD_RELOC_V850_16_GOT, + /* The textual name of the relocation type. */ + const char *name; +}; -/* DSO relocations. */ - BFD_RELOC_V850_32_GOT, +#define HOWTO_INSTALL_ADDEND 0 +#define HOWTO_RSIZE(sz) ((sz) < 0 ? -(sz) : (sz)) +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, HOWTO_RSIZE (size), bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, HOWTO_INSTALL_ADDEND, \ + src_mask, dst_mask, func, name } +#define EMPTY_HOWTO(C) \ + HOWTO ((C), 0, 1, 0, false, 0, complain_overflow_dont, NULL, \ + NULL, false, 0, 0, false) -/* DSO relocations. */ - BFD_RELOC_V850_22_PLT_PCREL, +static inline unsigned int +bfd_get_reloc_size (reloc_howto_type *howto) +{ + return howto->size; +} -/* DSO relocations. */ - BFD_RELOC_V850_32_PLT_PCREL, +typedef struct relent_chain +{ + arelent relent; + struct relent_chain *next; +} +arelent_chain; -/* DSO relocations. */ - BFD_RELOC_V850_COPY, +bfd_reloc_status_type bfd_check_overflow + (enum complain_overflow how, + unsigned int bitsize, + unsigned int rightshift, + unsigned int addrsize, + bfd_vma relocation); -/* DSO relocations. */ - BFD_RELOC_V850_GLOB_DAT, +bool bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); -/* DSO relocations. */ - BFD_RELOC_V850_JMP_SLOT, +bfd_reloc_status_type bfd_perform_relocation + (bfd *abfd, + arelent *reloc_entry, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message); -/* DSO relocations. */ - BFD_RELOC_V850_RELATIVE, +bfd_reloc_status_type bfd_install_relocation + (bfd *abfd, + arelent *reloc_entry, + void *data, bfd_vma data_start, + asection *input_section, + char **error_message); -/* DSO relocations. */ - BFD_RELOC_V850_16_GOTOFF, +enum bfd_reloc_code_real { + _dummy_first_bfd_reloc_code_real, -/* DSO relocations. */ - BFD_RELOC_V850_32_GOTOFF, -/* start code. */ - BFD_RELOC_V850_CODE, +/* Basic absolute relocations of N bits. */ + BFD_RELOC_64, + BFD_RELOC_32, + BFD_RELOC_26, + BFD_RELOC_24, + BFD_RELOC_16, + BFD_RELOC_14, + BFD_RELOC_8, -/* start data in text. */ - BFD_RELOC_V850_DATA, +/* PC-relative relocations. Sometimes these are relative to the address +of the relocation itself; sometimes they are relative to the start of +the section containing the relocation. It depends on the specific target. */ + BFD_RELOC_64_PCREL, + BFD_RELOC_32_PCREL, + BFD_RELOC_24_PCREL, + BFD_RELOC_16_PCREL, + BFD_RELOC_12_PCREL, + BFD_RELOC_8_PCREL, -/* This is a 8bit DP reloc for the tms320c30, where the most -significant 8 bits of a 24 bit word are placed into the least -significant 8 bits of the opcode. */ - BFD_RELOC_TIC30_LDP, +/* Section relative relocations. Some targets need this for DWARF2. */ + BFD_RELOC_32_SECREL, + BFD_RELOC_16_SECIDX, -/* This is a 7bit reloc for the tms320c54x, where the least -significant 7 bits of a 16 bit word are placed into the least -significant 7 bits of the opcode. */ - BFD_RELOC_TIC54X_PARTLS7, +/* For ELF. */ + BFD_RELOC_32_GOT_PCREL, + BFD_RELOC_16_GOT_PCREL, + BFD_RELOC_8_GOT_PCREL, + BFD_RELOC_32_GOTOFF, + BFD_RELOC_16_GOTOFF, + BFD_RELOC_LO16_GOTOFF, + BFD_RELOC_HI16_GOTOFF, + BFD_RELOC_HI16_S_GOTOFF, + BFD_RELOC_8_GOTOFF, + BFD_RELOC_64_PLT_PCREL, + BFD_RELOC_32_PLT_PCREL, + BFD_RELOC_24_PLT_PCREL, + BFD_RELOC_16_PLT_PCREL, + BFD_RELOC_8_PLT_PCREL, + BFD_RELOC_64_PLTOFF, + BFD_RELOC_32_PLTOFF, + BFD_RELOC_16_PLTOFF, + BFD_RELOC_LO16_PLTOFF, + BFD_RELOC_HI16_PLTOFF, + BFD_RELOC_HI16_S_PLTOFF, + BFD_RELOC_8_PLTOFF, -/* This is a 9bit DP reloc for the tms320c54x, where the most -significant 9 bits of a 16 bit word are placed into the least -significant 9 bits of the opcode. */ - BFD_RELOC_TIC54X_PARTMS9, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, -/* This is an extended address 23-bit reloc for the tms320c54x. */ - BFD_RELOC_TIC54X_23, +/* Relocations used by 68K ELF. */ + BFD_RELOC_68K_GLOB_DAT, + BFD_RELOC_68K_JMP_SLOT, + BFD_RELOC_68K_RELATIVE, + BFD_RELOC_68K_TLS_GD32, + BFD_RELOC_68K_TLS_GD16, + BFD_RELOC_68K_TLS_GD8, + BFD_RELOC_68K_TLS_LDM32, + BFD_RELOC_68K_TLS_LDM16, + BFD_RELOC_68K_TLS_LDM8, + BFD_RELOC_68K_TLS_LDO32, + BFD_RELOC_68K_TLS_LDO16, + BFD_RELOC_68K_TLS_LDO8, + BFD_RELOC_68K_TLS_IE32, + BFD_RELOC_68K_TLS_IE16, + BFD_RELOC_68K_TLS_IE8, + BFD_RELOC_68K_TLS_LE32, + BFD_RELOC_68K_TLS_LE16, + BFD_RELOC_68K_TLS_LE8, -/* This is a 16-bit reloc for the tms320c54x, where the least -significant 16 bits of a 23-bit extended address are placed into -the opcode. */ - BFD_RELOC_TIC54X_16_OF_23, +/* Linkage-table relative. */ + BFD_RELOC_32_BASEREL, + BFD_RELOC_16_BASEREL, + BFD_RELOC_LO16_BASEREL, + BFD_RELOC_HI16_BASEREL, + BFD_RELOC_HI16_S_BASEREL, + BFD_RELOC_8_BASEREL, + BFD_RELOC_RVA, -/* This is a reloc for the tms320c54x, where the most -significant 7 bits of a 23-bit extended address are placed into -the opcode. */ - BFD_RELOC_TIC54X_MS7_OF_23, +/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */ + BFD_RELOC_8_FFnn, -/* TMS320C6000 relocations. */ - BFD_RELOC_C6000_PCR_S21, - BFD_RELOC_C6000_PCR_S12, - BFD_RELOC_C6000_PCR_S10, - BFD_RELOC_C6000_PCR_S7, - BFD_RELOC_C6000_ABS_S16, - BFD_RELOC_C6000_ABS_L16, - BFD_RELOC_C6000_ABS_H16, - BFD_RELOC_C6000_SBR_U15_B, - BFD_RELOC_C6000_SBR_U15_H, - BFD_RELOC_C6000_SBR_U15_W, - BFD_RELOC_C6000_SBR_S16, - BFD_RELOC_C6000_SBR_L16_B, - BFD_RELOC_C6000_SBR_L16_H, - BFD_RELOC_C6000_SBR_L16_W, - BFD_RELOC_C6000_SBR_H16_B, - BFD_RELOC_C6000_SBR_H16_H, - BFD_RELOC_C6000_SBR_H16_W, - BFD_RELOC_C6000_SBR_GOT_U15_W, - BFD_RELOC_C6000_SBR_GOT_L16_W, - BFD_RELOC_C6000_SBR_GOT_H16_W, - BFD_RELOC_C6000_DSBT_INDEX, - BFD_RELOC_C6000_PREL31, - BFD_RELOC_C6000_COPY, - BFD_RELOC_C6000_JUMP_SLOT, - BFD_RELOC_C6000_EHTYPE, - BFD_RELOC_C6000_PCR_H16, - BFD_RELOC_C6000_PCR_L16, - BFD_RELOC_C6000_ALIGN, - BFD_RELOC_C6000_FPHEAD, - BFD_RELOC_C6000_NOCMP, +/* These PC-relative relocations are stored as word displacements -- +i.e., byte displacements shifted right two bits. The 30-bit word +displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the +SPARC. (SPARC tools generally refer to this as <>.) The +signed 16-bit displacement is used on the MIPS, and the 23-bit +displacement is used on the Alpha. */ + BFD_RELOC_32_PCREL_S2, + BFD_RELOC_16_PCREL_S2, + BFD_RELOC_23_PCREL_S2, -/* This is a 48 bit reloc for the FR30 that stores 32 bits. */ - BFD_RELOC_FR30_48, +/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of +the target word. These are used on the SPARC. */ + BFD_RELOC_HI22, + BFD_RELOC_LO10, -/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into -two sections. */ - BFD_RELOC_FR30_20, +/* For systems that allocate a Global Pointer register, these are +displacements off that register. These relocation types are +handled specially, because the value the register will have is +decided relatively late. */ + BFD_RELOC_GPREL16, + BFD_RELOC_GPREL32, -/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in -4 bits. */ - BFD_RELOC_FR30_6_IN_4, +/* SPARC ELF relocations. There is probably some overlap with other +relocation types already defined. */ + BFD_RELOC_NONE, + BFD_RELOC_SPARC_WDISP22, + BFD_RELOC_SPARC22, + BFD_RELOC_SPARC13, + BFD_RELOC_SPARC_GOT10, + BFD_RELOC_SPARC_GOT13, + BFD_RELOC_SPARC_GOT22, + BFD_RELOC_SPARC_PC10, + BFD_RELOC_SPARC_PC22, + BFD_RELOC_SPARC_WPLT30, + BFD_RELOC_SPARC_COPY, + BFD_RELOC_SPARC_GLOB_DAT, + BFD_RELOC_SPARC_JMP_SLOT, + BFD_RELOC_SPARC_RELATIVE, + BFD_RELOC_SPARC_UA16, + BFD_RELOC_SPARC_UA32, + BFD_RELOC_SPARC_UA64, + BFD_RELOC_SPARC_GOTDATA_HIX22, + BFD_RELOC_SPARC_GOTDATA_LOX10, + BFD_RELOC_SPARC_GOTDATA_OP_HIX22, + BFD_RELOC_SPARC_GOTDATA_OP_LOX10, + BFD_RELOC_SPARC_GOTDATA_OP, + BFD_RELOC_SPARC_JMP_IREL, + BFD_RELOC_SPARC_IRELATIVE, -/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset -into 8 bits. */ - BFD_RELOC_FR30_8_IN_8, +/* I think these are specific to SPARC a.out (e.g., Sun 4). */ + BFD_RELOC_SPARC_BASE13, + BFD_RELOC_SPARC_BASE22, -/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset -into 8 bits. */ - BFD_RELOC_FR30_9_IN_8, +/* SPARC64 relocations */ +#define BFD_RELOC_SPARC_64 BFD_RELOC_64 + BFD_RELOC_SPARC_10, + BFD_RELOC_SPARC_11, + BFD_RELOC_SPARC_OLO10, + BFD_RELOC_SPARC_HH22, + BFD_RELOC_SPARC_HM10, + BFD_RELOC_SPARC_LM22, + BFD_RELOC_SPARC_PC_HH22, + BFD_RELOC_SPARC_PC_HM10, + BFD_RELOC_SPARC_PC_LM22, + BFD_RELOC_SPARC_WDISP16, + BFD_RELOC_SPARC_WDISP19, + BFD_RELOC_SPARC_7, + BFD_RELOC_SPARC_6, + BFD_RELOC_SPARC_5, +#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL + BFD_RELOC_SPARC_PLT32, + BFD_RELOC_SPARC_PLT64, + BFD_RELOC_SPARC_HIX22, + BFD_RELOC_SPARC_LOX10, + BFD_RELOC_SPARC_H44, + BFD_RELOC_SPARC_M44, + BFD_RELOC_SPARC_L44, + BFD_RELOC_SPARC_REGISTER, + BFD_RELOC_SPARC_H34, + BFD_RELOC_SPARC_SIZE32, + BFD_RELOC_SPARC_SIZE64, + BFD_RELOC_SPARC_WDISP10, -/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset -into 8 bits. */ - BFD_RELOC_FR30_10_IN_8, +/* SPARC little endian relocation */ + BFD_RELOC_SPARC_REV32, -/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative -short offset into 8 bits. */ - BFD_RELOC_FR30_9_PCREL, +/* SPARC TLS relocations */ + BFD_RELOC_SPARC_TLS_GD_HI22, + BFD_RELOC_SPARC_TLS_GD_LO10, + BFD_RELOC_SPARC_TLS_GD_ADD, + BFD_RELOC_SPARC_TLS_GD_CALL, + BFD_RELOC_SPARC_TLS_LDM_HI22, + BFD_RELOC_SPARC_TLS_LDM_LO10, + BFD_RELOC_SPARC_TLS_LDM_ADD, + BFD_RELOC_SPARC_TLS_LDM_CALL, + BFD_RELOC_SPARC_TLS_LDO_HIX22, + BFD_RELOC_SPARC_TLS_LDO_LOX10, + BFD_RELOC_SPARC_TLS_LDO_ADD, + BFD_RELOC_SPARC_TLS_IE_HI22, + BFD_RELOC_SPARC_TLS_IE_LO10, + BFD_RELOC_SPARC_TLS_IE_LD, + BFD_RELOC_SPARC_TLS_IE_LDX, + BFD_RELOC_SPARC_TLS_IE_ADD, + BFD_RELOC_SPARC_TLS_LE_HIX22, + BFD_RELOC_SPARC_TLS_LE_LOX10, + BFD_RELOC_SPARC_TLS_DTPMOD32, + BFD_RELOC_SPARC_TLS_DTPMOD64, + BFD_RELOC_SPARC_TLS_DTPOFF32, + BFD_RELOC_SPARC_TLS_DTPOFF64, + BFD_RELOC_SPARC_TLS_TPOFF32, + BFD_RELOC_SPARC_TLS_TPOFF64, -/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative -short offset into 11 bits. */ - BFD_RELOC_FR30_12_PCREL, +/* SPU Relocations. */ + BFD_RELOC_SPU_IMM7, + BFD_RELOC_SPU_IMM8, + BFD_RELOC_SPU_IMM10, + BFD_RELOC_SPU_IMM10W, + BFD_RELOC_SPU_IMM16, + BFD_RELOC_SPU_IMM16W, + BFD_RELOC_SPU_IMM18, + BFD_RELOC_SPU_PCREL9a, + BFD_RELOC_SPU_PCREL9b, + BFD_RELOC_SPU_PCREL16, + BFD_RELOC_SPU_LO16, + BFD_RELOC_SPU_HI16, + BFD_RELOC_SPU_PPU32, + BFD_RELOC_SPU_PPU64, + BFD_RELOC_SPU_ADD_PIC, -/* Motorola Mcore relocations. */ - BFD_RELOC_MCORE_PCREL_IMM8BY4, - BFD_RELOC_MCORE_PCREL_IMM11BY2, - BFD_RELOC_MCORE_PCREL_IMM4BY2, - BFD_RELOC_MCORE_PCREL_32, - BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, - BFD_RELOC_MCORE_RVA, +/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or +"addend" in some special way. +For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when +writing; when reading, it will be the absolute section symbol. The +addend is the displacement in bytes of the "lda" instruction from +the "ldah" instruction (which is at the address of this reloc). */ + BFD_RELOC_ALPHA_GPDISP_HI16, -/* Toshiba Media Processor Relocations. */ - BFD_RELOC_MEP_8, - BFD_RELOC_MEP_16, - BFD_RELOC_MEP_32, - BFD_RELOC_MEP_PCREL8A2, - BFD_RELOC_MEP_PCREL12A2, - BFD_RELOC_MEP_PCREL17A2, - BFD_RELOC_MEP_PCREL24A2, - BFD_RELOC_MEP_PCABS24A2, - BFD_RELOC_MEP_LOW16, - BFD_RELOC_MEP_HI16U, - BFD_RELOC_MEP_HI16S, - BFD_RELOC_MEP_GPREL, - BFD_RELOC_MEP_TPREL, - BFD_RELOC_MEP_TPREL7, - BFD_RELOC_MEP_TPREL7A2, - BFD_RELOC_MEP_TPREL7A4, - BFD_RELOC_MEP_UIMM24, - BFD_RELOC_MEP_ADDR24A4, - BFD_RELOC_MEP_GNU_VTINHERIT, - BFD_RELOC_MEP_GNU_VTENTRY, +/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as +with GPDISP_HI16 relocs. The addend is ignored when writing the +relocations out, and is filled in with the file's GP value on +reading, for convenience. */ + BFD_RELOC_ALPHA_GPDISP_LO16, +/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 +relocation except that there is no accompanying GPDISP_LO16 +relocation. */ + BFD_RELOC_ALPHA_GPDISP, -/* Imagination Technologies Meta relocations. */ - BFD_RELOC_METAG_HIADDR16, - BFD_RELOC_METAG_LOADDR16, - BFD_RELOC_METAG_RELBRANCH, - BFD_RELOC_METAG_GETSETOFF, - BFD_RELOC_METAG_HIOG, - BFD_RELOC_METAG_LOOG, - BFD_RELOC_METAG_REL8, - BFD_RELOC_METAG_REL16, - BFD_RELOC_METAG_HI16_GOTOFF, - BFD_RELOC_METAG_LO16_GOTOFF, - BFD_RELOC_METAG_GETSET_GOTOFF, - BFD_RELOC_METAG_GETSET_GOT, - BFD_RELOC_METAG_HI16_GOTPC, - BFD_RELOC_METAG_LO16_GOTPC, - BFD_RELOC_METAG_HI16_PLT, - BFD_RELOC_METAG_LO16_PLT, - BFD_RELOC_METAG_RELBRANCH_PLT, - BFD_RELOC_METAG_GOTOFF, - BFD_RELOC_METAG_PLT, - BFD_RELOC_METAG_COPY, - BFD_RELOC_METAG_JMP_SLOT, - BFD_RELOC_METAG_RELATIVE, - BFD_RELOC_METAG_GLOB_DAT, - BFD_RELOC_METAG_TLS_GD, - BFD_RELOC_METAG_TLS_LDM, - BFD_RELOC_METAG_TLS_LDO_HI16, - BFD_RELOC_METAG_TLS_LDO_LO16, - BFD_RELOC_METAG_TLS_LDO, - BFD_RELOC_METAG_TLS_IE, - BFD_RELOC_METAG_TLS_IENONPIC, - BFD_RELOC_METAG_TLS_IENONPIC_HI16, - BFD_RELOC_METAG_TLS_IENONPIC_LO16, - BFD_RELOC_METAG_TLS_TPOFF, - BFD_RELOC_METAG_TLS_DTPMOD, - BFD_RELOC_METAG_TLS_DTPOFF, - BFD_RELOC_METAG_TLS_LE, - BFD_RELOC_METAG_TLS_LE_HI16, - BFD_RELOC_METAG_TLS_LE_LO16, +/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; +the assembler turns it into a LDQ instruction to load the address of +the symbol, and then fills in a register in the real instruction. -/* These are relocations for the GETA instruction. */ - BFD_RELOC_MMIX_GETA, - BFD_RELOC_MMIX_GETA_1, - BFD_RELOC_MMIX_GETA_2, - BFD_RELOC_MMIX_GETA_3, +The LITERAL reloc, at the LDQ instruction, refers to the .lita +section symbol. The addend is ignored when writing, but is filled +in with the file's GP value on reading, for convenience, as with the +GPDISP_LO16 reloc. -/* These are relocations for a conditional branch instruction. */ - BFD_RELOC_MMIX_CBRANCH, - BFD_RELOC_MMIX_CBRANCH_J, - BFD_RELOC_MMIX_CBRANCH_1, - BFD_RELOC_MMIX_CBRANCH_2, - BFD_RELOC_MMIX_CBRANCH_3, +The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16. +It should refer to the symbol to be referenced, as with 16_GOTOFF, +but it generates output not based on the position within the .got +section, but relative to the GP value chosen for the file during the +final link stage. -/* These are relocations for the PUSHJ instruction. */ - BFD_RELOC_MMIX_PUSHJ, - BFD_RELOC_MMIX_PUSHJ_1, - BFD_RELOC_MMIX_PUSHJ_2, - BFD_RELOC_MMIX_PUSHJ_3, - BFD_RELOC_MMIX_PUSHJ_STUBBABLE, +The LITUSE reloc, on the instruction using the loaded address, gives +information to the linker that it might be able to use to optimize +away some literal section references. The symbol is ignored (read +as the absolute section symbol), and the "addend" indicates the type +of instruction using the register: +1 - "memory" fmt insn +2 - byte-manipulation (byte offset reg) +3 - jsr (target of branch) */ + BFD_RELOC_ALPHA_LITERAL, + BFD_RELOC_ALPHA_ELF_LITERAL, + BFD_RELOC_ALPHA_LITUSE, -/* These are relocations for the JMP instruction. */ - BFD_RELOC_MMIX_JMP, - BFD_RELOC_MMIX_JMP_1, - BFD_RELOC_MMIX_JMP_2, - BFD_RELOC_MMIX_JMP_3, +/* The HINT relocation indicates a value that should be filled into the +"hint" field of a jmp/jsr/ret instruction, for possible branch- +prediction logic which may be provided on some processors. */ + BFD_RELOC_ALPHA_HINT, -/* This is a relocation for a relative address as in a GETA instruction or -a branch. */ - BFD_RELOC_MMIX_ADDR19, +/* The LINKAGE relocation outputs a linkage pair in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_LINKAGE, -/* This is a relocation for a relative address as in a JMP instruction. */ - BFD_RELOC_MMIX_ADDR27, +/* The CODEADDR relocation outputs a STO_CA in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_CODEADDR, -/* This is a relocation for an instruction field that may be a general -register or a value 0..255. */ - BFD_RELOC_MMIX_REG_OR_BYTE, +/* The GPREL_HI/LO relocations together form a 32-bit offset from the +GP register. */ + BFD_RELOC_ALPHA_GPREL_HI16, + BFD_RELOC_ALPHA_GPREL_LO16, -/* This is a relocation for an instruction field that may be a general -register. */ - BFD_RELOC_MMIX_REG, +/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must +share a common GP, and the target address is adjusted for +STO_ALPHA_STD_GPLOAD. */ + BFD_RELOC_ALPHA_BRSGP, -/* This is a relocation for two instruction fields holding a register and -an offset, the equivalent of the relocation. */ - BFD_RELOC_MMIX_BASE_PLUS_OFFSET, +/* The NOP relocation outputs a NOP if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_NOP, -/* This relocation is an assertion that the expression is not allocated as -a global register. It does not modify contents. */ - BFD_RELOC_MMIX_LOCAL, +/* The BSR relocation outputs a BSR if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_BSR, -/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative -short offset into 7 bits. */ - BFD_RELOC_AVR_7_PCREL, +/* The LDA relocation outputs a LDA if the longword displacement +between two procedure entry points is < 2^16. */ + BFD_RELOC_ALPHA_LDA, -/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative -short offset into 12 bits. */ - BFD_RELOC_AVR_13_PCREL, +/* The BOH relocation outputs a BSR if the longword displacement +between two procedure entry points is < 2^21, or else a hint. */ + BFD_RELOC_ALPHA_BOH, -/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually -program memory address) into 16 bits. */ - BFD_RELOC_AVR_16_PM, +/* Alpha thread-local storage relocations. */ + BFD_RELOC_ALPHA_TLSGD, + BFD_RELOC_ALPHA_TLSLDM, + BFD_RELOC_ALPHA_DTPMOD64, + BFD_RELOC_ALPHA_GOTDTPREL16, + BFD_RELOC_ALPHA_DTPREL64, + BFD_RELOC_ALPHA_DTPREL_HI16, + BFD_RELOC_ALPHA_DTPREL_LO16, + BFD_RELOC_ALPHA_DTPREL16, + BFD_RELOC_ALPHA_GOTTPREL16, + BFD_RELOC_ALPHA_TPREL64, + BFD_RELOC_ALPHA_TPREL_HI16, + BFD_RELOC_ALPHA_TPREL_LO16, + BFD_RELOC_ALPHA_TPREL16, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually -data memory address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_LO8_LDI, +/* The MIPS jump instruction. */ + BFD_RELOC_MIPS_JMP, + BFD_RELOC_MICROMIPS_JMP, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit -of data memory address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_HI8_LDI, +/* The MIPS16 jump instruction. */ + BFD_RELOC_MIPS16_JMP, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit -of program memory address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_HH8_LDI, +/* MIPS16 GP relative reloc. */ + BFD_RELOC_MIPS16_GPREL, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit -of 32 bit value) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_MS8_LDI, +/* High 16 bits of 32-bit value; simple reloc. */ + BFD_RELOC_HI16, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(usually data memory address) into 8 bit immediate value of SUBI insn. */ - BFD_RELOC_AVR_LO8_LDI_NEG, +/* High 16 bits of 32-bit value but the low 16 bits will be sign +extended and added to form the final result. If the low 16 +bits form a negative number, we need to add one to the high value +to compensate for the borrow when the low bits are added. */ + BFD_RELOC_HI16_S, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(high 8 bit of data memory address) into 8 bit immediate value of -SUBI insn. */ - BFD_RELOC_AVR_HI8_LDI_NEG, +/* Low 16 bits. */ + BFD_RELOC_LO16, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(most high 8 bit of program memory address) into 8 bit immediate value -of LDI or SUBI insn. */ - BFD_RELOC_AVR_HH8_LDI_NEG, +/* High 16 bits of 32-bit pc-relative value */ + BFD_RELOC_HI16_PCREL, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb -of 32 bit value) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_MS8_LDI_NEG, +/* High 16 bits of 32-bit pc-relative value, adjusted */ + BFD_RELOC_HI16_S_PCREL, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually -command address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_LO8_LDI_PM, +/* Low 16 bits of pc-relative value */ + BFD_RELOC_LO16_PCREL, -/* This is a 16 bit reloc for the AVR that stores 8 bit value -(command address) into 8 bit immediate value of LDI insn. If the address -is beyond the 128k boundary, the linker inserts a jump stub for this reloc -in the lower 128k. */ - BFD_RELOC_AVR_LO8_LDI_GS, +/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of +16-bit immediate fields */ + BFD_RELOC_MIPS16_GOT16, + BFD_RELOC_MIPS16_CALL16, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit -of command address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_HI8_LDI_PM, +/* MIPS16 high 16 bits of 32-bit value. */ + BFD_RELOC_MIPS16_HI16, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit -of command address) into 8 bit immediate value of LDI insn. If the address -is beyond the 128k boundary, the linker inserts a jump stub for this reloc -below 128k. */ - BFD_RELOC_AVR_HI8_LDI_GS, +/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign +extended and added to form the final result. If the low 16 +bits form a negative number, we need to add one to the high value +to compensate for the borrow when the low bits are added. */ + BFD_RELOC_MIPS16_HI16_S, -/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit -of command address) into 8 bit immediate value of LDI insn. */ - BFD_RELOC_AVR_HH8_LDI_PM, +/* MIPS16 low 16 bits. */ + BFD_RELOC_MIPS16_LO16, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(usually command address) into 8 bit immediate value of SUBI insn. */ - BFD_RELOC_AVR_LO8_LDI_PM_NEG, +/* MIPS16 TLS relocations */ + BFD_RELOC_MIPS16_TLS_GD, + BFD_RELOC_MIPS16_TLS_LDM, + BFD_RELOC_MIPS16_TLS_DTPREL_HI16, + BFD_RELOC_MIPS16_TLS_DTPREL_LO16, + BFD_RELOC_MIPS16_TLS_GOTTPREL, + BFD_RELOC_MIPS16_TLS_TPREL_HI16, + BFD_RELOC_MIPS16_TLS_TPREL_LO16, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(high 8 bit of 16 bit command address) into 8 bit immediate value -of SUBI insn. */ - BFD_RELOC_AVR_HI8_LDI_PM_NEG, +/* Relocation against a MIPS literal section. */ + BFD_RELOC_MIPS_LITERAL, + BFD_RELOC_MICROMIPS_LITERAL, -/* This is a 16 bit reloc for the AVR that stores negated 8 bit value -(high 6 bit of 22 bit command address) into 8 bit immediate -value of SUBI insn. */ - BFD_RELOC_AVR_HH8_LDI_PM_NEG, +/* microMIPS PC-relative relocations. */ + BFD_RELOC_MICROMIPS_7_PCREL_S1, + BFD_RELOC_MICROMIPS_10_PCREL_S1, + BFD_RELOC_MICROMIPS_16_PCREL_S1, -/* This is a 32 bit reloc for the AVR that stores 23 bit value -into 22 bits. */ - BFD_RELOC_AVR_CALL, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, -/* This is a 16 bit reloc for the AVR that stores all needed bits -for absolute addressing with ldi with overflow check to linktime */ - BFD_RELOC_AVR_LDI, +/* MIPS PC-relative relocations. */ + BFD_RELOC_MIPS_21_PCREL_S2, + BFD_RELOC_MIPS_26_PCREL_S2, + BFD_RELOC_MIPS_18_PCREL_S3, + BFD_RELOC_MIPS_19_PCREL_S2, -/* This is a 6 bit reloc for the AVR that stores offset for ldd/std -instructions */ - BFD_RELOC_AVR_6, +/* microMIPS versions of generic BFD relocs. */ + BFD_RELOC_MICROMIPS_GPREL16, + BFD_RELOC_MICROMIPS_HI16, + BFD_RELOC_MICROMIPS_HI16_S, + BFD_RELOC_MICROMIPS_LO16, -/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw -instructions */ - BFD_RELOC_AVR_6_ADIW, +/* MIPS ELF relocations. */ + BFD_RELOC_MIPS_GOT16, + BFD_RELOC_MICROMIPS_GOT16, + BFD_RELOC_MIPS_CALL16, + BFD_RELOC_MICROMIPS_CALL16, + BFD_RELOC_MIPS_GOT_HI16, + BFD_RELOC_MICROMIPS_GOT_HI16, + BFD_RELOC_MIPS_GOT_LO16, + BFD_RELOC_MICROMIPS_GOT_LO16, + BFD_RELOC_MIPS_CALL_HI16, + BFD_RELOC_MICROMIPS_CALL_HI16, + BFD_RELOC_MIPS_CALL_LO16, + BFD_RELOC_MICROMIPS_CALL_LO16, + BFD_RELOC_MIPS_SUB, + BFD_RELOC_MICROMIPS_SUB, + BFD_RELOC_MIPS_GOT_PAGE, + BFD_RELOC_MICROMIPS_GOT_PAGE, + BFD_RELOC_MIPS_GOT_OFST, + BFD_RELOC_MICROMIPS_GOT_OFST, + BFD_RELOC_MIPS_GOT_DISP, + BFD_RELOC_MICROMIPS_GOT_DISP, + BFD_RELOC_MIPS_SHIFT5, + BFD_RELOC_MIPS_SHIFT6, + BFD_RELOC_MIPS_INSERT_A, + BFD_RELOC_MIPS_INSERT_B, + BFD_RELOC_MIPS_DELETE, + BFD_RELOC_MIPS_HIGHEST, + BFD_RELOC_MICROMIPS_HIGHEST, + BFD_RELOC_MIPS_HIGHER, + BFD_RELOC_MICROMIPS_HIGHER, + BFD_RELOC_MIPS_SCN_DISP, + BFD_RELOC_MICROMIPS_SCN_DISP, + BFD_RELOC_MIPS_16, + BFD_RELOC_MIPS_RELGOT, + BFD_RELOC_MIPS_JALR, + BFD_RELOC_MICROMIPS_JALR, + BFD_RELOC_MIPS_TLS_DTPMOD32, + BFD_RELOC_MIPS_TLS_DTPREL32, + BFD_RELOC_MIPS_TLS_DTPMOD64, + BFD_RELOC_MIPS_TLS_DTPREL64, + BFD_RELOC_MIPS_TLS_GD, + BFD_RELOC_MICROMIPS_TLS_GD, + BFD_RELOC_MIPS_TLS_LDM, + BFD_RELOC_MICROMIPS_TLS_LDM, + BFD_RELOC_MIPS_TLS_DTPREL_HI16, + BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16, + BFD_RELOC_MIPS_TLS_DTPREL_LO16, + BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16, + BFD_RELOC_MIPS_TLS_GOTTPREL, + BFD_RELOC_MICROMIPS_TLS_GOTTPREL, + BFD_RELOC_MIPS_TLS_TPREL32, + BFD_RELOC_MIPS_TLS_TPREL64, + BFD_RELOC_MIPS_TLS_TPREL_HI16, + BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, + BFD_RELOC_MIPS_TLS_TPREL_LO16, + BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, -/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol -in .byte lo8(symbol) */ - BFD_RELOC_AVR_8_LO, -/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol -in .byte hi8(symbol) */ - BFD_RELOC_AVR_8_HI, +/* MIPS ELF relocations (VxWorks and PLT extensions). */ + BFD_RELOC_MIPS_COPY, + BFD_RELOC_MIPS_JUMP_SLOT, -/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol -in .byte hlo8(symbol) */ - BFD_RELOC_AVR_8_HLO, -/* AVR relocations to mark the difference of two local symbols. -These are only needed to support linker relaxation and can be ignored -when not relaxing. The field is set to the value of the difference -assuming no relaxation. The relocation encodes the position of the -second symbol so the linker can determine whether to adjust the field -value. */ - BFD_RELOC_AVR_DIFF8, - BFD_RELOC_AVR_DIFF16, - BFD_RELOC_AVR_DIFF32, +/* Moxie ELF relocations. */ + BFD_RELOC_MOXIE_10_PCREL, -/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit -lds and sts instructions supported only tiny core. */ - BFD_RELOC_AVR_LDS_STS_16, -/* This is a 6 bit reloc for the AVR that stores an I/O register -number for the IN and OUT instructions */ - BFD_RELOC_AVR_PORT6, +/* FT32 ELF relocations. */ + BFD_RELOC_FT32_10, + BFD_RELOC_FT32_20, + BFD_RELOC_FT32_17, + BFD_RELOC_FT32_18, + BFD_RELOC_FT32_RELAX, + BFD_RELOC_FT32_SC0, + BFD_RELOC_FT32_SC1, + BFD_RELOC_FT32_15, + BFD_RELOC_FT32_DIFF32, -/* This is a 5 bit reloc for the AVR that stores an I/O register -number for the SBIC, SBIS, SBI and CBI instructions */ - BFD_RELOC_AVR_PORT5, -/* RISC-V relocations. */ - BFD_RELOC_RISCV_HI20, - BFD_RELOC_RISCV_PCREL_HI20, - BFD_RELOC_RISCV_PCREL_LO12_I, - BFD_RELOC_RISCV_PCREL_LO12_S, - BFD_RELOC_RISCV_LO12_I, - BFD_RELOC_RISCV_LO12_S, - BFD_RELOC_RISCV_GPREL12_I, - BFD_RELOC_RISCV_GPREL12_S, - BFD_RELOC_RISCV_TPREL_HI20, - BFD_RELOC_RISCV_TPREL_LO12_I, - BFD_RELOC_RISCV_TPREL_LO12_S, - BFD_RELOC_RISCV_TPREL_ADD, - BFD_RELOC_RISCV_CALL, - BFD_RELOC_RISCV_CALL_PLT, - BFD_RELOC_RISCV_ADD8, - BFD_RELOC_RISCV_ADD16, - BFD_RELOC_RISCV_ADD32, - BFD_RELOC_RISCV_ADD64, - BFD_RELOC_RISCV_SUB8, - BFD_RELOC_RISCV_SUB16, - BFD_RELOC_RISCV_SUB32, - BFD_RELOC_RISCV_SUB64, - BFD_RELOC_RISCV_GOT_HI20, - BFD_RELOC_RISCV_TLS_GOT_HI20, - BFD_RELOC_RISCV_TLS_GD_HI20, - BFD_RELOC_RISCV_JMP, - BFD_RELOC_RISCV_TLS_DTPMOD32, - BFD_RELOC_RISCV_TLS_DTPREL32, - BFD_RELOC_RISCV_TLS_DTPMOD64, - BFD_RELOC_RISCV_TLS_DTPREL64, - BFD_RELOC_RISCV_TLS_TPREL32, - BFD_RELOC_RISCV_TLS_TPREL64, - BFD_RELOC_RISCV_ALIGN, - BFD_RELOC_RISCV_RVC_BRANCH, - BFD_RELOC_RISCV_RVC_JUMP, - BFD_RELOC_RISCV_RVC_LUI, - BFD_RELOC_RISCV_GPREL_I, - BFD_RELOC_RISCV_GPREL_S, - BFD_RELOC_RISCV_TPREL_I, - BFD_RELOC_RISCV_TPREL_S, - BFD_RELOC_RISCV_RELAX, - BFD_RELOC_RISCV_CFA, - BFD_RELOC_RISCV_SUB6, - BFD_RELOC_RISCV_SET6, - BFD_RELOC_RISCV_SET8, - BFD_RELOC_RISCV_SET16, - BFD_RELOC_RISCV_SET32, - BFD_RELOC_RISCV_32_PCREL, +/* Fujitsu Frv Relocations. */ + BFD_RELOC_FRV_LABEL16, + BFD_RELOC_FRV_LABEL24, + BFD_RELOC_FRV_LO16, + BFD_RELOC_FRV_HI16, + BFD_RELOC_FRV_GPREL12, + BFD_RELOC_FRV_GPRELU12, + BFD_RELOC_FRV_GPREL32, + BFD_RELOC_FRV_GPRELHI, + BFD_RELOC_FRV_GPRELLO, + BFD_RELOC_FRV_GOT12, + BFD_RELOC_FRV_GOTHI, + BFD_RELOC_FRV_GOTLO, + BFD_RELOC_FRV_FUNCDESC, + BFD_RELOC_FRV_FUNCDESC_GOT12, + BFD_RELOC_FRV_FUNCDESC_GOTHI, + BFD_RELOC_FRV_FUNCDESC_GOTLO, + BFD_RELOC_FRV_FUNCDESC_VALUE, + BFD_RELOC_FRV_FUNCDESC_GOTOFF12, + BFD_RELOC_FRV_FUNCDESC_GOTOFFHI, + BFD_RELOC_FRV_FUNCDESC_GOTOFFLO, + BFD_RELOC_FRV_GOTOFF12, + BFD_RELOC_FRV_GOTOFFHI, + BFD_RELOC_FRV_GOTOFFLO, + BFD_RELOC_FRV_GETTLSOFF, + BFD_RELOC_FRV_TLSDESC_VALUE, + BFD_RELOC_FRV_GOTTLSDESC12, + BFD_RELOC_FRV_GOTTLSDESCHI, + BFD_RELOC_FRV_GOTTLSDESCLO, + BFD_RELOC_FRV_TLSMOFF12, + BFD_RELOC_FRV_TLSMOFFHI, + BFD_RELOC_FRV_TLSMOFFLO, + BFD_RELOC_FRV_GOTTLSOFF12, + BFD_RELOC_FRV_GOTTLSOFFHI, + BFD_RELOC_FRV_GOTTLSOFFLO, + BFD_RELOC_FRV_TLSOFF, + BFD_RELOC_FRV_TLSDESC_RELAX, + BFD_RELOC_FRV_GETTLSOFF_RELAX, + BFD_RELOC_FRV_TLSOFF_RELAX, + BFD_RELOC_FRV_TLSMOFF, -/* Renesas RL78 Relocations. */ - BFD_RELOC_RL78_NEG8, - BFD_RELOC_RL78_NEG16, - BFD_RELOC_RL78_NEG24, - BFD_RELOC_RL78_NEG32, - BFD_RELOC_RL78_16_OP, - BFD_RELOC_RL78_24_OP, - BFD_RELOC_RL78_32_OP, - BFD_RELOC_RL78_8U, - BFD_RELOC_RL78_16U, - BFD_RELOC_RL78_24U, - BFD_RELOC_RL78_DIR3U_PCREL, - BFD_RELOC_RL78_DIFF, - BFD_RELOC_RL78_GPRELB, - BFD_RELOC_RL78_GPRELW, - BFD_RELOC_RL78_GPRELL, - BFD_RELOC_RL78_SYM, - BFD_RELOC_RL78_OP_SUBTRACT, - BFD_RELOC_RL78_OP_NEG, - BFD_RELOC_RL78_OP_AND, - BFD_RELOC_RL78_OP_SHRA, - BFD_RELOC_RL78_ABS8, - BFD_RELOC_RL78_ABS16, - BFD_RELOC_RL78_ABS16_REV, - BFD_RELOC_RL78_ABS32, - BFD_RELOC_RL78_ABS32_REV, - BFD_RELOC_RL78_ABS16U, - BFD_RELOC_RL78_ABS16UW, - BFD_RELOC_RL78_ABS16UL, - BFD_RELOC_RL78_RELAX, - BFD_RELOC_RL78_HI16, - BFD_RELOC_RL78_HI8, - BFD_RELOC_RL78_LO16, - BFD_RELOC_RL78_CODE, - BFD_RELOC_RL78_SADDR, -/* Renesas RX Relocations. */ - BFD_RELOC_RX_NEG8, - BFD_RELOC_RX_NEG16, - BFD_RELOC_RX_NEG24, - BFD_RELOC_RX_NEG32, - BFD_RELOC_RX_16_OP, - BFD_RELOC_RX_24_OP, - BFD_RELOC_RX_32_OP, - BFD_RELOC_RX_8U, - BFD_RELOC_RX_16U, - BFD_RELOC_RX_24U, - BFD_RELOC_RX_DIR3U_PCREL, - BFD_RELOC_RX_DIFF, - BFD_RELOC_RX_GPRELB, - BFD_RELOC_RX_GPRELW, - BFD_RELOC_RX_GPRELL, - BFD_RELOC_RX_SYM, - BFD_RELOC_RX_OP_SUBTRACT, - BFD_RELOC_RX_OP_NEG, - BFD_RELOC_RX_ABS8, - BFD_RELOC_RX_ABS16, - BFD_RELOC_RX_ABS16_REV, - BFD_RELOC_RX_ABS32, - BFD_RELOC_RX_ABS32_REV, - BFD_RELOC_RX_ABS16U, - BFD_RELOC_RX_ABS16UW, - BFD_RELOC_RX_ABS16UL, - BFD_RELOC_RX_RELAX, +/* This is a 24bit GOT-relative reloc for the mn10300. */ + BFD_RELOC_MN10300_GOTOFF24, -/* Direct 12 bit. */ - BFD_RELOC_390_12, +/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes +in the instruction. */ + BFD_RELOC_MN10300_GOT32, -/* 12 bit GOT offset. */ - BFD_RELOC_390_GOT12, +/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes +in the instruction. */ + BFD_RELOC_MN10300_GOT24, -/* 32 bit PC relative PLT address. */ - BFD_RELOC_390_PLT32, +/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes +in the instruction. */ + BFD_RELOC_MN10300_GOT16, /* Copy symbol at runtime. */ - BFD_RELOC_390_COPY, + BFD_RELOC_MN10300_COPY, /* Create GOT entry. */ - BFD_RELOC_390_GLOB_DAT, + BFD_RELOC_MN10300_GLOB_DAT, /* Create PLT entry. */ - BFD_RELOC_390_JMP_SLOT, + BFD_RELOC_MN10300_JMP_SLOT, /* Adjust by program base. */ - BFD_RELOC_390_RELATIVE, + BFD_RELOC_MN10300_RELATIVE, -/* 32 bit PC relative offset to GOT. */ - BFD_RELOC_390_GOTPC, +/* Together with another reloc targeted at the same location, +allows for a value that is the difference of two symbols +in the same section. */ + BFD_RELOC_MN10300_SYM_DIFF, -/* 16 bit GOT offset. */ - BFD_RELOC_390_GOT16, +/* The addend of this reloc is an alignment power that must +be honoured at the offset's location, regardless of linker +relaxation. */ + BFD_RELOC_MN10300_ALIGN, + +/* Various TLS-related relocations. */ + BFD_RELOC_MN10300_TLS_GD, + BFD_RELOC_MN10300_TLS_LD, + BFD_RELOC_MN10300_TLS_LDO, + BFD_RELOC_MN10300_TLS_GOTIE, + BFD_RELOC_MN10300_TLS_IE, + BFD_RELOC_MN10300_TLS_LE, + BFD_RELOC_MN10300_TLS_DTPMOD, + BFD_RELOC_MN10300_TLS_DTPOFF, + BFD_RELOC_MN10300_TLS_TPOFF, + +/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the +instruction. */ + BFD_RELOC_MN10300_32_PCREL, + +/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the +instruction. */ + BFD_RELOC_MN10300_16_PCREL, + + +/* i386/elf relocations */ + BFD_RELOC_386_GOT32, + BFD_RELOC_386_PLT32, + BFD_RELOC_386_COPY, + BFD_RELOC_386_GLOB_DAT, + BFD_RELOC_386_JUMP_SLOT, + BFD_RELOC_386_RELATIVE, + BFD_RELOC_386_GOTOFF, + BFD_RELOC_386_GOTPC, + BFD_RELOC_386_TLS_TPOFF, + BFD_RELOC_386_TLS_IE, + BFD_RELOC_386_TLS_GOTIE, + BFD_RELOC_386_TLS_LE, + BFD_RELOC_386_TLS_GD, + BFD_RELOC_386_TLS_LDM, + BFD_RELOC_386_TLS_LDO_32, + BFD_RELOC_386_TLS_IE_32, + BFD_RELOC_386_TLS_LE_32, + BFD_RELOC_386_TLS_DTPMOD32, + BFD_RELOC_386_TLS_DTPOFF32, + BFD_RELOC_386_TLS_TPOFF32, + BFD_RELOC_386_TLS_GOTDESC, + BFD_RELOC_386_TLS_DESC_CALL, + BFD_RELOC_386_TLS_DESC, + BFD_RELOC_386_IRELATIVE, + BFD_RELOC_386_GOT32X, + +/* x86-64/elf relocations */ + BFD_RELOC_X86_64_GOT32, + BFD_RELOC_X86_64_PLT32, + BFD_RELOC_X86_64_COPY, + BFD_RELOC_X86_64_GLOB_DAT, + BFD_RELOC_X86_64_JUMP_SLOT, + BFD_RELOC_X86_64_RELATIVE, + BFD_RELOC_X86_64_GOTPCREL, + BFD_RELOC_X86_64_32S, + BFD_RELOC_X86_64_DTPMOD64, + BFD_RELOC_X86_64_DTPOFF64, + BFD_RELOC_X86_64_TPOFF64, + BFD_RELOC_X86_64_TLSGD, + BFD_RELOC_X86_64_TLSLD, + BFD_RELOC_X86_64_DTPOFF32, + BFD_RELOC_X86_64_GOTTPOFF, + BFD_RELOC_X86_64_TPOFF32, + BFD_RELOC_X86_64_GOTOFF64, + BFD_RELOC_X86_64_GOTPC32, + BFD_RELOC_X86_64_GOT64, + BFD_RELOC_X86_64_GOTPCREL64, + BFD_RELOC_X86_64_GOTPC64, + BFD_RELOC_X86_64_GOTPLT64, + BFD_RELOC_X86_64_PLTOFF64, + BFD_RELOC_X86_64_GOTPC32_TLSDESC, + BFD_RELOC_X86_64_TLSDESC_CALL, + BFD_RELOC_X86_64_TLSDESC, + BFD_RELOC_X86_64_IRELATIVE, + BFD_RELOC_X86_64_PC32_BND, + BFD_RELOC_X86_64_PLT32_BND, + BFD_RELOC_X86_64_GOTPCRELX, + BFD_RELOC_X86_64_REX_GOTPCRELX, + +/* ns32k relocations */ + BFD_RELOC_NS32K_IMM_8, + BFD_RELOC_NS32K_IMM_16, + BFD_RELOC_NS32K_IMM_32, + BFD_RELOC_NS32K_IMM_8_PCREL, + BFD_RELOC_NS32K_IMM_16_PCREL, + BFD_RELOC_NS32K_IMM_32_PCREL, + BFD_RELOC_NS32K_DISP_8, + BFD_RELOC_NS32K_DISP_16, + BFD_RELOC_NS32K_DISP_32, + BFD_RELOC_NS32K_DISP_8_PCREL, + BFD_RELOC_NS32K_DISP_16_PCREL, + BFD_RELOC_NS32K_DISP_32_PCREL, + +/* PDP11 relocations */ + BFD_RELOC_PDP11_DISP_8_PCREL, + BFD_RELOC_PDP11_DISP_6_PCREL, + +/* Picojava relocs. Not all of these appear in object files. */ + BFD_RELOC_PJ_CODE_HI16, + BFD_RELOC_PJ_CODE_LO16, + BFD_RELOC_PJ_CODE_DIR16, + BFD_RELOC_PJ_CODE_DIR32, + BFD_RELOC_PJ_CODE_REL16, + BFD_RELOC_PJ_CODE_REL32, + +/* Power(rs6000) and PowerPC relocations. */ + BFD_RELOC_PPC_B26, + BFD_RELOC_PPC_BA26, + BFD_RELOC_PPC_TOC16, + BFD_RELOC_PPC_TOC16_LO, + BFD_RELOC_PPC_TOC16_HI, + BFD_RELOC_PPC_B16, + BFD_RELOC_PPC_B16_BRTAKEN, + BFD_RELOC_PPC_B16_BRNTAKEN, + BFD_RELOC_PPC_BA16, + BFD_RELOC_PPC_BA16_BRTAKEN, + BFD_RELOC_PPC_BA16_BRNTAKEN, + BFD_RELOC_PPC_COPY, + BFD_RELOC_PPC_GLOB_DAT, + BFD_RELOC_PPC_JMP_SLOT, + BFD_RELOC_PPC_RELATIVE, + BFD_RELOC_PPC_LOCAL24PC, + BFD_RELOC_PPC_EMB_NADDR32, + BFD_RELOC_PPC_EMB_NADDR16, + BFD_RELOC_PPC_EMB_NADDR16_LO, + BFD_RELOC_PPC_EMB_NADDR16_HI, + BFD_RELOC_PPC_EMB_NADDR16_HA, + BFD_RELOC_PPC_EMB_SDAI16, + BFD_RELOC_PPC_EMB_SDA2I16, + BFD_RELOC_PPC_EMB_SDA2REL, + BFD_RELOC_PPC_EMB_SDA21, + BFD_RELOC_PPC_EMB_MRKREF, + BFD_RELOC_PPC_EMB_RELSEC16, + BFD_RELOC_PPC_EMB_RELST_LO, + BFD_RELOC_PPC_EMB_RELST_HI, + BFD_RELOC_PPC_EMB_RELST_HA, + BFD_RELOC_PPC_EMB_BIT_FLD, + BFD_RELOC_PPC_EMB_RELSDA, + BFD_RELOC_PPC_VLE_REL8, + BFD_RELOC_PPC_VLE_REL15, + BFD_RELOC_PPC_VLE_REL24, + BFD_RELOC_PPC_VLE_LO16A, + BFD_RELOC_PPC_VLE_LO16D, + BFD_RELOC_PPC_VLE_HI16A, + BFD_RELOC_PPC_VLE_HI16D, + BFD_RELOC_PPC_VLE_HA16A, + BFD_RELOC_PPC_VLE_HA16D, + BFD_RELOC_PPC_VLE_SDA21, + BFD_RELOC_PPC_VLE_SDA21_LO, + BFD_RELOC_PPC_VLE_SDAREL_LO16A, + BFD_RELOC_PPC_VLE_SDAREL_LO16D, + BFD_RELOC_PPC_VLE_SDAREL_HI16A, + BFD_RELOC_PPC_VLE_SDAREL_HI16D, + BFD_RELOC_PPC_VLE_SDAREL_HA16A, + BFD_RELOC_PPC_VLE_SDAREL_HA16D, + BFD_RELOC_PPC_16DX_HA, + BFD_RELOC_PPC_REL16DX_HA, + BFD_RELOC_PPC_NEG, + BFD_RELOC_PPC64_HIGHER, + BFD_RELOC_PPC64_HIGHER_S, + BFD_RELOC_PPC64_HIGHEST, + BFD_RELOC_PPC64_HIGHEST_S, + BFD_RELOC_PPC64_TOC16_LO, + BFD_RELOC_PPC64_TOC16_HI, + BFD_RELOC_PPC64_TOC16_HA, + BFD_RELOC_PPC64_TOC, + BFD_RELOC_PPC64_PLTGOT16, + BFD_RELOC_PPC64_PLTGOT16_LO, + BFD_RELOC_PPC64_PLTGOT16_HI, + BFD_RELOC_PPC64_PLTGOT16_HA, + BFD_RELOC_PPC64_ADDR16_DS, + BFD_RELOC_PPC64_ADDR16_LO_DS, + BFD_RELOC_PPC64_GOT16_DS, + BFD_RELOC_PPC64_GOT16_LO_DS, + BFD_RELOC_PPC64_PLT16_LO_DS, + BFD_RELOC_PPC64_SECTOFF_DS, + BFD_RELOC_PPC64_SECTOFF_LO_DS, + BFD_RELOC_PPC64_TOC16_DS, + BFD_RELOC_PPC64_TOC16_LO_DS, + BFD_RELOC_PPC64_PLTGOT16_DS, + BFD_RELOC_PPC64_PLTGOT16_LO_DS, + BFD_RELOC_PPC64_ADDR16_HIGH, + BFD_RELOC_PPC64_ADDR16_HIGHA, + BFD_RELOC_PPC64_REL16_HIGH, + BFD_RELOC_PPC64_REL16_HIGHA, + BFD_RELOC_PPC64_REL16_HIGHER, + BFD_RELOC_PPC64_REL16_HIGHERA, + BFD_RELOC_PPC64_REL16_HIGHEST, + BFD_RELOC_PPC64_REL16_HIGHESTA, + BFD_RELOC_PPC64_ADDR64_LOCAL, + BFD_RELOC_PPC64_ENTRY, + BFD_RELOC_PPC64_REL24_NOTOC, + BFD_RELOC_PPC64_REL24_P9NOTOC, + BFD_RELOC_PPC64_D34, + BFD_RELOC_PPC64_D34_LO, + BFD_RELOC_PPC64_D34_HI30, + BFD_RELOC_PPC64_D34_HA30, + BFD_RELOC_PPC64_PCREL34, + BFD_RELOC_PPC64_GOT_PCREL34, + BFD_RELOC_PPC64_PLT_PCREL34, + BFD_RELOC_PPC64_ADDR16_HIGHER34, + BFD_RELOC_PPC64_ADDR16_HIGHERA34, + BFD_RELOC_PPC64_ADDR16_HIGHEST34, + BFD_RELOC_PPC64_ADDR16_HIGHESTA34, + BFD_RELOC_PPC64_REL16_HIGHER34, + BFD_RELOC_PPC64_REL16_HIGHERA34, + BFD_RELOC_PPC64_REL16_HIGHEST34, + BFD_RELOC_PPC64_REL16_HIGHESTA34, + BFD_RELOC_PPC64_D28, + BFD_RELOC_PPC64_PCREL28, -/* PC relative 12 bit shifted by 1. */ - BFD_RELOC_390_PC12DBL, +/* PowerPC and PowerPC64 thread-local storage relocations. */ + BFD_RELOC_PPC_TLS, + BFD_RELOC_PPC_TLSGD, + BFD_RELOC_PPC_TLSLD, + BFD_RELOC_PPC_TLSLE, + BFD_RELOC_PPC_TLSIE, + BFD_RELOC_PPC_TLSM, + BFD_RELOC_PPC_TLSML, + BFD_RELOC_PPC_DTPMOD, + BFD_RELOC_PPC_TPREL16, + BFD_RELOC_PPC_TPREL16_LO, + BFD_RELOC_PPC_TPREL16_HI, + BFD_RELOC_PPC_TPREL16_HA, + BFD_RELOC_PPC_TPREL, + BFD_RELOC_PPC_DTPREL16, + BFD_RELOC_PPC_DTPREL16_LO, + BFD_RELOC_PPC_DTPREL16_HI, + BFD_RELOC_PPC_DTPREL16_HA, + BFD_RELOC_PPC_DTPREL, + BFD_RELOC_PPC_GOT_TLSGD16, + BFD_RELOC_PPC_GOT_TLSGD16_LO, + BFD_RELOC_PPC_GOT_TLSGD16_HI, + BFD_RELOC_PPC_GOT_TLSGD16_HA, + BFD_RELOC_PPC_GOT_TLSLD16, + BFD_RELOC_PPC_GOT_TLSLD16_LO, + BFD_RELOC_PPC_GOT_TLSLD16_HI, + BFD_RELOC_PPC_GOT_TLSLD16_HA, + BFD_RELOC_PPC_GOT_TPREL16, + BFD_RELOC_PPC_GOT_TPREL16_LO, + BFD_RELOC_PPC_GOT_TPREL16_HI, + BFD_RELOC_PPC_GOT_TPREL16_HA, + BFD_RELOC_PPC_GOT_DTPREL16, + BFD_RELOC_PPC_GOT_DTPREL16_LO, + BFD_RELOC_PPC_GOT_DTPREL16_HI, + BFD_RELOC_PPC_GOT_DTPREL16_HA, + BFD_RELOC_PPC64_TLSGD, + BFD_RELOC_PPC64_TLSLD, + BFD_RELOC_PPC64_TLSLE, + BFD_RELOC_PPC64_TLSIE, + BFD_RELOC_PPC64_TLSM, + BFD_RELOC_PPC64_TLSML, + BFD_RELOC_PPC64_TPREL16_DS, + BFD_RELOC_PPC64_TPREL16_LO_DS, + BFD_RELOC_PPC64_TPREL16_HIGH, + BFD_RELOC_PPC64_TPREL16_HIGHA, + BFD_RELOC_PPC64_TPREL16_HIGHER, + BFD_RELOC_PPC64_TPREL16_HIGHERA, + BFD_RELOC_PPC64_TPREL16_HIGHEST, + BFD_RELOC_PPC64_TPREL16_HIGHESTA, + BFD_RELOC_PPC64_DTPREL16_DS, + BFD_RELOC_PPC64_DTPREL16_LO_DS, + BFD_RELOC_PPC64_DTPREL16_HIGH, + BFD_RELOC_PPC64_DTPREL16_HIGHA, + BFD_RELOC_PPC64_DTPREL16_HIGHER, + BFD_RELOC_PPC64_DTPREL16_HIGHERA, + BFD_RELOC_PPC64_DTPREL16_HIGHEST, + BFD_RELOC_PPC64_DTPREL16_HIGHESTA, + BFD_RELOC_PPC64_TPREL34, + BFD_RELOC_PPC64_DTPREL34, + BFD_RELOC_PPC64_GOT_TLSGD_PCREL34, + BFD_RELOC_PPC64_GOT_TLSLD_PCREL34, + BFD_RELOC_PPC64_GOT_TPREL_PCREL34, + BFD_RELOC_PPC64_GOT_DTPREL_PCREL34, + BFD_RELOC_PPC64_TLS_PCREL, -/* 12 bit PC rel. PLT shifted by 1. */ - BFD_RELOC_390_PLT12DBL, +/* IBM 370/390 relocations */ + BFD_RELOC_I370_D12, -/* PC relative 16 bit shifted by 1. */ - BFD_RELOC_390_PC16DBL, +/* The type of reloc used to build a constructor table - at the moment +probably a 32 bit wide absolute relocation, but the target can choose. +It generally does map to one of the other relocation types. */ + BFD_RELOC_CTOR, -/* 16 bit PC rel. PLT shifted by 1. */ - BFD_RELOC_390_PLT16DBL, +/* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are +not stored in the instruction. */ + BFD_RELOC_ARM_PCREL_BRANCH, -/* PC relative 24 bit shifted by 1. */ - BFD_RELOC_390_PC24DBL, +/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_ARM_PCREL_BLX, -/* 24 bit PC rel. PLT shifted by 1. */ - BFD_RELOC_390_PLT24DBL, +/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_THUMB_PCREL_BLX, -/* PC relative 32 bit shifted by 1. */ - BFD_RELOC_390_PC32DBL, +/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */ + BFD_RELOC_ARM_PCREL_CALL, -/* 32 bit PC rel. PLT shifted by 1. */ - BFD_RELOC_390_PLT32DBL, +/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ + BFD_RELOC_ARM_PCREL_JUMP, -/* 32 bit PC rel. GOT shifted by 1. */ - BFD_RELOC_390_GOTPCDBL, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, -/* 64 bit GOT offset. */ - BFD_RELOC_390_GOT64, +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, -/* 64 bit PC relative PLT address. */ - BFD_RELOC_390_PLT64, +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, -/* 32 bit rel. offset to GOT entry. */ - BFD_RELOC_390_GOTENT, +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, -/* 64 bit offset to GOT. */ - BFD_RELOC_390_GOTOFF64, +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, -/* 12-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_390_GOTPLT12, +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, -/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_390_GOTPLT16, +/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches. +The lowest bit must be zero and is not stored in the instruction. +Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an +"nn" one smaller in all cases. Note further that BRANCH23 +corresponds to R_ARM_THM_CALL. */ + BFD_RELOC_THUMB_PCREL_BRANCH7, + BFD_RELOC_THUMB_PCREL_BRANCH9, + BFD_RELOC_THUMB_PCREL_BRANCH12, + BFD_RELOC_THUMB_PCREL_BRANCH20, + BFD_RELOC_THUMB_PCREL_BRANCH23, + BFD_RELOC_THUMB_PCREL_BRANCH25, -/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_390_GOTPLT32, +/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */ + BFD_RELOC_ARM_OFFSET_IMM, -/* 64-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_390_GOTPLT64, +/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */ + BFD_RELOC_ARM_THUMB_OFFSET, -/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_390_GOTPLTENT, +/* Pc-relative or absolute relocation depending on target. Used for +entries in .init_array sections. */ + BFD_RELOC_ARM_TARGET1, -/* 16-bit rel. offset from the GOT to a PLT entry. */ - BFD_RELOC_390_PLTOFF16, +/* Read-only segment base relative address. */ + BFD_RELOC_ARM_ROSEGREL32, -/* 32-bit rel. offset from the GOT to a PLT entry. */ - BFD_RELOC_390_PLTOFF32, +/* Data segment base relative address. */ + BFD_RELOC_ARM_SBREL32, -/* 64-bit rel. offset from the GOT to a PLT entry. */ - BFD_RELOC_390_PLTOFF64, +/* This reloc is used for references to RTTI data from exception handling +tables. The actual definition depends on the target. It may be a +pc-relative or some form of GOT-indirect relocation. */ + BFD_RELOC_ARM_TARGET2, -/* s390 tls relocations. */ - BFD_RELOC_390_TLS_LOAD, - BFD_RELOC_390_TLS_GDCALL, - BFD_RELOC_390_TLS_LDCALL, - BFD_RELOC_390_TLS_GD32, - BFD_RELOC_390_TLS_GD64, - BFD_RELOC_390_TLS_GOTIE12, - BFD_RELOC_390_TLS_GOTIE32, - BFD_RELOC_390_TLS_GOTIE64, - BFD_RELOC_390_TLS_LDM32, - BFD_RELOC_390_TLS_LDM64, - BFD_RELOC_390_TLS_IE32, - BFD_RELOC_390_TLS_IE64, - BFD_RELOC_390_TLS_IEENT, - BFD_RELOC_390_TLS_LE32, - BFD_RELOC_390_TLS_LE64, - BFD_RELOC_390_TLS_LDO32, - BFD_RELOC_390_TLS_LDO64, - BFD_RELOC_390_TLS_DTPMOD, - BFD_RELOC_390_TLS_DTPOFF, - BFD_RELOC_390_TLS_TPOFF, +/* 31-bit PC relative address. */ + BFD_RELOC_ARM_PREL31, -/* Long displacement extension. */ - BFD_RELOC_390_20, - BFD_RELOC_390_GOT20, - BFD_RELOC_390_GOTPLT20, - BFD_RELOC_390_TLS_GOTIE20, +/* Low and High halfword relocations for MOVW and MOVT instructions. */ + BFD_RELOC_ARM_MOVW, + BFD_RELOC_ARM_MOVT, + BFD_RELOC_ARM_MOVW_PCREL, + BFD_RELOC_ARM_MOVT_PCREL, + BFD_RELOC_ARM_THUMB_MOVW, + BFD_RELOC_ARM_THUMB_MOVT, + BFD_RELOC_ARM_THUMB_MOVW_PCREL, + BFD_RELOC_ARM_THUMB_MOVT_PCREL, -/* STT_GNU_IFUNC relocation. */ - BFD_RELOC_390_IRELATIVE, +/* ARM FDPIC specific relocations. */ + BFD_RELOC_ARM_GOTFUNCDESC, + BFD_RELOC_ARM_GOTOFFFUNCDESC, + BFD_RELOC_ARM_FUNCDESC, + BFD_RELOC_ARM_FUNCDESC_VALUE, + BFD_RELOC_ARM_TLS_GD32_FDPIC, + BFD_RELOC_ARM_TLS_LDM32_FDPIC, + BFD_RELOC_ARM_TLS_IE32_FDPIC, -/* Score relocations -Low 16 bit for load/store */ - BFD_RELOC_SCORE_GPREL15, +/* Relocations for setting up GOTs and PLTs for shared libraries. */ + BFD_RELOC_ARM_JUMP_SLOT, + BFD_RELOC_ARM_GLOB_DAT, + BFD_RELOC_ARM_GOT32, + BFD_RELOC_ARM_PLT32, + BFD_RELOC_ARM_RELATIVE, + BFD_RELOC_ARM_GOTOFF, + BFD_RELOC_ARM_GOTPC, + BFD_RELOC_ARM_GOT_PREL, -/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ - BFD_RELOC_SCORE_DUMMY2, - BFD_RELOC_SCORE_JMP, +/* ARM thread-local storage relocations. */ + BFD_RELOC_ARM_TLS_GD32, + BFD_RELOC_ARM_TLS_LDO32, + BFD_RELOC_ARM_TLS_LDM32, + BFD_RELOC_ARM_TLS_DTPOFF32, + BFD_RELOC_ARM_TLS_DTPMOD32, + BFD_RELOC_ARM_TLS_TPOFF32, + BFD_RELOC_ARM_TLS_IE32, + BFD_RELOC_ARM_TLS_LE32, + BFD_RELOC_ARM_TLS_GOTDESC, + BFD_RELOC_ARM_TLS_CALL, + BFD_RELOC_ARM_THM_TLS_CALL, + BFD_RELOC_ARM_TLS_DESCSEQ, + BFD_RELOC_ARM_THM_TLS_DESCSEQ, + BFD_RELOC_ARM_TLS_DESC, -/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ - BFD_RELOC_SCORE_BRANCH, +/* ARM group relocations. */ + BFD_RELOC_ARM_ALU_PC_G0_NC, + BFD_RELOC_ARM_ALU_PC_G0, + BFD_RELOC_ARM_ALU_PC_G1_NC, + BFD_RELOC_ARM_ALU_PC_G1, + BFD_RELOC_ARM_ALU_PC_G2, + BFD_RELOC_ARM_LDR_PC_G0, + BFD_RELOC_ARM_LDR_PC_G1, + BFD_RELOC_ARM_LDR_PC_G2, + BFD_RELOC_ARM_LDRS_PC_G0, + BFD_RELOC_ARM_LDRS_PC_G1, + BFD_RELOC_ARM_LDRS_PC_G2, + BFD_RELOC_ARM_LDC_PC_G0, + BFD_RELOC_ARM_LDC_PC_G1, + BFD_RELOC_ARM_LDC_PC_G2, + BFD_RELOC_ARM_ALU_SB_G0_NC, + BFD_RELOC_ARM_ALU_SB_G0, + BFD_RELOC_ARM_ALU_SB_G1_NC, + BFD_RELOC_ARM_ALU_SB_G1, + BFD_RELOC_ARM_ALU_SB_G2, + BFD_RELOC_ARM_LDR_SB_G0, + BFD_RELOC_ARM_LDR_SB_G1, + BFD_RELOC_ARM_LDR_SB_G2, + BFD_RELOC_ARM_LDRS_SB_G0, + BFD_RELOC_ARM_LDRS_SB_G1, + BFD_RELOC_ARM_LDRS_SB_G2, + BFD_RELOC_ARM_LDC_SB_G0, + BFD_RELOC_ARM_LDC_SB_G1, + BFD_RELOC_ARM_LDC_SB_G2, -/* This is a 32-bit reloc for 48-bit instructions. */ - BFD_RELOC_SCORE_IMM30, +/* Annotation of BX instructions. */ + BFD_RELOC_ARM_V4BX, -/* This is a 32-bit reloc for 48-bit instructions. */ - BFD_RELOC_SCORE_IMM32, +/* ARM support for STT_GNU_IFUNC. */ + BFD_RELOC_ARM_IRELATIVE, -/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ - BFD_RELOC_SCORE16_JMP, +/* Thumb1 relocations to support execute-only code. */ + BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC, + BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC, + BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC, + BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC, -/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ - BFD_RELOC_SCORE16_BRANCH, +/* These relocs are only used within the ARM assembler. They are not +(at present) written to any object files. */ + BFD_RELOC_ARM_IMMEDIATE, + BFD_RELOC_ARM_ADRL_IMMEDIATE, + BFD_RELOC_ARM_T32_IMMEDIATE, + BFD_RELOC_ARM_T32_ADD_IMM, + BFD_RELOC_ARM_T32_IMM12, + BFD_RELOC_ARM_T32_ADD_PC12, + BFD_RELOC_ARM_SHIFT_IMM, + BFD_RELOC_ARM_SMC, + BFD_RELOC_ARM_HVC, + BFD_RELOC_ARM_SWI, + BFD_RELOC_ARM_MULTI, + BFD_RELOC_ARM_CP_OFF_IMM, + BFD_RELOC_ARM_CP_OFF_IMM_S2, + BFD_RELOC_ARM_T32_CP_OFF_IMM, + BFD_RELOC_ARM_T32_CP_OFF_IMM_S2, + BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM, + BFD_RELOC_ARM_ADR_IMM, + BFD_RELOC_ARM_LDR_IMM, + BFD_RELOC_ARM_LITERAL, + BFD_RELOC_ARM_IN_POOL, + BFD_RELOC_ARM_OFFSET_IMM8, + BFD_RELOC_ARM_T32_OFFSET_U8, + BFD_RELOC_ARM_T32_OFFSET_IMM, + BFD_RELOC_ARM_HWLITERAL, + BFD_RELOC_ARM_THUMB_ADD, + BFD_RELOC_ARM_THUMB_IMM, + BFD_RELOC_ARM_THUMB_SHIFT, -/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */ - BFD_RELOC_SCORE_BCMP, +/* Renesas / SuperH SH relocs. Not all of these appear in object files. */ + BFD_RELOC_SH_PCDISP8BY2, + BFD_RELOC_SH_PCDISP12BY2, + BFD_RELOC_SH_IMM3, + BFD_RELOC_SH_IMM3U, + BFD_RELOC_SH_DISP12, + BFD_RELOC_SH_DISP12BY2, + BFD_RELOC_SH_DISP12BY4, + BFD_RELOC_SH_DISP12BY8, + BFD_RELOC_SH_DISP20, + BFD_RELOC_SH_DISP20BY8, + BFD_RELOC_SH_IMM4, + BFD_RELOC_SH_IMM4BY2, + BFD_RELOC_SH_IMM4BY4, + BFD_RELOC_SH_IMM8, + BFD_RELOC_SH_IMM8BY2, + BFD_RELOC_SH_IMM8BY4, + BFD_RELOC_SH_PCRELIMM8BY2, + BFD_RELOC_SH_PCRELIMM8BY4, + BFD_RELOC_SH_SWITCH16, + BFD_RELOC_SH_SWITCH32, + BFD_RELOC_SH_USES, + BFD_RELOC_SH_COUNT, + BFD_RELOC_SH_ALIGN, + BFD_RELOC_SH_CODE, + BFD_RELOC_SH_DATA, + BFD_RELOC_SH_LABEL, + BFD_RELOC_SH_LOOP_START, + BFD_RELOC_SH_LOOP_END, + BFD_RELOC_SH_COPY, + BFD_RELOC_SH_GLOB_DAT, + BFD_RELOC_SH_JMP_SLOT, + BFD_RELOC_SH_RELATIVE, + BFD_RELOC_SH_GOTPC, + BFD_RELOC_SH_GOT_LOW16, + BFD_RELOC_SH_GOT_MEDLOW16, + BFD_RELOC_SH_GOT_MEDHI16, + BFD_RELOC_SH_GOT_HI16, + BFD_RELOC_SH_GOTPLT_LOW16, + BFD_RELOC_SH_GOTPLT_MEDLOW16, + BFD_RELOC_SH_GOTPLT_MEDHI16, + BFD_RELOC_SH_GOTPLT_HI16, + BFD_RELOC_SH_PLT_LOW16, + BFD_RELOC_SH_PLT_MEDLOW16, + BFD_RELOC_SH_PLT_MEDHI16, + BFD_RELOC_SH_PLT_HI16, + BFD_RELOC_SH_GOTOFF_LOW16, + BFD_RELOC_SH_GOTOFF_MEDLOW16, + BFD_RELOC_SH_GOTOFF_MEDHI16, + BFD_RELOC_SH_GOTOFF_HI16, + BFD_RELOC_SH_GOTPC_LOW16, + BFD_RELOC_SH_GOTPC_MEDLOW16, + BFD_RELOC_SH_GOTPC_MEDHI16, + BFD_RELOC_SH_GOTPC_HI16, + BFD_RELOC_SH_COPY64, + BFD_RELOC_SH_GLOB_DAT64, + BFD_RELOC_SH_JMP_SLOT64, + BFD_RELOC_SH_RELATIVE64, + BFD_RELOC_SH_GOT10BY4, + BFD_RELOC_SH_GOT10BY8, + BFD_RELOC_SH_GOTPLT10BY4, + BFD_RELOC_SH_GOTPLT10BY8, + BFD_RELOC_SH_GOTPLT32, + BFD_RELOC_SH_SHMEDIA_CODE, + BFD_RELOC_SH_IMMU5, + BFD_RELOC_SH_IMMS6, + BFD_RELOC_SH_IMMS6BY32, + BFD_RELOC_SH_IMMU6, + BFD_RELOC_SH_IMMS10, + BFD_RELOC_SH_IMMS10BY2, + BFD_RELOC_SH_IMMS10BY4, + BFD_RELOC_SH_IMMS10BY8, + BFD_RELOC_SH_IMMS16, + BFD_RELOC_SH_IMMU16, + BFD_RELOC_SH_IMM_LOW16, + BFD_RELOC_SH_IMM_LOW16_PCREL, + BFD_RELOC_SH_IMM_MEDLOW16, + BFD_RELOC_SH_IMM_MEDLOW16_PCREL, + BFD_RELOC_SH_IMM_MEDHI16, + BFD_RELOC_SH_IMM_MEDHI16_PCREL, + BFD_RELOC_SH_IMM_HI16, + BFD_RELOC_SH_IMM_HI16_PCREL, + BFD_RELOC_SH_PT_16, + BFD_RELOC_SH_TLS_GD_32, + BFD_RELOC_SH_TLS_LD_32, + BFD_RELOC_SH_TLS_LDO_32, + BFD_RELOC_SH_TLS_IE_32, + BFD_RELOC_SH_TLS_LE_32, + BFD_RELOC_SH_TLS_DTPMOD32, + BFD_RELOC_SH_TLS_DTPOFF32, + BFD_RELOC_SH_TLS_TPOFF32, + BFD_RELOC_SH_GOT20, + BFD_RELOC_SH_GOTOFF20, + BFD_RELOC_SH_GOTFUNCDESC, + BFD_RELOC_SH_GOTFUNCDESC20, + BFD_RELOC_SH_GOTOFFFUNCDESC, + BFD_RELOC_SH_GOTOFFFUNCDESC20, + BFD_RELOC_SH_FUNCDESC, -/* Undocumented Score relocs */ - BFD_RELOC_SCORE_GOT15, - BFD_RELOC_SCORE_GOT_LO16, - BFD_RELOC_SCORE_CALL15, - BFD_RELOC_SCORE_DUMMY_HI16, +/* ARC relocs. */ + BFD_RELOC_ARC_NONE, + BFD_RELOC_ARC_8, + BFD_RELOC_ARC_16, + BFD_RELOC_ARC_24, + BFD_RELOC_ARC_32, + BFD_RELOC_ARC_N8, + BFD_RELOC_ARC_N16, + BFD_RELOC_ARC_N24, + BFD_RELOC_ARC_N32, + BFD_RELOC_ARC_SDA, + BFD_RELOC_ARC_SECTOFF, + BFD_RELOC_ARC_S21H_PCREL, + BFD_RELOC_ARC_S21W_PCREL, + BFD_RELOC_ARC_S25H_PCREL, + BFD_RELOC_ARC_S25W_PCREL, + BFD_RELOC_ARC_SDA32, + BFD_RELOC_ARC_SDA_LDST, + BFD_RELOC_ARC_SDA_LDST1, + BFD_RELOC_ARC_SDA_LDST2, + BFD_RELOC_ARC_SDA16_LD, + BFD_RELOC_ARC_SDA16_LD1, + BFD_RELOC_ARC_SDA16_LD2, + BFD_RELOC_ARC_S13_PCREL, + BFD_RELOC_ARC_W, + BFD_RELOC_ARC_32_ME, + BFD_RELOC_ARC_32_ME_S, + BFD_RELOC_ARC_N32_ME, + BFD_RELOC_ARC_SECTOFF_ME, + BFD_RELOC_ARC_SDA32_ME, + BFD_RELOC_ARC_W_ME, + BFD_RELOC_AC_SECTOFF_U8, + BFD_RELOC_AC_SECTOFF_U8_1, + BFD_RELOC_AC_SECTOFF_U8_2, + BFD_RELOC_AC_SECTOFF_S9, + BFD_RELOC_AC_SECTOFF_S9_1, + BFD_RELOC_AC_SECTOFF_S9_2, + BFD_RELOC_ARC_SECTOFF_ME_1, + BFD_RELOC_ARC_SECTOFF_ME_2, + BFD_RELOC_ARC_SECTOFF_1, + BFD_RELOC_ARC_SECTOFF_2, + BFD_RELOC_ARC_SDA_12, + BFD_RELOC_ARC_SDA16_ST2, + BFD_RELOC_ARC_32_PCREL, + BFD_RELOC_ARC_PC32, + BFD_RELOC_ARC_GOT32, + BFD_RELOC_ARC_GOTPC32, + BFD_RELOC_ARC_PLT32, + BFD_RELOC_ARC_COPY, + BFD_RELOC_ARC_GLOB_DAT, + BFD_RELOC_ARC_JMP_SLOT, + BFD_RELOC_ARC_RELATIVE, + BFD_RELOC_ARC_GOTOFF, + BFD_RELOC_ARC_GOTPC, + BFD_RELOC_ARC_S21W_PCREL_PLT, + BFD_RELOC_ARC_S25H_PCREL_PLT, + BFD_RELOC_ARC_TLS_DTPMOD, + BFD_RELOC_ARC_TLS_TPOFF, + BFD_RELOC_ARC_TLS_GD_GOT, + BFD_RELOC_ARC_TLS_GD_LD, + BFD_RELOC_ARC_TLS_GD_CALL, + BFD_RELOC_ARC_TLS_IE_GOT, + BFD_RELOC_ARC_TLS_DTPOFF, + BFD_RELOC_ARC_TLS_DTPOFF_S9, + BFD_RELOC_ARC_TLS_LE_S9, + BFD_RELOC_ARC_TLS_LE_32, + BFD_RELOC_ARC_S25W_PCREL_PLT, + BFD_RELOC_ARC_S21H_PCREL_PLT, + BFD_RELOC_ARC_NPS_CMEM16, + BFD_RELOC_ARC_JLI_SECTOFF, -/* Scenix IP2K - 9-bit register number / data address */ - BFD_RELOC_IP2K_FR9, +/* ADI Blackfin 16 bit immediate absolute reloc. */ + BFD_RELOC_BFIN_16_IMM, -/* Scenix IP2K - 4-bit register/data bank number */ - BFD_RELOC_IP2K_BANK, +/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */ + BFD_RELOC_BFIN_16_HIGH, -/* Scenix IP2K - low 13 bits of instruction word address */ - BFD_RELOC_IP2K_ADDR16CJP, +/* ADI Blackfin 'a' part of LSETUP. */ + BFD_RELOC_BFIN_4_PCREL, -/* Scenix IP2K - high 3 bits of instruction word address */ - BFD_RELOC_IP2K_PAGE3, +/* ADI Blackfin. */ + BFD_RELOC_BFIN_5_PCREL, -/* Scenix IP2K - ext/low/high 8 bits of data address */ - BFD_RELOC_IP2K_LO8DATA, - BFD_RELOC_IP2K_HI8DATA, - BFD_RELOC_IP2K_EX8DATA, +/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */ + BFD_RELOC_BFIN_16_LOW, -/* Scenix IP2K - low/high 8 bits of instruction word address */ - BFD_RELOC_IP2K_LO8INSN, - BFD_RELOC_IP2K_HI8INSN, +/* ADI Blackfin. */ + BFD_RELOC_BFIN_10_PCREL, -/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */ - BFD_RELOC_IP2K_PC_SKIP, +/* ADI Blackfin 'b' part of LSETUP. */ + BFD_RELOC_BFIN_11_PCREL, -/* Scenix IP2K - 16 bit word address in text section. */ - BFD_RELOC_IP2K_TEXT, +/* ADI Blackfin. */ + BFD_RELOC_BFIN_12_PCREL_JUMP, -/* Scenix IP2K - 7-bit sp or dp offset */ - BFD_RELOC_IP2K_FR_OFFSET, +/* ADI Blackfin Short jump, pcrel. */ + BFD_RELOC_BFIN_12_PCREL_JUMP_S, -/* Scenix VPE4K coprocessor - data/insn-space addressing */ - BFD_RELOC_VPE4KMATH_DATA, - BFD_RELOC_VPE4KMATH_INSN, +/* ADI Blackfin Call.x not implemented. */ + BFD_RELOC_BFIN_24_PCREL_CALL_X, -/* These two relocations are used by the linker to determine which of -the entries in a C++ virtual function table are actually used. When -the --gc-sections option is given, the linker will zero out the entries -that are not used, so that the code for those functions need not be -included in the output. +/* ADI Blackfin Long Jump pcrel. */ + BFD_RELOC_BFIN_24_PCREL_JUMP_L, -VTABLE_INHERIT is a zero-space relocation used to describe to the -linker the inheritance tree of a C++ virtual function table. The -relocation's symbol should be the parent class' vtable, and the -relocation should be located at the child vtable. +/* ADI Blackfin FD-PIC relocations. */ + BFD_RELOC_BFIN_GOT17M4, + BFD_RELOC_BFIN_GOTHI, + BFD_RELOC_BFIN_GOTLO, + BFD_RELOC_BFIN_FUNCDESC, + BFD_RELOC_BFIN_FUNCDESC_GOT17M4, + BFD_RELOC_BFIN_FUNCDESC_GOTHI, + BFD_RELOC_BFIN_FUNCDESC_GOTLO, + BFD_RELOC_BFIN_FUNCDESC_VALUE, + BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, + BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, + BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, + BFD_RELOC_BFIN_GOTOFF17M4, + BFD_RELOC_BFIN_GOTOFFHI, + BFD_RELOC_BFIN_GOTOFFLO, -VTABLE_ENTRY is a zero-space relocation that describes the use of a -virtual function table entry. The reloc's symbol should refer to the -table of the class mentioned in the code. Off of that base, an offset -describes the entry that is being used. For Rela hosts, this offset -is stored in the reloc's addend. For Rel hosts, we are forced to put -this offset in the reloc's section offset. */ - BFD_RELOC_VTABLE_INHERIT, - BFD_RELOC_VTABLE_ENTRY, +/* ADI Blackfin GOT relocation. */ + BFD_RELOC_BFIN_GOT, -/* Intel IA64 Relocations. */ - BFD_RELOC_IA64_IMM14, - BFD_RELOC_IA64_IMM22, - BFD_RELOC_IA64_IMM64, - BFD_RELOC_IA64_DIR32MSB, - BFD_RELOC_IA64_DIR32LSB, - BFD_RELOC_IA64_DIR64MSB, - BFD_RELOC_IA64_DIR64LSB, - BFD_RELOC_IA64_GPREL22, - BFD_RELOC_IA64_GPREL64I, - BFD_RELOC_IA64_GPREL32MSB, - BFD_RELOC_IA64_GPREL32LSB, - BFD_RELOC_IA64_GPREL64MSB, - BFD_RELOC_IA64_GPREL64LSB, - BFD_RELOC_IA64_LTOFF22, - BFD_RELOC_IA64_LTOFF64I, - BFD_RELOC_IA64_PLTOFF22, - BFD_RELOC_IA64_PLTOFF64I, - BFD_RELOC_IA64_PLTOFF64MSB, - BFD_RELOC_IA64_PLTOFF64LSB, - BFD_RELOC_IA64_FPTR64I, - BFD_RELOC_IA64_FPTR32MSB, - BFD_RELOC_IA64_FPTR32LSB, - BFD_RELOC_IA64_FPTR64MSB, - BFD_RELOC_IA64_FPTR64LSB, - BFD_RELOC_IA64_PCREL21B, - BFD_RELOC_IA64_PCREL21BI, - BFD_RELOC_IA64_PCREL21M, - BFD_RELOC_IA64_PCREL21F, - BFD_RELOC_IA64_PCREL22, - BFD_RELOC_IA64_PCREL60B, - BFD_RELOC_IA64_PCREL64I, - BFD_RELOC_IA64_PCREL32MSB, - BFD_RELOC_IA64_PCREL32LSB, - BFD_RELOC_IA64_PCREL64MSB, - BFD_RELOC_IA64_PCREL64LSB, - BFD_RELOC_IA64_LTOFF_FPTR22, - BFD_RELOC_IA64_LTOFF_FPTR64I, - BFD_RELOC_IA64_LTOFF_FPTR32MSB, - BFD_RELOC_IA64_LTOFF_FPTR32LSB, - BFD_RELOC_IA64_LTOFF_FPTR64MSB, - BFD_RELOC_IA64_LTOFF_FPTR64LSB, - BFD_RELOC_IA64_SEGREL32MSB, - BFD_RELOC_IA64_SEGREL32LSB, - BFD_RELOC_IA64_SEGREL64MSB, - BFD_RELOC_IA64_SEGREL64LSB, - BFD_RELOC_IA64_SECREL32MSB, - BFD_RELOC_IA64_SECREL32LSB, - BFD_RELOC_IA64_SECREL64MSB, - BFD_RELOC_IA64_SECREL64LSB, - BFD_RELOC_IA64_REL32MSB, - BFD_RELOC_IA64_REL32LSB, - BFD_RELOC_IA64_REL64MSB, - BFD_RELOC_IA64_REL64LSB, - BFD_RELOC_IA64_LTV32MSB, - BFD_RELOC_IA64_LTV32LSB, - BFD_RELOC_IA64_LTV64MSB, - BFD_RELOC_IA64_LTV64LSB, - BFD_RELOC_IA64_IPLTMSB, - BFD_RELOC_IA64_IPLTLSB, - BFD_RELOC_IA64_COPY, - BFD_RELOC_IA64_LTOFF22X, - BFD_RELOC_IA64_LDXMOV, - BFD_RELOC_IA64_TPREL14, - BFD_RELOC_IA64_TPREL22, - BFD_RELOC_IA64_TPREL64I, - BFD_RELOC_IA64_TPREL64MSB, - BFD_RELOC_IA64_TPREL64LSB, - BFD_RELOC_IA64_LTOFF_TPREL22, - BFD_RELOC_IA64_DTPMOD64MSB, - BFD_RELOC_IA64_DTPMOD64LSB, - BFD_RELOC_IA64_LTOFF_DTPMOD22, - BFD_RELOC_IA64_DTPREL14, - BFD_RELOC_IA64_DTPREL22, - BFD_RELOC_IA64_DTPREL64I, - BFD_RELOC_IA64_DTPREL32MSB, - BFD_RELOC_IA64_DTPREL32LSB, - BFD_RELOC_IA64_DTPREL64MSB, - BFD_RELOC_IA64_DTPREL64LSB, - BFD_RELOC_IA64_LTOFF_DTPREL22, +/* ADI Blackfin PLTPC relocation. */ + BFD_RELOC_BFIN_PLTPC, -/* Motorola 68HC11 reloc. -This is the 8 bit high part of an absolute address. */ - BFD_RELOC_M68HC11_HI8, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PUSH, -/* Motorola 68HC11 reloc. -This is the 8 bit low part of an absolute address. */ - BFD_RELOC_M68HC11_LO8, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_CONST, -/* Motorola 68HC11 reloc. -This is the 3 bit of a value. */ - BFD_RELOC_M68HC11_3B, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADD, -/* Motorola 68HC11 reloc. -This reloc marks the beginning of a jump/call instruction. -It is used for linker relaxation to correctly identify beginning -of instruction and change some branches to use PC-relative -addressing mode. */ - BFD_RELOC_M68HC11_RL_JUMP, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_SUB, -/* Motorola 68HC11 reloc. -This reloc marks a group of several instructions that gcc generates -and for which the linker relaxation pass can modify and/or remove -some of them. */ - BFD_RELOC_M68HC11_RL_GROUP, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MULT, -/* Motorola 68HC11 reloc. -This is the 16-bit lower part of an address. It is used for 'call' -instruction to specify the symbol address without any special -transformation (due to memory bank window). */ - BFD_RELOC_M68HC11_LO16, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_DIV, -/* Motorola 68HC11 reloc. -This is a 8-bit reloc that specifies the page number of an address. -It is used by 'call' instruction to specify the page number of -the symbol. */ - BFD_RELOC_M68HC11_PAGE, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MOD, -/* Motorola 68HC11 reloc. -This is a 24-bit reloc that represents the address with a 16-bit -value and a 8-bit page number. The symbol address is transformed -to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */ - BFD_RELOC_M68HC11_24, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LSHIFT, -/* Motorola 68HC12 reloc. -This is the 5 bits of a value. */ - BFD_RELOC_M68HC12_5B, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_RSHIFT, -/* Freescale XGATE reloc. -This reloc marks the beginning of a bra/jal instruction. */ - BFD_RELOC_XGATE_RL_JUMP, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_AND, -/* Freescale XGATE reloc. -This reloc marks a group of several instructions that gcc generates -and for which the linker relaxation pass can modify and/or remove -some of them. */ - BFD_RELOC_XGATE_RL_GROUP, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_OR, -/* Freescale XGATE reloc. -This is the 16-bit lower part of an address. It is used for the '16-bit' -instructions. */ - BFD_RELOC_XGATE_LO16, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_XOR, -/* Freescale XGATE reloc. */ - BFD_RELOC_XGATE_GPAGE, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LAND, -/* Freescale XGATE reloc. */ - BFD_RELOC_XGATE_24, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LOR, -/* Freescale XGATE reloc. -This is a 9-bit pc-relative reloc. */ - BFD_RELOC_XGATE_PCREL_9, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LEN, -/* Freescale XGATE reloc. -This is a 10-bit pc-relative reloc. */ - BFD_RELOC_XGATE_PCREL_10, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_NEG, -/* Freescale XGATE reloc. -This is the 16-bit lower part of an address. It is used for the '16-bit' -instructions. */ - BFD_RELOC_XGATE_IMM8_LO, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_COMP, -/* Freescale XGATE reloc. -This is the 16-bit higher part of an address. It is used for the '16-bit' -instructions. */ - BFD_RELOC_XGATE_IMM8_HI, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PAGE, -/* Freescale XGATE reloc. -This is a 3-bit pc-relative reloc. */ - BFD_RELOC_XGATE_IMM3, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_HWPAGE, -/* Freescale XGATE reloc. -This is a 4-bit pc-relative reloc. */ - BFD_RELOC_XGATE_IMM4, +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADDR, -/* Freescale XGATE reloc. -This is a 5-bit pc-relative reloc. */ - BFD_RELOC_XGATE_IMM5, +/* Mitsubishi D10V relocs. +This is a 10-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_10_PCREL_R, -/* Motorola 68HC12 reloc. -This is the 9 bits of a value. */ - BFD_RELOC_M68HC12_9B, +/* Mitsubishi D10V relocs. +This is a 10-bit reloc with the right 2 bits +assumed to be 0. This is the same as the previous reloc +except it is in the left container, i.e., +shifted left 15 bits. */ + BFD_RELOC_D10V_10_PCREL_L, -/* Motorola 68HC12 reloc. -This is the 16 bits of a value. */ - BFD_RELOC_M68HC12_16B, +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18, -/* Motorola 68HC12/XGATE reloc. -This is a PCREL9 branch. */ - BFD_RELOC_M68HC12_9_PCREL, +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18_PCREL, -/* Motorola 68HC12/XGATE reloc. -This is a PCREL10 branch. */ - BFD_RELOC_M68HC12_10_PCREL, +/* Mitsubishi D30V relocs. +This is a 6-bit absolute reloc. */ + BFD_RELOC_D30V_6, -/* Motorola 68HC12/XGATE reloc. -This is the 8 bit low part of an absolute address and immediately precedes -a matching HI8XG part. */ - BFD_RELOC_M68HC12_LO8XG, +/* This is a 6-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_9_PCREL, -/* Motorola 68HC12/XGATE reloc. -This is the 8 bit high part of an absolute address and immediately follows -a matching LO8XG part. */ - BFD_RELOC_M68HC12_HI8XG, +/* This is a 6-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_9_PCREL_R, -/* Freescale S12Z reloc. -This is a 15 bit relative address. If the most significant bits are all zero -then it may be truncated to 8 bits. */ - BFD_RELOC_S12Z_15_PCREL, +/* This is a 12-bit absolute reloc with the +right 3 bitsassumed to be 0. */ + BFD_RELOC_D30V_15, -/* NS CR16 Relocations. */ - BFD_RELOC_CR16_NUM8, - BFD_RELOC_CR16_NUM16, - BFD_RELOC_CR16_NUM32, - BFD_RELOC_CR16_NUM32a, - BFD_RELOC_CR16_REGREL0, - BFD_RELOC_CR16_REGREL4, - BFD_RELOC_CR16_REGREL4a, - BFD_RELOC_CR16_REGREL14, - BFD_RELOC_CR16_REGREL14a, - BFD_RELOC_CR16_REGREL16, - BFD_RELOC_CR16_REGREL20, - BFD_RELOC_CR16_REGREL20a, - BFD_RELOC_CR16_ABS20, - BFD_RELOC_CR16_ABS24, - BFD_RELOC_CR16_IMM4, - BFD_RELOC_CR16_IMM8, - BFD_RELOC_CR16_IMM16, - BFD_RELOC_CR16_IMM20, - BFD_RELOC_CR16_IMM24, - BFD_RELOC_CR16_IMM32, - BFD_RELOC_CR16_IMM32a, - BFD_RELOC_CR16_DISP4, - BFD_RELOC_CR16_DISP8, - BFD_RELOC_CR16_DISP16, - BFD_RELOC_CR16_DISP20, - BFD_RELOC_CR16_DISP24, - BFD_RELOC_CR16_DISP24a, - BFD_RELOC_CR16_SWITCH8, - BFD_RELOC_CR16_SWITCH16, - BFD_RELOC_CR16_SWITCH32, - BFD_RELOC_CR16_GOT_REGREL20, - BFD_RELOC_CR16_GOTC_REGREL20, - BFD_RELOC_CR16_GLOB_DAT, +/* This is a 12-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_15_PCREL, -/* NS CRX Relocations. */ - BFD_RELOC_CRX_REL4, - BFD_RELOC_CRX_REL8, - BFD_RELOC_CRX_REL8_CMP, - BFD_RELOC_CRX_REL16, - BFD_RELOC_CRX_REL24, - BFD_RELOC_CRX_REL32, - BFD_RELOC_CRX_REGREL12, - BFD_RELOC_CRX_REGREL22, - BFD_RELOC_CRX_REGREL28, - BFD_RELOC_CRX_REGREL32, - BFD_RELOC_CRX_ABS16, - BFD_RELOC_CRX_ABS32, - BFD_RELOC_CRX_NUM8, - BFD_RELOC_CRX_NUM16, - BFD_RELOC_CRX_NUM32, - BFD_RELOC_CRX_IMM16, - BFD_RELOC_CRX_IMM32, - BFD_RELOC_CRX_SWITCH8, - BFD_RELOC_CRX_SWITCH16, - BFD_RELOC_CRX_SWITCH32, +/* This is a 12-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_15_PCREL_R, -/* These relocs are only used within the CRIS assembler. They are not -(at present) written to any object files. */ - BFD_RELOC_CRIS_BDISP8, - BFD_RELOC_CRIS_UNSIGNED_5, - BFD_RELOC_CRIS_SIGNED_6, - BFD_RELOC_CRIS_UNSIGNED_6, - BFD_RELOC_CRIS_SIGNED_8, - BFD_RELOC_CRIS_UNSIGNED_8, - BFD_RELOC_CRIS_SIGNED_16, - BFD_RELOC_CRIS_UNSIGNED_16, - BFD_RELOC_CRIS_LAPCQ_OFFSET, - BFD_RELOC_CRIS_UNSIGNED_4, +/* This is an 18-bit absolute reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21, -/* Relocs used in ELF shared libraries for CRIS. */ - BFD_RELOC_CRIS_COPY, - BFD_RELOC_CRIS_GLOB_DAT, - BFD_RELOC_CRIS_JUMP_SLOT, - BFD_RELOC_CRIS_RELATIVE, +/* This is an 18-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21_PCREL, -/* 32-bit offset to symbol-entry within GOT. */ - BFD_RELOC_CRIS_32_GOT, +/* This is an 18-bit pc-relative reloc with +the right 3 bits assumed to be 0. Same +as the previous reloc but on the right side +of the container. */ + BFD_RELOC_D30V_21_PCREL_R, -/* 16-bit offset to symbol-entry within GOT. */ - BFD_RELOC_CRIS_16_GOT, +/* This is a 32-bit absolute reloc. */ + BFD_RELOC_D30V_32, -/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_CRIS_32_GOTPLT, +/* This is a 32-bit pc-relative reloc. */ + BFD_RELOC_D30V_32_PCREL, -/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ - BFD_RELOC_CRIS_16_GOTPLT, +/* DLX relocs */ + BFD_RELOC_DLX_HI16_S, -/* 32-bit offset to symbol, relative to GOT. */ - BFD_RELOC_CRIS_32_GOTREL, +/* DLX relocs */ + BFD_RELOC_DLX_LO16, -/* 32-bit offset to symbol with PLT entry, relative to GOT. */ - BFD_RELOC_CRIS_32_PLT_GOTREL, +/* DLX relocs */ + BFD_RELOC_DLX_JMP26, -/* 32-bit offset to symbol with PLT entry, relative to this relocation. */ - BFD_RELOC_CRIS_32_PLT_PCREL, +/* Renesas M16C/M32C Relocations. */ + BFD_RELOC_M32C_HI8, + BFD_RELOC_M32C_RL_JUMP, + BFD_RELOC_M32C_RL_1ADDR, + BFD_RELOC_M32C_RL_2ADDR, -/* Relocs used in TLS code for CRIS. */ - BFD_RELOC_CRIS_32_GOT_GD, - BFD_RELOC_CRIS_16_GOT_GD, - BFD_RELOC_CRIS_32_GD, - BFD_RELOC_CRIS_DTP, - BFD_RELOC_CRIS_32_DTPREL, - BFD_RELOC_CRIS_16_DTPREL, - BFD_RELOC_CRIS_32_GOT_TPREL, - BFD_RELOC_CRIS_16_GOT_TPREL, - BFD_RELOC_CRIS_32_TPREL, - BFD_RELOC_CRIS_16_TPREL, - BFD_RELOC_CRIS_DTPMOD, - BFD_RELOC_CRIS_32_IE, +/* Renesas M32R (formerly Mitsubishi M32R) relocs. +This is a 24 bit absolute address. */ + BFD_RELOC_M32R_24, -/* OpenRISC 1000 Relocations. */ - BFD_RELOC_OR1K_REL_26, - BFD_RELOC_OR1K_SLO16, - BFD_RELOC_OR1K_PCREL_PG21, - BFD_RELOC_OR1K_LO13, - BFD_RELOC_OR1K_SLO13, - BFD_RELOC_OR1K_GOTPC_HI16, - BFD_RELOC_OR1K_GOTPC_LO16, - BFD_RELOC_OR1K_GOT_AHI16, - BFD_RELOC_OR1K_GOT16, - BFD_RELOC_OR1K_GOT_PG21, - BFD_RELOC_OR1K_GOT_LO13, - BFD_RELOC_OR1K_PLT26, - BFD_RELOC_OR1K_PLTA26, - BFD_RELOC_OR1K_GOTOFF_SLO16, - BFD_RELOC_OR1K_COPY, - BFD_RELOC_OR1K_GLOB_DAT, - BFD_RELOC_OR1K_JMP_SLOT, - BFD_RELOC_OR1K_RELATIVE, - BFD_RELOC_OR1K_TLS_GD_HI16, - BFD_RELOC_OR1K_TLS_GD_LO16, - BFD_RELOC_OR1K_TLS_GD_PG21, - BFD_RELOC_OR1K_TLS_GD_LO13, - BFD_RELOC_OR1K_TLS_LDM_HI16, - BFD_RELOC_OR1K_TLS_LDM_LO16, - BFD_RELOC_OR1K_TLS_LDM_PG21, - BFD_RELOC_OR1K_TLS_LDM_LO13, - BFD_RELOC_OR1K_TLS_LDO_HI16, - BFD_RELOC_OR1K_TLS_LDO_LO16, - BFD_RELOC_OR1K_TLS_IE_HI16, - BFD_RELOC_OR1K_TLS_IE_AHI16, - BFD_RELOC_OR1K_TLS_IE_LO16, - BFD_RELOC_OR1K_TLS_IE_PG21, - BFD_RELOC_OR1K_TLS_IE_LO13, - BFD_RELOC_OR1K_TLS_LE_HI16, - BFD_RELOC_OR1K_TLS_LE_AHI16, - BFD_RELOC_OR1K_TLS_LE_LO16, - BFD_RELOC_OR1K_TLS_LE_SLO16, - BFD_RELOC_OR1K_TLS_TPOFF, - BFD_RELOC_OR1K_TLS_DTPOFF, - BFD_RELOC_OR1K_TLS_DTPMOD, +/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_10_PCREL, -/* H8 elf Relocations. */ - BFD_RELOC_H8_DIR16A8, - BFD_RELOC_H8_DIR16R8, - BFD_RELOC_H8_DIR24A8, - BFD_RELOC_H8_DIR24R8, - BFD_RELOC_H8_DIR32A16, - BFD_RELOC_H8_DISP32A16, +/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_18_PCREL, -/* Sony Xstormy16 Relocations. */ - BFD_RELOC_XSTORMY16_REL_12, - BFD_RELOC_XSTORMY16_12, - BFD_RELOC_XSTORMY16_24, - BFD_RELOC_XSTORMY16_FPTR16, +/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_26_PCREL, -/* Self-describing complex relocations. */ - BFD_RELOC_RELC, +/* This is a 16-bit reloc containing the high 16 bits of an address +used when the lower 16 bits are treated as unsigned. */ + BFD_RELOC_M32R_HI16_ULO, +/* This is a 16-bit reloc containing the high 16 bits of an address +used when the lower 16 bits are treated as signed. */ + BFD_RELOC_M32R_HI16_SLO, -/* Relocations used by VAX ELF. */ - BFD_RELOC_VAX_GLOB_DAT, - BFD_RELOC_VAX_JMP_SLOT, - BFD_RELOC_VAX_RELATIVE, +/* This is a 16-bit reloc containing the lower 16 bits of an address. */ + BFD_RELOC_M32R_LO16, -/* Morpho MT - 16 bit immediate relocation. */ - BFD_RELOC_MT_PC16, +/* This is a 16-bit reloc containing the small data area offset for use in +add3, load, and store instructions. */ + BFD_RELOC_M32R_SDA16, -/* Morpho MT - Hi 16 bits of an address. */ - BFD_RELOC_MT_HI16, +/* For PIC. */ + BFD_RELOC_M32R_GOT24, + BFD_RELOC_M32R_26_PLTREL, + BFD_RELOC_M32R_COPY, + BFD_RELOC_M32R_GLOB_DAT, + BFD_RELOC_M32R_JMP_SLOT, + BFD_RELOC_M32R_RELATIVE, + BFD_RELOC_M32R_GOTOFF, + BFD_RELOC_M32R_GOTOFF_HI_ULO, + BFD_RELOC_M32R_GOTOFF_HI_SLO, + BFD_RELOC_M32R_GOTOFF_LO, + BFD_RELOC_M32R_GOTPC24, + BFD_RELOC_M32R_GOT16_HI_ULO, + BFD_RELOC_M32R_GOT16_HI_SLO, + BFD_RELOC_M32R_GOT16_LO, + BFD_RELOC_M32R_GOTPC_HI_ULO, + BFD_RELOC_M32R_GOTPC_HI_SLO, + BFD_RELOC_M32R_GOTPC_LO, -/* Morpho MT - Low 16 bits of an address. */ - BFD_RELOC_MT_LO16, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, -/* Morpho MT - Used to tell the linker which vtable entries are used. */ - BFD_RELOC_MT_GNU_VTINHERIT, +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, -/* Morpho MT - Used to tell the linker which vtable entries are used. */ - BFD_RELOC_MT_GNU_VTENTRY, +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, -/* Morpho MT - 8 bit immediate relocation. */ - BFD_RELOC_MT_PCINSN8, +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, -/* msp430 specific relocation codes */ - BFD_RELOC_MSP430_10_PCREL, - BFD_RELOC_MSP430_16_PCREL, - BFD_RELOC_MSP430_16, - BFD_RELOC_MSP430_16_PCREL_BYTE, - BFD_RELOC_MSP430_16_BYTE, - BFD_RELOC_MSP430_2X_PCREL, - BFD_RELOC_MSP430_RL_PCREL, - BFD_RELOC_MSP430_ABS8, - BFD_RELOC_MSP430X_PCR20_EXT_SRC, - BFD_RELOC_MSP430X_PCR20_EXT_DST, - BFD_RELOC_MSP430X_PCR20_EXT_ODST, - BFD_RELOC_MSP430X_ABS20_EXT_SRC, - BFD_RELOC_MSP430X_ABS20_EXT_DST, - BFD_RELOC_MSP430X_ABS20_EXT_ODST, - BFD_RELOC_MSP430X_ABS20_ADR_SRC, - BFD_RELOC_MSP430X_ABS20_ADR_DST, - BFD_RELOC_MSP430X_PCR16, - BFD_RELOC_MSP430X_PCR20_CALL, - BFD_RELOC_MSP430X_ABS16, - BFD_RELOC_MSP430_ABS_HI16, - BFD_RELOC_MSP430_PREL31, - BFD_RELOC_MSP430_SYM_DIFF, - BFD_RELOC_MSP430_SET_ULEB128, - BFD_RELOC_MSP430_SUB_ULEB128, +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, -/* Relocations used by the Altera Nios II core. */ - BFD_RELOC_NIOS2_S16, - BFD_RELOC_NIOS2_U16, - BFD_RELOC_NIOS2_CALL26, - BFD_RELOC_NIOS2_IMM5, - BFD_RELOC_NIOS2_CACHE_OPX, - BFD_RELOC_NIOS2_IMM6, - BFD_RELOC_NIOS2_IMM8, - BFD_RELOC_NIOS2_HI16, - BFD_RELOC_NIOS2_LO16, - BFD_RELOC_NIOS2_HIADJ16, - BFD_RELOC_NIOS2_GPREL, - BFD_RELOC_NIOS2_UJMP, - BFD_RELOC_NIOS2_CJMP, - BFD_RELOC_NIOS2_CALLR, - BFD_RELOC_NIOS2_ALIGN, - BFD_RELOC_NIOS2_GOT16, - BFD_RELOC_NIOS2_CALL16, - BFD_RELOC_NIOS2_GOTOFF_LO, - BFD_RELOC_NIOS2_GOTOFF_HA, - BFD_RELOC_NIOS2_PCREL_LO, - BFD_RELOC_NIOS2_PCREL_HA, - BFD_RELOC_NIOS2_TLS_GD16, - BFD_RELOC_NIOS2_TLS_LDM16, - BFD_RELOC_NIOS2_TLS_LDO16, - BFD_RELOC_NIOS2_TLS_IE16, - BFD_RELOC_NIOS2_TLS_LE16, - BFD_RELOC_NIOS2_TLS_DTPMOD, - BFD_RELOC_NIOS2_TLS_DTPREL, - BFD_RELOC_NIOS2_TLS_TPREL, - BFD_RELOC_NIOS2_COPY, - BFD_RELOC_NIOS2_GLOB_DAT, - BFD_RELOC_NIOS2_JUMP_SLOT, - BFD_RELOC_NIOS2_RELATIVE, - BFD_RELOC_NIOS2_GOTOFF, - BFD_RELOC_NIOS2_CALL26_NOAT, - BFD_RELOC_NIOS2_GOT_LO, - BFD_RELOC_NIOS2_GOT_HA, - BFD_RELOC_NIOS2_CALL_LO, - BFD_RELOC_NIOS2_CALL_HA, - BFD_RELOC_NIOS2_R2_S12, - BFD_RELOC_NIOS2_R2_I10_1_PCREL, - BFD_RELOC_NIOS2_R2_T1I7_1_PCREL, - BFD_RELOC_NIOS2_R2_T1I7_2, - BFD_RELOC_NIOS2_R2_T2I4, - BFD_RELOC_NIOS2_R2_T2I4_1, - BFD_RELOC_NIOS2_R2_T2I4_2, - BFD_RELOC_NIOS2_R2_X1I7_2, - BFD_RELOC_NIOS2_R2_X2L5, - BFD_RELOC_NIOS2_R2_F1I5_2, - BFD_RELOC_NIOS2_R2_L5I4X1, - BFD_RELOC_NIOS2_R2_T1X1I6, - BFD_RELOC_NIOS2_R2_T1X1I6_2, +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, -/* PRU LDI 16-bit unsigned data-memory relocation. */ - BFD_RELOC_PRU_U16, +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, -/* PRU LDI 16-bit unsigned instruction-memory relocation. */ - BFD_RELOC_PRU_U16_PMEMIMM, +/* This is a 12-bit reloc containing the lower 12 bits of an address +then shift right by 3. This is used with ldi,sdi... */ + BFD_RELOC_NDS32_LO12S3, -/* PRU relocation for two consecutive LDI load instructions that load a -32 bit value into a register. If the higher bits are all zero, then -the second instruction may be relaxed. */ - BFD_RELOC_PRU_LDI32, +/* This is a 12-bit reloc containing the lower 12 bits of an address +then shift left by 2. This is used with lwi,swi... */ + BFD_RELOC_NDS32_LO12S2, -/* PRU QBBx 10-bit signed PC-relative relocation. */ - BFD_RELOC_PRU_S10_PCREL, +/* This is a 12-bit reloc containing the lower 12 bits of an address +then shift left by 1. This is used with lhi,shi... */ + BFD_RELOC_NDS32_LO12S1, -/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ - BFD_RELOC_PRU_U8_PCREL, +/* This is a 12-bit reloc containing the lower 12 bits of an address +then shift left by 0. This is used with lbisbi... */ + BFD_RELOC_NDS32_LO12S0, -/* PRU Program Memory relocations. Used to convert from byte addressing to -32-bit word addressing. */ - BFD_RELOC_PRU_32_PMEM, - BFD_RELOC_PRU_16_PMEM, +/* This is a 12-bit reloc containing the lower 12 bits of an address +then shift left by 0. This is only used with branch relaxations */ + BFD_RELOC_NDS32_LO12S0_ORI, -/* PRU relocations to mark the difference of two local symbols. -These are only needed to support linker relaxation and can be ignored -when not relaxing. The field is set to the value of the difference -assuming no relaxation. The relocation encodes the position of the -second symbol so the linker can determine whether to adjust the field -value. The PMEM variants encode the word difference, instead of byte -difference between symbols. */ - BFD_RELOC_PRU_GNU_DIFF8, - BFD_RELOC_PRU_GNU_DIFF16, - BFD_RELOC_PRU_GNU_DIFF32, - BFD_RELOC_PRU_GNU_DIFF16_PMEM, - BFD_RELOC_PRU_GNU_DIFF32_PMEM, +/* This is a 15-bit reloc containing the small data area 18-bit signed offset +and shift left by 3 for use in ldi, sdi... */ + BFD_RELOC_NDS32_SDA15S3, -/* IQ2000 Relocations. */ - BFD_RELOC_IQ2000_OFFSET_16, - BFD_RELOC_IQ2000_OFFSET_21, - BFD_RELOC_IQ2000_UHI16, +/* This is a 15-bit reloc containing the small data area 17-bit signed offset +and shift left by 2 for use in lwi, swi... */ + BFD_RELOC_NDS32_SDA15S2, + +/* This is a 15-bit reloc containing the small data area 16-bit signed offset +and shift left by 1 for use in lhi, shi... */ + BFD_RELOC_NDS32_SDA15S1, -/* Special Xtensa relocation used only by PLT entries in ELF shared -objects to indicate that the runtime linker should set the value -to one of its own internal functions or data structures. */ - BFD_RELOC_XTENSA_RTLD, +/* This is a 15-bit reloc containing the small data area 15-bit signed offset +and shift left by 0 for use in lbi, sbi... */ + BFD_RELOC_NDS32_SDA15S0, -/* Xtensa relocations for ELF shared objects. */ - BFD_RELOC_XTENSA_GLOB_DAT, - BFD_RELOC_XTENSA_JMP_SLOT, - BFD_RELOC_XTENSA_RELATIVE, +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, -/* Xtensa relocation used in ELF object files for symbols that may require -PLT entries. Otherwise, this is just a generic 32-bit relocation. */ - BFD_RELOC_XTENSA_PLT, +/* This is a 17-bit reloc containing the small data area 17-bit signed offset +and shift left by 2 for use in lwi.gp, swi.gp... */ + BFD_RELOC_NDS32_SDA17S2, -/* Xtensa relocations for backward compatibility. These have been replaced -by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF. -Xtensa relocations to mark the difference of two local symbols. -These are only needed to support linker relaxation and can be ignored -when not relaxing. The field is set to the value of the difference -assuming no relaxation. The relocation encodes the position of the -first symbol so the linker can determine whether to adjust the field -value. */ - BFD_RELOC_XTENSA_DIFF8, - BFD_RELOC_XTENSA_DIFF16, - BFD_RELOC_XTENSA_DIFF32, +/* This is a 18-bit reloc containing the small data area 18-bit signed offset +and shift left by 1 for use in lhi.gp, shi.gp... */ + BFD_RELOC_NDS32_SDA18S1, -/* Generic Xtensa relocations for instruction operands. Only the slot -number is encoded in the relocation. The relocation applies to the -last PC-relative immediate operand, or if there are no PC-relative -immediates, to the last immediate operand. */ - BFD_RELOC_XTENSA_SLOT0_OP, - BFD_RELOC_XTENSA_SLOT1_OP, - BFD_RELOC_XTENSA_SLOT2_OP, - BFD_RELOC_XTENSA_SLOT3_OP, - BFD_RELOC_XTENSA_SLOT4_OP, - BFD_RELOC_XTENSA_SLOT5_OP, - BFD_RELOC_XTENSA_SLOT6_OP, - BFD_RELOC_XTENSA_SLOT7_OP, - BFD_RELOC_XTENSA_SLOT8_OP, - BFD_RELOC_XTENSA_SLOT9_OP, - BFD_RELOC_XTENSA_SLOT10_OP, - BFD_RELOC_XTENSA_SLOT11_OP, - BFD_RELOC_XTENSA_SLOT12_OP, - BFD_RELOC_XTENSA_SLOT13_OP, - BFD_RELOC_XTENSA_SLOT14_OP, +/* This is a 19-bit reloc containing the small data area 19-bit signed offset +and shift left by 0 for use in lbi.gp, sbi.gp... */ + BFD_RELOC_NDS32_SDA19S0, -/* Alternate Xtensa relocations. Only the slot is encoded in the -relocation. The meaning of these relocations is opcode-specific. */ - BFD_RELOC_XTENSA_SLOT0_ALT, - BFD_RELOC_XTENSA_SLOT1_ALT, - BFD_RELOC_XTENSA_SLOT2_ALT, - BFD_RELOC_XTENSA_SLOT3_ALT, - BFD_RELOC_XTENSA_SLOT4_ALT, - BFD_RELOC_XTENSA_SLOT5_ALT, - BFD_RELOC_XTENSA_SLOT6_ALT, - BFD_RELOC_XTENSA_SLOT7_ALT, - BFD_RELOC_XTENSA_SLOT8_ALT, - BFD_RELOC_XTENSA_SLOT9_ALT, - BFD_RELOC_XTENSA_SLOT10_ALT, - BFD_RELOC_XTENSA_SLOT11_ALT, - BFD_RELOC_XTENSA_SLOT12_ALT, - BFD_RELOC_XTENSA_SLOT13_ALT, - BFD_RELOC_XTENSA_SLOT14_ALT, +/* for PIC */ + BFD_RELOC_NDS32_GOT20, + BFD_RELOC_NDS32_9_PLTREL, + BFD_RELOC_NDS32_25_PLTREL, + BFD_RELOC_NDS32_COPY, + BFD_RELOC_NDS32_GLOB_DAT, + BFD_RELOC_NDS32_JMP_SLOT, + BFD_RELOC_NDS32_RELATIVE, + BFD_RELOC_NDS32_GOTOFF, + BFD_RELOC_NDS32_GOTOFF_HI20, + BFD_RELOC_NDS32_GOTOFF_LO12, + BFD_RELOC_NDS32_GOTPC20, + BFD_RELOC_NDS32_GOT_HI20, + BFD_RELOC_NDS32_GOT_LO12, + BFD_RELOC_NDS32_GOTPC_HI20, + BFD_RELOC_NDS32_GOTPC_LO12, -/* Xtensa relocations for backward compatibility. These have all been -replaced by BFD_RELOC_XTENSA_SLOT0_OP. */ - BFD_RELOC_XTENSA_OP0, - BFD_RELOC_XTENSA_OP1, - BFD_RELOC_XTENSA_OP2, +/* for relax */ + BFD_RELOC_NDS32_INSN16, + BFD_RELOC_NDS32_LABEL, + BFD_RELOC_NDS32_LONGCALL1, + BFD_RELOC_NDS32_LONGCALL2, + BFD_RELOC_NDS32_LONGCALL3, + BFD_RELOC_NDS32_LONGJUMP1, + BFD_RELOC_NDS32_LONGJUMP2, + BFD_RELOC_NDS32_LONGJUMP3, + BFD_RELOC_NDS32_LOADSTORE, + BFD_RELOC_NDS32_9_FIXED, + BFD_RELOC_NDS32_15_FIXED, + BFD_RELOC_NDS32_17_FIXED, + BFD_RELOC_NDS32_25_FIXED, + BFD_RELOC_NDS32_LONGCALL4, + BFD_RELOC_NDS32_LONGCALL5, + BFD_RELOC_NDS32_LONGCALL6, + BFD_RELOC_NDS32_LONGJUMP4, + BFD_RELOC_NDS32_LONGJUMP5, + BFD_RELOC_NDS32_LONGJUMP6, + BFD_RELOC_NDS32_LONGJUMP7, -/* Xtensa relocation to mark that the assembler expanded the -instructions from an original target. The expansion size is -encoded in the reloc size. */ - BFD_RELOC_XTENSA_ASM_EXPAND, +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, -/* Xtensa relocation to mark that the linker should simplify -assembler-expanded instructions. This is commonly used -internally by the linker after analysis of a -BFD_RELOC_XTENSA_ASM_EXPAND. */ - BFD_RELOC_XTENSA_ASM_SIMPLIFY, +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, -/* Xtensa TLS relocations. */ - BFD_RELOC_XTENSA_TLSDESC_FN, - BFD_RELOC_XTENSA_TLSDESC_ARG, - BFD_RELOC_XTENSA_TLS_DTPOFF, - BFD_RELOC_XTENSA_TLS_TPOFF, - BFD_RELOC_XTENSA_TLS_FUNC, - BFD_RELOC_XTENSA_TLS_ARG, - BFD_RELOC_XTENSA_TLS_CALL, +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, -/* Xtensa relocations to mark the difference of two local symbols. -These are only needed to support linker relaxation and can be ignored -when not relaxing. The field is set to the value of the difference -assuming no relaxation. The relocation encodes the position of the -subtracted symbol so the linker can determine whether to adjust the field -value. PDIFF relocations are used for positive differences, NDIFF -relocations are used for negative differences. The difference value -is treated as unsigned with these relocation types, giving full -8/16 value ranges. */ - BFD_RELOC_XTENSA_PDIFF8, - BFD_RELOC_XTENSA_PDIFF16, - BFD_RELOC_XTENSA_PDIFF32, - BFD_RELOC_XTENSA_NDIFF8, - BFD_RELOC_XTENSA_NDIFF16, - BFD_RELOC_XTENSA_NDIFF32, +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, -/* 8 bit signed offset in (ix+d) or (iy+d). */ - BFD_RELOC_Z80_DISP8, +/* for PIC object relaxation */ + BFD_RELOC_NDS32_PLT_GOTREL_LO20, + BFD_RELOC_NDS32_PLT_GOTREL_LO15, + BFD_RELOC_NDS32_PLT_GOTREL_LO19, + BFD_RELOC_NDS32_GOT_LO15, + BFD_RELOC_NDS32_GOT_LO19, + BFD_RELOC_NDS32_GOTOFF_LO15, + BFD_RELOC_NDS32_GOTOFF_LO19, + BFD_RELOC_NDS32_GOT15S2, + BFD_RELOC_NDS32_GOT17S2, -/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ - BFD_RELOC_Z80_BYTE0, +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, -/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ - BFD_RELOC_Z80_BYTE1, +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, -/* Third 8 bits of multibyte (32 or 24 bit) value. */ - BFD_RELOC_Z80_BYTE2, +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, -/* Fourth 8 bits of multibyte (32 bit) value. */ - BFD_RELOC_Z80_BYTE3, +/* relaxation relative relocation types */ + BFD_RELOC_NDS32_RELAX_ENTRY, + BFD_RELOC_NDS32_GOT_SUFF, + BFD_RELOC_NDS32_GOTOFF_SUFF, + BFD_RELOC_NDS32_PLT_GOT_SUFF, + BFD_RELOC_NDS32_MULCALL_SUFF, + BFD_RELOC_NDS32_PTR, + BFD_RELOC_NDS32_PTR_COUNT, + BFD_RELOC_NDS32_PTR_RESOLVED, + BFD_RELOC_NDS32_PLTBLOCK, + BFD_RELOC_NDS32_RELAX_REGION_BEGIN, + BFD_RELOC_NDS32_RELAX_REGION_END, + BFD_RELOC_NDS32_MINUEND, + BFD_RELOC_NDS32_SUBTRAHEND, + BFD_RELOC_NDS32_DIFF8, + BFD_RELOC_NDS32_DIFF16, + BFD_RELOC_NDS32_DIFF32, + BFD_RELOC_NDS32_DIFF_ULEB128, + BFD_RELOC_NDS32_EMPTY, -/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ - BFD_RELOC_Z80_WORD0, +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, -/* Highest 16 bits of multibyte (32 or 24 bit) value. */ - BFD_RELOC_Z80_WORD1, +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, -/* Like BFD_RELOC_16 but big-endian. */ - BFD_RELOC_Z80_16_BE, +/* For TLS. */ + BFD_RELOC_NDS32_TPOFF, + BFD_RELOC_NDS32_GOTTPOFF, + BFD_RELOC_NDS32_TLS_LE_HI20, + BFD_RELOC_NDS32_TLS_LE_LO12, + BFD_RELOC_NDS32_TLS_LE_20, + BFD_RELOC_NDS32_TLS_LE_15S0, + BFD_RELOC_NDS32_TLS_LE_15S1, + BFD_RELOC_NDS32_TLS_LE_15S2, + BFD_RELOC_NDS32_TLS_LE_ADD, + BFD_RELOC_NDS32_TLS_LE_LS, + BFD_RELOC_NDS32_TLS_IE_HI20, + BFD_RELOC_NDS32_TLS_IE_LO12, + BFD_RELOC_NDS32_TLS_IE_LO12S2, + BFD_RELOC_NDS32_TLS_IEGP_HI20, + BFD_RELOC_NDS32_TLS_IEGP_LO12, + BFD_RELOC_NDS32_TLS_IEGP_LO12S2, + BFD_RELOC_NDS32_TLS_IEGP_LW, + BFD_RELOC_NDS32_TLS_DESC, + BFD_RELOC_NDS32_TLS_DESC_HI20, + BFD_RELOC_NDS32_TLS_DESC_LO12, + BFD_RELOC_NDS32_TLS_DESC_20, + BFD_RELOC_NDS32_TLS_DESC_SDA17S2, + BFD_RELOC_NDS32_TLS_DESC_ADD, + BFD_RELOC_NDS32_TLS_DESC_FUNC, + BFD_RELOC_NDS32_TLS_DESC_CALL, + BFD_RELOC_NDS32_TLS_DESC_MEM, + BFD_RELOC_NDS32_REMOVE, + BFD_RELOC_NDS32_GROUP, + +/* For floating load store relaxation. */ + BFD_RELOC_NDS32_LSI, -/* DJNZ offset. */ - BFD_RELOC_Z8K_DISP7, +/* This is a 9-bit reloc */ + BFD_RELOC_V850_9_PCREL, -/* CALR offset. */ - BFD_RELOC_Z8K_CALLR, +/* This is a 22-bit reloc */ + BFD_RELOC_V850_22_PCREL, -/* 4 bit value. */ - BFD_RELOC_Z8K_IMM4L, +/* This is a 16 bit offset from the short data area pointer. */ + BFD_RELOC_V850_SDA_16_16_OFFSET, -/* Lattice Mico32 relocations. */ - BFD_RELOC_LM32_CALL, - BFD_RELOC_LM32_BRANCH, - BFD_RELOC_LM32_16_GOT, - BFD_RELOC_LM32_GOTOFF_HI16, - BFD_RELOC_LM32_GOTOFF_LO16, - BFD_RELOC_LM32_COPY, - BFD_RELOC_LM32_GLOB_DAT, - BFD_RELOC_LM32_JMP_SLOT, - BFD_RELOC_LM32_RELATIVE, +/* This is a 16 bit offset (of which only 15 bits are used) from the +short data area pointer. */ + BFD_RELOC_V850_SDA_15_16_OFFSET, -/* Difference between two section addreses. Must be followed by a -BFD_RELOC_MACH_O_PAIR. */ - BFD_RELOC_MACH_O_SECTDIFF, +/* This is a 16 bit offset from the zero data area pointer. */ + BFD_RELOC_V850_ZDA_16_16_OFFSET, -/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */ - BFD_RELOC_MACH_O_LOCAL_SECTDIFF, +/* This is a 16 bit offset (of which only 15 bits are used) from the +zero data area pointer. */ + BFD_RELOC_V850_ZDA_15_16_OFFSET, -/* Pair of relocation. Contains the first symbol. */ - BFD_RELOC_MACH_O_PAIR, +/* This is an 8 bit offset (of which only 6 bits are used) from the +tiny data area pointer. */ + BFD_RELOC_V850_TDA_6_8_OFFSET, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ - BFD_RELOC_MACH_O_SUBTRACTOR32, +/* This is an 8bit offset (of which only 7 bits are used) from the tiny +data area pointer. */ + BFD_RELOC_V850_TDA_7_8_OFFSET, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_SUBTRACTOR64, +/* This is a 7 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_7_7_OFFSET, -/* PCREL relocations. They are marked as branch to create PLT entry if -required. */ - BFD_RELOC_MACH_O_X86_64_BRANCH32, - BFD_RELOC_MACH_O_X86_64_BRANCH8, +/* This is a 16 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_16_16_OFFSET, -/* Used when referencing a GOT entry. */ - BFD_RELOC_MACH_O_X86_64_GOT, +/* This is a 5 bit offset (of which only 4 bits are used) from the tiny +data area pointer. */ + BFD_RELOC_V850_TDA_4_5_OFFSET, -/* Used when loading a GOT entry with movq. It is specially marked so that -the linker could optimize the movq to a leaq if possible. */ - BFD_RELOC_MACH_O_X86_64_GOT_LOAD, +/* This is a 4 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_4_4_OFFSET, -/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ - BFD_RELOC_MACH_O_X86_64_PCREL32_1, +/* This is a 16 bit offset from the short data area pointer, with the +bits placed non-contiguously in the instruction. */ + BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, -/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */ - BFD_RELOC_MACH_O_X86_64_PCREL32_2, +/* This is a 16 bit offset from the zero data area pointer, with the +bits placed non-contiguously in the instruction. */ + BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, -/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ - BFD_RELOC_MACH_O_X86_64_PCREL32_4, +/* This is a 6 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_6_7_OFFSET, -/* Used when referencing a TLV entry. */ - BFD_RELOC_MACH_O_X86_64_TLV, +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_16_16_OFFSET, -/* Addend for PAGE or PAGEOFF. */ - BFD_RELOC_MACH_O_ARM64_ADDEND, +/* Used for relaxing indirect function calls. */ + BFD_RELOC_V850_LONGCALL, -/* Relative offset to page of GOT slot. */ - BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21, +/* Used for relaxing indirect jumps. */ + BFD_RELOC_V850_LONGJUMP, -/* Relative offset within page of GOT slot. */ - BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, +/* Used to maintain alignment whilst relaxing. */ + BFD_RELOC_V850_ALIGN, -/* Address of a GOT entry. */ - BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, +/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu +instructions. */ + BFD_RELOC_V850_LO16_SPLIT_OFFSET, -/* This is a 32 bit reloc for the microblaze that stores the -low 16 bits of a value */ - BFD_RELOC_MICROBLAZE_32_LO, +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_PCREL, -/* This is a 32 bit pc-relative reloc for the microblaze that -stores the low 16 bits of a value */ - BFD_RELOC_MICROBLAZE_32_LO_PCREL, +/* This is a 17-bit reloc. */ + BFD_RELOC_V850_17_PCREL, -/* This is a 32 bit reloc for the microblaze that stores a -value relative to the read-only small data area anchor */ - BFD_RELOC_MICROBLAZE_32_ROSDA, +/* This is a 23-bit reloc. */ + BFD_RELOC_V850_23, -/* This is a 32 bit reloc for the microblaze that stores a -value relative to the read-write small data area anchor */ - BFD_RELOC_MICROBLAZE_32_RWSDA, +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_PCREL, -/* This is a 32 bit reloc for the microblaze to handle -expressions of the form "Symbol Op Symbol" */ - BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_ABS, -/* This is a 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is -done here - only used for relaxing */ - BFD_RELOC_MICROBLAZE_64_NONE, +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_SPLIT_OFFSET, -/* This is a 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). The relocation is -PC-relative GOT offset */ - BFD_RELOC_MICROBLAZE_64_GOTPC, +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_S1, -/* This is a 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). The relocation is -GOT offset */ - BFD_RELOC_MICROBLAZE_64_GOT, +/* Low 16 bits. 16 bit shifted by 1. */ + BFD_RELOC_V850_LO16_S1, -/* This is a 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). The relocation is -PC-relative offset into PLT */ - BFD_RELOC_MICROBLAZE_64_PLT, +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_15_16_OFFSET, -/* This is a 64 bit reloc that stores the 32 bit GOT relative -value in two words (with an imm instruction). The relocation is -relative offset from _GLOBAL_OFFSET_TABLE_ */ - BFD_RELOC_MICROBLAZE_64_GOTOFF, +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTPCREL, -/* This is a 32 bit reloc that stores the 32 bit GOT relative -value in a word. The relocation is relative offset from */ - BFD_RELOC_MICROBLAZE_32_GOTOFF, +/* DSO relocations. */ + BFD_RELOC_V850_16_GOT, -/* This is used to tell the dynamic linker to copy the value out of -the dynamic object into the runtime process image. */ - BFD_RELOC_MICROBLAZE_COPY, +/* DSO relocations. */ + BFD_RELOC_V850_32_GOT, -/* Unused Reloc */ - BFD_RELOC_MICROBLAZE_64_TLS, +/* DSO relocations. */ + BFD_RELOC_V850_22_PLT_PCREL, -/* This is a 64 bit reloc that stores the 32 bit GOT relative value -of the GOT TLS GD info entry in two words (with an imm instruction). The -relocation is GOT offset. */ - BFD_RELOC_MICROBLAZE_64_TLSGD, +/* DSO relocations. */ + BFD_RELOC_V850_32_PLT_PCREL, -/* This is a 64 bit reloc that stores the 32 bit GOT relative value -of the GOT TLS LD info entry in two words (with an imm instruction). The -relocation is GOT offset. */ - BFD_RELOC_MICROBLAZE_64_TLSLD, +/* DSO relocations. */ + BFD_RELOC_V850_COPY, -/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ - BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, +/* DSO relocations. */ + BFD_RELOC_V850_GLOB_DAT, -/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ - BFD_RELOC_MICROBLAZE_32_TLSDTPREL, +/* DSO relocations. */ + BFD_RELOC_V850_JMP_SLOT, -/* This is a 32 bit reloc for storing TLS offset to two words (uses imm -instruction) */ - BFD_RELOC_MICROBLAZE_64_TLSDTPREL, +/* DSO relocations. */ + BFD_RELOC_V850_RELATIVE, -/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset -to two words (uses imm instruction). */ - BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL, +/* DSO relocations. */ + BFD_RELOC_V850_16_GOTOFF, -/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset -to two words (uses imm instruction). */ - BFD_RELOC_MICROBLAZE_64_TLSTPREL, +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTOFF, -/* This is a 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). The relocation is -PC-relative offset from start of TEXT. */ - BFD_RELOC_MICROBLAZE_64_TEXTPCREL, +/* start code. */ + BFD_RELOC_V850_CODE, -/* This is a 64 bit reloc that stores the 32 bit offset -value in two words (with an imm instruction). The relocation is -relative offset from start of TEXT. */ - BFD_RELOC_MICROBLAZE_64_TEXTREL, +/* start data in text. */ + BFD_RELOC_V850_DATA, -/* AArch64 pseudo relocation code to mark the start of the AArch64 -relocation enumerators. N.B. the order of the enumerators is -important as several tables in the AArch64 bfd backend are indexed -by these enumerators; make sure they are all synced. */ - BFD_RELOC_AARCH64_RELOC_START, +/* This is a 8bit DP reloc for the tms320c30, where the most +significant 8 bits of a 24 bit word are placed into the least +significant 8 bits of the opcode. */ + BFD_RELOC_TIC30_LDP, -/* Deprecated AArch64 null relocation code. */ - BFD_RELOC_AARCH64_NULL, +/* This is a 7bit reloc for the tms320c54x, where the least +significant 7 bits of a 16 bit word are placed into the least +significant 7 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTLS7, -/* AArch64 null relocation code. */ - BFD_RELOC_AARCH64_NONE, +/* This is a 9bit DP reloc for the tms320c54x, where the most +significant 9 bits of a 16 bit word are placed into the least +significant 9 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTMS9, -/* Basic absolute relocations of N bits. These are equivalent to -BFD_RELOC_N and they were added to assist the indexing of the howto -table. */ - BFD_RELOC_AARCH64_64, - BFD_RELOC_AARCH64_32, - BFD_RELOC_AARCH64_16, +/* This is an extended address 23-bit reloc for the tms320c54x. */ + BFD_RELOC_TIC54X_23, -/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL -and they were added to assist the indexing of the howto table. */ - BFD_RELOC_AARCH64_64_PCREL, - BFD_RELOC_AARCH64_32_PCREL, - BFD_RELOC_AARCH64_16_PCREL, +/* This is a 16-bit reloc for the tms320c54x, where the least +significant 16 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_16_OF_23, + +/* This is a reloc for the tms320c54x, where the most +significant 7 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_MS7_OF_23, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* TMS320C6000 relocations. */ + BFD_RELOC_C6000_PCR_S21, + BFD_RELOC_C6000_PCR_S12, + BFD_RELOC_C6000_PCR_S10, + BFD_RELOC_C6000_PCR_S7, + BFD_RELOC_C6000_ABS_S16, + BFD_RELOC_C6000_ABS_L16, + BFD_RELOC_C6000_ABS_H16, + BFD_RELOC_C6000_SBR_U15_B, + BFD_RELOC_C6000_SBR_U15_H, + BFD_RELOC_C6000_SBR_U15_W, + BFD_RELOC_C6000_SBR_S16, + BFD_RELOC_C6000_SBR_L16_B, + BFD_RELOC_C6000_SBR_L16_H, + BFD_RELOC_C6000_SBR_L16_W, + BFD_RELOC_C6000_SBR_H16_B, + BFD_RELOC_C6000_SBR_H16_H, + BFD_RELOC_C6000_SBR_H16_W, + BFD_RELOC_C6000_SBR_GOT_U15_W, + BFD_RELOC_C6000_SBR_GOT_L16_W, + BFD_RELOC_C6000_SBR_GOT_H16_W, + BFD_RELOC_C6000_DSBT_INDEX, + BFD_RELOC_C6000_PREL31, + BFD_RELOC_C6000_COPY, + BFD_RELOC_C6000_JUMP_SLOT, + BFD_RELOC_C6000_EHTYPE, + BFD_RELOC_C6000_PCR_H16, + BFD_RELOC_C6000_PCR_L16, + BFD_RELOC_C6000_ALIGN, + BFD_RELOC_C6000_FPHEAD, + BFD_RELOC_C6000_NOCMP, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* This is a 48 bit reloc for the FR30 that stores 32 bits. */ + BFD_RELOC_FR30_48, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into +two sections. */ + BFD_RELOC_FR30_20, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in +4 bits. */ + BFD_RELOC_FR30_6_IN_4, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset +into 8 bits. */ + BFD_RELOC_FR30_8_IN_8, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset +into 8 bits. */ + BFD_RELOC_FR30_9_IN_8, -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, +/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset +into 8 bits. */ + BFD_RELOC_FR30_10_IN_8, -/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 -of a signed value. Changes instruction to MOVZ or MOVN depending on the -value's sign. */ - BFD_RELOC_AARCH64_MOVW_G0_S, +/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative +short offset into 8 bits. */ + BFD_RELOC_FR30_9_PCREL, -/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31 -of a signed value. Changes instruction to MOVZ or MOVN depending on the -value's sign. */ - BFD_RELOC_AARCH64_MOVW_G1_S, +/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative +short offset into 11 bits. */ + BFD_RELOC_FR30_12_PCREL, -/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47 -of a signed value. Changes instruction to MOVZ or MOVN depending on the -value's sign. */ - BFD_RELOC_AARCH64_MOVW_G2_S, +/* Motorola Mcore relocations. */ + BFD_RELOC_MCORE_PCREL_IMM8BY4, + BFD_RELOC_MCORE_PCREL_IMM11BY2, + BFD_RELOC_MCORE_PCREL_IMM4BY2, + BFD_RELOC_MCORE_PCREL_32, + BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, + BFD_RELOC_MCORE_RVA, -/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 -of a signed value. Changes instruction to MOVZ or MOVN depending on the -value's sign. */ - BFD_RELOC_AARCH64_MOVW_PREL_G0, +/* Toshiba Media Processor Relocations. */ + BFD_RELOC_MEP_8, + BFD_RELOC_MEP_16, + BFD_RELOC_MEP_32, + BFD_RELOC_MEP_PCREL8A2, + BFD_RELOC_MEP_PCREL12A2, + BFD_RELOC_MEP_PCREL17A2, + BFD_RELOC_MEP_PCREL24A2, + BFD_RELOC_MEP_PCABS24A2, + BFD_RELOC_MEP_LOW16, + BFD_RELOC_MEP_HI16U, + BFD_RELOC_MEP_HI16S, + BFD_RELOC_MEP_GPREL, + BFD_RELOC_MEP_TPREL, + BFD_RELOC_MEP_TPREL7, + BFD_RELOC_MEP_TPREL7A2, + BFD_RELOC_MEP_TPREL7A4, + BFD_RELOC_MEP_UIMM24, + BFD_RELOC_MEP_ADDR24A4, + BFD_RELOC_MEP_GNU_VTINHERIT, + BFD_RELOC_MEP_GNU_VTENTRY, -/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 -of a signed value. Changes instruction to MOVZ or MOVN depending on the -value's sign. */ - BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, -/* AArch64 MOVK instruction with most significant bits 16 to 31 -of a signed value. */ - BFD_RELOC_AARCH64_MOVW_PREL_G1, +/* Imagination Technologies Meta relocations. */ + BFD_RELOC_METAG_HIADDR16, + BFD_RELOC_METAG_LOADDR16, + BFD_RELOC_METAG_RELBRANCH, + BFD_RELOC_METAG_GETSETOFF, + BFD_RELOC_METAG_HIOG, + BFD_RELOC_METAG_LOOG, + BFD_RELOC_METAG_REL8, + BFD_RELOC_METAG_REL16, + BFD_RELOC_METAG_HI16_GOTOFF, + BFD_RELOC_METAG_LO16_GOTOFF, + BFD_RELOC_METAG_GETSET_GOTOFF, + BFD_RELOC_METAG_GETSET_GOT, + BFD_RELOC_METAG_HI16_GOTPC, + BFD_RELOC_METAG_LO16_GOTPC, + BFD_RELOC_METAG_HI16_PLT, + BFD_RELOC_METAG_LO16_PLT, + BFD_RELOC_METAG_RELBRANCH_PLT, + BFD_RELOC_METAG_GOTOFF, + BFD_RELOC_METAG_PLT, + BFD_RELOC_METAG_COPY, + BFD_RELOC_METAG_JMP_SLOT, + BFD_RELOC_METAG_RELATIVE, + BFD_RELOC_METAG_GLOB_DAT, + BFD_RELOC_METAG_TLS_GD, + BFD_RELOC_METAG_TLS_LDM, + BFD_RELOC_METAG_TLS_LDO_HI16, + BFD_RELOC_METAG_TLS_LDO_LO16, + BFD_RELOC_METAG_TLS_LDO, + BFD_RELOC_METAG_TLS_IE, + BFD_RELOC_METAG_TLS_IENONPIC, + BFD_RELOC_METAG_TLS_IENONPIC_HI16, + BFD_RELOC_METAG_TLS_IENONPIC_LO16, + BFD_RELOC_METAG_TLS_TPOFF, + BFD_RELOC_METAG_TLS_DTPMOD, + BFD_RELOC_METAG_TLS_DTPOFF, + BFD_RELOC_METAG_TLS_LE, + BFD_RELOC_METAG_TLS_LE_HI16, + BFD_RELOC_METAG_TLS_LE_LO16, -/* AArch64 MOVK instruction with most significant bits 16 to 31 -of a signed value. */ - BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, +/* These are relocations for the GETA instruction. */ + BFD_RELOC_MMIX_GETA, + BFD_RELOC_MMIX_GETA_1, + BFD_RELOC_MMIX_GETA_2, + BFD_RELOC_MMIX_GETA_3, -/* AArch64 MOVK instruction with most significant bits 32 to 47 -of a signed value. */ - BFD_RELOC_AARCH64_MOVW_PREL_G2, +/* These are relocations for a conditional branch instruction. */ + BFD_RELOC_MMIX_CBRANCH, + BFD_RELOC_MMIX_CBRANCH_J, + BFD_RELOC_MMIX_CBRANCH_1, + BFD_RELOC_MMIX_CBRANCH_2, + BFD_RELOC_MMIX_CBRANCH_3, -/* AArch64 MOVK instruction with most significant bits 32 to 47 -of a signed value. */ - BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, +/* These are relocations for the PUSHJ instruction. */ + BFD_RELOC_MMIX_PUSHJ, + BFD_RELOC_MMIX_PUSHJ_1, + BFD_RELOC_MMIX_PUSHJ_2, + BFD_RELOC_MMIX_PUSHJ_3, + BFD_RELOC_MMIX_PUSHJ_STUBBABLE, -/* AArch64 MOVK instruction with most significant bits 47 to 63 -of a signed value. */ - BFD_RELOC_AARCH64_MOVW_PREL_G3, +/* These are relocations for the JMP instruction. */ + BFD_RELOC_MMIX_JMP, + BFD_RELOC_MMIX_JMP_1, + BFD_RELOC_MMIX_JMP_2, + BFD_RELOC_MMIX_JMP_3, -/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word -offset. The lowest two bits must be zero and are not stored in the -instruction, giving a 21 bit signed byte offset. */ - BFD_RELOC_AARCH64_LD_LO19_PCREL, +/* This is a relocation for a relative address as in a GETA instruction or +a branch. */ + BFD_RELOC_MMIX_ADDR19, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* This is a relocation for a relative address as in a JMP instruction. */ + BFD_RELOC_MMIX_ADDR27, -/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page -offset, giving a 4KB aligned page base address. */ - BFD_RELOC_AARCH64_ADR_HI21_PCREL, +/* This is a relocation for an instruction field that may be a general +register or a value 0..255. */ + BFD_RELOC_MMIX_REG_OR_BYTE, -/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page -offset, giving a 4KB aligned page base address, but with no overflow -checking. */ - BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, +/* This is a relocation for an instruction field that may be a general +register. */ + BFD_RELOC_MMIX_REG, -/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address. -Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_ADD_LO12, +/* This is a relocation for two instruction fields holding a register and +an offset, the equivalent of the relocation. */ + BFD_RELOC_MMIX_BASE_PLUS_OFFSET, -/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST8_LO12, +/* This relocation is an assertion that the expression is not allocated as +a global register. It does not modify contents. */ + BFD_RELOC_MMIX_LOCAL, -/* AArch64 14 bit pc-relative test bit and branch. -The lowest two bits must be zero and are not stored in the instruction, -giving a 16 bit signed byte offset. */ - BFD_RELOC_AARCH64_TSTBR14, +/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative +short offset into 7 bits. */ + BFD_RELOC_AVR_7_PCREL, -/* AArch64 19 bit pc-relative conditional branch and compare & branch. -The lowest two bits must be zero and are not stored in the instruction, -giving a 21 bit signed byte offset. */ - BFD_RELOC_AARCH64_BRANCH19, +/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative +short offset into 12 bits. */ + BFD_RELOC_AVR_13_PCREL, -/* AArch64 26 bit pc-relative unconditional branch. -The lowest two bits must be zero and are not stored in the instruction, -giving a 28 bit signed byte offset. */ - BFD_RELOC_AARCH64_JUMP26, +/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually +program memory address) into 16 bits. */ + BFD_RELOC_AVR_16_PM, -/* AArch64 26 bit pc-relative unconditional branch and link. -The lowest two bits must be zero and are not stored in the instruction, -giving a 28 bit signed byte offset. */ - BFD_RELOC_AARCH64_CALL26, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI, -/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST16_LO12, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI, -/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST32_LO12, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of program memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI, -/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST64_LO12, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of 32 bit value) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_MS8_LDI, -/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST128_LO12, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually data memory address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_NEG, -/* AArch64 Load Literal instruction, holding a 19 bit PC relative word -offset of the global offset table entry for a symbol. The lowest two -bits must be zero and are not stored in the instruction, giving a 21 -bit signed byte offset. This relocation type requires signed overflow -checking. */ - BFD_RELOC_AARCH64_GOT_LD_PREL19, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of data memory address) into 8 bit immediate value of +SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_NEG, -/* Get to the page base of the global offset table entry for a symbol as -part of an ADRP instruction using a 21 bit PC relative value.Used in -conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */ - BFD_RELOC_AARCH64_ADR_GOT_PAGE, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(most high 8 bit of program memory address) into 8 bit immediate value +of LDI or SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_NEG, -/* Unsigned 12 bit byte offset for 64 bit load/store from the page of -the GOT entry for this symbol. Used in conjunction with -BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb +of 32 bit value) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_MS8_LDI_NEG, -/* Unsigned 12 bit byte offset for 32 bit load/store from the page of -the GOT entry for this symbol. Used in conjunction with -BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */ - BFD_RELOC_AARCH64_LD32_GOT_LO12_NC, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM, -/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry -for this symbol. Valid in LP64 ABI only. */ - BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC, +/* This is a 16 bit reloc for the AVR that stores 8 bit value +(command address) into 8 bit immediate value of LDI insn. If the address +is beyond the 128k boundary, the linker inserts a jump stub for this reloc +in the lower 128k. */ + BFD_RELOC_AVR_LO8_LDI_GS, -/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry -for this symbol. Valid in LP64 ABI only. */ - BFD_RELOC_AARCH64_MOVW_GOTOFF_G1, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM, -/* Unsigned 15 bit byte offset for 64 bit load/store from the page of -the GOT entry for this symbol. Valid in LP64 ABI only. */ - BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of command address) into 8 bit immediate value of LDI insn. If the address +is beyond the 128k boundary, the linker inserts a jump stub for this reloc +below 128k. */ + BFD_RELOC_AVR_HI8_LDI_GS, -/* Scaled 14 bit byte offset to the page base of the global offset table. */ - BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM, -/* Scaled 15 bit byte offset to the page base of the global offset table. */ - BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually command address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM_NEG, -/* Get to the page base of the global offset table entry for a symbols -tls_index structure as part of an adrp instruction using a 21 bit PC -relative value. Used in conjunction with -BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ - BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of 16 bit command address) into 8 bit immediate value +of SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM_NEG, -/* AArch64 TLS General Dynamic */ - BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 6 bit of 22 bit command address) into 8 bit immediate +value of SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM_NEG, -/* Unsigned 12 bit byte offset to global offset table entry for a symbols -tls_index structure. Used in conjunction with -BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */ - BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC, +/* This is a 32 bit reloc for the AVR that stores 23 bit value +into 22 bits. */ + BFD_RELOC_AVR_CALL, -/* AArch64 TLS General Dynamic relocation. */ - BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, +/* This is a 16 bit reloc for the AVR that stores all needed bits +for absolute addressing with ldi with overflow check to linktime */ + BFD_RELOC_AVR_LDI, -/* AArch64 TLS General Dynamic relocation. */ - BFD_RELOC_AARCH64_TLSGD_MOVW_G1, +/* This is a 6 bit reloc for the AVR that stores offset for ldd/std +instructions */ + BFD_RELOC_AVR_6, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, +/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw +instructions */ + BFD_RELOC_AVR_6_ADIW, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, +/* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol +in .byte lo8(symbol) */ + BFD_RELOC_AVR_8_LO, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, +/* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol +in .byte hi8(symbol) */ + BFD_RELOC_AVR_8_HI, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, +/* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol +in .byte hlo8(symbol) */ + BFD_RELOC_AVR_8_HLO, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, +/* AVR relocations to mark the difference of two local symbols. +These are only needed to support linker relaxation and can be ignored +when not relaxing. The field is set to the value of the difference +assuming no relaxation. The relocation encodes the position of the +second symbol so the linker can determine whether to adjust the field +value. */ + BFD_RELOC_AVR_DIFF8, + BFD_RELOC_AVR_DIFF16, + BFD_RELOC_AVR_DIFF32, -/* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit +lds and sts instructions supported only tiny core. */ + BFD_RELOC_AVR_LDS_STS_16, -/* bit[23:12] of byte offset to module TLS base address. */ - BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, +/* This is a 6 bit reloc for the AVR that stores an I/O register +number for the IN and OUT instructions */ + BFD_RELOC_AVR_PORT6, -/* Unsigned 12 bit byte offset to module TLS base address. */ - BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, +/* This is a 5 bit reloc for the AVR that stores an I/O register +number for the SBIC, SBIS, SBI and CBI instructions */ + BFD_RELOC_AVR_PORT5, -/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ - BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, +/* RISC-V relocations. */ + BFD_RELOC_RISCV_HI20, + BFD_RELOC_RISCV_PCREL_HI20, + BFD_RELOC_RISCV_PCREL_LO12_I, + BFD_RELOC_RISCV_PCREL_LO12_S, + BFD_RELOC_RISCV_LO12_I, + BFD_RELOC_RISCV_LO12_S, + BFD_RELOC_RISCV_GPREL12_I, + BFD_RELOC_RISCV_GPREL12_S, + BFD_RELOC_RISCV_TPREL_HI20, + BFD_RELOC_RISCV_TPREL_LO12_I, + BFD_RELOC_RISCV_TPREL_LO12_S, + BFD_RELOC_RISCV_TPREL_ADD, + BFD_RELOC_RISCV_CALL, + BFD_RELOC_RISCV_CALL_PLT, + BFD_RELOC_RISCV_ADD8, + BFD_RELOC_RISCV_ADD16, + BFD_RELOC_RISCV_ADD32, + BFD_RELOC_RISCV_ADD64, + BFD_RELOC_RISCV_SUB8, + BFD_RELOC_RISCV_SUB16, + BFD_RELOC_RISCV_SUB32, + BFD_RELOC_RISCV_SUB64, + BFD_RELOC_RISCV_GOT_HI20, + BFD_RELOC_RISCV_TLS_GOT_HI20, + BFD_RELOC_RISCV_TLS_GD_HI20, + BFD_RELOC_RISCV_JMP, + BFD_RELOC_RISCV_TLS_DTPMOD32, + BFD_RELOC_RISCV_TLS_DTPREL32, + BFD_RELOC_RISCV_TLS_DTPMOD64, + BFD_RELOC_RISCV_TLS_DTPREL64, + BFD_RELOC_RISCV_TLS_TPREL32, + BFD_RELOC_RISCV_TLS_TPREL64, + BFD_RELOC_RISCV_ALIGN, + BFD_RELOC_RISCV_RVC_BRANCH, + BFD_RELOC_RISCV_RVC_JUMP, + BFD_RELOC_RISCV_RVC_LUI, + BFD_RELOC_RISCV_GPREL_I, + BFD_RELOC_RISCV_GPREL_S, + BFD_RELOC_RISCV_TPREL_I, + BFD_RELOC_RISCV_TPREL_S, + BFD_RELOC_RISCV_RELAX, + BFD_RELOC_RISCV_CFA, + BFD_RELOC_RISCV_SUB6, + BFD_RELOC_RISCV_SET6, + BFD_RELOC_RISCV_SET8, + BFD_RELOC_RISCV_SET16, + BFD_RELOC_RISCV_SET32, + BFD_RELOC_RISCV_32_PCREL, + BFD_RELOC_RISCV_SET_ULEB128, + BFD_RELOC_RISCV_SUB_ULEB128, -/* Unsigned 12 bit byte offset to global offset table entry for a symbols -tls_index structure. Used in conjunction with -BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */ - BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC, +/* Renesas RL78 Relocations. */ + BFD_RELOC_RL78_NEG8, + BFD_RELOC_RL78_NEG16, + BFD_RELOC_RL78_NEG24, + BFD_RELOC_RL78_NEG32, + BFD_RELOC_RL78_16_OP, + BFD_RELOC_RL78_24_OP, + BFD_RELOC_RL78_32_OP, + BFD_RELOC_RL78_8U, + BFD_RELOC_RL78_16U, + BFD_RELOC_RL78_24U, + BFD_RELOC_RL78_DIR3U_PCREL, + BFD_RELOC_RL78_DIFF, + BFD_RELOC_RL78_GPRELB, + BFD_RELOC_RL78_GPRELW, + BFD_RELOC_RL78_GPRELL, + BFD_RELOC_RL78_SYM, + BFD_RELOC_RL78_OP_SUBTRACT, + BFD_RELOC_RL78_OP_NEG, + BFD_RELOC_RL78_OP_AND, + BFD_RELOC_RL78_OP_SHRA, + BFD_RELOC_RL78_ABS8, + BFD_RELOC_RL78_ABS16, + BFD_RELOC_RL78_ABS16_REV, + BFD_RELOC_RL78_ABS32, + BFD_RELOC_RL78_ABS32_REV, + BFD_RELOC_RL78_ABS16U, + BFD_RELOC_RL78_ABS16UW, + BFD_RELOC_RL78_ABS16UL, + BFD_RELOC_RL78_RELAX, + BFD_RELOC_RL78_HI16, + BFD_RELOC_RL78_HI8, + BFD_RELOC_RL78_LO16, + BFD_RELOC_RL78_CODE, + BFD_RELOC_RL78_SADDR, -/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP -instruction. */ - BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, +/* Renesas RX Relocations. */ + BFD_RELOC_RX_NEG8, + BFD_RELOC_RX_NEG16, + BFD_RELOC_RX_NEG24, + BFD_RELOC_RX_NEG32, + BFD_RELOC_RX_16_OP, + BFD_RELOC_RX_24_OP, + BFD_RELOC_RX_32_OP, + BFD_RELOC_RX_8U, + BFD_RELOC_RX_16U, + BFD_RELOC_RX_24U, + BFD_RELOC_RX_DIR3U_PCREL, + BFD_RELOC_RX_DIFF, + BFD_RELOC_RX_GPRELB, + BFD_RELOC_RX_GPRELW, + BFD_RELOC_RX_GPRELL, + BFD_RELOC_RX_SYM, + BFD_RELOC_RX_OP_SUBTRACT, + BFD_RELOC_RX_OP_NEG, + BFD_RELOC_RX_ABS8, + BFD_RELOC_RX_ABS16, + BFD_RELOC_RX_ABS16_REV, + BFD_RELOC_RX_ABS32, + BFD_RELOC_RX_ABS32_REV, + BFD_RELOC_RX_ABS16U, + BFD_RELOC_RX_ABS16UW, + BFD_RELOC_RX_ABS16UL, + BFD_RELOC_RX_RELAX, -/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ - BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, +/* Direct 12 bit. */ + BFD_RELOC_390_12, -/* bit[11:1] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, +/* 12 bit GOT offset. */ + BFD_RELOC_390_GOT12, -/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, +/* 32 bit PC relative PLT address. */ + BFD_RELOC_390_PLT32, -/* bit[11:2] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, +/* Copy symbol at runtime. */ + BFD_RELOC_390_COPY, -/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, +/* Create GOT entry. */ + BFD_RELOC_390_GLOB_DAT, -/* bit[11:3] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, +/* Create PLT entry. */ + BFD_RELOC_390_JMP_SLOT, -/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, +/* Adjust by program base. */ + BFD_RELOC_390_RELATIVE, -/* bit[11:0] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, +/* 32 bit PC relative offset to GOT. */ + BFD_RELOC_390_GOTPC, -/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, +/* 16 bit GOT offset. */ + BFD_RELOC_390_GOT16, -/* bit[15:0] of byte offset to module TLS base address. */ - BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, -/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ - BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, -/* bit[31:16] of byte offset to module TLS base address. */ - BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, +/* PC relative 16 bit shifted by 1. */ + BFD_RELOC_390_PC16DBL, -/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ - BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, +/* 16 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT16DBL, -/* bit[47:32] of byte offset to module TLS base address. */ - BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* PC relative 32 bit shifted by 1. */ + BFD_RELOC_390_PC32DBL, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* 32 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT32DBL, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* 32 bit PC rel. GOT shifted by 1. */ + BFD_RELOC_390_GOTPCDBL, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* 64 bit GOT offset. */ + BFD_RELOC_390_GOT64, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12, +/* 64 bit PC relative PLT address. */ + BFD_RELOC_390_PLT64, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12, +/* 32 bit rel. offset to GOT entry. */ + BFD_RELOC_390_GOTENT, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, +/* 64 bit offset to GOT. */ + BFD_RELOC_390_GOTOFF64, -/* bit[11:1] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, +/* 12-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT12, -/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, +/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT16, -/* bit[11:2] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, +/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT32, -/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, +/* 64-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT64, -/* bit[11:3] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, +/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLTENT, -/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, +/* 16-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF16, -/* bit[11:0] of byte offset to module TLS base address, encoded in ldst -instructions. */ - BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, +/* 32-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF32, -/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, +/* 64-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF64, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, +/* s390 tls relocations. */ + BFD_RELOC_390_TLS_LOAD, + BFD_RELOC_390_TLS_GDCALL, + BFD_RELOC_390_TLS_LDCALL, + BFD_RELOC_390_TLS_GD32, + BFD_RELOC_390_TLS_GD64, + BFD_RELOC_390_TLS_GOTIE12, + BFD_RELOC_390_TLS_GOTIE32, + BFD_RELOC_390_TLS_GOTIE64, + BFD_RELOC_390_TLS_LDM32, + BFD_RELOC_390_TLS_LDM64, + BFD_RELOC_390_TLS_IE32, + BFD_RELOC_390_TLS_IE64, + BFD_RELOC_390_TLS_IEENT, + BFD_RELOC_390_TLS_LE32, + BFD_RELOC_390_TLS_LE64, + BFD_RELOC_390_TLS_LDO32, + BFD_RELOC_390_TLS_LDO64, + BFD_RELOC_390_TLS_DTPMOD, + BFD_RELOC_390_TLS_DTPOFF, + BFD_RELOC_390_TLS_TPOFF, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, +/* Long displacement extension. */ + BFD_RELOC_390_20, + BFD_RELOC_390_GOT20, + BFD_RELOC_390_GOTPLT20, + BFD_RELOC_390_TLS_GOTIE20, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, +/* STT_GNU_IFUNC relocation. */ + BFD_RELOC_390_IRELATIVE, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, +/* Score relocations +Low 16 bit for load/store */ + BFD_RELOC_SCORE_GPREL15, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, +/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_DUMMY2, + BFD_RELOC_SCORE_JMP, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, +/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BRANCH, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM30, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM32, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, +/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_JMP, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, +/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_BRANCH, -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, +/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BCMP, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_COPY, +/* Undocumented Score relocs */ + BFD_RELOC_SCORE_GOT15, + BFD_RELOC_SCORE_GOT_LO16, + BFD_RELOC_SCORE_CALL15, + BFD_RELOC_SCORE_DUMMY_HI16, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_GLOB_DAT, +/* Scenix IP2K - 9-bit register number / data address */ + BFD_RELOC_IP2K_FR9, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_JUMP_SLOT, +/* Scenix IP2K - 4-bit register/data bank number */ + BFD_RELOC_IP2K_BANK, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_RELATIVE, +/* Scenix IP2K - low 13 bits of instruction word address */ + BFD_RELOC_IP2K_ADDR16CJP, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD, +/* Scenix IP2K - high 3 bits of instruction word address */ + BFD_RELOC_IP2K_PAGE3, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL, +/* Scenix IP2K - ext/low/high 8 bits of data address */ + BFD_RELOC_IP2K_LO8DATA, + BFD_RELOC_IP2K_HI8DATA, + BFD_RELOC_IP2K_EX8DATA, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL, +/* Scenix IP2K - low/high 8 bits of instruction word address */ + BFD_RELOC_IP2K_LO8INSN, + BFD_RELOC_IP2K_HI8INSN, -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, +/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */ + BFD_RELOC_IP2K_PC_SKIP, -/* AArch64 support for STT_GNU_IFUNC. */ - BFD_RELOC_AARCH64_IRELATIVE, +/* Scenix IP2K - 16 bit word address in text section. */ + BFD_RELOC_IP2K_TEXT, -/* AArch64 pseudo relocation code to mark the end of the AArch64 -relocation enumerators that have direct mapping to ELF reloc codes. -There are a few more enumerators after this one; those are mainly -used by the AArch64 assembler for the internal fixup or to select -one of the above enumerators. */ - BFD_RELOC_AARCH64_RELOC_END, +/* Scenix IP2K - 7-bit sp or dp offset */ + BFD_RELOC_IP2K_FR_OFFSET, -/* AArch64 pseudo relocation code to be used internally by the AArch64 -assembler and not (currently) written to any object files. */ - BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP, +/* Scenix VPE4K coprocessor - data/insn-space addressing */ + BFD_RELOC_VPE4KMATH_DATA, + BFD_RELOC_VPE4KMATH_INSN, -/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the -address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ - BFD_RELOC_AARCH64_LDST_LO12, +/* These two relocations are used by the linker to determine which of +the entries in a C++ virtual function table are actually used. When +the --gc-sections option is given, the linker will zero out the entries +that are not used, so that the code for those functions need not be +included in the output. -/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be -used internally by the AArch64 assembler and not (currently) written to -any object files. */ - BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, +VTABLE_INHERIT is a zero-space relocation used to describe to the +linker the inheritance tree of a C++ virtual function table. The +relocation's symbol should be the parent class' vtable, and the +relocation should be located at the child vtable. -/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, +VTABLE_ENTRY is a zero-space relocation that describes the use of a +virtual function table entry. The reloc's symbol should refer to the +table of the class mentioned in the code. Off of that base, an offset +describes the entry that is being used. For Rela hosts, this offset +is stored in the reloc's addend. For Rel hosts, we are forced to put +this offset in the reloc's section offset. */ + BFD_RELOC_VTABLE_INHERIT, + BFD_RELOC_VTABLE_ENTRY, -/* AArch64 pseudo relocation code for TLS local exec mode. It's to be -used internally by the AArch64 assembler and not (currently) written to -any object files. */ - BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, +/* Intel IA64 Relocations. */ + BFD_RELOC_IA64_IMM14, + BFD_RELOC_IA64_IMM22, + BFD_RELOC_IA64_IMM64, + BFD_RELOC_IA64_DIR32MSB, + BFD_RELOC_IA64_DIR32LSB, + BFD_RELOC_IA64_DIR64MSB, + BFD_RELOC_IA64_DIR64LSB, + BFD_RELOC_IA64_GPREL22, + BFD_RELOC_IA64_GPREL64I, + BFD_RELOC_IA64_GPREL32MSB, + BFD_RELOC_IA64_GPREL32LSB, + BFD_RELOC_IA64_GPREL64MSB, + BFD_RELOC_IA64_GPREL64LSB, + BFD_RELOC_IA64_LTOFF22, + BFD_RELOC_IA64_LTOFF64I, + BFD_RELOC_IA64_PLTOFF22, + BFD_RELOC_IA64_PLTOFF64I, + BFD_RELOC_IA64_PLTOFF64MSB, + BFD_RELOC_IA64_PLTOFF64LSB, + BFD_RELOC_IA64_FPTR64I, + BFD_RELOC_IA64_FPTR32MSB, + BFD_RELOC_IA64_FPTR32LSB, + BFD_RELOC_IA64_FPTR64MSB, + BFD_RELOC_IA64_FPTR64LSB, + BFD_RELOC_IA64_PCREL21B, + BFD_RELOC_IA64_PCREL21BI, + BFD_RELOC_IA64_PCREL21M, + BFD_RELOC_IA64_PCREL21F, + BFD_RELOC_IA64_PCREL22, + BFD_RELOC_IA64_PCREL60B, + BFD_RELOC_IA64_PCREL64I, + BFD_RELOC_IA64_PCREL32MSB, + BFD_RELOC_IA64_PCREL32LSB, + BFD_RELOC_IA64_PCREL64MSB, + BFD_RELOC_IA64_PCREL64LSB, + BFD_RELOC_IA64_LTOFF_FPTR22, + BFD_RELOC_IA64_LTOFF_FPTR64I, + BFD_RELOC_IA64_LTOFF_FPTR32MSB, + BFD_RELOC_IA64_LTOFF_FPTR32LSB, + BFD_RELOC_IA64_LTOFF_FPTR64MSB, + BFD_RELOC_IA64_LTOFF_FPTR64LSB, + BFD_RELOC_IA64_SEGREL32MSB, + BFD_RELOC_IA64_SEGREL32LSB, + BFD_RELOC_IA64_SEGREL64MSB, + BFD_RELOC_IA64_SEGREL64LSB, + BFD_RELOC_IA64_SECREL32MSB, + BFD_RELOC_IA64_SECREL32LSB, + BFD_RELOC_IA64_SECREL64MSB, + BFD_RELOC_IA64_SECREL64LSB, + BFD_RELOC_IA64_REL32MSB, + BFD_RELOC_IA64_REL32LSB, + BFD_RELOC_IA64_REL64MSB, + BFD_RELOC_IA64_REL64LSB, + BFD_RELOC_IA64_LTV32MSB, + BFD_RELOC_IA64_LTV32LSB, + BFD_RELOC_IA64_LTV64MSB, + BFD_RELOC_IA64_LTV64LSB, + BFD_RELOC_IA64_IPLTMSB, + BFD_RELOC_IA64_IPLTLSB, + BFD_RELOC_IA64_COPY, + BFD_RELOC_IA64_LTOFF22X, + BFD_RELOC_IA64_LDXMOV, + BFD_RELOC_IA64_TPREL14, + BFD_RELOC_IA64_TPREL22, + BFD_RELOC_IA64_TPREL64I, + BFD_RELOC_IA64_TPREL64MSB, + BFD_RELOC_IA64_TPREL64LSB, + BFD_RELOC_IA64_LTOFF_TPREL22, + BFD_RELOC_IA64_DTPMOD64MSB, + BFD_RELOC_IA64_DTPMOD64LSB, + BFD_RELOC_IA64_LTOFF_DTPMOD22, + BFD_RELOC_IA64_DTPREL14, + BFD_RELOC_IA64_DTPREL22, + BFD_RELOC_IA64_DTPREL64I, + BFD_RELOC_IA64_DTPREL32MSB, + BFD_RELOC_IA64_DTPREL32LSB, + BFD_RELOC_IA64_DTPREL64MSB, + BFD_RELOC_IA64_DTPREL64LSB, + BFD_RELOC_IA64_LTOFF_DTPREL22, -/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ - BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, +/* Motorola 68HC11 reloc. +This is the 8 bit high part of an absolute address. */ + BFD_RELOC_M68HC11_HI8, -/* AArch64 pseudo relocation code to be used internally by the AArch64 -assembler and not (currently) written to any object files. */ - BFD_RELOC_AARCH64_LD_GOT_LO12_NC, +/* Motorola 68HC11 reloc. +This is the 8 bit low part of an absolute address. */ + BFD_RELOC_M68HC11_LO8, -/* AArch64 pseudo relocation code to be used internally by the AArch64 -assembler and not (currently) written to any object files. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC, +/* Motorola 68HC11 reloc. +This is the 3 bit of a value. */ + BFD_RELOC_M68HC11_3B, -/* AArch64 pseudo relocation code to be used internally by the AArch64 -assembler and not (currently) written to any object files. */ - BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC, +/* Motorola 68HC11 reloc. +This reloc marks the beginning of a jump/call instruction. +It is used for linker relaxation to correctly identify beginning +of instruction and change some branches to use PC-relative +addressing mode. */ + BFD_RELOC_M68HC11_RL_JUMP, -/* Tilera TILEPro Relocations. */ - BFD_RELOC_TILEPRO_COPY, - BFD_RELOC_TILEPRO_GLOB_DAT, - BFD_RELOC_TILEPRO_JMP_SLOT, - BFD_RELOC_TILEPRO_RELATIVE, - BFD_RELOC_TILEPRO_BROFF_X1, - BFD_RELOC_TILEPRO_JOFFLONG_X1, - BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT, - BFD_RELOC_TILEPRO_IMM8_X0, - BFD_RELOC_TILEPRO_IMM8_Y0, - BFD_RELOC_TILEPRO_IMM8_X1, - BFD_RELOC_TILEPRO_IMM8_Y1, - BFD_RELOC_TILEPRO_DEST_IMM8_X1, - BFD_RELOC_TILEPRO_MT_IMM15_X1, - BFD_RELOC_TILEPRO_MF_IMM15_X1, - BFD_RELOC_TILEPRO_IMM16_X0, - BFD_RELOC_TILEPRO_IMM16_X1, - BFD_RELOC_TILEPRO_IMM16_X0_LO, - BFD_RELOC_TILEPRO_IMM16_X1_LO, - BFD_RELOC_TILEPRO_IMM16_X0_HI, - BFD_RELOC_TILEPRO_IMM16_X1_HI, - BFD_RELOC_TILEPRO_IMM16_X0_HA, - BFD_RELOC_TILEPRO_IMM16_X1_HA, - BFD_RELOC_TILEPRO_IMM16_X0_PCREL, - BFD_RELOC_TILEPRO_IMM16_X1_PCREL, - BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL, - BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL, - BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL, - BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL, - BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL, - BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL, - BFD_RELOC_TILEPRO_IMM16_X0_GOT, - BFD_RELOC_TILEPRO_IMM16_X1_GOT, - BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO, - BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO, - BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI, - BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI, - BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA, - BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA, - BFD_RELOC_TILEPRO_MMSTART_X0, - BFD_RELOC_TILEPRO_MMEND_X0, - BFD_RELOC_TILEPRO_MMSTART_X1, - BFD_RELOC_TILEPRO_MMEND_X1, - BFD_RELOC_TILEPRO_SHAMT_X0, - BFD_RELOC_TILEPRO_SHAMT_X1, - BFD_RELOC_TILEPRO_SHAMT_Y0, - BFD_RELOC_TILEPRO_SHAMT_Y1, - BFD_RELOC_TILEPRO_TLS_GD_CALL, - BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, - BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, - BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, - BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, - BFD_RELOC_TILEPRO_TLS_IE_LOAD, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA, - BFD_RELOC_TILEPRO_TLS_DTPMOD32, - BFD_RELOC_TILEPRO_TLS_DTPOFF32, - BFD_RELOC_TILEPRO_TLS_TPOFF32, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, - BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, - BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, +/* Motorola 68HC11 reloc. +This reloc marks a group of several instructions that gcc generates +and for which the linker relaxation pass can modify and/or remove +some of them. */ + BFD_RELOC_M68HC11_RL_GROUP, -/* Tilera TILE-Gx Relocations. */ - BFD_RELOC_TILEGX_HW0, - BFD_RELOC_TILEGX_HW1, - BFD_RELOC_TILEGX_HW2, - BFD_RELOC_TILEGX_HW3, - BFD_RELOC_TILEGX_HW0_LAST, - BFD_RELOC_TILEGX_HW1_LAST, - BFD_RELOC_TILEGX_HW2_LAST, - BFD_RELOC_TILEGX_COPY, - BFD_RELOC_TILEGX_GLOB_DAT, - BFD_RELOC_TILEGX_JMP_SLOT, - BFD_RELOC_TILEGX_RELATIVE, - BFD_RELOC_TILEGX_BROFF_X1, - BFD_RELOC_TILEGX_JUMPOFF_X1, - BFD_RELOC_TILEGX_JUMPOFF_X1_PLT, - BFD_RELOC_TILEGX_IMM8_X0, - BFD_RELOC_TILEGX_IMM8_Y0, - BFD_RELOC_TILEGX_IMM8_X1, - BFD_RELOC_TILEGX_IMM8_Y1, - BFD_RELOC_TILEGX_DEST_IMM8_X1, - BFD_RELOC_TILEGX_MT_IMM14_X1, - BFD_RELOC_TILEGX_MF_IMM14_X1, - BFD_RELOC_TILEGX_MMSTART_X0, - BFD_RELOC_TILEGX_MMEND_X0, - BFD_RELOC_TILEGX_SHAMT_X0, - BFD_RELOC_TILEGX_SHAMT_X1, - BFD_RELOC_TILEGX_SHAMT_Y0, - BFD_RELOC_TILEGX_SHAMT_Y1, - BFD_RELOC_TILEGX_IMM16_X0_HW0, - BFD_RELOC_TILEGX_IMM16_X1_HW0, - BFD_RELOC_TILEGX_IMM16_X0_HW1, - BFD_RELOC_TILEGX_IMM16_X1_HW1, - BFD_RELOC_TILEGX_IMM16_X0_HW2, - BFD_RELOC_TILEGX_IMM16_X1_HW2, - BFD_RELOC_TILEGX_IMM16_X0_HW3, - BFD_RELOC_TILEGX_IMM16_X1_HW3, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST, - BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST, - BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST, - BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT, - BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT, - BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT, - BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD, - BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE, - BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, - BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, - BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, - BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE, - BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE, - BFD_RELOC_TILEGX_TLS_DTPMOD64, - BFD_RELOC_TILEGX_TLS_DTPOFF64, - BFD_RELOC_TILEGX_TLS_TPOFF64, - BFD_RELOC_TILEGX_TLS_DTPMOD32, - BFD_RELOC_TILEGX_TLS_DTPOFF32, - BFD_RELOC_TILEGX_TLS_TPOFF32, - BFD_RELOC_TILEGX_TLS_GD_CALL, - BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, - BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, - BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, - BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, - BFD_RELOC_TILEGX_TLS_IE_LOAD, - BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, - BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, - BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, - BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Motorola 68HC11 reloc. +This is the 16-bit lower part of an address. It is used for 'call' +instruction to specify the symbol address without any special +transformation (due to memory bank window). */ + BFD_RELOC_M68HC11_LO16, -/* Linux eBPF relocations. */ - BFD_RELOC_BPF_64, - BFD_RELOC_BPF_32, - BFD_RELOC_BPF_16, - BFD_RELOC_BPF_DISP16, - BFD_RELOC_BPF_DISP32, +/* Motorola 68HC11 reloc. +This is a 8-bit reloc that specifies the page number of an address. +It is used by 'call' instruction to specify the page number of +the symbol. */ + BFD_RELOC_M68HC11_PAGE, -/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ - BFD_RELOC_EPIPHANY_SIMM8, +/* Motorola 68HC11 reloc. +This is a 24-bit reloc that represents the address with a 16-bit +value and a 8-bit page number. The symbol address is transformed +to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */ + BFD_RELOC_M68HC11_24, -/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */ - BFD_RELOC_EPIPHANY_SIMM24, +/* Motorola 68HC12 reloc. +This is the 5 bits of a value. */ + BFD_RELOC_M68HC12_5B, -/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */ - BFD_RELOC_EPIPHANY_HIGH, +/* Freescale XGATE reloc. +This reloc marks the beginning of a bra/jal instruction. */ + BFD_RELOC_XGATE_RL_JUMP, -/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */ - BFD_RELOC_EPIPHANY_LOW, +/* Freescale XGATE reloc. +This reloc marks a group of several instructions that gcc generates +and for which the linker relaxation pass can modify and/or remove +some of them. */ + BFD_RELOC_XGATE_RL_GROUP, -/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */ - BFD_RELOC_EPIPHANY_SIMM11, +/* Freescale XGATE reloc. +This is the 16-bit lower part of an address. It is used for the '16-bit' +instructions. */ + BFD_RELOC_XGATE_LO16, -/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */ - BFD_RELOC_EPIPHANY_IMM11, +/* Freescale XGATE reloc. */ + BFD_RELOC_XGATE_GPAGE, -/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ - BFD_RELOC_EPIPHANY_IMM8, +/* Freescale XGATE reloc. */ + BFD_RELOC_XGATE_24, -/* Visium Relocations. */ - BFD_RELOC_VISIUM_HI16, - BFD_RELOC_VISIUM_LO16, - BFD_RELOC_VISIUM_IM16, - BFD_RELOC_VISIUM_REL16, - BFD_RELOC_VISIUM_HI16_PCREL, - BFD_RELOC_VISIUM_LO16_PCREL, - BFD_RELOC_VISIUM_IM16_PCREL, +/* Freescale XGATE reloc. +This is a 9-bit pc-relative reloc. */ + BFD_RELOC_XGATE_PCREL_9, -/* WebAssembly relocations. */ - BFD_RELOC_WASM32_LEB128, - BFD_RELOC_WASM32_LEB128_GOT, - BFD_RELOC_WASM32_LEB128_GOT_CODE, - BFD_RELOC_WASM32_LEB128_PLT, - BFD_RELOC_WASM32_PLT_INDEX, - BFD_RELOC_WASM32_ABS32_CODE, - BFD_RELOC_WASM32_COPY, - BFD_RELOC_WASM32_CODE_POINTER, - BFD_RELOC_WASM32_INDEX, - BFD_RELOC_WASM32_PLT_SIG, +/* Freescale XGATE reloc. +This is a 10-bit pc-relative reloc. */ + BFD_RELOC_XGATE_PCREL_10, -/* C-SKY relocations. */ - BFD_RELOC_CKCORE_NONE, - BFD_RELOC_CKCORE_ADDR32, - BFD_RELOC_CKCORE_PCREL_IMM8BY4, - BFD_RELOC_CKCORE_PCREL_IMM11BY2, - BFD_RELOC_CKCORE_PCREL_IMM4BY2, - BFD_RELOC_CKCORE_PCREL32, - BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2, - BFD_RELOC_CKCORE_GNU_VTINHERIT, - BFD_RELOC_CKCORE_GNU_VTENTRY, - BFD_RELOC_CKCORE_RELATIVE, - BFD_RELOC_CKCORE_COPY, - BFD_RELOC_CKCORE_GLOB_DAT, - BFD_RELOC_CKCORE_JUMP_SLOT, - BFD_RELOC_CKCORE_GOTOFF, - BFD_RELOC_CKCORE_GOTPC, - BFD_RELOC_CKCORE_GOT32, - BFD_RELOC_CKCORE_PLT32, - BFD_RELOC_CKCORE_ADDRGOT, - BFD_RELOC_CKCORE_ADDRPLT, - BFD_RELOC_CKCORE_PCREL_IMM26BY2, - BFD_RELOC_CKCORE_PCREL_IMM16BY2, - BFD_RELOC_CKCORE_PCREL_IMM16BY4, - BFD_RELOC_CKCORE_PCREL_IMM10BY2, - BFD_RELOC_CKCORE_PCREL_IMM10BY4, - BFD_RELOC_CKCORE_ADDR_HI16, - BFD_RELOC_CKCORE_ADDR_LO16, - BFD_RELOC_CKCORE_GOTPC_HI16, - BFD_RELOC_CKCORE_GOTPC_LO16, - BFD_RELOC_CKCORE_GOTOFF_HI16, - BFD_RELOC_CKCORE_GOTOFF_LO16, - BFD_RELOC_CKCORE_GOT12, - BFD_RELOC_CKCORE_GOT_HI16, - BFD_RELOC_CKCORE_GOT_LO16, - BFD_RELOC_CKCORE_PLT12, - BFD_RELOC_CKCORE_PLT_HI16, - BFD_RELOC_CKCORE_PLT_LO16, - BFD_RELOC_CKCORE_ADDRGOT_HI16, - BFD_RELOC_CKCORE_ADDRGOT_LO16, - BFD_RELOC_CKCORE_ADDRPLT_HI16, - BFD_RELOC_CKCORE_ADDRPLT_LO16, - BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2, - BFD_RELOC_CKCORE_TOFFSET_LO16, - BFD_RELOC_CKCORE_DOFFSET_LO16, - BFD_RELOC_CKCORE_PCREL_IMM18BY2, - BFD_RELOC_CKCORE_DOFFSET_IMM18, - BFD_RELOC_CKCORE_DOFFSET_IMM18BY2, - BFD_RELOC_CKCORE_DOFFSET_IMM18BY4, - BFD_RELOC_CKCORE_GOTOFF_IMM18, - BFD_RELOC_CKCORE_GOT_IMM18BY4, - BFD_RELOC_CKCORE_PLT_IMM18BY4, - BFD_RELOC_CKCORE_PCREL_IMM7BY4, - BFD_RELOC_CKCORE_TLS_LE32, - BFD_RELOC_CKCORE_TLS_IE32, - BFD_RELOC_CKCORE_TLS_GD32, - BFD_RELOC_CKCORE_TLS_LDM32, - BFD_RELOC_CKCORE_TLS_LDO32, - BFD_RELOC_CKCORE_TLS_DTPMOD32, - BFD_RELOC_CKCORE_TLS_DTPOFF32, - BFD_RELOC_CKCORE_TLS_TPOFF32, - BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4, - BFD_RELOC_CKCORE_NOJSRI, - BFD_RELOC_CKCORE_CALLGRAPH, - BFD_RELOC_CKCORE_IRELATIVE, - BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4, - BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4, +/* Freescale XGATE reloc. +This is the 16-bit lower part of an address. It is used for the '16-bit' +instructions. */ + BFD_RELOC_XGATE_IMM8_LO, -/* S12Z relocations. */ - BFD_RELOC_S12Z_OPR, +/* Freescale XGATE reloc. +This is the 16-bit higher part of an address. It is used for the '16-bit' +instructions. */ + BFD_RELOC_XGATE_IMM8_HI, -/* LARCH relocations. */ - BFD_RELOC_LARCH_TLS_DTPMOD32, - BFD_RELOC_LARCH_TLS_DTPREL32, - BFD_RELOC_LARCH_TLS_DTPMOD64, - BFD_RELOC_LARCH_TLS_DTPREL64, - BFD_RELOC_LARCH_TLS_TPREL32, - BFD_RELOC_LARCH_TLS_TPREL64, - BFD_RELOC_LARCH_MARK_LA, - BFD_RELOC_LARCH_MARK_PCREL, - BFD_RELOC_LARCH_SOP_PUSH_PCREL, - BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE, - BFD_RELOC_LARCH_SOP_PUSH_DUP, - BFD_RELOC_LARCH_SOP_PUSH_GPREL, - BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL, - BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT, - BFD_RELOC_LARCH_SOP_PUSH_TLS_GD, - BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL, - BFD_RELOC_LARCH_SOP_ASSERT, - BFD_RELOC_LARCH_SOP_NOT, - BFD_RELOC_LARCH_SOP_SUB, - BFD_RELOC_LARCH_SOP_SL, - BFD_RELOC_LARCH_SOP_SR, - BFD_RELOC_LARCH_SOP_ADD, - BFD_RELOC_LARCH_SOP_AND, - BFD_RELOC_LARCH_SOP_IF_ELSE, - BFD_RELOC_LARCH_SOP_POP_32_S_10_5, - BFD_RELOC_LARCH_SOP_POP_32_U_10_12, - BFD_RELOC_LARCH_SOP_POP_32_S_10_12, - BFD_RELOC_LARCH_SOP_POP_32_S_10_16, - BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2, - BFD_RELOC_LARCH_SOP_POP_32_S_5_20, - BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2, - BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2, - BFD_RELOC_LARCH_SOP_POP_32_U, - BFD_RELOC_LARCH_ADD8, - BFD_RELOC_LARCH_ADD16, - BFD_RELOC_LARCH_ADD24, - BFD_RELOC_LARCH_ADD32, - BFD_RELOC_LARCH_ADD64, - BFD_RELOC_LARCH_SUB8, - BFD_RELOC_LARCH_SUB16, - BFD_RELOC_LARCH_SUB24, - BFD_RELOC_LARCH_SUB32, - BFD_RELOC_LARCH_SUB64, - BFD_RELOC_LARCH_B16, - BFD_RELOC_LARCH_B21, - BFD_RELOC_LARCH_B26, - BFD_RELOC_LARCH_ABS_HI20, - BFD_RELOC_LARCH_ABS_LO12, - BFD_RELOC_LARCH_ABS64_LO20, - BFD_RELOC_LARCH_ABS64_HI12, - BFD_RELOC_LARCH_PCALA_HI20, - BFD_RELOC_LARCH_PCALA_LO12, - BFD_RELOC_LARCH_PCALA64_LO20, - BFD_RELOC_LARCH_PCALA64_HI12, - BFD_RELOC_LARCH_GOT_PC_HI20, - BFD_RELOC_LARCH_GOT_PC_LO12, - BFD_RELOC_LARCH_GOT64_PC_LO20, - BFD_RELOC_LARCH_GOT64_PC_HI12, - BFD_RELOC_LARCH_GOT_HI20, - BFD_RELOC_LARCH_GOT_LO12, - BFD_RELOC_LARCH_GOT64_LO20, - BFD_RELOC_LARCH_GOT64_HI12, - BFD_RELOC_LARCH_TLS_LE_HI20, - BFD_RELOC_LARCH_TLS_LE_LO12, - BFD_RELOC_LARCH_TLS_LE64_LO20, - BFD_RELOC_LARCH_TLS_LE64_HI12, - BFD_RELOC_LARCH_TLS_IE_PC_HI20, - BFD_RELOC_LARCH_TLS_IE_PC_LO12, - BFD_RELOC_LARCH_TLS_IE64_PC_LO20, - BFD_RELOC_LARCH_TLS_IE64_PC_HI12, - BFD_RELOC_LARCH_TLS_IE_HI20, - BFD_RELOC_LARCH_TLS_IE_LO12, - BFD_RELOC_LARCH_TLS_IE64_LO20, - BFD_RELOC_LARCH_TLS_IE64_HI12, - BFD_RELOC_LARCH_TLS_LD_PC_HI20, - BFD_RELOC_LARCH_TLS_LD_HI20, - BFD_RELOC_LARCH_TLS_GD_PC_HI20, - BFD_RELOC_LARCH_TLS_GD_HI20, - BFD_RELOC_LARCH_32_PCREL, - BFD_RELOC_LARCH_RELAX, - BFD_RELOC_UNUSED }; +/* Freescale XGATE reloc. +This is a 3-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM3, -typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; -reloc_howto_type *bfd_reloc_type_lookup - (bfd *abfd, bfd_reloc_code_real_type code); -reloc_howto_type *bfd_reloc_name_lookup - (bfd *abfd, const char *reloc_name); +/* Freescale XGATE reloc. +This is a 4-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM4, -const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); +/* Freescale XGATE reloc. +This is a 5-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM5, -/* Extracted from syms.c. */ +/* Motorola 68HC12 reloc. +This is the 9 bits of a value. */ + BFD_RELOC_M68HC12_9B, -typedef struct bfd_symbol -{ - /* A pointer to the BFD which owns the symbol. This information - is necessary so that a back end can work out what additional - information (invisible to the application writer) is carried - with the symbol. +/* Motorola 68HC12 reloc. +This is the 16 bits of a value. */ + BFD_RELOC_M68HC12_16B, - This field is *almost* redundant, since you can use section->owner - instead, except that some symbols point to the global sections - bfd_{abs,com,und}_section. This could be fixed by making - these globals be per-bfd (or per-target-flavor). FIXME. */ - struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ +/* Motorola 68HC12/XGATE reloc. +This is a PCREL9 branch. */ + BFD_RELOC_M68HC12_9_PCREL, - /* The text of the symbol. The name is left alone, and not copied; the - application may not alter it. */ - const char *name; +/* Motorola 68HC12/XGATE reloc. +This is a PCREL10 branch. */ + BFD_RELOC_M68HC12_10_PCREL, - /* The value of the symbol. This really should be a union of a - numeric value with a pointer, since some flags indicate that - a pointer to another symbol is stored here. */ - symvalue value; +/* Motorola 68HC12/XGATE reloc. +This is the 8 bit low part of an absolute address and immediately precedes +a matching HI8XG part. */ + BFD_RELOC_M68HC12_LO8XG, - /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0 +/* Motorola 68HC12/XGATE reloc. +This is the 8 bit high part of an absolute address and immediately follows +a matching LO8XG part. */ + BFD_RELOC_M68HC12_HI8XG, - /* The symbol has local scope; <> in <>. The value - is the offset into the section of the data. */ -#define BSF_LOCAL (1 << 0) +/* Freescale S12Z reloc. +This is a 15 bit relative address. If the most significant bits are all zero +then it may be truncated to 8 bits. */ + BFD_RELOC_S12Z_15_PCREL, - /* The symbol has global scope; initialized data in <>. The - value is the offset into the section of the data. */ -#define BSF_GLOBAL (1 << 1) +/* NS CR16 Relocations. */ + BFD_RELOC_CR16_NUM8, + BFD_RELOC_CR16_NUM16, + BFD_RELOC_CR16_NUM32, + BFD_RELOC_CR16_NUM32a, + BFD_RELOC_CR16_REGREL0, + BFD_RELOC_CR16_REGREL4, + BFD_RELOC_CR16_REGREL4a, + BFD_RELOC_CR16_REGREL14, + BFD_RELOC_CR16_REGREL14a, + BFD_RELOC_CR16_REGREL16, + BFD_RELOC_CR16_REGREL20, + BFD_RELOC_CR16_REGREL20a, + BFD_RELOC_CR16_ABS20, + BFD_RELOC_CR16_ABS24, + BFD_RELOC_CR16_IMM4, + BFD_RELOC_CR16_IMM8, + BFD_RELOC_CR16_IMM16, + BFD_RELOC_CR16_IMM20, + BFD_RELOC_CR16_IMM24, + BFD_RELOC_CR16_IMM32, + BFD_RELOC_CR16_IMM32a, + BFD_RELOC_CR16_DISP4, + BFD_RELOC_CR16_DISP8, + BFD_RELOC_CR16_DISP16, + BFD_RELOC_CR16_DISP20, + BFD_RELOC_CR16_DISP24, + BFD_RELOC_CR16_DISP24a, + BFD_RELOC_CR16_SWITCH8, + BFD_RELOC_CR16_SWITCH16, + BFD_RELOC_CR16_SWITCH32, + BFD_RELOC_CR16_GOT_REGREL20, + BFD_RELOC_CR16_GOTC_REGREL20, + BFD_RELOC_CR16_GLOB_DAT, - /* The symbol has global scope and is exported. The value is - the offset into the section of the data. */ -#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ +/* NS CRX Relocations. */ + BFD_RELOC_CRX_REL4, + BFD_RELOC_CRX_REL8, + BFD_RELOC_CRX_REL8_CMP, + BFD_RELOC_CRX_REL16, + BFD_RELOC_CRX_REL24, + BFD_RELOC_CRX_REL32, + BFD_RELOC_CRX_REGREL12, + BFD_RELOC_CRX_REGREL22, + BFD_RELOC_CRX_REGREL28, + BFD_RELOC_CRX_REGREL32, + BFD_RELOC_CRX_ABS16, + BFD_RELOC_CRX_ABS32, + BFD_RELOC_CRX_NUM8, + BFD_RELOC_CRX_NUM16, + BFD_RELOC_CRX_NUM32, + BFD_RELOC_CRX_IMM16, + BFD_RELOC_CRX_IMM32, + BFD_RELOC_CRX_SWITCH8, + BFD_RELOC_CRX_SWITCH16, + BFD_RELOC_CRX_SWITCH32, + +/* These relocs are only used within the CRIS assembler. They are not +(at present) written to any object files. */ + BFD_RELOC_CRIS_BDISP8, + BFD_RELOC_CRIS_UNSIGNED_5, + BFD_RELOC_CRIS_SIGNED_6, + BFD_RELOC_CRIS_UNSIGNED_6, + BFD_RELOC_CRIS_SIGNED_8, + BFD_RELOC_CRIS_UNSIGNED_8, + BFD_RELOC_CRIS_SIGNED_16, + BFD_RELOC_CRIS_UNSIGNED_16, + BFD_RELOC_CRIS_LAPCQ_OFFSET, + BFD_RELOC_CRIS_UNSIGNED_4, + +/* Relocs used in ELF shared libraries for CRIS. */ + BFD_RELOC_CRIS_COPY, + BFD_RELOC_CRIS_GLOB_DAT, + BFD_RELOC_CRIS_JUMP_SLOT, + BFD_RELOC_CRIS_RELATIVE, + +/* 32-bit offset to symbol-entry within GOT. */ + BFD_RELOC_CRIS_32_GOT, + +/* 16-bit offset to symbol-entry within GOT. */ + BFD_RELOC_CRIS_16_GOT, + +/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_CRIS_32_GOTPLT, + +/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_CRIS_16_GOTPLT, + +/* 32-bit offset to symbol, relative to GOT. */ + BFD_RELOC_CRIS_32_GOTREL, + +/* 32-bit offset to symbol with PLT entry, relative to GOT. */ + BFD_RELOC_CRIS_32_PLT_GOTREL, + +/* 32-bit offset to symbol with PLT entry, relative to this relocation. */ + BFD_RELOC_CRIS_32_PLT_PCREL, + +/* Relocs used in TLS code for CRIS. */ + BFD_RELOC_CRIS_32_GOT_GD, + BFD_RELOC_CRIS_16_GOT_GD, + BFD_RELOC_CRIS_32_GD, + BFD_RELOC_CRIS_DTP, + BFD_RELOC_CRIS_32_DTPREL, + BFD_RELOC_CRIS_16_DTPREL, + BFD_RELOC_CRIS_32_GOT_TPREL, + BFD_RELOC_CRIS_16_GOT_TPREL, + BFD_RELOC_CRIS_32_TPREL, + BFD_RELOC_CRIS_16_TPREL, + BFD_RELOC_CRIS_DTPMOD, + BFD_RELOC_CRIS_32_IE, - /* A normal C symbol would be one of: - <>, <> or <>. */ +/* OpenRISC 1000 Relocations. */ + BFD_RELOC_OR1K_REL_26, + BFD_RELOC_OR1K_SLO16, + BFD_RELOC_OR1K_PCREL_PG21, + BFD_RELOC_OR1K_LO13, + BFD_RELOC_OR1K_SLO13, + BFD_RELOC_OR1K_GOTPC_HI16, + BFD_RELOC_OR1K_GOTPC_LO16, + BFD_RELOC_OR1K_GOT_AHI16, + BFD_RELOC_OR1K_GOT16, + BFD_RELOC_OR1K_GOT_PG21, + BFD_RELOC_OR1K_GOT_LO13, + BFD_RELOC_OR1K_PLT26, + BFD_RELOC_OR1K_PLTA26, + BFD_RELOC_OR1K_GOTOFF_SLO16, + BFD_RELOC_OR1K_COPY, + BFD_RELOC_OR1K_GLOB_DAT, + BFD_RELOC_OR1K_JMP_SLOT, + BFD_RELOC_OR1K_RELATIVE, + BFD_RELOC_OR1K_TLS_GD_HI16, + BFD_RELOC_OR1K_TLS_GD_LO16, + BFD_RELOC_OR1K_TLS_GD_PG21, + BFD_RELOC_OR1K_TLS_GD_LO13, + BFD_RELOC_OR1K_TLS_LDM_HI16, + BFD_RELOC_OR1K_TLS_LDM_LO16, + BFD_RELOC_OR1K_TLS_LDM_PG21, + BFD_RELOC_OR1K_TLS_LDM_LO13, + BFD_RELOC_OR1K_TLS_LDO_HI16, + BFD_RELOC_OR1K_TLS_LDO_LO16, + BFD_RELOC_OR1K_TLS_IE_HI16, + BFD_RELOC_OR1K_TLS_IE_AHI16, + BFD_RELOC_OR1K_TLS_IE_LO16, + BFD_RELOC_OR1K_TLS_IE_PG21, + BFD_RELOC_OR1K_TLS_IE_LO13, + BFD_RELOC_OR1K_TLS_LE_HI16, + BFD_RELOC_OR1K_TLS_LE_AHI16, + BFD_RELOC_OR1K_TLS_LE_LO16, + BFD_RELOC_OR1K_TLS_LE_SLO16, + BFD_RELOC_OR1K_TLS_TPOFF, + BFD_RELOC_OR1K_TLS_DTPOFF, + BFD_RELOC_OR1K_TLS_DTPMOD, - /* The symbol is a debugging record. The value has an arbitrary - meaning, unless BSF_DEBUGGING_RELOC is also set. */ -#define BSF_DEBUGGING (1 << 2) +/* H8 elf Relocations. */ + BFD_RELOC_H8_DIR16A8, + BFD_RELOC_H8_DIR16R8, + BFD_RELOC_H8_DIR24A8, + BFD_RELOC_H8_DIR24R8, + BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, - /* The symbol denotes a function entry point. Used in ELF, - perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +/* Sony Xstormy16 Relocations. */ + BFD_RELOC_XSTORMY16_REL_12, + BFD_RELOC_XSTORMY16_12, + BFD_RELOC_XSTORMY16_24, + BFD_RELOC_XSTORMY16_FPTR16, - /* Used by the linker. */ -#define BSF_KEEP (1 << 5) +/* Self-describing complex relocations. */ + BFD_RELOC_RELC, - /* An ELF common symbol. */ -#define BSF_ELF_COMMON (1 << 6) - /* A weak global symbol, overridable without warnings by - a regular global symbol of the same name. */ -#define BSF_WEAK (1 << 7) +/* Relocations used by VAX ELF. */ + BFD_RELOC_VAX_GLOB_DAT, + BFD_RELOC_VAX_JMP_SLOT, + BFD_RELOC_VAX_RELATIVE, - /* This symbol was created to point to a section, e.g. ELF's - STT_SECTION symbols. */ -#define BSF_SECTION_SYM (1 << 8) +/* Morpho MT - 16 bit immediate relocation. */ + BFD_RELOC_MT_PC16, - /* The symbol used to be a common symbol, but now it is - allocated. */ -#define BSF_OLD_COMMON (1 << 9) +/* Morpho MT - Hi 16 bits of an address. */ + BFD_RELOC_MT_HI16, - /* In some files the type of a symbol sometimes alters its - location in an output file - ie in coff a <> symbol - which is also <> symbol appears where it was - declared and not at the end of a section. This bit is set - by the target BFD part to convey this information. */ -#define BSF_NOT_AT_END (1 << 10) +/* Morpho MT - Low 16 bits of an address. */ + BFD_RELOC_MT_LO16, - /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTINHERIT, - /* Signal that the symbol is a warning symbol. The name is a - warning. The name of the next symbol is the one to warn about; - if a reference is made to a symbol with the same name as the next - symbol, a warning is issued by the linker. */ -#define BSF_WARNING (1 << 12) +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTENTRY, - /* Signal that the symbol is indirect. This symbol is an indirect - pointer to the symbol with the same name as the next symbol. */ -#define BSF_INDIRECT (1 << 13) +/* Morpho MT - 8 bit immediate relocation. */ + BFD_RELOC_MT_PCINSN8, - /* BSF_FILE marks symbols that contain a file name. This is used - for ELF STT_FILE symbols. */ -#define BSF_FILE (1 << 14) +/* msp430 specific relocation codes */ + BFD_RELOC_MSP430_10_PCREL, + BFD_RELOC_MSP430_16_PCREL, + BFD_RELOC_MSP430_16, + BFD_RELOC_MSP430_16_PCREL_BYTE, + BFD_RELOC_MSP430_16_BYTE, + BFD_RELOC_MSP430_2X_PCREL, + BFD_RELOC_MSP430_RL_PCREL, + BFD_RELOC_MSP430_ABS8, + BFD_RELOC_MSP430X_PCR20_EXT_SRC, + BFD_RELOC_MSP430X_PCR20_EXT_DST, + BFD_RELOC_MSP430X_PCR20_EXT_ODST, + BFD_RELOC_MSP430X_ABS20_EXT_SRC, + BFD_RELOC_MSP430X_ABS20_EXT_DST, + BFD_RELOC_MSP430X_ABS20_EXT_ODST, + BFD_RELOC_MSP430X_ABS20_ADR_SRC, + BFD_RELOC_MSP430X_ABS20_ADR_DST, + BFD_RELOC_MSP430X_PCR16, + BFD_RELOC_MSP430X_PCR20_CALL, + BFD_RELOC_MSP430X_ABS16, + BFD_RELOC_MSP430_ABS_HI16, + BFD_RELOC_MSP430_PREL31, + BFD_RELOC_MSP430_SYM_DIFF, + BFD_RELOC_MSP430_SET_ULEB128, + BFD_RELOC_MSP430_SUB_ULEB128, - /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +/* Relocations used by the Altera Nios II core. */ + BFD_RELOC_NIOS2_S16, + BFD_RELOC_NIOS2_U16, + BFD_RELOC_NIOS2_CALL26, + BFD_RELOC_NIOS2_IMM5, + BFD_RELOC_NIOS2_CACHE_OPX, + BFD_RELOC_NIOS2_IMM6, + BFD_RELOC_NIOS2_IMM8, + BFD_RELOC_NIOS2_HI16, + BFD_RELOC_NIOS2_LO16, + BFD_RELOC_NIOS2_HIADJ16, + BFD_RELOC_NIOS2_GPREL, + BFD_RELOC_NIOS2_UJMP, + BFD_RELOC_NIOS2_CJMP, + BFD_RELOC_NIOS2_CALLR, + BFD_RELOC_NIOS2_ALIGN, + BFD_RELOC_NIOS2_GOT16, + BFD_RELOC_NIOS2_CALL16, + BFD_RELOC_NIOS2_GOTOFF_LO, + BFD_RELOC_NIOS2_GOTOFF_HA, + BFD_RELOC_NIOS2_PCREL_LO, + BFD_RELOC_NIOS2_PCREL_HA, + BFD_RELOC_NIOS2_TLS_GD16, + BFD_RELOC_NIOS2_TLS_LDM16, + BFD_RELOC_NIOS2_TLS_LDO16, + BFD_RELOC_NIOS2_TLS_IE16, + BFD_RELOC_NIOS2_TLS_LE16, + BFD_RELOC_NIOS2_TLS_DTPMOD, + BFD_RELOC_NIOS2_TLS_DTPREL, + BFD_RELOC_NIOS2_TLS_TPREL, + BFD_RELOC_NIOS2_COPY, + BFD_RELOC_NIOS2_GLOB_DAT, + BFD_RELOC_NIOS2_JUMP_SLOT, + BFD_RELOC_NIOS2_RELATIVE, + BFD_RELOC_NIOS2_GOTOFF, + BFD_RELOC_NIOS2_CALL26_NOAT, + BFD_RELOC_NIOS2_GOT_LO, + BFD_RELOC_NIOS2_GOT_HA, + BFD_RELOC_NIOS2_CALL_LO, + BFD_RELOC_NIOS2_CALL_HA, + BFD_RELOC_NIOS2_R2_S12, + BFD_RELOC_NIOS2_R2_I10_1_PCREL, + BFD_RELOC_NIOS2_R2_T1I7_1_PCREL, + BFD_RELOC_NIOS2_R2_T1I7_2, + BFD_RELOC_NIOS2_R2_T2I4, + BFD_RELOC_NIOS2_R2_T2I4_1, + BFD_RELOC_NIOS2_R2_T2I4_2, + BFD_RELOC_NIOS2_R2_X1I7_2, + BFD_RELOC_NIOS2_R2_X2L5, + BFD_RELOC_NIOS2_R2_F1I5_2, + BFD_RELOC_NIOS2_R2_L5I4X1, + BFD_RELOC_NIOS2_R2_T1X1I6, + BFD_RELOC_NIOS2_R2_T1X1I6_2, - /* The symbol denotes a data object. Used in ELF, and perhaps - others someday. */ -#define BSF_OBJECT (1 << 16) +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, - /* This symbol is a debugging symbol. The value is the offset - into the section of the data. BSF_DEBUGGING should be set - as well. */ -#define BSF_DEBUGGING_RELOC (1 << 17) +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, - /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +/* PRU relocation for two consecutive LDI load instructions that load a +32 bit value into a register. If the higher bits are all zero, then +the second instruction may be relaxed. */ + BFD_RELOC_PRU_LDI32, - /* This symbol represents a complex relocation expression, - with the expression tree serialized in the symbol name. */ -#define BSF_RELC (1 << 19) +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, - /* This symbol represents a signed complex relocation expression, - with the expression tree serialized in the symbol name. */ -#define BSF_SRELC (1 << 20) +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, - /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +/* PRU Program Memory relocations. Used to convert from byte addressing to +32-bit word addressing. */ + BFD_RELOC_PRU_32_PMEM, + BFD_RELOC_PRU_16_PMEM, - /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT. - The dynamic linker will compute the value of this symbol by - calling the function that it points to. BSF_FUNCTION must - also be also set. */ -#define BSF_GNU_INDIRECT_FUNCTION (1 << 22) - /* This symbol is a globally unique data object. The dynamic linker - will make sure that in the entire process there is just one symbol - with this name and type in use. BSF_OBJECT must also be set. */ -#define BSF_GNU_UNIQUE (1 << 23) +/* PRU relocations to mark the difference of two local symbols. +These are only needed to support linker relaxation and can be ignored +when not relaxing. The field is set to the value of the difference +assuming no relaxation. The relocation encodes the position of the +second symbol so the linker can determine whether to adjust the field +value. The PMEM variants encode the word difference, instead of byte +difference between symbols. */ + BFD_RELOC_PRU_GNU_DIFF8, + BFD_RELOC_PRU_GNU_DIFF16, + BFD_RELOC_PRU_GNU_DIFF32, + BFD_RELOC_PRU_GNU_DIFF16_PMEM, + BFD_RELOC_PRU_GNU_DIFF32_PMEM, - /* This section symbol should be included in the symbol table. */ -#define BSF_SECTION_SYM_USED (1 << 24) +/* IQ2000 Relocations. */ + BFD_RELOC_IQ2000_OFFSET_16, + BFD_RELOC_IQ2000_OFFSET_21, + BFD_RELOC_IQ2000_UHI16, - flagword flags; +/* Special Xtensa relocation used only by PLT entries in ELF shared +objects to indicate that the runtime linker should set the value +to one of its own internal functions or data structures. */ + BFD_RELOC_XTENSA_RTLD, - /* A pointer to the section to which this symbol is - relative. This will always be non NULL, there are special - sections for undefined and absolute symbols. */ - struct bfd_section *section; +/* Xtensa relocations for ELF shared objects. */ + BFD_RELOC_XTENSA_GLOB_DAT, + BFD_RELOC_XTENSA_JMP_SLOT, + BFD_RELOC_XTENSA_RELATIVE, - /* Back end special data. */ - union - { - void *p; - bfd_vma i; - } - udata; -} -asymbol; +/* Xtensa relocation used in ELF object files for symbols that may require +PLT entries. Otherwise, this is just a generic 32-bit relocation. */ + BFD_RELOC_XTENSA_PLT, -#define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) +/* Xtensa relocations for backward compatibility. These have been replaced +by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF. +Xtensa relocations to mark the difference of two local symbols. +These are only needed to support linker relaxation and can be ignored +when not relaxing. The field is set to the value of the difference +assuming no relaxation. The relocation encodes the position of the +first symbol so the linker can determine whether to adjust the field +value. */ + BFD_RELOC_XTENSA_DIFF8, + BFD_RELOC_XTENSA_DIFF16, + BFD_RELOC_XTENSA_DIFF32, -bool bfd_is_local_label (bfd *abfd, asymbol *sym); +/* Generic Xtensa relocations for instruction operands. Only the slot +number is encoded in the relocation. The relocation applies to the +last PC-relative immediate operand, or if there are no PC-relative +immediates, to the last immediate operand. */ + BFD_RELOC_XTENSA_SLOT0_OP, + BFD_RELOC_XTENSA_SLOT1_OP, + BFD_RELOC_XTENSA_SLOT2_OP, + BFD_RELOC_XTENSA_SLOT3_OP, + BFD_RELOC_XTENSA_SLOT4_OP, + BFD_RELOC_XTENSA_SLOT5_OP, + BFD_RELOC_XTENSA_SLOT6_OP, + BFD_RELOC_XTENSA_SLOT7_OP, + BFD_RELOC_XTENSA_SLOT8_OP, + BFD_RELOC_XTENSA_SLOT9_OP, + BFD_RELOC_XTENSA_SLOT10_OP, + BFD_RELOC_XTENSA_SLOT11_OP, + BFD_RELOC_XTENSA_SLOT12_OP, + BFD_RELOC_XTENSA_SLOT13_OP, + BFD_RELOC_XTENSA_SLOT14_OP, -bool bfd_is_local_label_name (bfd *abfd, const char *name); +/* Alternate Xtensa relocations. Only the slot is encoded in the +relocation. The meaning of these relocations is opcode-specific. */ + BFD_RELOC_XTENSA_SLOT0_ALT, + BFD_RELOC_XTENSA_SLOT1_ALT, + BFD_RELOC_XTENSA_SLOT2_ALT, + BFD_RELOC_XTENSA_SLOT3_ALT, + BFD_RELOC_XTENSA_SLOT4_ALT, + BFD_RELOC_XTENSA_SLOT5_ALT, + BFD_RELOC_XTENSA_SLOT6_ALT, + BFD_RELOC_XTENSA_SLOT7_ALT, + BFD_RELOC_XTENSA_SLOT8_ALT, + BFD_RELOC_XTENSA_SLOT9_ALT, + BFD_RELOC_XTENSA_SLOT10_ALT, + BFD_RELOC_XTENSA_SLOT11_ALT, + BFD_RELOC_XTENSA_SLOT12_ALT, + BFD_RELOC_XTENSA_SLOT13_ALT, + BFD_RELOC_XTENSA_SLOT14_ALT, -#define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) +/* Xtensa relocations for backward compatibility. These have all been +replaced by BFD_RELOC_XTENSA_SLOT0_OP. */ + BFD_RELOC_XTENSA_OP0, + BFD_RELOC_XTENSA_OP1, + BFD_RELOC_XTENSA_OP2, -bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); +/* Xtensa relocation to mark that the assembler expanded the +instructions from an original target. The expansion size is +encoded in the reloc size. */ + BFD_RELOC_XTENSA_ASM_EXPAND, -#define bfd_is_target_special_symbol(abfd, sym) \ - BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) +/* Xtensa relocation to mark that the linker should simplify +assembler-expanded instructions. This is commonly used +internally by the linker after analysis of a +BFD_RELOC_XTENSA_ASM_EXPAND. */ + BFD_RELOC_XTENSA_ASM_SIMPLIFY, -#define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) +/* Xtensa TLS relocations. */ + BFD_RELOC_XTENSA_TLSDESC_FN, + BFD_RELOC_XTENSA_TLSDESC_ARG, + BFD_RELOC_XTENSA_TLS_DTPOFF, + BFD_RELOC_XTENSA_TLS_TPOFF, + BFD_RELOC_XTENSA_TLS_FUNC, + BFD_RELOC_XTENSA_TLS_ARG, + BFD_RELOC_XTENSA_TLS_CALL, -bool bfd_set_symtab - (bfd *abfd, asymbol **location, unsigned int count); +/* Xtensa relocations to mark the difference of two local symbols. +These are only needed to support linker relaxation and can be ignored +when not relaxing. The field is set to the value of the difference +assuming no relaxation. The relocation encodes the position of the +subtracted symbol so the linker can determine whether to adjust the field +value. PDIFF relocations are used for positive differences, NDIFF +relocations are used for negative differences. The difference value +is treated as unsigned with these relocation types, giving full +8/16 value ranges. */ + BFD_RELOC_XTENSA_PDIFF8, + BFD_RELOC_XTENSA_PDIFF16, + BFD_RELOC_XTENSA_PDIFF32, + BFD_RELOC_XTENSA_NDIFF8, + BFD_RELOC_XTENSA_NDIFF16, + BFD_RELOC_XTENSA_NDIFF32, -void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); +/* 8 bit signed offset in (ix+d) or (iy+d). */ + BFD_RELOC_Z80_DISP8, -#define bfd_make_empty_symbol(abfd) \ - BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, -asymbol *_bfd_generic_make_empty_symbol (bfd *); +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, -#define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, -int bfd_decode_symclass (asymbol *symbol); +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, -bool bfd_is_undefined_symclass (int symclass); +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, -void bfd_symbol_info (asymbol *symbol, symbol_info *ret); +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, -bool bfd_copy_private_symbol_data - (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); +/* Like BFD_RELOC_16 but big-endian. */ + BFD_RELOC_Z80_16_BE, -#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ - BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ - (ibfd, isymbol, obfd, osymbol)) +/* DJNZ offset. */ + BFD_RELOC_Z8K_DISP7, -/* Extracted from bfd.c. */ +/* CALR offset. */ + BFD_RELOC_Z8K_CALLR, -enum bfd_direction - { - no_direction = 0, - read_direction = 1, - write_direction = 2, - both_direction = 3 - }; +/* 4 bit value. */ + BFD_RELOC_Z8K_IMM4L, -enum bfd_plugin_format - { - bfd_plugin_unknown = 0, - bfd_plugin_yes = 1, - bfd_plugin_no = 2 - }; +/* Lattice Mico32 relocations. */ + BFD_RELOC_LM32_CALL, + BFD_RELOC_LM32_BRANCH, + BFD_RELOC_LM32_16_GOT, + BFD_RELOC_LM32_GOTOFF_HI16, + BFD_RELOC_LM32_GOTOFF_LO16, + BFD_RELOC_LM32_COPY, + BFD_RELOC_LM32_GLOB_DAT, + BFD_RELOC_LM32_JMP_SLOT, + BFD_RELOC_LM32_RELATIVE, -struct bfd_build_id - { - bfd_size_type size; - bfd_byte data[1]; - }; +/* Difference between two section addreses. Must be followed by a +BFD_RELOC_MACH_O_PAIR. */ + BFD_RELOC_MACH_O_SECTDIFF, -struct bfd -{ - /* The filename the application opened the BFD with. */ - const char *filename; +/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */ + BFD_RELOC_MACH_O_LOCAL_SECTDIFF, - /* A pointer to the target jump table. */ - const struct bfd_target *xvec; +/* Pair of relocation. Contains the first symbol. */ + BFD_RELOC_MACH_O_PAIR, - /* The IOSTREAM, and corresponding IO vector that provide access - to the file backing the BFD. */ - void *iostream; - const struct bfd_iovec *iovec; +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, - /* The caching routines use these to maintain a - least-recently-used list of BFDs. */ - struct bfd *lru_prev, *lru_next; +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, - /* Track current file position (or current buffer offset for - in-memory BFDs). When a file is closed by the caching routines, - BFD retains state information on the file here. */ - ufile_ptr where; +/* PCREL relocations. They are marked as branch to create PLT entry if +required. */ + BFD_RELOC_MACH_O_X86_64_BRANCH32, + BFD_RELOC_MACH_O_X86_64_BRANCH8, - /* File modified time, if mtime_set is TRUE. */ - long mtime; +/* Used when referencing a GOT entry. */ + BFD_RELOC_MACH_O_X86_64_GOT, - /* A unique identifier of the BFD */ - unsigned int id; +/* Used when loading a GOT entry with movq. It is specially marked so that +the linker could optimize the movq to a leaq if possible. */ + BFD_RELOC_MACH_O_X86_64_GOT_LOAD, - /* Format_specific flags. */ - flagword flags; +/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_1, - /* Values that may appear in the flags field of a BFD. These also - appear in the object_flags field of the bfd_target structure, where - they indicate the set of flags used by that backend (not all flags - are meaningful for all object file formats) (FIXME: at the moment, - the object_flags values have mostly just been copied from backend - to another, and are not necessarily correct). */ +/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_2, -#define BFD_NO_FLAGS 0x0 +/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_4, - /* BFD contains relocation entries. */ -#define HAS_RELOC 0x1 +/* Used when referencing a TLV entry. */ + BFD_RELOC_MACH_O_X86_64_TLV, + +/* Addend for PAGE or PAGEOFF. */ + BFD_RELOC_MACH_O_ARM64_ADDEND, + +/* Relative offset to page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21, - /* BFD is directly executable. */ -#define EXEC_P 0x2 +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, - /* BFD has line number information (basically used for F_LNNO in a - COFF header). */ -#define HAS_LINENO 0x4 +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, - /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +/* This is a 32 bit reloc for the microblaze that stores the +low 16 bits of a value */ + BFD_RELOC_MICROBLAZE_32_LO, - /* BFD has symbols. */ -#define HAS_SYMS 0x10 +/* This is a 32 bit pc-relative reloc for the microblaze that +stores the low 16 bits of a value */ + BFD_RELOC_MICROBLAZE_32_LO_PCREL, - /* BFD has local symbols (basically used for F_LSYMS in a COFF - header). */ -#define HAS_LOCALS 0x20 +/* This is a 32 bit reloc for the microblaze that stores a +value relative to the read-only small data area anchor */ + BFD_RELOC_MICROBLAZE_32_ROSDA, - /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +/* This is a 32 bit reloc for the microblaze that stores a +value relative to the read-write small data area anchor */ + BFD_RELOC_MICROBLAZE_32_RWSDA, - /* Text section is write protected (if D_PAGED is not set, this is - like an a.out NMAGIC file) (the linker sets this by default, but - clears it for -r or -N). */ -#define WP_TEXT 0x80 +/* This is a 32 bit reloc for the microblaze to handle +expressions of the form "Symbol Op Symbol" */ + BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, - /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the - linker sets this by default, but clears it for -r or -n or -N). */ -#define D_PAGED 0x100 +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). No relocation is +done here - only used for relaxing */ + BFD_RELOC_MICROBLAZE_64_NONE, - /* BFD is relaxable (this means that bfd_relax_section may be able to - do something) (sometimes bfd_relax_section can do something even if - this is not set). */ -#define BFD_IS_RELAXABLE 0x200 +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +PC-relative GOT offset */ + BFD_RELOC_MICROBLAZE_64_GOTPC, - /* This may be set before writing out a BFD to request using a - traditional format. For example, this is used to request that when - writing out an a.out object the symbols not be hashed to eliminate - duplicates. */ -#define BFD_TRADITIONAL_FORMAT 0x400 +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +GOT offset */ + BFD_RELOC_MICROBLAZE_64_GOT, - /* This flag indicates that the BFD contents are actually cached - in memory. If this is set, iostream points to a bfd_in_memory - struct. */ -#define BFD_IN_MEMORY 0x800 +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +PC-relative offset into PLT */ + BFD_RELOC_MICROBLAZE_64_PLT, - /* This BFD has been created by the linker and doesn't correspond - to any input file. */ -#define BFD_LINKER_CREATED 0x1000 +/* This is a 64 bit reloc that stores the 32 bit GOT relative +value in two words (with an imm instruction). The relocation is +relative offset from _GLOBAL_OFFSET_TABLE_ */ + BFD_RELOC_MICROBLAZE_64_GOTOFF, - /* This may be set before writing out a BFD to request that it - be written using values for UIDs, GIDs, timestamps, etc. that - will be consistent from run to run. */ -#define BFD_DETERMINISTIC_OUTPUT 0x2000 +/* This is a 32 bit reloc that stores the 32 bit GOT relative +value in a word. The relocation is relative offset from */ + BFD_RELOC_MICROBLAZE_32_GOTOFF, - /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x4000 +/* This is used to tell the dynamic linker to copy the value out of +the dynamic object into the runtime process image. */ + BFD_RELOC_MICROBLAZE_COPY, - /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x8000 +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, - /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x10000 +/* This is a 64 bit reloc that stores the 32 bit GOT relative value +of the GOT TLS GD info entry in two words (with an imm instruction). The +relocation is GOT offset. */ + BFD_RELOC_MICROBLAZE_64_TLSGD, - /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ -#define BFD_COMPRESS_GABI 0x20000 +/* This is a 64 bit reloc that stores the 32 bit GOT relative value +of the GOT TLS LD info entry in two words (with an imm instruction). The +relocation is GOT offset. */ + BFD_RELOC_MICROBLAZE_64_TLSLD, - /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this - BFD. */ -#define BFD_CONVERT_ELF_COMMON 0x40000 +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, - /* Use the ELF STT_COMMON type in this BFD. */ -#define BFD_USE_ELF_STT_COMMON 0x80000 +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, - /* Put pathnames into archives (non-POSIX). */ -#define BFD_ARCHIVE_FULL_PATH 0x100000 +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, -#define BFD_CLOSED_BY_CACHE 0x200000 - /* Compress sections in this BFD with SHF_COMPRESSED zstd. */ -#define BFD_COMPRESS_ZSTD 0x400000 +/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset +to two words (uses imm instruction). */ + BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL, - /* Flags bits to be saved in bfd_preserve_save. */ -#define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ - | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ - | BFD_USE_ELF_STT_COMMON | BFD_COMPRESS_ZSTD) +/* This is a 64 bit reloc that stores 32-bit thread pointer relative offset +to two words (uses imm instruction). */ + BFD_RELOC_MICROBLAZE_64_TLSTPREL, - /* Flags bits which are for BFD use only. */ -#define BFD_FLAGS_FOR_BFD_USE_MASK \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ - | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ - | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +PC-relative offset from start of TEXT. */ + BFD_RELOC_MICROBLAZE_64_TEXTPCREL, - /* The format which belongs to the BFD. (object, core, etc.) */ - ENUM_BITFIELD (bfd_format) format : 3; +/* This is a 64 bit reloc that stores the 32 bit offset +value in two words (with an imm instruction). The relocation is +relative offset from start of TEXT. */ + BFD_RELOC_MICROBLAZE_64_TEXTREL, - /* The direction with which the BFD was opened. */ - ENUM_BITFIELD (bfd_direction) direction : 2; +/* KVX pseudo relocation code to mark the start of the KVX +relocation enumerators. N.B. the order of the enumerators is +important as several tables in the KVX bfd backend are indexed +by these enumerators; make sure they are all synced."; */ + BFD_RELOC_KVX_RELOC_START, + +/* KVX null relocation code. */ + BFD_RELOC_KVX_NONE, + +/* KVX Relocations. */ + BFD_RELOC_KVX_16, + BFD_RELOC_KVX_32, + BFD_RELOC_KVX_64, + BFD_RELOC_KVX_S16_PCREL, + BFD_RELOC_KVX_PCREL17, + BFD_RELOC_KVX_PCREL27, + BFD_RELOC_KVX_32_PCREL, + BFD_RELOC_KVX_S37_PCREL_LO10, + BFD_RELOC_KVX_S37_PCREL_UP27, + BFD_RELOC_KVX_S43_PCREL_LO10, + BFD_RELOC_KVX_S43_PCREL_UP27, + BFD_RELOC_KVX_S43_PCREL_EX6, + BFD_RELOC_KVX_S64_PCREL_LO10, + BFD_RELOC_KVX_S64_PCREL_UP27, + BFD_RELOC_KVX_S64_PCREL_EX27, + BFD_RELOC_KVX_64_PCREL, + BFD_RELOC_KVX_S16, + BFD_RELOC_KVX_S32_LO5, + BFD_RELOC_KVX_S32_UP27, + BFD_RELOC_KVX_S37_LO10, + BFD_RELOC_KVX_S37_UP27, + BFD_RELOC_KVX_S37_GOTOFF_LO10, + BFD_RELOC_KVX_S37_GOTOFF_UP27, + BFD_RELOC_KVX_S43_GOTOFF_LO10, + BFD_RELOC_KVX_S43_GOTOFF_UP27, + BFD_RELOC_KVX_S43_GOTOFF_EX6, + BFD_RELOC_KVX_32_GOTOFF, + BFD_RELOC_KVX_64_GOTOFF, + BFD_RELOC_KVX_32_GOT, + BFD_RELOC_KVX_S37_GOT_LO10, + BFD_RELOC_KVX_S37_GOT_UP27, + BFD_RELOC_KVX_S43_GOT_LO10, + BFD_RELOC_KVX_S43_GOT_UP27, + BFD_RELOC_KVX_S43_GOT_EX6, + BFD_RELOC_KVX_64_GOT, + BFD_RELOC_KVX_GLOB_DAT, + BFD_RELOC_KVX_COPY, + BFD_RELOC_KVX_JMP_SLOT, + BFD_RELOC_KVX_RELATIVE, + BFD_RELOC_KVX_S43_LO10, + BFD_RELOC_KVX_S43_UP27, + BFD_RELOC_KVX_S43_EX6, + BFD_RELOC_KVX_S64_LO10, + BFD_RELOC_KVX_S64_UP27, + BFD_RELOC_KVX_S64_EX27, + BFD_RELOC_KVX_S37_GOTADDR_LO10, + BFD_RELOC_KVX_S37_GOTADDR_UP27, + BFD_RELOC_KVX_S43_GOTADDR_LO10, + BFD_RELOC_KVX_S43_GOTADDR_UP27, + BFD_RELOC_KVX_S43_GOTADDR_EX6, + BFD_RELOC_KVX_S64_GOTADDR_LO10, + BFD_RELOC_KVX_S64_GOTADDR_UP27, + BFD_RELOC_KVX_S64_GOTADDR_EX27, + BFD_RELOC_KVX_64_DTPMOD, + BFD_RELOC_KVX_64_DTPOFF, + BFD_RELOC_KVX_S37_TLS_DTPOFF_LO10, + BFD_RELOC_KVX_S37_TLS_DTPOFF_UP27, + BFD_RELOC_KVX_S43_TLS_DTPOFF_LO10, + BFD_RELOC_KVX_S43_TLS_DTPOFF_UP27, + BFD_RELOC_KVX_S43_TLS_DTPOFF_EX6, + BFD_RELOC_KVX_S37_TLS_GD_LO10, + BFD_RELOC_KVX_S37_TLS_GD_UP27, + BFD_RELOC_KVX_S43_TLS_GD_LO10, + BFD_RELOC_KVX_S43_TLS_GD_UP27, + BFD_RELOC_KVX_S43_TLS_GD_EX6, + BFD_RELOC_KVX_S37_TLS_LD_LO10, + BFD_RELOC_KVX_S37_TLS_LD_UP27, + BFD_RELOC_KVX_S43_TLS_LD_LO10, + BFD_RELOC_KVX_S43_TLS_LD_UP27, + BFD_RELOC_KVX_S43_TLS_LD_EX6, + BFD_RELOC_KVX_64_TPOFF, + BFD_RELOC_KVX_S37_TLS_IE_LO10, + BFD_RELOC_KVX_S37_TLS_IE_UP27, + BFD_RELOC_KVX_S43_TLS_IE_LO10, + BFD_RELOC_KVX_S43_TLS_IE_UP27, + BFD_RELOC_KVX_S43_TLS_IE_EX6, + BFD_RELOC_KVX_S37_TLS_LE_LO10, + BFD_RELOC_KVX_S37_TLS_LE_UP27, + BFD_RELOC_KVX_S43_TLS_LE_LO10, + BFD_RELOC_KVX_S43_TLS_LE_UP27, + BFD_RELOC_KVX_S43_TLS_LE_EX6, + BFD_RELOC_KVX_8, + +/* KVX pseudo relocation code to mark the end of the KVX +relocation enumerators that have direct mapping to ELF reloc codes. +There are a few more enumerators after this one; those are mainly +used by the KVX assembler for the internal fixup or to select +one of the above enumerators. */ + BFD_RELOC_KVX_RELOC_END, - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; +/* AArch64 pseudo relocation code to mark the start of the AArch64 +relocation enumerators. N.B. the order of the enumerators is +important as several tables in the AArch64 bfd backend are indexed +by these enumerators; make sure they are all synced. */ + BFD_RELOC_AARCH64_RELOC_START, - /* Marks whether there was a default target specified when the - BFD was opened. This is used to select which matching algorithm - to use to choose the back end. */ - unsigned int target_defaulted : 1; +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; +/* Basic absolute relocations of N bits. These are equivalent to +BFD_RELOC_N and they were added to assist the indexing of the howto +table. */ + BFD_RELOC_AARCH64_64, + BFD_RELOC_AARCH64_32, + BFD_RELOC_AARCH64_16, - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; +/* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL +and they were added to assist the indexing of the howto table. */ + BFD_RELOC_AARCH64_64_PCREL, + BFD_RELOC_AARCH64_32_PCREL, + BFD_RELOC_AARCH64_16_PCREL, - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, - /* Have archive map. */ - unsigned int has_armap : 1; +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, - /* Set if this archive should not cache element positions. */ - unsigned int no_element_cache : 1; +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, - /* Set if only required symbols should be added in the link hash table for - this object. Used by VMS linkers. */ - unsigned int selective_search : 1; +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, - /* Set if this is the linker output BFD. */ - unsigned int is_linker_output : 1; +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, - /* Set if this is the linker input BFD. */ - unsigned int is_linker_input : 1; +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, - /* If this is an input for a compiler plug-in library. */ - ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; +/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 +of a signed value. Changes instruction to MOVZ or MOVN depending on the +value's sign. */ + BFD_RELOC_AARCH64_MOVW_G0_S, - /* Set if this is a plugin output file. */ - unsigned int lto_output : 1; +/* AArch64 MOV[NZ] instruction with most significant bits 16 to 31 +of a signed value. Changes instruction to MOVZ or MOVN depending on the +value's sign. */ + BFD_RELOC_AARCH64_MOVW_G1_S, - /* Set if this is a slim LTO object not loaded with a compiler plugin. */ - unsigned int lto_slim_object : 1; +/* AArch64 MOV[NZ] instruction with most significant bits 32 to 47 +of a signed value. Changes instruction to MOVZ or MOVN depending on the +value's sign. */ + BFD_RELOC_AARCH64_MOVW_G2_S, - /* Do not attempt to modify this file. Set when detecting errors - that BFD is not prepared to handle for objcopy/strip. */ - unsigned int read_only : 1; +/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 +of a signed value. Changes instruction to MOVZ or MOVN depending on the +value's sign. */ + BFD_RELOC_AARCH64_MOVW_PREL_G0, - /* Set to dummy BFD created when claimed by a compiler plug-in - library. */ - bfd *plugin_dummy_bfd; +/* AArch64 MOV[NZ] instruction with most significant bits 0 to 15 +of a signed value. Changes instruction to MOVZ or MOVN depending on the +value's sign. */ + BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, - /* The offset of this bfd in the file, typically 0 if it is not - contained in an archive. */ - ufile_ptr origin; +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1, - /* The origin in the archive of the proxy entry. This will - normally be the same as origin, except for thin archives, - when it will contain the current offset of the proxy in the - thin archive rather than the offset of the bfd in its actual - container. */ - ufile_ptr proxy_origin; +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, - /* A hash table for section names. */ - struct bfd_hash_table section_htab; +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, - /* Pointer to linked list of sections. */ - struct bfd_section *sections; +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, - /* The last section on the section list. */ - struct bfd_section *section_last; +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, - /* The number of sections. */ - unsigned int section_count; +/* AArch64 Load Literal instruction, holding a 19 bit pc-relative word +offset. The lowest two bits must be zero and are not stored in the +instruction, giving a 21 bit signed byte offset. */ + BFD_RELOC_AARCH64_LD_LO19_PCREL, - /* The archive plugin file descriptor. */ - int archive_plugin_fd; +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, - /* The number of opens on the archive plugin file descriptor. */ - unsigned int archive_plugin_fd_open_count; +/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page +offset, giving a 4KB aligned page base address. */ + BFD_RELOC_AARCH64_ADR_HI21_PCREL, - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; +/* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page +offset, giving a 4KB aligned page base address, but with no overflow +checking. */ + BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, - /* The total size of memory from bfd_alloc. */ - bfd_size_type alloc_size; +/* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address. +Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_ADD_LO12, - /* Stuff only useful for object files: - The start address. */ - bfd_vma start_address; +/* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST8_LO12, - /* Symbol table for output BFD (with symcount entries). - Also used by the linker to cache input BFD symbols. */ - struct bfd_symbol **outsymbols; +/* AArch64 14 bit pc-relative test bit and branch. +The lowest two bits must be zero and are not stored in the instruction, +giving a 16 bit signed byte offset. */ + BFD_RELOC_AARCH64_TSTBR14, - /* Used for input and output. */ - unsigned int symcount; +/* AArch64 19 bit pc-relative conditional branch and compare & branch. +The lowest two bits must be zero and are not stored in the instruction, +giving a 21 bit signed byte offset. */ + BFD_RELOC_AARCH64_BRANCH19, - /* Used for slurped dynamic symbol tables. */ - unsigned int dynsymcount; +/* AArch64 26 bit pc-relative unconditional branch. +The lowest two bits must be zero and are not stored in the instruction, +giving a 28 bit signed byte offset. */ + BFD_RELOC_AARCH64_JUMP26, - /* Pointer to structure which contains architecture information. */ - const struct bfd_arch_info *arch_info; +/* AArch64 26 bit pc-relative unconditional branch and link. +The lowest two bits must be zero and are not stored in the instruction, +giving a 28 bit signed byte offset. */ + BFD_RELOC_AARCH64_CALL26, - /* Cached length of file for bfd_get_size. 0 until bfd_get_size is - called, 1 if stat returns an error or the file size is too large to - return in ufile_ptr. Both 0 and 1 should be treated as "unknown". */ - ufile_ptr size; +/* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST16_LO12, - /* Stuff only useful for archives. */ - void *arelt_data; - struct bfd *my_archive; /* The containing archive BFD. */ - struct bfd *archive_next; /* The next BFD in the archive. */ - struct bfd *archive_head; /* The first BFD in the archive. */ - struct bfd *nested_archives; /* List of nested archive in a flattened - thin archive. */ +/* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST32_LO12, - union { - /* For input BFDs, a chain of BFDs involved in a link. */ - struct bfd *next; - /* For output BFD, the linker hash table. */ - struct bfd_link_hash_table *hash; - } link; +/* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST64_LO12, - /* Used by the back end to hold private data. */ - union - { - struct aout_data_struct *aout_data; - struct artdata *aout_ar_data; - struct coff_tdata *coff_obj_data; - struct pe_tdata *pe_obj_data; - struct xcoff_tdata *xcoff_obj_data; - struct ecoff_tdata *ecoff_obj_data; - struct srec_data_struct *srec_data; - struct verilog_data_struct *verilog_data; - struct ihex_data_struct *ihex_data; - struct tekhex_data_struct *tekhex_data; - struct elf_obj_tdata *elf_obj_data; - struct mmo_data_struct *mmo_data; - struct sun_core_struct *sun_core_data; - struct sco5_core_struct *sco5_core_data; - struct trad_core_struct *trad_core_data; - struct som_data_struct *som_data; - struct hpux_core_struct *hpux_core_data; - struct hppabsd_core_struct *hppabsd_core_data; - struct sgi_core_struct *sgi_core_data; - struct lynx_core_struct *lynx_core_data; - struct osf_core_struct *osf_core_data; - struct cisco_core_struct *cisco_core_data; - struct versados_data_struct *versados_data; - struct netbsd_core_struct *netbsd_core_data; - struct mach_o_data_struct *mach_o_data; - struct mach_o_fat_data_struct *mach_o_fat_data; - struct plugin_data_struct *plugin_data; - struct bfd_pef_data_struct *pef_data; - struct bfd_pef_xlib_data_struct *pef_xlib_data; - struct bfd_sym_data_struct *sym_data; - void *any; - } - tdata; +/* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST128_LO12, - /* Used by the application to hold private data. */ - void *usrdata; +/* AArch64 Load Literal instruction, holding a 19 bit PC relative word +offset of the global offset table entry for a symbol. The lowest two +bits must be zero and are not stored in the instruction, giving a 21 +bit signed byte offset. This relocation type requires signed overflow +checking. */ + BFD_RELOC_AARCH64_GOT_LD_PREL19, - /* Where all the allocated stuff under this BFD goes. This is a - struct objalloc *, but we use void * to avoid requiring the inclusion - of objalloc.h. */ - void *memory; +/* Get to the page base of the global offset table entry for a symbol as +part of an ADRP instruction using a 21 bit PC relative value.Used in +conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */ + BFD_RELOC_AARCH64_ADR_GOT_PAGE, - /* For input BFDs, the build ID, if the object has one. */ - const struct bfd_build_id *build_id; -}; +/* Unsigned 12 bit byte offset for 64 bit load/store from the page of +the GOT entry for this symbol. Used in conjunction with +BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, -static inline const char * -bfd_get_filename (const bfd *abfd) -{ - return abfd->filename; -} +/* Unsigned 12 bit byte offset for 32 bit load/store from the page of +the GOT entry for this symbol. Used in conjunction with +BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */ + BFD_RELOC_AARCH64_LD32_GOT_LO12_NC, -static inline bool -bfd_get_cacheable (const bfd *abfd) -{ - return abfd->cacheable; -} +/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry +for this symbol. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC, -static inline enum bfd_format -bfd_get_format (const bfd *abfd) -{ - return abfd->format; -} +/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry +for this symbol. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_MOVW_GOTOFF_G1, -static inline flagword -bfd_get_file_flags (const bfd *abfd) -{ - return abfd->flags; -} +/* Unsigned 15 bit byte offset for 64 bit load/store from the page of +the GOT entry for this symbol. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, -static inline bfd_vma -bfd_get_start_address (const bfd *abfd) -{ - return abfd->start_address; -} +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -static inline unsigned int -bfd_get_symcount (const bfd *abfd) -{ - return abfd->symcount; -} +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, -static inline unsigned int -bfd_get_dynamic_symcount (const bfd *abfd) -{ - return abfd->dynsymcount; -} +/* Get to the page base of the global offset table entry for a symbols +tls_index structure as part of an adrp instruction using a 21 bit PC +relative value. Used in conjunction with +BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ + BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, -static inline struct bfd_symbol ** -bfd_get_outsymbols (const bfd *abfd) -{ - return abfd->outsymbols; -} +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, -static inline unsigned int -bfd_count_sections (const bfd *abfd) -{ - return abfd->section_count; -} +/* Unsigned 12 bit byte offset to global offset table entry for a symbols +tls_index structure. Used in conjunction with +BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */ + BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC, -static inline bool -bfd_has_map (const bfd *abfd) -{ - return abfd->has_armap; -} +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, -static inline bool -bfd_is_thin_archive (const bfd *abfd) -{ - return abfd->is_thin_archive; -} +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, -static inline void * -bfd_usrdata (const bfd *abfd) -{ - return abfd->usrdata; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, -/* See note beside bfd_set_section_userdata. */ -static inline bool -bfd_set_cacheable (bfd * abfd, bool val) -{ - abfd->cacheable = val; - return true; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, -static inline void -bfd_set_thin_archive (bfd *abfd, bool val) -{ - abfd->is_thin_archive = val; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, -static inline void -bfd_set_usrdata (bfd *abfd, void *val) -{ - abfd->usrdata = val; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, -static inline asection * -bfd_asymbol_section (const asymbol *sy) -{ - return sy->section; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, -static inline bfd_vma -bfd_asymbol_value (const asymbol *sy) -{ - return sy->section->vma + sy->value; -} +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, -static inline const char * -bfd_asymbol_name (const asymbol *sy) -{ - return sy->name; -} +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, -static inline struct bfd * -bfd_asymbol_bfd (const asymbol *sy) -{ - return sy->the_bfd; -} +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, -static inline void -bfd_set_asymbol_name (asymbol *sy, const char *name) -{ - sy->name = name; -} +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, -static inline bfd_size_type -bfd_get_section_limit_octets (const bfd *abfd, const asection *sec) -{ - if (abfd->direction != write_direction && sec->rawsize != 0) - return sec->rawsize; - return sec->size; -} +/* Unsigned 12 bit byte offset to global offset table entry for a symbols +tls_index structure. Used in conjunction with +BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */ + BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC, -/* Find the address one past the end of SEC. */ -static inline bfd_size_type -bfd_get_section_limit (const bfd *abfd, const asection *sec) -{ - return (bfd_get_section_limit_octets (abfd, sec) - / bfd_octets_per_byte (abfd, sec)); -} +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, -static inline bfd_size_type -bfd_get_section_alloc_size (const bfd *abfd, const asection *sec) -{ - if (abfd->direction != write_direction && sec->rawsize > sec->size) - return sec->rawsize; - return sec->size; -} +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, -/* Functions to handle insertion and deletion of a bfd's sections. These - only handle the list pointers, ie. do not adjust section_count, - target_index etc. */ -static inline void -bfd_section_list_remove (bfd *abfd, asection *s) -{ - asection *next = s->next; - asection *prev = s->prev; - if (prev) - prev->next = next; - else - abfd->sections = next; - if (next) - next->prev = prev; - else - abfd->section_last = prev; -} +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, -static inline void -bfd_section_list_append (bfd *abfd, asection *s) -{ - s->next = 0; - if (abfd->section_last) - { - s->prev = abfd->section_last; - abfd->section_last->next = s; - } - else - { - s->prev = 0; - abfd->sections = s; - } - abfd->section_last = s; -} +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, -static inline void -bfd_section_list_prepend (bfd *abfd, asection *s) -{ - s->prev = 0; - if (abfd->sections) - { - s->next = abfd->sections; - abfd->sections->prev = s; - } - else - { - s->next = 0; - abfd->section_last = s; - } - abfd->sections = s; -} +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, -static inline void -bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s) -{ - asection *next = a->next; - s->next = next; - s->prev = a; - a->next = s; - if (next) - next->prev = s; - else - abfd->section_last = s; -} +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, -static inline void -bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s) -{ - asection *prev = b->prev; - s->prev = prev; - s->next = b; - b->prev = s; - if (prev) - prev->next = s; - else - abfd->sections = s; -} +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, -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; -} +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, -typedef enum bfd_error -{ - bfd_error_no_error = 0, - bfd_error_system_call, - bfd_error_invalid_target, - bfd_error_wrong_format, - bfd_error_wrong_object_format, - bfd_error_invalid_operation, - bfd_error_no_memory, - bfd_error_no_symbols, - bfd_error_no_armap, - bfd_error_no_more_archived_files, - bfd_error_malformed_archive, - bfd_error_missing_dso, - bfd_error_file_not_recognized, - bfd_error_file_ambiguously_recognized, - bfd_error_no_contents, - bfd_error_nonrepresentable_section, - bfd_error_no_debug_section, - bfd_error_bad_value, - bfd_error_file_truncated, - bfd_error_file_too_big, - bfd_error_sorry, - bfd_error_on_input, - bfd_error_invalid_error_code -} -bfd_error_type; +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, -bfd_error_type bfd_get_error (void); +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, -void bfd_set_error (bfd_error_type error_tag); +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, -void bfd_set_input_error (bfd *input, bfd_error_type error_tag); +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, -const char *bfd_errmsg (bfd_error_type error_tag); +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, -void bfd_perror (const char *message); +/* bit[47:32] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2, +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, -typedef void (*bfd_error_handler_type) (const char *, va_list); +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, -void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, -bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, -void bfd_set_error_program_name (const char *); +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, - const char *bfd_version, - const char *bfd_file, - int bfd_line); +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -long bfd_canonicalize_reloc - (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -void bfd_set_reloc - (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, -#define bfd_set_reloc(abfd, asect, location, count) \ - BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) -bool bfd_set_file_flags (bfd *abfd, flagword flags); +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, -int bfd_get_arch_size (bfd *abfd); +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, -int bfd_get_sign_extend_vma (bfd *abfd); +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, -bool bfd_set_start_address (bfd *abfd, bfd_vma vma); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, -unsigned int bfd_get_gp_size (bfd *abfd); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, -void bfd_set_gp_size (bfd *abfd, unsigned int i); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, -void bfd_set_gp_value (bfd *abfd, bfd_vma v); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, -bfd_vma bfd_scan_vma (const char *string, const char **end, int base); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, -bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, -#define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) -bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, -#define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bool bfd_set_private_flags (bfd *abfd, flagword flags); +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, -#define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) -#define bfd_sizeof_headers(abfd, info) \ - BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info)) +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, -#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ - BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, syms, sec, off, file, func, line, NULL)) +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, -#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \ - file, func, line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \ - (abfd, alt_filename, syms, sec, off, file, func, line, disc)) +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, -#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, syms, sec, off, file, func, line, disc)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_COPY, -#define bfd_find_line(abfd, syms, sym, file, line) \ - BFD_SEND (abfd, _bfd_find_line, \ - (abfd, syms, sym, file, line)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_GLOB_DAT, -#define bfd_find_inliner_info(abfd, file, func, line) \ - BFD_SEND (abfd, _bfd_find_inliner_info, \ - (abfd, file, func, line)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_JUMP_SLOT, -#define bfd_debug_info_start(abfd) \ - BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, -#define bfd_debug_info_end(abfd) \ - BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, -#define bfd_debug_info_accumulate(abfd, section) \ - BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, -#define bfd_stat_arch_elt(abfd, stat) \ - BFD_SEND (abfd->my_archive ? abfd->my_archive : abfd, \ - _bfd_stat_arch_elt, (abfd, stat)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, -#define bfd_update_armap_timestamp(abfd) \ - BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, -#define bfd_set_arch_mach(abfd, arch, mach)\ - BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, -#define bfd_relax_section(abfd, section, link_info, again) \ - BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) +/* AArch64 pseudo relocation code to mark the end of the AArch64 +relocation enumerators that have direct mapping to ELF reloc codes. +There are a few more enumerators after this one; those are mainly +used by the AArch64 assembler for the internal fixup or to select +one of the above enumerators. */ + BFD_RELOC_AARCH64_RELOC_END, -#define bfd_gc_sections(abfd, link_info) \ - BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) +/* AArch64 pseudo relocation code to be used internally by the AArch64 +assembler and not (currently) written to any object files. */ + BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP, -#define bfd_lookup_section_flags(link_info, flag_info, section) \ - BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section)) +/* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the +address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ + BFD_RELOC_AARCH64_LDST_LO12, -#define bfd_merge_sections(abfd, link_info) \ - BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) +/* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be +used internally by the AArch64 assembler and not (currently) written to +any object files. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, -#define bfd_is_group_section(abfd, sec) \ - BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec)) +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, -#define bfd_group_name(abfd, sec) \ - BFD_SEND (abfd, _bfd_group_name, (abfd, sec)) +/* AArch64 pseudo relocation code for TLS local exec mode. It's to be +used internally by the AArch64 assembler and not (currently) written to +any object files. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, -#define bfd_discard_group(abfd, sec) \ - BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, -#define bfd_link_hash_table_create(abfd) \ - BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) +/* AArch64 pseudo relocation code to be used internally by the AArch64 +assembler and not (currently) written to any object files. */ + BFD_RELOC_AARCH64_LD_GOT_LO12_NC, -#define bfd_link_add_symbols(abfd, info) \ - BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) +/* AArch64 pseudo relocation code to be used internally by the AArch64 +assembler and not (currently) written to any object files. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC, -#define bfd_link_just_syms(abfd, sec, info) \ - BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) +/* AArch64 pseudo relocation code to be used internally by the AArch64 +assembler and not (currently) written to any object files. */ + BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC, -#define bfd_final_link(abfd, info) \ - BFD_SEND (abfd, _bfd_final_link, (abfd, info)) +/* Tilera TILEPro Relocations. */ + BFD_RELOC_TILEPRO_COPY, + BFD_RELOC_TILEPRO_GLOB_DAT, + BFD_RELOC_TILEPRO_JMP_SLOT, + BFD_RELOC_TILEPRO_RELATIVE, + BFD_RELOC_TILEPRO_BROFF_X1, + BFD_RELOC_TILEPRO_JOFFLONG_X1, + BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT, + BFD_RELOC_TILEPRO_IMM8_X0, + BFD_RELOC_TILEPRO_IMM8_Y0, + BFD_RELOC_TILEPRO_IMM8_X1, + BFD_RELOC_TILEPRO_IMM8_Y1, + BFD_RELOC_TILEPRO_DEST_IMM8_X1, + BFD_RELOC_TILEPRO_MT_IMM15_X1, + BFD_RELOC_TILEPRO_MF_IMM15_X1, + BFD_RELOC_TILEPRO_IMM16_X0, + BFD_RELOC_TILEPRO_IMM16_X1, + BFD_RELOC_TILEPRO_IMM16_X0_LO, + BFD_RELOC_TILEPRO_IMM16_X1_LO, + BFD_RELOC_TILEPRO_IMM16_X0_HI, + BFD_RELOC_TILEPRO_IMM16_X1_HI, + BFD_RELOC_TILEPRO_IMM16_X0_HA, + BFD_RELOC_TILEPRO_IMM16_X1_HA, + BFD_RELOC_TILEPRO_IMM16_X0_PCREL, + BFD_RELOC_TILEPRO_IMM16_X1_PCREL, + BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL, + BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL, + BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL, + BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL, + BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL, + BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL, + BFD_RELOC_TILEPRO_IMM16_X0_GOT, + BFD_RELOC_TILEPRO_IMM16_X1_GOT, + BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO, + BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO, + BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI, + BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI, + BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA, + BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA, + BFD_RELOC_TILEPRO_MMSTART_X0, + BFD_RELOC_TILEPRO_MMEND_X0, + BFD_RELOC_TILEPRO_MMSTART_X1, + BFD_RELOC_TILEPRO_MMEND_X1, + BFD_RELOC_TILEPRO_SHAMT_X0, + BFD_RELOC_TILEPRO_SHAMT_X1, + BFD_RELOC_TILEPRO_SHAMT_Y0, + BFD_RELOC_TILEPRO_SHAMT_Y1, + BFD_RELOC_TILEPRO_TLS_GD_CALL, + BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, + BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, + BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, + BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, + BFD_RELOC_TILEPRO_TLS_IE_LOAD, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA, + BFD_RELOC_TILEPRO_TLS_DTPMOD32, + BFD_RELOC_TILEPRO_TLS_DTPOFF32, + BFD_RELOC_TILEPRO_TLS_TPOFF32, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, + BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, + BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, -#define bfd_free_cached_info(abfd) \ - BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) +/* Tilera TILE-Gx Relocations. */ + BFD_RELOC_TILEGX_HW0, + BFD_RELOC_TILEGX_HW1, + BFD_RELOC_TILEGX_HW2, + BFD_RELOC_TILEGX_HW3, + BFD_RELOC_TILEGX_HW0_LAST, + BFD_RELOC_TILEGX_HW1_LAST, + BFD_RELOC_TILEGX_HW2_LAST, + BFD_RELOC_TILEGX_COPY, + BFD_RELOC_TILEGX_GLOB_DAT, + BFD_RELOC_TILEGX_JMP_SLOT, + BFD_RELOC_TILEGX_RELATIVE, + BFD_RELOC_TILEGX_BROFF_X1, + BFD_RELOC_TILEGX_JUMPOFF_X1, + BFD_RELOC_TILEGX_JUMPOFF_X1_PLT, + BFD_RELOC_TILEGX_IMM8_X0, + BFD_RELOC_TILEGX_IMM8_Y0, + BFD_RELOC_TILEGX_IMM8_X1, + BFD_RELOC_TILEGX_IMM8_Y1, + BFD_RELOC_TILEGX_DEST_IMM8_X1, + BFD_RELOC_TILEGX_MT_IMM14_X1, + BFD_RELOC_TILEGX_MF_IMM14_X1, + BFD_RELOC_TILEGX_MMSTART_X0, + BFD_RELOC_TILEGX_MMEND_X0, + BFD_RELOC_TILEGX_SHAMT_X0, + BFD_RELOC_TILEGX_SHAMT_X1, + BFD_RELOC_TILEGX_SHAMT_Y0, + BFD_RELOC_TILEGX_SHAMT_Y1, + BFD_RELOC_TILEGX_IMM16_X0_HW0, + BFD_RELOC_TILEGX_IMM16_X1_HW0, + BFD_RELOC_TILEGX_IMM16_X0_HW1, + BFD_RELOC_TILEGX_IMM16_X1_HW1, + BFD_RELOC_TILEGX_IMM16_X0_HW2, + BFD_RELOC_TILEGX_IMM16_X1_HW2, + BFD_RELOC_TILEGX_IMM16_X0_HW3, + BFD_RELOC_TILEGX_IMM16_X1_HW3, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST, + BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST, + BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST, + BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT, + BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT, + BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT, + BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD, + BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE, + BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, + BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, + BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, + BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE, + BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE, + BFD_RELOC_TILEGX_TLS_DTPMOD64, + BFD_RELOC_TILEGX_TLS_DTPOFF64, + BFD_RELOC_TILEGX_TLS_TPOFF64, + BFD_RELOC_TILEGX_TLS_DTPMOD32, + BFD_RELOC_TILEGX_TLS_DTPOFF32, + BFD_RELOC_TILEGX_TLS_TPOFF32, + BFD_RELOC_TILEGX_TLS_GD_CALL, + BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, + BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, + BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, + BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, + BFD_RELOC_TILEGX_TLS_IE_LOAD, + BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, + BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, + BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, + BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, -#define bfd_get_dynamic_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_DISP32, + BFD_RELOC_BPF_DISPCALL32, + BFD_RELOC_BPF_DISP16, -#define bfd_print_private_bfd_data(abfd, file)\ - BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) +/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ + BFD_RELOC_EPIPHANY_SIMM8, -#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ - BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) +/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */ + BFD_RELOC_EPIPHANY_SIMM24, -#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ - BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ - dyncount, dynsyms, ret)) +/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */ + BFD_RELOC_EPIPHANY_HIGH, -#define bfd_get_dynamic_reloc_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) +/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */ + BFD_RELOC_EPIPHANY_LOW, -#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ - BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) +/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */ + BFD_RELOC_EPIPHANY_SIMM11, -extern bfd_byte *bfd_get_relocated_section_contents - (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, - bool, asymbol **); +/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */ + BFD_RELOC_EPIPHANY_IMM11, -bool bfd_alt_mach_code (bfd *abfd, int alternative); +/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ + BFD_RELOC_EPIPHANY_IMM8, -bfd_vma bfd_emul_get_maxpagesize (const char *); +/* Visium Relocations. */ + BFD_RELOC_VISIUM_HI16, + BFD_RELOC_VISIUM_LO16, + BFD_RELOC_VISIUM_IM16, + BFD_RELOC_VISIUM_REL16, + BFD_RELOC_VISIUM_HI16_PCREL, + BFD_RELOC_VISIUM_LO16_PCREL, + BFD_RELOC_VISIUM_IM16_PCREL, -bfd_vma bfd_emul_get_commonpagesize (const char *); +/* WebAssembly relocations. */ + BFD_RELOC_WASM32_LEB128, + BFD_RELOC_WASM32_LEB128_GOT, + BFD_RELOC_WASM32_LEB128_GOT_CODE, + BFD_RELOC_WASM32_LEB128_PLT, + BFD_RELOC_WASM32_PLT_INDEX, + BFD_RELOC_WASM32_ABS32_CODE, + BFD_RELOC_WASM32_COPY, + BFD_RELOC_WASM32_CODE_POINTER, + BFD_RELOC_WASM32_INDEX, + BFD_RELOC_WASM32_PLT_SIG, -char *bfd_demangle (bfd *, const char *, int); +/* C-SKY relocations. */ + BFD_RELOC_CKCORE_NONE, + BFD_RELOC_CKCORE_ADDR32, + BFD_RELOC_CKCORE_PCREL_IMM8BY4, + BFD_RELOC_CKCORE_PCREL_IMM11BY2, + BFD_RELOC_CKCORE_PCREL_IMM4BY2, + BFD_RELOC_CKCORE_PCREL32, + BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2, + BFD_RELOC_CKCORE_GNU_VTINHERIT, + BFD_RELOC_CKCORE_GNU_VTENTRY, + BFD_RELOC_CKCORE_RELATIVE, + BFD_RELOC_CKCORE_COPY, + BFD_RELOC_CKCORE_GLOB_DAT, + BFD_RELOC_CKCORE_JUMP_SLOT, + BFD_RELOC_CKCORE_GOTOFF, + BFD_RELOC_CKCORE_GOTPC, + BFD_RELOC_CKCORE_GOT32, + BFD_RELOC_CKCORE_PLT32, + BFD_RELOC_CKCORE_ADDRGOT, + BFD_RELOC_CKCORE_ADDRPLT, + BFD_RELOC_CKCORE_PCREL_IMM26BY2, + BFD_RELOC_CKCORE_PCREL_IMM16BY2, + BFD_RELOC_CKCORE_PCREL_IMM16BY4, + BFD_RELOC_CKCORE_PCREL_IMM10BY2, + BFD_RELOC_CKCORE_PCREL_IMM10BY4, + BFD_RELOC_CKCORE_ADDR_HI16, + BFD_RELOC_CKCORE_ADDR_LO16, + BFD_RELOC_CKCORE_GOTPC_HI16, + BFD_RELOC_CKCORE_GOTPC_LO16, + BFD_RELOC_CKCORE_GOTOFF_HI16, + BFD_RELOC_CKCORE_GOTOFF_LO16, + BFD_RELOC_CKCORE_GOT12, + BFD_RELOC_CKCORE_GOT_HI16, + BFD_RELOC_CKCORE_GOT_LO16, + BFD_RELOC_CKCORE_PLT12, + BFD_RELOC_CKCORE_PLT_HI16, + BFD_RELOC_CKCORE_PLT_LO16, + BFD_RELOC_CKCORE_ADDRGOT_HI16, + BFD_RELOC_CKCORE_ADDRGOT_LO16, + BFD_RELOC_CKCORE_ADDRPLT_HI16, + BFD_RELOC_CKCORE_ADDRPLT_LO16, + BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2, + BFD_RELOC_CKCORE_TOFFSET_LO16, + BFD_RELOC_CKCORE_DOFFSET_LO16, + BFD_RELOC_CKCORE_PCREL_IMM18BY2, + BFD_RELOC_CKCORE_DOFFSET_IMM18, + BFD_RELOC_CKCORE_DOFFSET_IMM18BY2, + BFD_RELOC_CKCORE_DOFFSET_IMM18BY4, + BFD_RELOC_CKCORE_GOTOFF_IMM18, + BFD_RELOC_CKCORE_GOT_IMM18BY4, + BFD_RELOC_CKCORE_PLT_IMM18BY4, + BFD_RELOC_CKCORE_PCREL_IMM7BY4, + BFD_RELOC_CKCORE_TLS_LE32, + BFD_RELOC_CKCORE_TLS_IE32, + BFD_RELOC_CKCORE_TLS_GD32, + BFD_RELOC_CKCORE_TLS_LDM32, + BFD_RELOC_CKCORE_TLS_LDO32, + BFD_RELOC_CKCORE_TLS_DTPMOD32, + BFD_RELOC_CKCORE_TLS_DTPOFF32, + BFD_RELOC_CKCORE_TLS_TPOFF32, + BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4, + BFD_RELOC_CKCORE_NOJSRI, + BFD_RELOC_CKCORE_CALLGRAPH, + BFD_RELOC_CKCORE_IRELATIVE, + BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4, + BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4, -/* Extracted from archive.c. */ -symindex bfd_get_next_mapent - (bfd *abfd, symindex previous, carsym **sym); +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, -bool bfd_set_archive_head (bfd *output, bfd *new_head); +/* LARCH relocations. */ + BFD_RELOC_LARCH_TLS_DTPMOD32, + BFD_RELOC_LARCH_TLS_DTPREL32, + BFD_RELOC_LARCH_TLS_DTPMOD64, + BFD_RELOC_LARCH_TLS_DTPREL64, + BFD_RELOC_LARCH_TLS_TPREL32, + BFD_RELOC_LARCH_TLS_TPREL64, + BFD_RELOC_LARCH_MARK_LA, + BFD_RELOC_LARCH_MARK_PCREL, + BFD_RELOC_LARCH_SOP_PUSH_PCREL, + BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE, + BFD_RELOC_LARCH_SOP_PUSH_DUP, + BFD_RELOC_LARCH_SOP_PUSH_GPREL, + BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL, + BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT, + BFD_RELOC_LARCH_SOP_PUSH_TLS_GD, + BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL, + BFD_RELOC_LARCH_SOP_ASSERT, + BFD_RELOC_LARCH_SOP_NOT, + BFD_RELOC_LARCH_SOP_SUB, + BFD_RELOC_LARCH_SOP_SL, + BFD_RELOC_LARCH_SOP_SR, + BFD_RELOC_LARCH_SOP_ADD, + BFD_RELOC_LARCH_SOP_AND, + BFD_RELOC_LARCH_SOP_IF_ELSE, + BFD_RELOC_LARCH_SOP_POP_32_S_10_5, + BFD_RELOC_LARCH_SOP_POP_32_U_10_12, + BFD_RELOC_LARCH_SOP_POP_32_S_10_12, + BFD_RELOC_LARCH_SOP_POP_32_S_10_16, + BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2, + BFD_RELOC_LARCH_SOP_POP_32_S_5_20, + BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2, + BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2, + BFD_RELOC_LARCH_SOP_POP_32_U, + BFD_RELOC_LARCH_ADD8, + BFD_RELOC_LARCH_ADD16, + BFD_RELOC_LARCH_ADD24, + BFD_RELOC_LARCH_ADD32, + BFD_RELOC_LARCH_ADD64, + BFD_RELOC_LARCH_SUB8, + BFD_RELOC_LARCH_SUB16, + BFD_RELOC_LARCH_SUB24, + BFD_RELOC_LARCH_SUB32, + BFD_RELOC_LARCH_SUB64, + BFD_RELOC_LARCH_B16, + BFD_RELOC_LARCH_B21, + BFD_RELOC_LARCH_B26, + BFD_RELOC_LARCH_ABS_HI20, + BFD_RELOC_LARCH_ABS_LO12, + BFD_RELOC_LARCH_ABS64_LO20, + BFD_RELOC_LARCH_ABS64_HI12, + BFD_RELOC_LARCH_PCALA_HI20, + BFD_RELOC_LARCH_PCALA_LO12, + BFD_RELOC_LARCH_PCALA64_LO20, + BFD_RELOC_LARCH_PCALA64_HI12, + BFD_RELOC_LARCH_GOT_PC_HI20, + BFD_RELOC_LARCH_GOT_PC_LO12, + BFD_RELOC_LARCH_GOT64_PC_LO20, + BFD_RELOC_LARCH_GOT64_PC_HI12, + BFD_RELOC_LARCH_GOT_HI20, + BFD_RELOC_LARCH_GOT_LO12, + BFD_RELOC_LARCH_GOT64_LO20, + BFD_RELOC_LARCH_GOT64_HI12, + BFD_RELOC_LARCH_TLS_LE_HI20, + BFD_RELOC_LARCH_TLS_LE_LO12, + BFD_RELOC_LARCH_TLS_LE64_LO20, + BFD_RELOC_LARCH_TLS_LE64_HI12, + BFD_RELOC_LARCH_TLS_IE_PC_HI20, + BFD_RELOC_LARCH_TLS_IE_PC_LO12, + BFD_RELOC_LARCH_TLS_IE64_PC_LO20, + BFD_RELOC_LARCH_TLS_IE64_PC_HI12, + BFD_RELOC_LARCH_TLS_IE_HI20, + BFD_RELOC_LARCH_TLS_IE_LO12, + BFD_RELOC_LARCH_TLS_IE64_LO20, + BFD_RELOC_LARCH_TLS_IE64_HI12, + BFD_RELOC_LARCH_TLS_LD_PC_HI20, + BFD_RELOC_LARCH_TLS_LD_HI20, + BFD_RELOC_LARCH_TLS_GD_PC_HI20, + BFD_RELOC_LARCH_TLS_GD_HI20, + BFD_RELOC_LARCH_32_PCREL, + BFD_RELOC_LARCH_RELAX, + BFD_RELOC_LARCH_DELETE, + BFD_RELOC_LARCH_ALIGN, + BFD_RELOC_LARCH_PCREL20_S2, + BFD_RELOC_LARCH_CFA, + BFD_RELOC_LARCH_ADD6, + BFD_RELOC_LARCH_SUB6, + BFD_RELOC_LARCH_ADD_ULEB128, + BFD_RELOC_LARCH_SUB_ULEB128, + BFD_RELOC_LARCH_64_PCREL, + BFD_RELOC_UNUSED }; +typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; -bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); +reloc_howto_type *bfd_reloc_type_lookup + (bfd *abfd, bfd_reloc_code_real_type code); +reloc_howto_type *bfd_reloc_name_lookup + (bfd *abfd, const char *reloc_name); -/* Extracted from corefile.c. */ -const char *bfd_core_file_failing_command (bfd *abfd); +const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); -int bfd_core_file_failing_signal (bfd *abfd); +/* Extracted from simple.c. */ +bfd_byte *bfd_simple_get_relocated_section_contents + (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); -int bfd_core_file_pid (bfd *abfd); +/* Extracted from stab-syms.c. */ +const char *bfd_get_stab_name (int); -bool core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); +/* Extracted from stabs.c. */ +/* This structure is used to keep track of stabs in sections + information while linking. */ -bool generic_core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); +struct stab_info +{ + /* A hash table used to hold stabs strings. */ + struct bfd_strtab_hash *strings; + /* The header file hash table. */ + struct bfd_hash_table includes; + /* The first .stabstr section. */ + struct bfd_section *stabstr; +}; /* Extracted from targets.c. */ #define BFD_SEND(bfd, message, arglist) \ @@ -7323,10 +7563,7 @@ enum bfd_flavour bfd_target_verilog_flavour, bfd_target_ihex_flavour, bfd_target_som_flavour, - bfd_target_os9k_flavour, - bfd_target_versados_flavour, bfd_target_msdos_flavour, - bfd_target_ovax_flavour, bfd_target_evax_flavour, bfd_target_mmo_flavour, bfd_target_mach_o_flavour, @@ -7337,12 +7574,8 @@ enum bfd_flavour enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; -/* Forward declaration. */ -typedef struct bfd_link_info _bfd_link_info; - -/* Forward declaration. */ -typedef struct flag_info flag_info; - +/* Forward declarations. */ +struct flag_info; typedef void (*bfd_cleanup) (bfd *); typedef struct bfd_target @@ -7422,7 +7655,6 @@ typedef struct bfd_target /* Write cached information into a file being written, at <>. */ bool (*_bfd_write_contents[bfd_type_end]) (bfd *); - /* Generic entry points. */ #define BFD_JUMP_TABLE_GENERIC(NAME) \ NAME##_close_and_cleanup, \ @@ -7439,9 +7671,9 @@ typedef struct bfd_target bool (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, - bfd_size_type); + bfd_size_type); bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *, - file_ptr, bfd_size_type); + file_ptr, bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -7464,16 +7696,16 @@ typedef struct bfd_target 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)) + (ibfd, isec, obfd, osec, link_info)) bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr, - struct bfd_link_info *); + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, - bfd *, asymbol *); + bfd *, asymbol *); /* Called to copy BFD private header data from one object file to another. */ bool (*_bfd_copy_private_header_data) (bfd *, bfd *); @@ -7512,8 +7744,8 @@ typedef struct bfd_target 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 **); + 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 *); @@ -7549,7 +7781,7 @@ typedef struct bfd_target struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, - bfd_print_symbol_type); + 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 *); @@ -7557,7 +7789,7 @@ typedef struct bfd_target BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) const char * (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, - bool, bool *); + bool, bool *); #define bfd_get_symbol_version_string(b,s,p,h) \ BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h)) bool (*_bfd_is_local_label_name) (bfd *, const char *); @@ -7565,24 +7797,24 @@ typedef struct bfd_target 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 *); + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *, - struct bfd_symbol **, - struct bfd_section *, bfd_vma, - const char **, const char **, - unsigned int *, unsigned int *); + 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 *); + 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); + (*_bfd_make_debug_symbol) (bfd *); #define bfd_read_minisymbols(b, d, m, s) \ BFD_SEND (b, _read_minisymbols, (b, d, m, s)) long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *); @@ -7601,7 +7833,7 @@ typedef struct bfd_target long (*_get_reloc_upper_bound) (bfd *, sec_ptr); long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, - struct bfd_symbol **); + struct bfd_symbol **); void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * @@ -7615,9 +7847,9 @@ typedef struct bfd_target NAME##_set_section_contents bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, - unsigned long); + unsigned long); bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, - file_ptr, bfd_size_type); + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -7645,13 +7877,13 @@ typedef struct bfd_target 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 **); + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bool, + struct bfd_symbol **); bool (*_bfd_relax_section) (bfd *, struct bfd_section *, - struct bfd_link_info *, bool *); + struct bfd_link_info *, bool *); /* Create a hash table for the linker. Different backends store different information in this table. */ @@ -7669,8 +7901,8 @@ typedef struct bfd_target #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 *); + 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. */ @@ -7687,7 +7919,7 @@ typedef struct bfd_target /* Sets the bitmask of allowed and disallowed section flags. */ bool (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -7704,20 +7936,20 @@ typedef struct bfd_target /* Check if SEC has been already linked during a reloceatable or final link. */ bool (*_section_already_linked) (bfd *, asection *, - struct bfd_link_info *); + struct bfd_link_info *); /* Define a common symbol. */ bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, - struct bfd_link_hash_entry *); + struct bfd_link_hash_entry *); /* Hide a symbol. */ void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, - struct bfd_link_hash_entry *); + struct bfd_link_hash_entry *); /* Define a __start, __stop, .startof. or .sizeof. symbol. */ struct bfd_link_hash_entry * (*_bfd_define_start_stop) (struct bfd_link_info *, const char *, - asection *); + asection *); /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ @@ -7733,13 +7965,13 @@ typedef struct bfd_target 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, 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 *); /* Read in the dynamic relocs. */ long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, - struct bfd_symbol **); + struct bfd_symbol **); /* Opposite endian version of this target. */ const struct bfd_target *alternative_target; @@ -7772,7 +8004,7 @@ 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); + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); } static inline bool @@ -7824,13 +8056,6 @@ bfd_keep_unused_section_symbols (const bfd *abfd) return abfd->xvec->keep_unused_section_symbols; } -/* Cached _bfd_check_format messages are put in this. */ -struct per_xvec_message -{ - struct per_xvec_message *next; - char message[]; -}; - bool bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -7840,6 +8065,7 @@ const bfd_target *bfd_get_target_info (const char *target_name, bool *is_bigendian, int *underscoring, const char **def_target_arch); + const char ** bfd_target_list (void); const bfd_target *bfd_iterate_over_targets @@ -7848,174 +8074,6 @@ const bfd_target *bfd_iterate_over_targets const char *bfd_flavour_name (enum bfd_flavour flavour); -/* Extracted from format.c. */ -bool bfd_check_format (bfd *abfd, bfd_format format); - -bool bfd_check_format_matches - (bfd *abfd, bfd_format format, char ***matching); - -bool bfd_set_format (bfd *abfd, bfd_format format); - -const char *bfd_format_string (bfd_format format); - -/* Extracted from linker.c. */ -/* Return TRUE if the symbol described by a linker hash entry H - is going to be absolute. Linker-script defined symbols can be - converted from absolute to section-relative ones late in the - link. Use this macro to correctly determine whether the symbol - will actually end up absolute in output. */ -#define bfd_is_abs_symbol(H) \ - (((H)->type == bfd_link_hash_defined \ - || (H)->type == bfd_link_hash_defweak) \ - && bfd_is_abs_section ((H)->u.def.section) \ - && !(H)->rel_from_abs) - -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)) - -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)) - -bool bfd_generic_define_common_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); - -#define bfd_define_common_symbol(output_bfd, info, h) \ - BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) - -void _bfd_generic_link_hide_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); - -#define bfd_link_hide_symbol(output_bfd, info, h) \ - BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h)) - -struct bfd_link_hash_entry *bfd_generic_define_start_stop - (struct bfd_link_info *info, - const char *symbol, asection *sec); - -#define bfd_define_start_stop(output_bfd, info, symbol, sec) \ - BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec)) - -struct bfd_elf_version_tree * bfd_find_version_for_sym - (struct bfd_elf_version_tree *verdefs, - const char *sym_name, bool *hide); - -bool bfd_hide_sym_by_version - (struct bfd_elf_version_tree *verdefs, const char *sym_name); - -bool bfd_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); - -bool _bfd_generic_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); - -bool bfd_merge_private_bfd_data - (bfd *ibfd, struct bfd_link_info *info); - -#define bfd_merge_private_bfd_data(ibfd, info) \ - BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \ - (ibfd, info)) -/* Extracted from simple.c. */ -bfd_byte *bfd_simple_get_relocated_section_contents - (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); - -/* Extracted from compress.c. */ -/* Types of compressed DWARF debug sections. */ -enum compressed_debug_section_type -{ - COMPRESS_DEBUG_NONE = 0, - COMPRESS_DEBUG_GNU_ZLIB = 1 << 1, - COMPRESS_DEBUG_GABI_ZLIB = 1 << 2, - COMPRESS_DEBUG_ZSTD = 1 << 3, - COMPRESS_UNKNOWN = 1 << 4 -}; - -/* Tuple for compressed_debug_section_type and their name. */ -struct compressed_type_tuple -{ - enum compressed_debug_section_type type; - const char *name; -}; - -/* Compression header ch_type values. */ -enum compression_type -{ - ch_none = 0, - ch_compress_zlib = 1 , /* Compressed with zlib. */ - ch_compress_zstd = 2 /* Compressed with zstd (www.zstandard.org). */ -}; - -static inline char * -bfd_debug_name_to_zdebug (bfd *abfd, const char *name) -{ - size_t len = strlen (name); - char *new_name = (char *) bfd_alloc (abfd, len + 2); - if (new_name == NULL) - return NULL; - new_name[0] = '.'; - new_name[1] = 'z'; - memcpy (new_name + 2, name + 1, len); - return new_name; -} - -static inline char * -bfd_zdebug_name_to_debug (bfd *abfd, const char *name) -{ - size_t len = strlen (name); - char *new_name = (char *) bfd_alloc (abfd, len); - if (new_name == NULL) - return NULL; - new_name[0] = '.'; - memcpy (new_name + 1, name + 2, len - 1); - return new_name; -} - -enum compressed_debug_section_type -bfd_get_compression_algorithm (const char *name); -const char *bfd_get_compression_algorithm_name - (enum compressed_debug_section_type type); -void bfd_update_compression_header - (bfd *abfd, bfd_byte *contents, asection *sec); - -int bfd_get_compression_header_size (bfd *abfd, asection *sec); - -bool bfd_convert_section_setup - (bfd *ibfd, asection *isec, bfd *obfd, - const char **new_name, bfd_size_type *new_size); - -bool bfd_convert_section_contents - (bfd *ibfd, asection *isec, bfd *obfd, - bfd_byte **ptr, bfd_size_type *ptr_size); - -bool bfd_get_full_section_contents - (bfd *abfd, asection *section, bfd_byte **ptr); - -bool bfd_is_section_compressed_info - (bfd *abfd, asection *section, - int *compression_header_size_p, - bfd_size_type *uncompressed_size_p, - unsigned int *uncompressed_alignment_power_p, - enum compression_type *ch_type); - -bool bfd_is_section_compressed - (bfd *abfd, asection *section); - -bool bfd_init_section_decompress_status - (bfd *abfd, asection *section); - -bool bfd_init_section_compress_status - (bfd *abfd, asection *section); - -bool bfd_compress_section - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); - #ifdef __cplusplus } #endif diff --git a/bfd/bfd.c b/bfd/bfd.c index 97ce2b104..88943a042 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -1,5 +1,5 @@ /* Generic BFD library interface and support routines. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -34,7 +34,16 @@ SECTION contains the major data about the file and pointers to the rest of the data. -CODE_FRAGMENT +EXTERNAL +.typedef enum bfd_format +. { +. bfd_unknown = 0, {* File format is unknown. *} +. bfd_object, {* Linker/assembler/compiler output. *} +. bfd_archive, {* Object archive file. *} +. bfd_core, {* Core dump. *} +. bfd_type_end {* Marks the end; don't use it! *} +. } +.bfd_format; . .enum bfd_direction . { @@ -44,6 +53,14 @@ CODE_FRAGMENT . both_direction = 3 . }; . +.enum bfd_last_io +. { +. bfd_io_seek = 0, +. bfd_io_read = 1, +. bfd_io_write = 2, +. bfd_io_force = 3 +. }; +. .enum bfd_plugin_format . { . bfd_plugin_unknown = 0, @@ -57,6 +74,8 @@ CODE_FRAGMENT . bfd_byte data[1]; . }; . + +CODE_FRAGMENT .struct bfd .{ . {* The filename the application opened the BFD with. *} @@ -181,17 +200,15 @@ CODE_FRAGMENT . {* Compress sections in this BFD with SHF_COMPRESSED zstd. *} .#define BFD_COMPRESS_ZSTD 0x400000 . -. {* Flags bits to be saved in bfd_preserve_save. *} -.#define BFD_FLAGS_SAVED \ -. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ -. | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ -. | BFD_USE_ELF_STT_COMMON | BFD_COMPRESS_ZSTD) +. {* Don't generate ELF section header. *} +.#define BFD_NO_SECTION_HEADER 0x800000 . . {* Flags bits which are for BFD use only. *} .#define BFD_FLAGS_FOR_BFD_USE_MASK \ . (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ . | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ -. | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) +. | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON \ +. | BFD_NO_SECTION_HEADER) . . {* The format which belongs to the BFD. (object, core, etc.) *} . ENUM_BITFIELD (bfd_format) format : 3; @@ -199,6 +216,20 @@ CODE_FRAGMENT . {* The direction with which the BFD was opened. *} . ENUM_BITFIELD (bfd_direction) direction : 2; . +. {* POSIX.1-2017 (IEEE Std 1003.1) says of fopen : "When a file is +. opened with update mode ('+' as the second or third character in +. the mode argument), both input and output may be performed on +. the associated stream. However, the application shall ensure +. that output is not directly followed by input without an +. intervening call to fflush() or to a file positioning function +. (fseek(), fsetpos(), or rewind()), and input is not directly +. followed by output without an intervening call to a file +. positioning function, unless the input operation encounters +. end-of-file." +. This field tracks the last IO operation, so that bfd can insert +. a seek when IO direction changes. *} +. ENUM_BITFIELD (bfd_last_io) last_io : 2; +. . {* Is the file descriptor being cached? That is, can it be closed as . needed, and re-opened when accessed later? *} . unsigned int cacheable : 1; @@ -346,8 +377,6 @@ CODE_FRAGMENT . struct tekhex_data_struct *tekhex_data; . struct elf_obj_tdata *elf_obj_data; . struct mmo_data_struct *mmo_data; -. struct sun_core_struct *sun_core_data; -. struct sco5_core_struct *sco5_core_data; . struct trad_core_struct *trad_core_data; . struct som_data_struct *som_data; . struct hpux_core_struct *hpux_core_data; @@ -356,7 +385,6 @@ CODE_FRAGMENT . struct lynx_core_struct *lynx_core_data; . struct osf_core_struct *osf_core_data; . struct cisco_core_struct *cisco_core_data; -. struct versados_data_struct *versados_data; . struct netbsd_core_struct *netbsd_core_data; . struct mach_o_data_struct *mach_o_data; . struct mach_o_fat_data_struct *mach_o_fat_data; @@ -380,6 +408,8 @@ CODE_FRAGMENT . const struct bfd_build_id *build_id; .}; . + +EXTERNAL .static inline const char * .bfd_get_filename (const bfd *abfd) .{ @@ -502,6 +532,8 @@ CODE_FRAGMENT . sy->name = name; .} . +.{* For input sections return the original size on disk of the +. section. For output sections return the current size. *} .static inline bfd_size_type .bfd_get_section_limit_octets (const bfd *abfd, const asection *sec) .{ @@ -518,6 +550,9 @@ CODE_FRAGMENT . / bfd_octets_per_byte (abfd, sec)); .} . +.{* For input sections return the larger of the current size and the +. original size on disk of the section. For output sections return +. the current size. *} .static inline bfd_size_type .bfd_get_section_alloc_size (const bfd *abfd, const asection *sec) .{ @@ -641,7 +676,7 @@ CODE_FRAGMENT /* INODE -Error reporting, Miscellaneous, typedef bfd, BFD front end +Error reporting, Initialization, typedef bfd, BFD front end SECTION Error reporting @@ -663,7 +698,6 @@ SUBSECTION enumerated type <>. CODE_FRAGMENT -. .typedef enum bfd_error .{ . bfd_error_no_error = 0, @@ -692,11 +726,16 @@ CODE_FRAGMENT .} .bfd_error_type; . +INTERNAL +.{* A buffer that is freed on bfd_close. *} +.extern char *_bfd_error_buf; +. */ -static bfd_error_type bfd_error = bfd_error_no_error; -static bfd *input_bfd = NULL; -static bfd_error_type input_error = bfd_error_no_error; +static bfd_error_type bfd_error; +static bfd_error_type input_error; +static bfd *input_bfd; +char *_bfd_error_buf; const char *const bfd_errmsgs[] = { @@ -784,6 +823,8 @@ bfd_set_input_error (bfd *input, bfd_error_type error_tag) /* This is an error that occurred during bfd_close when writing an archive, but on one of the input files. */ bfd_error = bfd_error_on_input; + free (_bfd_error_buf); + _bfd_error_buf = NULL; input_bfd = input; input_error = error_tag; if (input_error >= bfd_error_on_input) @@ -810,12 +851,11 @@ bfd_errmsg (bfd_error_type error_tag) #endif if (error_tag == bfd_error_on_input) { - char *buf; const char *msg = bfd_errmsg (input_error); - - if (asprintf (&buf, _(bfd_errmsgs [error_tag]), - bfd_get_filename (input_bfd), msg) != -1) - return buf; + char *ret = bfd_asprintf (_(bfd_errmsgs[error_tag]), + bfd_get_filename (input_bfd), msg); + if (ret) + return ret; /* Ick, what to do on out of memory? */ return msg; @@ -827,7 +867,7 @@ bfd_errmsg (bfd_error_type error_tag) if (error_tag > bfd_error_invalid_error_code) error_tag = bfd_error_invalid_error_code; /* sanity check */ - return _(bfd_errmsgs [error_tag]); + return _(bfd_errmsgs[error_tag]); } /* @@ -856,6 +896,40 @@ bfd_perror (const char *message) fflush (stderr); } +/* +INTERNAL_FUNCTION + bfd_asprintf + +SYNOPSIS + char *bfd_asprintf (const char *fmt, ...); + +DESCRIPTION + Primarily for error reporting, this function is like + libiberty's xasprintf except that it can return NULL on no + memory and the returned string should not be freed. Uses a + single malloc'd buffer managed by libbfd, _bfd_error_buf. + Be aware that a call to this function frees the result of any + previous call. bfd_errmsg (bfd_error_on_input) also calls + this function. +*/ + +char * +bfd_asprintf (const char *fmt, ...) +{ + free (_bfd_error_buf); + _bfd_error_buf = NULL; + va_list ap; + va_start (ap, fmt); + int count = vasprintf (&_bfd_error_buf, fmt, ap); + va_end (ap); + if (count == -1) + { + bfd_set_error (bfd_error_no_memory); + _bfd_error_buf = NULL; + } + return _bfd_error_buf; +} + /* SUBSECTION BFD error handler @@ -867,7 +941,6 @@ SUBSECTION The BFD error handler acts like vprintf. CODE_FRAGMENT -. .typedef void (*bfd_error_handler_type) (const char *, va_list); . */ @@ -1575,7 +1648,6 @@ SUBSECTION _bfd_error_handler and continues. CODE_FRAGMENT -. .typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, . const char *bfd_version, . const char *bfd_file, @@ -1626,10 +1698,46 @@ bfd_set_assert_handler (bfd_assert_handler_type pnew) _bfd_assert_handler = pnew; return pold; } + +/* +INODE +Initialization, Miscellaneous, Error reporting, BFD front end + +FUNCTION + bfd_init + +SYNOPSIS + unsigned int bfd_init (void); + +DESCRIPTION + This routine must be called before any other BFD function to + initialize magical internal data structures. + Returns a magic number, which may be used to check + that the bfd library is configured as expected by users. + +.{* Value returned by bfd_init. *} +.#define BFD_INIT_MAGIC (sizeof (struct bfd_section)) +. +*/ + +unsigned int +bfd_init (void) +{ + bfd_error = bfd_error_no_error; + input_bfd = NULL; + free (_bfd_error_buf); + _bfd_error_buf = NULL; + input_error = bfd_error_no_error; + _bfd_error_program_name = NULL; + _bfd_error_internal = error_handler_fprintf; + _bfd_assert_handler = _bfd_default_assert_handler; + + return BFD_INIT_MAGIC; +} /* INODE -Miscellaneous, Memory Usage, Error reporting, BFD front end +Miscellaneous, Memory Usage, Initialization, BFD front end SECTION Miscellaneous @@ -1805,7 +1913,6 @@ DESCRIPTION header. Use bfd_arch_bits_per_address for number of bits in the architecture address. -RETURNS Returns the arch size in bits if known, <<-1>> otherwise. */ @@ -1833,7 +1940,6 @@ DESCRIPTION return an address sign extended to fill a bfd_vma when this is the case. -RETURNS Returns <<1>> if the target architecture is known to sign extend addresses, <<0>> if the target architecture is known to not sign extend addresses, and <<-1>> otherwise. @@ -1885,7 +1991,6 @@ SYNOPSIS DESCRIPTION Make @var{vma} the entry point of output BFD @var{abfd}. -RETURNS Returns <> on success, <> otherwise. */ @@ -2262,11 +2367,21 @@ DESCRIPTION .#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ . BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) . -.extern bfd_byte *bfd_get_relocated_section_contents -. (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, -. bool, asymbol **); -. +*/ +/* +FUNCTION + bfd_get_relocated_section_contents + +SYNOPSIS + bfd_byte *bfd_get_relocated_section_contents + (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, + bool, asymbol **); + +DESCRIPTION + Read and relocate the indirect link_order section, into DATA + (if non-NULL) or to a malloc'd buffer. Return the buffer, or + NULL on errors. */ bfd_byte * @@ -2295,7 +2410,18 @@ bfd_get_relocated_section_contents (bfd *abfd, return (*fn) (abfd, link_info, link_order, data, relocatable, symbols); } -/* Record information about an ELF program header. */ +/* +FUNCTION + bfd_record_phdr + +SYNOPSIS + bool bfd_record_phdr + (bfd *, unsigned long, bool, flagword, bool, bfd_vma, + bool, bool, unsigned int, struct bfd_section **); + +DESCRIPTION + Record information about an ELF program header. +*/ bool bfd_record_phdr (bfd *abfd, @@ -2357,8 +2483,23 @@ is32bit (bfd *abfd) } #endif -/* bfd_sprintf_vma and bfd_fprintf_vma display an address in the - target's address size. */ +/* +FUNCTION + bfd_sprintf_vma + bfd_fprintf_vma + +SYNOPSIS + void bfd_sprintf_vma (bfd *, char *, bfd_vma); + void bfd_fprintf_vma (bfd *, void *, bfd_vma); + +DESCRIPTION + bfd_sprintf_vma and bfd_fprintf_vma display an address in the + target's address size. + +EXTERNAL +.#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd, stdout, x) +. +*/ void bfd_sprintf_vma (bfd *abfd ATTRIBUTE_UNUSED, char *buf, bfd_vma value) @@ -2449,9 +2590,6 @@ SYNOPSIS DESCRIPTION Returns the maximum page size, in bytes, as determined by emulation. - -RETURNS - Returns the maximum page size in bytes for ELF, 0 otherwise. */ bfd_vma @@ -2477,9 +2615,6 @@ SYNOPSIS DESCRIPTION Returns the common page size, in bytes, as determined by emulation. - -RETURNS - Returns the common page size in bytes for ELF, 0 otherwise. */ bfd_vma diff --git a/bfd/bfd.m4 b/bfd/bfd.m4 index 86903e2a8..f47ad182d 100644 --- a/bfd/bfd.m4 +++ b/bfd/bfd.m4 @@ -1,6 +1,6 @@ dnl This file was derived from acinclude.m4. dnl -dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2023 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by diff --git a/bfd/bfdio.c b/bfd/bfdio.c index a67d4bbbe..7b8608b45 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -1,6 +1,6 @@ /* Low-level I/O routines for BFDs. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. @@ -154,6 +154,11 @@ _bfd_real_fopen (const char *filename, const char *modes) wcscpy (fullPath, prefix); int prefixLen = sizeof(prefix) / sizeof(wchar_t); + + /* Do not add a prefix to the null device. */ + if (stricmp (filename, "nul") == 0) + prefixLen = 1; + wchar_t * fullPathOffset = fullPath + prefixLen - 1; GetFullPathNameW (partPath, fullPathWSize, fullPathOffset, lpFilePart); @@ -220,14 +225,25 @@ DESCRIPTION .}; .extern const struct bfd_iovec _bfd_memory_iovec; - +. */ -/* Return value is amount read. */ +/* +FUNCTION + bfd_read + +SYNOPSIS + bfd_size_type bfd_read (void *, bfd_size_type, bfd *) + ATTRIBUTE_WARN_UNUSED_RESULT; + +DESCRIPTION + Attempt to read SIZE bytes from ABFD's iostream to PTR. + Return the amount read. +*/ bfd_size_type -bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) +bfd_read (void *ptr, bfd_size_type size, bfd *abfd) { file_ptr nread; bfd *element_bfd = abfd; @@ -264,6 +280,14 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) return -1; } + if (abfd->last_io == bfd_io_write) + { + abfd->last_io = bfd_io_force; + if (bfd_seek (abfd, 0, SEEK_CUR) != 0) + return -1; + } + abfd->last_io = bfd_io_read; + nread = abfd->iovec->bread (abfd, ptr, size); if (nread != -1) abfd->where += nread; @@ -271,8 +295,21 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) return nread; } +/* +FUNCTION + bfd_write + +SYNOPSIS + bfd_size_type bfd_write (const void *, bfd_size_type, bfd *) + ATTRIBUTE_WARN_UNUSED_RESULT; + +DESCRIPTION + Attempt to write SIZE bytes to ABFD's iostream from PTR. + Return the amount written. +*/ + bfd_size_type -bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd) +bfd_write (const void *ptr, bfd_size_type size, bfd *abfd) { file_ptr nwrote; @@ -286,6 +323,14 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd) return -1; } + if (abfd->last_io == bfd_io_read) + { + abfd->last_io = bfd_io_force; + if (bfd_seek (abfd, 0, SEEK_CUR) != 0) + return -1; + } + abfd->last_io = bfd_io_write; + nwrote = abfd->iovec->bwrite (abfd, ptr, size); if (nwrote != -1) abfd->where += nwrote; @@ -299,6 +344,17 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd) return nwrote; } +/* +FUNCTION + bfd_tell + +SYNOPSIS + file_ptr bfd_tell (bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; + +DESCRIPTION + Return ABFD's iostream file position. +*/ + file_ptr bfd_tell (bfd *abfd) { @@ -321,6 +377,17 @@ bfd_tell (bfd *abfd) return ptr - offset; } +/* +FUNCTION + bfd_flush + +SYNOPSIS + int bfd_flush (bfd *); + +DESCRIPTION + Flush ABFD's iostream pending IO. +*/ + int bfd_flush (bfd *abfd) { @@ -334,8 +401,18 @@ bfd_flush (bfd *abfd) return abfd->iovec->bflush (abfd); } -/* Returns 0 for success, negative value for failure (in which case - bfd_get_error can retrieve the error code). */ +/* +FUNCTION + bfd_stat + +SYNOPSIS + int bfd_stat (bfd *, struct stat *) ATTRIBUTE_WARN_UNUSED_RESULT; + +DESCRIPTION + Call fstat on ABFD's iostream. Return 0 on success, and a + negative value on failure. +*/ + int bfd_stat (bfd *abfd, struct stat *statbuf) { @@ -357,8 +434,17 @@ bfd_stat (bfd *abfd, struct stat *statbuf) return result; } -/* Returns 0 for success, nonzero for failure (in which case bfd_get_error - can retrieve the error code). */ +/* +FUNCTION + bfd_seek + +SYNOPSIS + int bfd_seek (bfd *, file_ptr, int) ATTRIBUTE_WARN_UNUSED_RESULT; + +DESCRIPTION + Call fseek on ABFD's iostream. Return 0 on success, and a + negative value on failure. +*/ int bfd_seek (bfd *abfd, file_ptr position, int direction) @@ -388,10 +474,13 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) if (direction != SEEK_CUR) position += offset; - if ((direction == SEEK_CUR && position == 0) - || (direction == SEEK_SET && (ufile_ptr) position == abfd->where)) + if (((direction == SEEK_CUR && position == 0) + || (direction == SEEK_SET && (ufile_ptr) position == abfd->where)) + && abfd->last_io != bfd_io_force) return 0; + abfd->last_io = bfd_io_seek; + result = abfd->iovec->bseek (abfd, position, direction); if (result != 0) { @@ -519,6 +608,7 @@ ufile_ptr bfd_get_file_size (bfd *abfd) { ufile_ptr file_size, archive_size = (ufile_ptr) -1; + unsigned int compression_p2 = 0; if (abfd->my_archive != NULL && !bfd_is_thin_archive (abfd->my_archive)) @@ -527,17 +617,17 @@ bfd_get_file_size (bfd *abfd) if (adata != NULL) { archive_size = adata->parsed_size; - /* If the archive is compressed we can't compare against - file size. */ + /* If the archive is compressed, assume an element won't + expand more than eight times file size. */ if (adata->arch_header != NULL && memcmp (((struct ar_hdr *) adata->arch_header)->ar_fmag, "Z\012", 2) == 0) - return archive_size; + compression_p2 = 3; abfd = abfd->my_archive; } } - file_size = bfd_get_size (abfd); + file_size = bfd_get_size (abfd) << compression_p2; if (archive_size < file_size) return archive_size; return file_size; @@ -550,7 +640,8 @@ FUNCTION SYNOPSIS void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, - void **map_addr, bfd_size_type *map_len); + void **map_addr, bfd_size_type *map_len) + ATTRIBUTE_WARN_UNUSED_RESULT; DESCRIPTION Return mmap()ed region of the file, if possible and implemented. @@ -737,3 +828,47 @@ const struct bfd_iovec _bfd_memory_iovec = &memory_bread, &memory_bwrite, &memory_btell, &memory_bseek, &memory_bclose, &memory_bflush, &memory_bstat, &memory_bmmap }; + +/* +FUNCTION + bfd_get_current_time + +SYNOPSIS + time_t bfd_get_current_time (time_t now); + +DESCRIPTION + Returns the current time. + + If the environment variable SOURCE_DATE_EPOCH is defined + then this is parsed and its value is returned. Otherwise + if the paramter NOW is non-zero, then that is returned. + Otherwise the result of the system call "time(NULL)" is + returned. +*/ + +time_t +bfd_get_current_time (time_t now) +{ + char *source_date_epoch; + unsigned long long epoch; + + /* FIXME: We could probably cache this lookup, + and the parsing of its value below. */ + source_date_epoch = getenv ("SOURCE_DATE_EPOCH"); + + if (source_date_epoch == NULL) + { + if (now) + return now; + return time (NULL); + } + + epoch = strtoull (source_date_epoch, NULL, 0); + + /* If epoch == 0 then something is wrong with SOURCE_DATE_EPOCH, + but we do not have an easy way to report it. Since the presence + of the environment variable implies that the user wants + deterministic behaviour we just accept the 0 value. */ + + return (time_t) epoch; +} diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c index 14cb33c23..6b4ea5c4d 100644 --- a/bfd/bfdwin.c +++ b/bfd/bfdwin.c @@ -1,5 +1,5 @@ /* Support for memory-mapped windows into a BFD. - Copyright (C) 1995-2022 Free Software Foundation, Inc. + Copyright (C) 1995-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -47,15 +47,47 @@ static int debug_windows; though. */ /* -INTERNAL_DEFINITION - -.struct _bfd_window_internal { +INTERNAL +.typedef struct _bfd_window_internal +.{ . struct _bfd_window_internal *next; . void *data; . bfd_size_type size; . int refcount : 31; {* should be enough... *} . unsigned mapped : 1; {* 1 = mmap, 0 = malloc *} -.}; +.} +.bfd_window_internal; +. + +EXTERNAL +.struct _bfd_window_internal; +. +.typedef struct _bfd_window +.{ +. {* What the user asked for. *} +. void *data; +. bfd_size_type size; +. {* The actual window used by BFD. Small user-requested read-only +. regions sharing a page may share a single window into the object +. file. Read-write versions shouldn't until I've fixed things to +. keep track of which portions have been claimed by the +. application; don't want to give the same region back when the +. application wants two writable copies! *} +. struct _bfd_window_internal *i; +.} +.bfd_window; +. +*/ + +/* +FUNCTION + bfd_init_window + +SYNOPSIS + void bfd_init_window (bfd_window *); + +DESCRIPTION + Initialise mmap window. */ void @@ -66,6 +98,17 @@ bfd_init_window (bfd_window *windowp) windowp->size = 0; } +/* +FUNCTION + bfd_free_window + +SYNOPSIS + void bfd_free_window (bfd_window *); + +DESCRIPTION + Finalise mmap window struct. +*/ + void bfd_free_window (bfd_window *windowp) { @@ -102,7 +145,17 @@ bfd_free_window (bfd_window *windowp) free (i); } -static int ok_to_map = 1; +/* +FUNCTION + bfd_get_file_window + +SYNOPSIS + bool bfd_get_file_window + (bfd *, file_ptr, bfd_size_type, bfd_window *, bool {*writable*}); + +DESCRIPTION + mmap from a bfd's iostream. +*/ bool bfd_get_file_window (bfd *abfd, @@ -111,6 +164,7 @@ bfd_get_file_window (bfd *abfd, bfd_window *windowp, bool writable) { + static int ok_to_map = 1; static size_t pagesize; bfd_window_internal *i = windowp->i; bfd_size_type size_to_alloc = size; @@ -238,7 +292,7 @@ bfd_get_file_window (bfd *abfd, i->refcount = 1; if (bfd_seek (abfd, offset, SEEK_SET) != 0) goto free_and_fail; - i->size = bfd_bread (i->data, size, abfd); + i->size = bfd_read (i->data, size, abfd); if (i->size != size) goto free_and_fail; i->mapped = 0; diff --git a/bfd/binary.c b/bfd/binary.c index 7abf4611a..c31ef3c2e 100644 --- a/bfd/binary.c +++ b/bfd/binary.c @@ -1,5 +1,5 @@ /* BFD back-end for binary objects. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, This file is part of BFD, the Binary File Descriptor library. @@ -103,7 +103,7 @@ binary_get_section_contents (bfd *abfd, bfd_size_type count) { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 - || bfd_bread (location, count, abfd) != count) + || bfd_read (location, count, abfd) != count) return false; return true; } diff --git a/bfd/bpf-reloc.def b/bfd/bpf-reloc.def new file mode 100644 index 000000000..31f761d29 --- /dev/null +++ b/bfd/bpf-reloc.def @@ -0,0 +1,89 @@ + /* This reloc does nothing. */ + BPF_HOWTO (R_BPF_NONE, /* type */ + 0, /* rightshift */ + 0, /* size */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false) /* pcrel_offset */ + + /* 64-immediate in LDDW instruction. */ + BPF_HOWTO (R_BPF_64_64, /* type */ + 0, /* rightshift */ + 8, /* size */ + 64, /* bitsize */ + false, /* pc_relative */ + 32, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_64_64", /* name */ + true, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + true) /* pcrel_offset */ + + /* 32-bit data. */ + BPF_HOWTO (R_BPF_64_ABS32, /* type */ + 0, /* rightshift */ + 4, /* size */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_64_ABS32", /* name */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + true) /* pcrel_offset */ + + /* 64-bit data. */ + BPF_HOWTO (R_BPF_64_ABS64, /* type */ + 0, /* rightshift */ + 8, /* size */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_64_ABS64", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + MINUS_ONE, /* dst_mask */ + true) /* pcrel_offset */ + + /* 32-bit PC-relative address in call instructions. */ + BPF_HOWTO (R_BPF_64_32, /* type */ + 0, /* rightshift */ + 4, /* size */ + 32, /* bitsize */ + true, /* pc_relative */ + 32, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_64_32", /* name */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + true) /* pcrel_offset */ + + /* 16-bit PC-relative address in load instructions. */ + BPF_HOWTO (R_BPF_GNU_64_16, /* type */ + 0, /* rightshift */ + 2, /* size */ + 16, /* bitsize */ + true, /* pc_relative */ + 16, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bpf_elf_generic_reloc, /* special_function */ + "R_BPF_GNU_64_16", /* name */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + true) /* pcrel_offset */ diff --git a/bfd/cache.c b/bfd/cache.c index 73b68c7af..357a38da5 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -1,6 +1,6 @@ /* BFD library -- caching of file descriptors. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com). @@ -266,10 +266,7 @@ bfd_cache_lookup_worker (bfd *abfd, enum cache_flag flag) && !(flag & CACHE_NO_SEEK_ERROR)) bfd_set_error (bfd_error_system_call); else - { - abfd->flags &= ~BFD_CLOSED_BY_CACHE; - return (FILE *) abfd->iostream; - } + return (FILE *) abfd->iostream; /* xgettext:c-format */ _bfd_error_handler (_("reopening %pB: %s"), @@ -506,12 +503,13 @@ bfd_cache_init (bfd *abfd) } abfd->iovec = &cache_iovec; insert (abfd); + abfd->flags &= ~BFD_CLOSED_BY_CACHE; ++open_files; return true; } /* -INTERNAL_FUNCTION +FUNCTION bfd_cache_close SYNOPSIS @@ -521,7 +519,6 @@ DESCRIPTION Remove the BFD @var{abfd} from the cache. If the attached file is open, then close it too. -RETURNS <> is returned if closing the file fails, <> is returned if all is well. */ @@ -529,6 +526,7 @@ RETURNS bool bfd_cache_close (bfd *abfd) { + /* Don't remove this test. bfd_reinit depends on it. */ if (abfd->iovec != &cache_iovec) return true; @@ -548,9 +546,10 @@ SYNOPSIS DESCRIPTION Remove all BFDs from the cache. If the attached file is open, - then close it too. + then close it too. Note - despite its name this function will + close a BFD even if it is not marked as being cacheable, ie + even if bfd_get_cacheable() returns false. -RETURNS <> is returned if closing one of the file fails, <> is returned if all is well. */ @@ -561,7 +560,16 @@ bfd_cache_close_all (void) bool ret = true; while (bfd_last_cache != NULL) - ret &= bfd_cache_close (bfd_last_cache); + { + bfd *prev_bfd_last_cache = bfd_last_cache; + + ret &= bfd_cache_close (bfd_last_cache); + + /* Stop a potential infinite loop should bfd_cache_close() + not update bfd_last_cache. */ + if (bfd_last_cache == prev_bfd_last_cache) + break; + } return ret; } diff --git a/bfd/cf-i386lynx.c b/bfd/cf-i386lynx.c index 162375807..eb11ed565 100644 --- a/bfd/cf-i386lynx.c +++ b/bfd/cf-i386lynx.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF LynxOS files. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c index db63ba9bf..345f06bf5 100644 --- a/bfd/cisco-core.c +++ b/bfd/cisco-core.c @@ -1,5 +1,5 @@ /* BFD back-end for CISCO crash dumps. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -95,10 +95,10 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc) size_t amt; flagword flags; - if (bfd_seek (abfd, (file_ptr) crash_info_loc, SEEK_SET) != 0) + if (bfd_seek (abfd, crash_info_loc, SEEK_SET) != 0) return NULL; - nread = bfd_bread (buf, (bfd_size_type) 4, abfd); + nread = bfd_read (buf, 4, abfd); if (nread != 4) { if (bfd_get_error () != bfd_error_system_call) @@ -107,14 +107,14 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc) } crashinfo_offset = MASK_ADDR (bfd_get_32 (abfd, buf)); - if (bfd_seek (abfd, (file_ptr) crashinfo_offset, SEEK_SET) != 0) + if (bfd_seek (abfd, crashinfo_offset, SEEK_SET) != 0) { /* Most likely we failed because of a bogus (huge) offset */ bfd_set_error (bfd_error_wrong_format); return NULL; } - nread = bfd_bread (&crashinfo, (bfd_size_type) sizeof (crashinfo), abfd); + nread = bfd_read (&crashinfo, sizeof (crashinfo), abfd); if (nread != sizeof (crashinfo)) { if (bfd_get_error () != bfd_error_system_call) diff --git a/bfd/coff-aarch64.c b/bfd/coff-aarch64.c index 2c3e225a2..60e231343 100644 --- a/bfd/coff-aarch64.c +++ b/bfd/coff-aarch64.c @@ -1,5 +1,5 @@ /* BFD back-end for AArch64 COFF files. - Copyright (C) 2021-2022 Free Software Foundation, Inc. + Copyright (C) 2021-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,10 +23,6 @@ #define COFF_WITH_peAArch64 #endif -/* Note we have to make sure not to include headers twice. - Not all headers are wrapped in #ifdef guards, so we define - PEI_HEADERS to prevent double including here. */ -#ifndef PEI_HEADERS #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -35,65 +31,302 @@ #include "coff/pe.h" #include "libcoff.h" #include "libiberty.h" -#endif -#include "libcoff.h" +/* For these howto special functions, + output_bfd == NULL => final link, or objdump -W and other calls to + bfd_simple_get_relocated_section_contents + output_bfd != NULL && output_bfd != abfd => ld -r + output_bfd != NULL && output_bfd == abfd => gas. + FIXME: ld -r is punted to bfd_perform_relocation. This won't be + correct for cases where the addend needs to be adjusted, eg. for + relocations against section symbols, and the field is split because + bfd_perform_relocation can't write addends to split relocation fields. */ + +static bfd_reloc_status_type +coff_aarch64_rel21_reloc (bfd *abfd, + arelent *reloc_entry, + asymbol *symbol, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message ATTRIBUTE_UNUSED) +{ + if (output_bfd != NULL && output_bfd != abfd) + return bfd_reloc_continue; + + if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, + input_section, reloc_entry->address)) + return bfd_reloc_outofrange; + + uint32_t op = bfd_getl32 (data + reloc_entry->address); + bfd_vma relocation = reloc_entry->addend; + bfd_reloc_status_type ret = bfd_reloc_ok; + if (output_bfd == NULL) + { + if (bfd_is_und_section (symbol->section)) + { + if ((symbol->flags & BSF_WEAK) == 0) + ret = bfd_reloc_undefined; + } + else if (!bfd_is_com_section (symbol->section)) + relocation += (symbol->value + + symbol->section->output_offset + + symbol->section->output_section->vma); + bfd_vma addend = ((op >> 3) & 0x1ffffc) | ((op >> 29) & 0x3); + addend = (addend ^ 0x100000) - 0x100000; + relocation += addend; + relocation -= (reloc_entry->address + + input_section->output_offset + + input_section->output_section->vma); + relocation = (bfd_signed_vma) relocation >> reloc_entry->howto->rightshift; + } + if (relocation + 0x100000 > 0x1fffff) + ret = bfd_reloc_overflow; + + op &= 0x9f00001f; + op |= (relocation & 0x1ffffc) << 3; + op |= (relocation & 0x3) << 29; + + bfd_putl32 (op, data + reloc_entry->address); + + return ret; +} + +static bfd_reloc_status_type +coff_aarch64_po12l_reloc (bfd *abfd, + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message ATTRIBUTE_UNUSED) +{ + if (output_bfd != NULL && output_bfd != abfd) + return bfd_reloc_continue; + + if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, + input_section, reloc_entry->address)) + return bfd_reloc_outofrange; + + uint32_t op = bfd_getl32 (data + reloc_entry->address); + bfd_vma relocation = reloc_entry->addend & 0xfff; + int shift; + + if ((op & 0xff800000) == 0x3d800000) + { + /* LDR / STR with q register */ + shift = 4; + } + else + { + /* top two bits represent how much addend should be shifted */ + shift = op >> 30; + } + + bfd_reloc_status_type ret = bfd_reloc_ok; + if (output_bfd == NULL) + { + if (bfd_is_und_section (symbol->section)) + { + if ((symbol->flags & BSF_WEAK) == 0) + ret = bfd_reloc_undefined; + } + else if (!bfd_is_com_section (symbol->section)) + relocation += (symbol->value + + symbol->section->output_offset + + symbol->section->output_section->vma); + bfd_vma addend = (op >> 10) & 0xfff; + addend <<= shift; + relocation += addend; + } + + if (relocation & ((1 << shift) - 1)) + ret = bfd_reloc_overflow; + + op &= 0xffc003ff; + op |= (relocation >> shift << 10) & 0x3ffc00; + + bfd_putl32 (op, data + reloc_entry->address); + + return ret; +} + +static bfd_reloc_status_type +coff_aarch64_addr32nb_reloc (bfd *abfd, + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message) +{ + if (output_bfd != NULL && output_bfd != abfd) + return bfd_reloc_continue; + + if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, + input_section, reloc_entry->address)) + return bfd_reloc_outofrange; + + bfd_vma relocation = reloc_entry->addend; + bfd_reloc_status_type ret = bfd_reloc_ok; + if (output_bfd == NULL) + { + if (bfd_is_und_section (symbol->section)) + { + if ((symbol->flags & BSF_WEAK) == 0) + ret = bfd_reloc_undefined; + } + else if (!bfd_is_com_section (symbol->section)) + relocation += (symbol->value + + symbol->section->output_offset + + symbol->section->output_section->vma); + bfd_vma addend = bfd_getl_signed_32 (data + reloc_entry->address); + relocation += addend; + bfd *obfd = input_section->output_section->owner; + if (bfd_get_flavour (obfd) == bfd_target_coff_flavour + && obj_pe (obfd)) + relocation -= pe_data (obfd)->pe_opthdr.ImageBase; + else + { + *error_message = "unsupported"; + return bfd_reloc_dangerous; + } + } + + if (relocation + 0x80000000 > 0xffffffff) + ret = bfd_reloc_overflow; + + bfd_putl32 (relocation, data + reloc_entry->address); + + return ret; +} + +static bfd_reloc_status_type +coff_aarch64_secrel_reloc (bfd *abfd, + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message ATTRIBUTE_UNUSED) +{ + if (output_bfd != NULL && output_bfd != abfd) + return bfd_reloc_continue; + + if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, + input_section, reloc_entry->address)) + return bfd_reloc_outofrange; + + bfd_vma relocation = reloc_entry->addend; + bfd_reloc_status_type ret = bfd_reloc_ok; + if (output_bfd == NULL) + { + if (bfd_is_und_section (symbol->section)) + { + if ((symbol->flags & BSF_WEAK) == 0) + ret = bfd_reloc_undefined; + } + else if (!bfd_is_com_section (symbol->section)) + relocation += (symbol->value + + symbol->section->output_offset); + bfd_vma addend = bfd_getl_signed_32 (data + reloc_entry->address); + relocation += addend; + } + if (relocation > 0xffffffff) + ret = bfd_reloc_overflow; + + bfd_putl32 (relocation, data + reloc_entry->address); + + return ret; +} + +#define coff_aarch64_NULL NULL +#undef HOWTO_INSTALL_ADDEND +#define HOWTO_INSTALL_ADDEND 1 +#define HOW(type, right, size, bits, pcrel, left, ovf, func, mask) \ + HOWTO (type, right, size, bits, pcrel, left, complain_overflow_##ovf, \ + coff_aarch64_##func, #type, true, mask, mask, false) + +static const reloc_howto_type arm64_reloc_howto_abs += HOW (IMAGE_REL_ARM64_ABSOLUTE, + 0, 0, 0, false, 0, dont, NULL, 0); + +static const reloc_howto_type arm64_reloc_howto_64 += HOW (IMAGE_REL_ARM64_ADDR64, + 0, 8, 64, false, 0, dont, NULL, UINT64_C (-1)); + +static const reloc_howto_type arm64_reloc_howto_32 += HOW (IMAGE_REL_ARM64_ADDR32, + 0, 4, 32, false, 0, signed, NULL, 0xffffffff); + +static const reloc_howto_type arm64_reloc_howto_32_pcrel += HOW (IMAGE_REL_ARM64_REL32, + 0, 4, 32, true, 0, signed, NULL, 0xffffffff); -/* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ -#define MINUS_ONE (~ (bfd_vma) 0) +static const reloc_howto_type arm64_reloc_howto_branch26 += HOW (IMAGE_REL_ARM64_BRANCH26, + 2, 4, 26, true, 0, signed, NULL, 0x3ffffff); -static const reloc_howto_type arm64_reloc_howto_64 = HOWTO(IMAGE_REL_ARM64_ADDR64, 0, 8, 64, false, 0, - complain_overflow_bitfield, - NULL, "64", - false, MINUS_ONE, MINUS_ONE, false); +static const reloc_howto_type arm64_reloc_howto_page21 += HOW (IMAGE_REL_ARM64_PAGEBASE_REL21, + 12, 4, 21, true, 0, signed, rel21_reloc, 0x1fffff); -static const reloc_howto_type arm64_reloc_howto_32 = HOWTO (IMAGE_REL_ARM64_ADDR32, 0, 4, 32, false, 0, - complain_overflow_bitfield, - NULL, "32", - false, 0xffffffff, 0xffffffff, false); +static const reloc_howto_type arm64_reloc_howto_lo21 += HOW (IMAGE_REL_ARM64_REL21, + 0, 4, 21, true, 0, signed, rel21_reloc, 0x1fffff); -static const reloc_howto_type arm64_reloc_howto_32_pcrel = HOWTO (IMAGE_REL_ARM64_REL32, 0, 4, 32, true, 0, - complain_overflow_bitfield, - NULL, "DISP32", - false, 0xffffffff, 0xffffffff, true); +static const reloc_howto_type arm64_reloc_howto_pgoff12l += HOW (IMAGE_REL_ARM64_PAGEOFFSET_12L, + 0, 4, 12, true, 10, signed, po12l_reloc, 0x3ffc00); -static const reloc_howto_type arm64_reloc_howto_branch26 = HOWTO (IMAGE_REL_ARM64_BRANCH26, 0, 4, 26, true, 0, - complain_overflow_bitfield, - NULL, "BRANCH26", - false, 0x03ffffff, 0x03ffffff, true); +static const reloc_howto_type arm64_reloc_howto_branch19 += HOW (IMAGE_REL_ARM64_BRANCH19, + 2, 4, 19, true, 5, signed, NULL, 0xffffe0); -static const reloc_howto_type arm64_reloc_howto_page21 = HOWTO (IMAGE_REL_ARM64_PAGEBASE_REL21, 12, 4, 21, true, 0, - complain_overflow_signed, - NULL, "PAGE21", - false, 0x1fffff, 0x1fffff, false); +static const reloc_howto_type arm64_reloc_howto_branch14 += HOW (IMAGE_REL_ARM64_BRANCH14, + 2, 4, 14, true, 5, signed, NULL, 0x7ffe0); -static const reloc_howto_type arm64_reloc_howto_lo21 = HOWTO (IMAGE_REL_ARM64_REL21, 0, 4, 21, true, 0, - complain_overflow_signed, - NULL, "LO21", - false, 0x1fffff, 0x1fffff, true); +static const reloc_howto_type arm64_reloc_howto_pgoff12a += HOW (IMAGE_REL_ARM64_PAGEOFFSET_12A, + 0, 4, 12, true, 10, dont, NULL, 0x3ffc00); -static const reloc_howto_type arm64_reloc_howto_pgoff12 = HOWTO (IMAGE_REL_ARM64_PAGEOFFSET_12L, 1, 4, 12, true, 0, - complain_overflow_signed, - NULL, "PGOFF12", - false, 0xffe, 0xffe, true); +static const reloc_howto_type arm64_reloc_howto_32nb += HOW (IMAGE_REL_ARM64_ADDR32NB, + 0, 4, 32, false, 0, signed, addr32nb_reloc, 0xffffffff); -static const reloc_howto_type arm64_reloc_howto_branch19 = HOWTO (IMAGE_REL_ARM64_BRANCH19, 2, 4, 19, true, 0, - complain_overflow_signed, - NULL, "BRANCH19", - false, 0x7ffff, 0x7ffff, true); +static const reloc_howto_type arm64_reloc_howto_secrel += HOW (IMAGE_REL_ARM64_SECREL, + 0, 4, 32, false, 0, dont, secrel_reloc, 0xffffffff); +static const reloc_howto_type arm64_reloc_howto_secidx += HOW (IMAGE_REL_ARM64_SECTION, + 0, 2, 16, false, 0, dont, NULL, 0xffff); static const reloc_howto_type* const arm64_howto_table[] = { + &arm64_reloc_howto_abs, &arm64_reloc_howto_64, &arm64_reloc_howto_32, &arm64_reloc_howto_32_pcrel, &arm64_reloc_howto_branch26, &arm64_reloc_howto_page21, &arm64_reloc_howto_lo21, - &arm64_reloc_howto_pgoff12, - &arm64_reloc_howto_branch19 + &arm64_reloc_howto_pgoff12l, + &arm64_reloc_howto_branch19, + &arm64_reloc_howto_branch14, + &arm64_reloc_howto_pgoff12a, + &arm64_reloc_howto_32nb, + &arm64_reloc_howto_secrel, + &arm64_reloc_howto_secidx }; +/* No adjustment to addends should be needed. The actual relocation + addend is in the section contents. Unfortunately this means actual + addends are not shown by objdump -r, but that's true for most + COFF/PE targets where arelent.addend is an adjustment. */ +#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \ + cache_ptr->addend = 0; + #ifndef NUM_ELEM #define NUM_ELEM(a) ((sizeof (a)) / sizeof ((a)[0])) #endif @@ -118,13 +351,28 @@ coff_aarch64_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real case BFD_RELOC_AARCH64_JUMP26: return &arm64_reloc_howto_branch26; case BFD_RELOC_AARCH64_ADR_HI21_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: return &arm64_reloc_howto_page21; + case BFD_RELOC_AARCH64_TSTBR14: + return &arm64_reloc_howto_branch14; case BFD_RELOC_AARCH64_ADR_LO21_PCREL: return &arm64_reloc_howto_lo21; + case BFD_RELOC_AARCH64_ADD_LO12: + return &arm64_reloc_howto_pgoff12a; + case BFD_RELOC_AARCH64_LDST8_LO12: case BFD_RELOC_AARCH64_LDST16_LO12: - return &arm64_reloc_howto_pgoff12; + case BFD_RELOC_AARCH64_LDST32_LO12: + case BFD_RELOC_AARCH64_LDST64_LO12: + case BFD_RELOC_AARCH64_LDST128_LO12: + return &arm64_reloc_howto_pgoff12l; case BFD_RELOC_AARCH64_BRANCH19: return &arm64_reloc_howto_branch19; + case BFD_RELOC_RVA: + return &arm64_reloc_howto_32nb; + case BFD_RELOC_32_SECREL: + return &arm64_reloc_howto_secrel; + case BFD_RELOC_16_SECIDX: + return &arm64_reloc_howto_secidx; default: BFD_FAIL (); return NULL; @@ -155,6 +403,8 @@ coff_aarch64_rtype_lookup (unsigned int code) { switch (code) { + case IMAGE_REL_ARM64_ABSOLUTE: + return &arm64_reloc_howto_abs; case IMAGE_REL_ARM64_ADDR64: return &arm64_reloc_howto_64; case IMAGE_REL_ARM64_ADDR32: @@ -168,19 +418,46 @@ coff_aarch64_rtype_lookup (unsigned int code) case IMAGE_REL_ARM64_REL21: return &arm64_reloc_howto_lo21; case IMAGE_REL_ARM64_PAGEOFFSET_12L: - return &arm64_reloc_howto_pgoff12; + return &arm64_reloc_howto_pgoff12l; case IMAGE_REL_ARM64_BRANCH19: return &arm64_reloc_howto_branch19; + case IMAGE_REL_ARM64_BRANCH14: + return &arm64_reloc_howto_branch14; + case IMAGE_REL_ARM64_PAGEOFFSET_12A: + return &arm64_reloc_howto_pgoff12a; + case IMAGE_REL_ARM64_ADDR32NB: + return &arm64_reloc_howto_32nb; + case IMAGE_REL_ARM64_SECREL: + return &arm64_reloc_howto_secrel; + case IMAGE_REL_ARM64_SECTION: + return &arm64_reloc_howto_secidx; default: - BFD_FAIL (); return NULL; } return NULL; } -#define RTYPE2HOWTO(cache_ptr, dst) \ - ((cache_ptr)->howto = coff_aarch64_rtype_lookup((dst)->r_type)) +#define RTYPE2HOWTO(cache_ptr, dst) \ + ((cache_ptr)->howto = coff_aarch64_rtype_lookup((dst)->r_type)) + +static reloc_howto_type * +coff_aarch64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, + asection *sec ATTRIBUTE_UNUSED, + struct internal_reloc *rel, + struct coff_link_hash_entry *h ATTRIBUTE_UNUSED, + struct internal_syment *sym ATTRIBUTE_UNUSED, + bfd_vma *addendp) +{ + reloc_howto_type *howto = coff_aarch64_rtype_lookup (rel->r_type); + + /* Cancel out code in _bfd_coff_generic_relocate_section. */ + *addendp = 0; + + return howto; +} + +#define coff_rtype_to_howto coff_aarch64_rtype_to_howto #define SELECT_RELOC(x,howto) { (x).r_type = (howto)->type; } @@ -188,10 +465,7 @@ coff_aarch64_rtype_lookup (unsigned int code) #define bfd_pe_print_pdata NULL #endif -/* Handle include/coff/aarch64.h external_reloc. */ -#define SWAP_IN_RELOC_OFFSET H_GET_32 -#define SWAP_OUT_RELOC_OFFSET H_PUT_32 - +#ifdef COFF_WITH_PE /* Return TRUE if this relocation should appear in the output .reloc section. */ @@ -201,9 +475,441 @@ in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, { return !howto->pc_relative; } +#endif + +static bool +coff_pe_aarch64_relocate_section (bfd *output_bfd, + struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + struct internal_reloc *relocs, + struct internal_syment *syms, + asection **sections) +{ + struct internal_reloc *rel; + struct internal_reloc *relend; + + if (bfd_link_relocatable (info)) + return true; + + rel = relocs; + relend = rel + input_section->reloc_count; + + /* The addend for a relocation is stored in the immediate bits of each + opcode. So for each relocation, we need to extract the immediate value, + use this to calculate what it should be for the symbol, and rewrite the + opcode into the section stream. */ + + for (; rel < relend; rel++) + { + long symndx; + struct coff_link_hash_entry *h; + bfd_vma sym_value; + asection *sec = NULL; + uint64_t dest_vma; + + /* skip trivial relocations */ + if (rel->r_type == IMAGE_REL_ARM64_ADDR32 + || rel->r_type == IMAGE_REL_ARM64_ADDR64 + || rel->r_type == IMAGE_REL_ARM64_ABSOLUTE) + continue; + + symndx = rel->r_symndx; + sym_value = syms[symndx].n_value; + + h = obj_coff_sym_hashes (input_bfd)[symndx]; + + if (h && h->root.type == bfd_link_hash_defined) + { + sec = h->root.u.def.section; + sym_value = h->root.u.def.value; + } + else + { + sec = sections[symndx]; + } + + if (!sec) + continue; + + if (bfd_is_und_section (sec)) + continue; + + if (discarded_section (sec)) + continue; + + dest_vma = sec->output_section->vma + sec->output_offset + sym_value; + + if (symndx < 0 + || (unsigned long) symndx >= obj_raw_syment_count (input_bfd)) + continue; + + /* All the relocs handled below operate on 4 bytes. */ + if (input_section->size < rel->r_vaddr + || input_section->size - rel->r_vaddr < 4) + { + _bfd_error_handler + /* xgettext: c-format */ + (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"), + input_bfd, (uint64_t) rel->r_vaddr, input_section); + continue; + } + + switch (rel->r_type) + { + case IMAGE_REL_ARM64_ADDR32NB: + { + uint64_t val; + int32_t addend; + + addend = bfd_getl32 (contents + rel->r_vaddr); + + dest_vma += addend; + + val = dest_vma; + val -= pe_data (output_bfd)->pe_opthdr.ImageBase; + + if (val > 0xffffffff) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_ADDR32NB", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + bfd_putl32 (val, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_BRANCH26: + { + uint64_t cur_vma; + uint32_t opcode; + int64_t addend, val; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = (opcode & 0x3ffffff) << 2; + + if (addend & 0x8000000) + addend |= 0xfffffffff0000000; + + dest_vma += addend; + cur_vma = input_section->output_section->vma + + input_section->output_offset + + rel->r_vaddr; + + val = (dest_vma >> 2) - (cur_vma >> 2); + + if (val > 0x1ffffff || val < -0x2000000) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_BRANCH26", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + opcode &= 0xfc000000; + opcode |= val & 0x3ffffff; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_BRANCH19: + { + uint64_t cur_vma; + uint32_t opcode; + int64_t addend, val; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = (opcode & 0xffffe0) >> 3; + + if (addend & 0x100000) + addend |= 0xffffffffffe00000; + + dest_vma += addend; + cur_vma = input_section->output_section->vma + + input_section->output_offset + + rel->r_vaddr; + + val = (dest_vma >> 2) - (cur_vma >> 2); + + if (val > 0x3ffff || val < -0x40000) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_BRANCH19", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + opcode &= 0xff00001f; + opcode |= (val & 0x7ffff) << 5; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_BRANCH14: + { + uint64_t cur_vma; + uint32_t opcode; + int64_t addend, val; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = (opcode & 0x7ffe0) >> 3; + + if (addend & 0x8000) + addend |= 0xffffffffffff0000; + + dest_vma += addend; + cur_vma = input_section->output_section->vma + + input_section->output_offset + + rel->r_vaddr; + + val = (dest_vma >> 2) - (cur_vma >> 2); + + if (val > 0x1fff || val < -0x2000) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_BRANCH14", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + opcode &= 0xfff8001f; + opcode |= (val & 0x3fff) << 5; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_PAGEBASE_REL21: + { + uint64_t cur_vma; + uint32_t opcode; + int64_t addend, val; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = ((opcode & 0xffffe0) >> 3) + | ((opcode & 0x60000000) >> 29); + + if (addend & 0x100000) + addend |= 0xffffffffffe00000; + + dest_vma += addend; + cur_vma = input_section->output_section->vma + + input_section->output_offset + + rel->r_vaddr; + + val = (dest_vma >> 12) - (cur_vma >> 12); + + if (val > 0xfffff || val < -0x100000) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_PAGEBASE_REL21", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + opcode &= 0x9f00001f; + opcode |= (val & 0x3) << 29; + opcode |= (val & 0x1ffffc) << 3; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_REL21: + { + uint64_t cur_vma; + uint32_t opcode; + int64_t addend, val; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = ((opcode & 0xffffe0) >> 3) + | ((opcode & 0x60000000) >> 29); + + if (addend & 0x100000) + addend |= 0xffffffffffe00000; + + dest_vma += addend; + cur_vma = input_section->output_section->vma + + input_section->output_offset + + rel->r_vaddr; + + val = dest_vma - cur_vma; + + if (val > 0xfffff || val < -0x100000) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_REL21", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + opcode &= 0x9f00001f; + opcode |= (val & 0x3) << 29; + opcode |= (val & 0x1ffffc) << 3; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_PAGEOFFSET_12L: + { + uint32_t opcode, val; + uint8_t shift; + int32_t addend; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = (opcode & 0x3ffc00) >> 10; + + if ((opcode & 0xff800000) == 0x3d800000) + { + /* LDR / STR with q register */ + shift = 4; + } + else + { + /* top two bits represent how much addend should be shifted */ + shift = opcode >> 30; + } + + addend <<= shift; + + dest_vma += addend; + + /* only interested in bottom 12 bits */ + val = dest_vma & 0xfff; + + if (val & ((1 << shift) - 1)) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_PAGEOFFSET_12L", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + val >>= shift; + + opcode &= 0xffc003ff; + opcode |= val << 10; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_PAGEOFFSET_12A: + { + uint32_t opcode, val; + int32_t addend; + + opcode = bfd_getl32 (contents + rel->r_vaddr); + + addend = (opcode & 0x3ffc00) >> 10; + + dest_vma += addend; + + /* only interested in bottom 12 bits */ + val = dest_vma & 0xfff; + + opcode &= 0xffc003ff; + opcode |= val << 10; + + bfd_putl32 (opcode, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_SECREL: + { + uint64_t val; + int32_t addend; + + addend = bfd_getl32 (contents + rel->r_vaddr); + + val = sec->output_offset + sym_value + addend; + + if (val > 0xffffffff) + (*info->callbacks->reloc_overflow) + (info, h ? &h->root : NULL, syms[symndx]._n._n_name, + "IMAGE_REL_ARM64_SECREL", addend, input_bfd, + input_section, rel->r_vaddr - input_section->vma); + + bfd_putl32 (val, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + case IMAGE_REL_ARM64_SECTION: + { + uint16_t idx = 0, i = 1; + asection *s; + + s = output_bfd->sections; + while (s) + { + if (s == sec->output_section) + { + idx = i; + break; + } + + i++; + s = s->next; + } + + + bfd_putl16 (idx, contents + rel->r_vaddr); + rel->r_type = IMAGE_REL_ARM64_ABSOLUTE; + + break; + } + + default: + info->callbacks->einfo (_("%F%P: Unhandled relocation type %u\n"), + rel->r_type); + BFD_FAIL (); + return false; + } + } + + return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, + input_section, contents, + relocs, syms, sections); +} + +#define coff_relocate_section coff_pe_aarch64_relocate_section #include "coffcode.h" +/* Prevent assertion in md_apply_fix by forcing use_rela_p on for new + sections. */ +static bool +coff_aarch64_new_section_hook (bfd *abfd, asection *section) +{ + if (!coff_new_section_hook (abfd, section)) + return false; + + section->use_rela_p = 1; + + return true; +} + +#define coff_aarch64_close_and_cleanup coff_close_and_cleanup +#define coff_aarch64_bfd_free_cached_info coff_bfd_free_cached_info +#define coff_aarch64_get_section_contents coff_get_section_contents +#define coff_aarch64_get_section_contents_in_window coff_get_section_contents_in_window + /* Target vectors. */ const bfd_target #ifdef TARGET_SYM @@ -270,7 +976,7 @@ const bfd_target _bfd_bool_bfd_false_error }, - BFD_JUMP_TABLE_GENERIC (coff), + BFD_JUMP_TABLE_GENERIC (coff_aarch64), BFD_JUMP_TABLE_COPY (coff), BFD_JUMP_TABLE_CORE (_bfd_nocore), BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index 2ac47754a..1b34a8957 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -1,5 +1,5 @@ /* BFD back-end for ALPHA Extended-Coff files. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Modified from coff-mips.c by Steve Chamberlain and Ian Lance Taylor . @@ -2030,9 +2030,9 @@ alpha_ecoff_read_ar_hdr (bfd *abfd) /* This is a compressed file. We must set the size correctly. The size is the eight bytes after the dummy file header. */ - if (bfd_seek (abfd, (file_ptr) FILHSZ, SEEK_CUR) != 0 - || bfd_bread (ab, (bfd_size_type) 8, abfd) != 8 - || bfd_seek (abfd, (file_ptr) (- (FILHSZ + 8)), SEEK_CUR) != 0) + if (bfd_seek (abfd, FILHSZ, SEEK_CUR) != 0 + || bfd_read (ab, 8, abfd) != 8 + || bfd_seek (abfd, -(FILHSZ + 8), SEEK_CUR) != 0) { free (ret); return NULL; @@ -2077,18 +2077,18 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos, return nbfd; /* We must uncompress this element. We do this by copying it into a - memory buffer, and making bfd_bread and bfd_seek use that buffer. + memory buffer, and making bfd_read and bfd_seek use that buffer. This can use a lot of memory, but it's simpler than getting a temporary file, making that work with the file descriptor caching code, and making sure that it is deleted at all appropriate times. It can be changed if it ever becomes important. */ /* The compressed file starts with a dummy ECOFF file header. */ - if (bfd_seek (nbfd, (file_ptr) FILHSZ, SEEK_SET) != 0) + if (bfd_seek (nbfd, FILHSZ, SEEK_SET) != 0) goto error_return; /* The next eight bytes are the real file size. */ - if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8) + if (bfd_read (ab, 8, nbfd) != 8) goto error_return; size = H_GET_64 (nbfd, ab); @@ -2115,7 +2115,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos, left = size; /* I don't know what the next eight bytes are for. */ - if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8) + if (bfd_read (ab, 8, nbfd) != 8) goto error_return; /* This is the uncompression algorithm. It's a simple @@ -2126,7 +2126,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos, next eight bytes in the output stream. */ memset (dict, 0, sizeof dict); h = 0; - while (bfd_bread (&b, (bfd_size_type) 1, nbfd) == 1) + while (bfd_read (&b, 1, nbfd) == 1) { unsigned int i; @@ -2138,7 +2138,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos, n = dict[h]; else { - if (bfd_bread (&n, 1, nbfd) != 1) + if (bfd_read (&n, 1, nbfd) != 1) goto error_return; dict[h] = n; } @@ -2174,6 +2174,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos, nbfd->iostream = bim; nbfd->iovec = &_bfd_memory_iovec; nbfd->origin = 0; + nbfd->size = 0; BFD_ASSERT (! nbfd->cacheable); return nbfd; diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c index 65cb94651..694ae8daa 100644 --- a/bfd/coff-arm.c +++ b/bfd/coff-arm.c @@ -1,5 +1,5 @@ /* BFD back-end for ARM COFF files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -953,7 +953,7 @@ arm_emit_base_file_entry (struct bfd_link_info *info, + input_section->output_offset + input_section->output_section->vma); - if (coff_data (output_bfd)->pe) + if (obj_pe (output_bfd)) addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) return true; diff --git a/bfd/coff-arm.h b/bfd/coff-arm.h index 58a611618..3d82b1572 100644 --- a/bfd/coff-arm.h +++ b/bfd/coff-arm.h @@ -1,5 +1,5 @@ /* BFD back-end for ARM COFF files. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/coff-bfd.c b/bfd/coff-bfd.c index 2152bec18..9aceeb080 100644 --- a/bfd/coff-bfd.c +++ b/bfd/coff-bfd.c @@ -1,5 +1,5 @@ /* BFD COFF interfaces used outside of BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -45,9 +45,12 @@ bfd_coff_get_syment (bfd *abfd, *psyment = csym->native->u.syment; if (csym->native->fix_value) - psyment->n_value = - ((psyment->n_value - (uintptr_t) obj_raw_syments (abfd)) - / sizeof (combined_entry_type)); + { + psyment->n_value = + ((psyment->n_value - (uintptr_t) obj_raw_syments (abfd)) + / sizeof (combined_entry_type)); + csym->native->fix_value = 0; + } /* FIXME: We should handle fix_line here. */ @@ -82,19 +85,28 @@ bfd_coff_get_auxent (bfd *abfd, *pauxent = ent->u.auxent; if (ent->fix_tag) - pauxent->x_sym.x_tagndx.l = - ((combined_entry_type *) pauxent->x_sym.x_tagndx.p - - obj_raw_syments (abfd)); + { + pauxent->x_sym.x_tagndx.u32 = + ((combined_entry_type *) pauxent->x_sym.x_tagndx.p + - obj_raw_syments (abfd)); + ent->fix_tag = 0; + } if (ent->fix_end) - pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l = - ((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p - - obj_raw_syments (abfd)); + { + pauxent->x_sym.x_fcnary.x_fcn.x_endndx.u32 = + ((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p + - obj_raw_syments (abfd)); + ent->fix_end = 0; + } if (ent->fix_scnlen) - pauxent->x_csect.x_scnlen.l = - ((combined_entry_type *) pauxent->x_csect.x_scnlen.p - - obj_raw_syments (abfd)); + { + pauxent->x_csect.x_scnlen.u64 = + ((combined_entry_type *) pauxent->x_csect.x_scnlen.p + - obj_raw_syments (abfd)); + ent->fix_scnlen = 0; + } return true; } diff --git a/bfd/coff-bfd.h b/bfd/coff-bfd.h index ba88599a0..133ccadc4 100644 --- a/bfd/coff-bfd.h +++ b/bfd/coff-bfd.h @@ -1,5 +1,5 @@ /* BFD COFF interfaces used outside of BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -43,12 +43,8 @@ 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. */ - bool keep_relocs; /* The section contents. This may be NULL. */ bfd_byte *contents; - /* If this is TRUE, the contents entry may not be freed. */ - bool keep_contents; /* Information cached by coff_find_nearest_line. */ bool saved_bias; bfd_signed_vma bias; diff --git a/bfd/coff-go32.c b/bfd/coff-go32.c index ac2ae7116..501f88fb6 100644 --- a/bfd/coff-go32.c +++ b/bfd/coff-go32.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files (DJGPP variant). - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by DJ Delorie. This file is part of BFD, the Binary File Descriptor library. @@ -80,6 +80,9 @@ _bfd_go32_mkobject (bfd * abfd) coff_data (abfd)->go32 = true; + bfd_coff_long_section_names (abfd) + = coff_backend_info (abfd)->_bfd_coff_long_section_names; + return true; } diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index 92cc5c207..71516066d 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -405,7 +405,8 @@ static reloc_howto_type howto_table[] = cache_ptr->addend = - coffsym->native->u.syment.n_value; \ else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ && ptr->section != (asection *) NULL) \ - cache_ptr->addend = - (ptr->section->vma + ptr->value); \ + cache_ptr->addend = - (ptr->section->vma \ + + COFF_PE_ADDEND_BIAS (ptr)); \ else \ cache_ptr->addend = 0; \ if (ptr && reloc.r_type < NUM_HOWTOS \ diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c index d21a7b8dd..4baf1412d 100644 --- a/bfd/coff-ia64.c +++ b/bfd/coff-ia64.c @@ -1,5 +1,5 @@ /* BFD back-end for HP/Intel IA-64 COFF files. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by David Mosberger This file is part of BFD, the Binary File Descriptor library. @@ -76,9 +76,8 @@ ia64coff_object_p (bfd *abfd) struct external_PEI_IMAGE_hdr image_hdr; file_ptr offset; - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 - || (bfd_bread (&dos_hdr, (bfd_size_type) sizeof (dos_hdr), abfd) - != sizeof (dos_hdr))) + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || (bfd_read (&dos_hdr, sizeof (dos_hdr), abfd) != sizeof (dos_hdr))) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -103,7 +102,7 @@ ia64coff_object_p (bfd *abfd) offset = H_GET_32 (abfd, dos_hdr.e_lfanew); if (bfd_seek (abfd, offset, SEEK_SET) != 0 - || (bfd_bread (&image_hdr, (bfd_size_type) sizeof (image_hdr), abfd) + || (bfd_read (&image_hdr, sizeof (image_hdr), abfd) != sizeof (image_hdr))) { if (bfd_get_error () != bfd_error_system_call) diff --git a/bfd/coff-loongarch64.c b/bfd/coff-loongarch64.c index f752efbb5..8ae3f8422 100644 --- a/bfd/coff-loongarch64.c +++ b/bfd/coff-loongarch64.c @@ -1,5 +1,5 @@ /* BFD back-end for LoongArch64 COFF files. - Copyright (C) 2022 Free Software Foundation, Inc. + Copyright (C) 2022-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,10 +23,6 @@ #define COFF_WITH_peLoongArch64 #endif -/* Note we have to make sure not to include headers twice. - Not all headers are wrapped in #ifdef guards, so we define - PEI_HEADERS to prevent double including here. */ -#ifndef PEI_HEADERS #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -35,9 +31,6 @@ #include "coff/pe.h" #include "libcoff.h" #include "libiberty.h" -#endif - -#include "libcoff.h" /* The page size is a guess based on ELF. */ diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c index 53f166543..96a1c9d44 100644 --- a/bfd/coff-mcore.c +++ b/bfd/coff-mcore.c @@ -1,5 +1,5 @@ /* BFD back-end for Motorola MCore COFF/PE - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -220,7 +220,7 @@ mcore_emit_base_file_entry (struct bfd_link_info *info, + input_section->output_offset + input_section->output_section->vma; - if (coff_data (output_bfd)->pe) + if (obj_pe (output_bfd)) addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) @@ -434,7 +434,13 @@ coff_mcore_relocate_section (bfd * output_bfd, my_name = "*unknown*"; else if ( sym->_n._n_n._n_zeroes == 0 && sym->_n._n_n._n_offset != 0) - my_name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset; + { + if (sym->_n._n_n._n_offset < obj_coff_strings_len (input_bfd)) + my_name = (obj_coff_strings (input_bfd) + + sym->_n._n_n._n_offset); + else + my_name = "?"; + } else { strncpy (buf, sym->_n._n_name, SYMNMLEN); diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index 1ef4235f0..fdc077197 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -1,5 +1,5 @@ /* BFD back-end for MIPS Extended-Coff files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -423,19 +423,8 @@ mips_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, reloc. This extension permits gcc to output the HI and LO relocs itself. */ -struct mips_hi -{ - struct mips_hi *next; - bfd_byte *addr; - bfd_vma addend; -}; - -/* FIXME: This should not be a static variable. */ - -static struct mips_hi *mips_refhi_list; - static bfd_reloc_status_type -mips_refhi_reloc (bfd *abfd ATTRIBUTE_UNUSED, +mips_refhi_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void * data, @@ -480,8 +469,8 @@ mips_refhi_reloc (bfd *abfd ATTRIBUTE_UNUSED, return bfd_reloc_outofrange; n->addr = (bfd_byte *) data + reloc_entry->address; n->addend = relocation; - n->next = mips_refhi_list; - mips_refhi_list = n; + n->next = ecoff_data (abfd)->mips_refhi_list; + ecoff_data (abfd)->mips_refhi_list = n; if (output_bfd != (bfd *) NULL) reloc_entry->address += input_section->output_offset; @@ -502,11 +491,11 @@ mips_reflo_reloc (bfd *abfd, bfd *output_bfd, char **error_message) { - if (mips_refhi_list != NULL) + if (ecoff_data (abfd)->mips_refhi_list != NULL) { struct mips_hi *l; - l = mips_refhi_list; + l = ecoff_data (abfd)->mips_refhi_list; while (l != NULL) { unsigned long insn; @@ -549,7 +538,7 @@ mips_reflo_reloc (bfd *abfd, l = next; } - mips_refhi_list = NULL; + ecoff_data (abfd)->mips_refhi_list = NULL; } /* Now do the REFLO reloc in the usual way. */ diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index bfa999d69..d7b6a4b6b 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for IBM RS/6000 "XCOFF" files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore. Archive support from Damon A. Permezel. Contributed by IBM Corporation and Cygnus Support. @@ -507,7 +507,7 @@ _bfd_xcoff_swap_aux_in (bfd *abfd, void * ext1, int type ATTRIBUTE_UNUSED, case C_HIDEXT: if (indx + 1 == numaux) { - in->x_csect.x_scnlen.l = H_GET_32 (abfd, ext->x_csect.x_scnlen); + in->x_csect.x_scnlen.u64 = H_GET_32 (abfd, ext->x_csect.x_scnlen); in->x_csect.x_parmhash = H_GET_32 (abfd, ext->x_csect.x_parmhash); in->x_csect.x_snhash = H_GET_16 (abfd, ext->x_csect.x_snhash); /* We don't have to hack bitfields in x_smtyp because it's @@ -525,7 +525,7 @@ _bfd_xcoff_swap_aux_in (bfd *abfd, void * ext1, int type ATTRIBUTE_UNUSED, = H_GET_32 (abfd, ext->x_fcn.x_fsize); in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_32 (abfd, ext->x_fcn.x_lnnoptr); - in->x_sym.x_fcnary.x_fcn.x_endndx.l + in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = H_GET_32 (abfd, ext->x_fcn.x_endndx); } break; @@ -591,7 +591,7 @@ _bfd_xcoff_swap_aux_out (bfd *abfd, void * inp, int type ATTRIBUTE_UNUSED, case C_HIDEXT: if (indx + 1 == numaux) { - H_PUT_32 (abfd, in->x_csect.x_scnlen.l, ext->x_csect.x_scnlen); + H_PUT_32 (abfd, in->x_csect.x_scnlen.u64, ext->x_csect.x_scnlen); H_PUT_32 (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash); H_PUT_16 (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash); /* We don't have to hack bitfields in x_smtyp because it's @@ -607,7 +607,7 @@ _bfd_xcoff_swap_aux_out (bfd *abfd, void * inp, int type ATTRIBUTE_UNUSED, H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_fcn.x_fsize); H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_fcn.x_lnnoptr); - H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, + H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext->x_fcn.x_endndx); } break; @@ -1294,7 +1294,7 @@ _bfd_xcoff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, take a maximum length as an additional parameter. Also - just to save space, we omit the endptr return parameter, since we know that it is never used. */ -static long +static unsigned long _bfd_strntol (const char * nptr, int base, unsigned int maxlen) { char buf[24]; /* Should be enough. */ @@ -1306,7 +1306,7 @@ _bfd_strntol (const char * nptr, int base, unsigned int maxlen) return strtol (buf, NULL, base); } -static long long +static unsigned long long _bfd_strntoll (const char * nptr, int base, unsigned int maxlen) { char buf[32]; /* Should be enough. */ @@ -1338,7 +1338,7 @@ _bfd_strntoll (const char * nptr, int base, unsigned int maxlen) bool _bfd_xcoff_slurp_armap (bfd *abfd) { - file_ptr off; + ufile_ptr off; size_t namlen; bfd_size_type sz; bfd_byte *contents, *cend; @@ -1346,7 +1346,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd) carsym *arsym; bfd_byte *p; - if (xcoff_ardata (abfd) == NULL) + if (x_artdata (abfd) == NULL) { abfd->has_armap = false; return true; @@ -1357,7 +1357,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd) /* This is for the old format. */ struct xcoff_ar_hdr hdr; - GET_VALUE_IN_FIELD (off, xcoff_ardata (abfd)->symoff, 10); + GET_VALUE_IN_FIELD (off, x_artdata (abfd)->u.hdr.symoff, 10); if (off == 0) { abfd->has_armap = false; @@ -1368,8 +1368,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd) 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) + if (bfd_read (&hdr, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR) return false; /* Skip the name (normally empty). */ @@ -1419,7 +1418,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd) /* This is for the new format. */ struct xcoff_ar_hdr_big hdr; - GET_VALUE_IN_FIELD (off, xcoff_ardata_big (abfd)->symoff, 10); + GET_VALUE_IN_FIELD (off, x_artdata (abfd)->u.bhdr.symoff, 10); if (off == 0) { abfd->has_armap = false; @@ -1430,8 +1429,7 @@ _bfd_xcoff_slurp_armap (bfd *abfd) 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) + if (bfd_read (&hdr, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) return false; /* Skip the name (normally empty). */ @@ -1506,7 +1504,7 @@ _bfd_xcoff_archive_p (bfd *abfd) char magic[SXCOFFARMAG]; size_t amt = SXCOFFARMAG; - if (bfd_bread (magic, amt, abfd) != amt) + if (bfd_read (magic, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1527,13 +1525,6 @@ _bfd_xcoff_archive_p (bfd *abfd) if (bfd_ardata (abfd) == (struct artdata *) NULL) goto error_ret_restore; - /* Cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache = NULL; - bfd_ardata (abfd)->archive_head = NULL; - bfd_ardata (abfd)->symdefs = NULL; - bfd_ardata (abfd)->extended_names = NULL; - bfd_ardata (abfd)->extended_names_size = 0; */ - /* Now handle the two formats. */ if (magic[1] != 'b') { @@ -1545,7 +1536,7 @@ _bfd_xcoff_archive_p (bfd *abfd) /* Now read the rest of the file header. */ amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG; - if (bfd_bread (&hdr.memoff, amt, abfd) != amt) + if (bfd_read (&hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1555,12 +1546,12 @@ _bfd_xcoff_archive_p (bfd *abfd) GET_VALUE_IN_FIELD (bfd_ardata (abfd)->first_file_filepos, hdr.firstmemoff, 10); - amt = SIZEOF_AR_FILE_HDR; + amt = sizeof (struct xcoff_artdata); bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) goto error_ret; - memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR); + memcpy (&x_artdata (abfd)->u.hdr, &hdr, SIZEOF_AR_FILE_HDR); } else { @@ -1572,7 +1563,7 @@ _bfd_xcoff_archive_p (bfd *abfd) /* Now read the rest of the file header. */ amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG; - if (bfd_bread (&hdr.memoff, amt, abfd) != amt) + if (bfd_read (&hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1583,12 +1574,12 @@ _bfd_xcoff_archive_p (bfd *abfd) (const char **) 0, 10); - amt = SIZEOF_AR_FILE_HDR_BIG; + amt = sizeof (struct xcoff_artdata); bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) goto error_ret; - memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG); + memcpy (&x_artdata (abfd)->u.bhdr, &hdr, SIZEOF_AR_FILE_HDR_BIG); } if (! _bfd_xcoff_slurp_armap (abfd)) @@ -1603,6 +1594,97 @@ _bfd_xcoff_archive_p (bfd *abfd) return _bfd_no_cleanup; } +/* Track file ranges occupied by elements. Add [START,END) to the + list of ranges and return TRUE if there is no overlap between the + new and any other element or the archive file header. This is + aimed at preventing infinite looping on malformed archives, for + "ar" and similar which typically use code like: + . for (last = bfd_openr_next_archived_file (archive, NULL); + . last; + . last = next) + . { + . do_something_with (last); + . next = bfd_openr_next_archived_file (archive, last); + . bfd_close (last); + . } + The check implemented here is only possible due to the fact that + for XCOFF archives bfd_openr_next_archived_file is the only code + path leading to _bfd_read_ar_hdr. _bfd_read_ar_hdr is not called + when reading the armap, nor do XCOFF archives use the extended name + scheme implemented in archive.c. + + Note that the check relies on the previous element being closed, + and there is one case where add_range might fail but I think it is + sufficently unusual that it doesn't warrant fixing: + If the loop body above called bfd_openr_next_archived_file twice + with the same arguments and the element returned is bfd_close'd + between those calls then we'll return false here for the second + call. (For why this is so see _bfd_look_for_bfd_in_cache in + _bfd_get_elt_at_filepos, and know that bfd_close removes elements + from the cache.) */ + +static bool +add_range (bfd *abfd, ufile_ptr start, ufile_ptr end) +{ + if (end <= start) + { + err: + bfd_set_error (bfd_error_malformed_archive); + return false; + } + + /* This list is kept sorted by address. Find the highest address + range on the list that ends before the new range starts. Exit + the loop with that range in LO, and the mext higher range in HI. */ + struct ar_ranges *hi = &x_artdata (abfd)->ranges; + struct ar_ranges *lo = NULL; + while (hi && hi->end <= start) + { + lo = hi; + hi = hi->next; + } + + if (lo == NULL) + /* Start overlaps the file header or elements adjacent to it. */ + goto err; + + if (hi && hi->start < end) + /* Overlap with another element. */ + goto err; + + /* A zero size element with a one char name is this big. */ + unsigned min_elt = x_artdata (abfd)->ar_hdr_size + 2 + SXCOFFARFMAG; + if (start - lo->end < min_elt) + { + /* Merge into an existing range. */ + lo->end = end; + if (hi && hi->start - end < min_elt) + { + /* In fact, we can merge two ranges. */ + lo->end = hi->end; + lo->next = hi->next; + /* The list uses bfd_alloc so don't free HI. */ + } + return true; + } + + if (hi && hi->start - end < min_elt) + { + /* Merge into an existing range. */ + hi->start = start; + return true; + } + + struct ar_ranges *newr = bfd_alloc (abfd, sizeof (*newr)); + if (newr == NULL) + return false; + newr->start = start; + newr->end = end; + newr->next = hi; + lo->next = newr; + return true; +} + /* Read the archive header in an XCOFF archive. */ void * @@ -1611,13 +1693,14 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) bfd_size_type namlen; struct areltdata *ret; bfd_size_type amt; + ufile_ptr start = abfd->where; if (! xcoff_big_format_p (abfd)) { struct xcoff_ar_hdr hdr; struct xcoff_ar_hdr *hdrp; - if (bfd_bread (&hdr, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR) + if (bfd_read (&hdr, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR) return NULL; GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10); @@ -1630,7 +1713,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) hdrp = (struct xcoff_ar_hdr *) (ret + 1); memcpy (hdrp, &hdr, SIZEOF_AR_HDR); - if (bfd_bread ((char *) hdrp + SIZEOF_AR_HDR, namlen, abfd) != namlen) + if (bfd_read ((char *) hdrp + SIZEOF_AR_HDR, namlen, abfd) != namlen) { free (ret); return NULL; @@ -1646,7 +1729,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) struct xcoff_ar_hdr_big hdr; struct xcoff_ar_hdr_big *hdrp; - if (bfd_bread (&hdr, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) + if (bfd_read (&hdr, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) return NULL; GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10); @@ -1659,7 +1742,7 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) hdrp = (struct xcoff_ar_hdr_big *) (ret + 1); memcpy (hdrp, &hdr, SIZEOF_AR_HDR_BIG); - if (bfd_bread ((char *) hdrp + SIZEOF_AR_HDR_BIG, namlen, abfd) != namlen) + if (bfd_read ((char *) hdrp + SIZEOF_AR_HDR_BIG, namlen, abfd) != namlen) { free (ret); return NULL; @@ -1676,8 +1759,12 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) ret->extra_size = namlen + (namlen & 1) + SXCOFFARFMAG; /* Skip over the XCOFFARFMAG at the end of the file name. */ - if (bfd_seek (abfd, (file_ptr) ((namlen & 1) + SXCOFFARFMAG), SEEK_CUR) != 0) - return NULL; + if (bfd_seek (abfd, (namlen & 1) + SXCOFFARFMAG, SEEK_CUR) != 0 + || !add_range (abfd, start, abfd->where + ret->parsed_size)) + { + free (ret); + return NULL; + } return ret; } @@ -1687,10 +1774,9 @@ _bfd_xcoff_read_ar_hdr (bfd *abfd) bfd * _bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file) { - file_ptr filestart; - file_ptr laststart, lastend; + ufile_ptr filestart; - if (xcoff_ardata (archive) == NULL) + if (x_artdata (archive) == NULL) { bfd_set_error (bfd_error_invalid_operation); return NULL; @@ -1700,30 +1786,23 @@ _bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file) { if (last_file == NULL) { + /* If we are scanning over elements twice in an open archive, + which can happen in gdb after a fork, ensure we start the + second scan with clean ranges. */ + x_artdata (archive)->ranges.start = 0; + x_artdata (archive)->ranges.end = SIZEOF_AR_FILE_HDR; + x_artdata (archive)->ranges.next = NULL; + x_artdata (archive)->ar_hdr_size = SIZEOF_AR_HDR; filestart = bfd_ardata (archive)->first_file_filepos; - laststart = 0; - lastend = SIZEOF_AR_FILE_HDR; } else - { - struct areltdata *arel = arch_eltdata (last_file); - - GET_VALUE_IN_FIELD (filestart, arch_xhdr (last_file)->nextoff, 10); - laststart = last_file->proxy_origin; - lastend = laststart + arel->parsed_size; - laststart -= SIZEOF_AR_HDR + arel->extra_size; - } - - /* Sanity check that we aren't pointing into the previous element. */ - if (filestart != 0 && filestart >= laststart && filestart < lastend) - { - bfd_set_error (bfd_error_malformed_archive); - return NULL; - } + GET_VALUE_IN_FIELD (filestart, arch_xhdr (last_file)->nextoff, 10); if (filestart == 0 - || EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->memoff, 10) - || EQ_VALUE_IN_FIELD (filestart, xcoff_ardata (archive)->symoff, 10)) + || EQ_VALUE_IN_FIELD (filestart, + x_artdata (archive)->u.hdr.memoff, 10) + || EQ_VALUE_IN_FIELD (filestart, + x_artdata (archive)->u.hdr.symoff, 10)) { bfd_set_error (bfd_error_no_more_archived_files); return NULL; @@ -1733,32 +1812,38 @@ _bfd_xcoff_openr_next_archived_file (bfd *archive, bfd *last_file) { if (last_file == NULL) { + x_artdata (archive)->ranges.start = 0; + x_artdata (archive)->ranges.end = SIZEOF_AR_FILE_HDR_BIG; + x_artdata (archive)->ranges.next = NULL; + x_artdata (archive)->ar_hdr_size = SIZEOF_AR_HDR_BIG; filestart = bfd_ardata (archive)->first_file_filepos; - laststart = 0; - lastend = SIZEOF_AR_FILE_HDR_BIG; } else - { - struct areltdata *arel = arch_eltdata (last_file); + GET_VALUE_IN_FIELD (filestart, arch_xhdr_big (last_file)->nextoff, 10); - GET_VALUE_IN_FIELD (filestart, arch_xhdr_big (last_file)->nextoff, 10); - laststart = last_file->proxy_origin; - lastend = laststart + arel->parsed_size; - laststart -= SIZEOF_AR_HDR_BIG + arel->extra_size; - } - - /* Sanity check that we aren't pointing into the previous element. */ - if (filestart != 0 && filestart >= laststart && filestart < lastend) + if (filestart == 0 + || EQ_VALUE_IN_FIELD (filestart, + x_artdata (archive)->u.bhdr.memoff, 10) + || EQ_VALUE_IN_FIELD (filestart, + x_artdata (archive)->u.bhdr.symoff, 10)) { - bfd_set_error (bfd_error_malformed_archive); + bfd_set_error (bfd_error_no_more_archived_files); return NULL; } + } - if (filestart == 0 - || EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->memoff, 10) - || EQ_VALUE_IN_FIELD (filestart, xcoff_ardata_big (archive)->symoff, 10)) + /* Check that we aren't pointing back at the last element. This is + necessary depite the add_range checking in _bfd_xcoff_read_ar_hdr + because archive.c leaves the last element open and thus in the + archive element cache until the next element is opened. */ + if (last_file != NULL) + { + ufile_ptr laststart = last_file->proxy_origin; + laststart -= x_artdata (archive)->ar_hdr_size; + laststart -= arch_eltdata (last_file)->extra_size; + if (filestart == laststart) { - bfd_set_error (bfd_error_no_more_archived_files); + bfd_set_error (bfd_error_malformed_archive); return NULL; } } @@ -1833,7 +1918,8 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, memset (&hdr, 0, sizeof hdr); sprintf (hdr.size, "%ld", (long) (4 + orl_count * 4 + stridx)); sprintf (hdr.nextoff, "%d", 0); - memcpy (hdr.prevoff, xcoff_ardata (abfd)->memoff, XCOFFARMAG_ELEMENT_SIZE); + memcpy (hdr.prevoff, x_artdata (abfd)->u.hdr.memoff, + XCOFFARMAG_ELEMENT_SIZE); sprintf (hdr.date, "%d", 0); sprintf (hdr.uid, "%d", 0); sprintf (hdr.gid, "%d", 0); @@ -1845,14 +1931,12 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, if (*p == '\0') *p = ' '; - if (bfd_bwrite (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd) - != SIZEOF_AR_HDR - || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd) - != SXCOFFARFMAG)) + if (bfd_write (&hdr, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR + || bfd_write (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG) return false; H_PUT_32 (abfd, orl_count, buf); - if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) + if (bfd_write (buf, 4, abfd) != 4) return false; i = 0; @@ -1861,7 +1945,7 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, while (map[i].u.abfd == iterator.current.member) { H_PUT_32 (abfd, iterator.current.offset, buf); - if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) + if (bfd_write (buf, 4, abfd) != 4) return false; ++i; } @@ -1873,7 +1957,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) + if (bfd_write (name, namlen + 1, abfd) != namlen + 1) return false; } @@ -1882,7 +1966,7 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, char b; b = '\0'; - if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) + if (bfd_write (&b, 1, abfd) != 1) return false; } @@ -1925,7 +2009,7 @@ do_pad (bfd *abfd, unsigned int number) return false; while (number--) - if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) + if (bfd_write (&b, 1, abfd) != 1) return false; return true; @@ -1935,26 +2019,26 @@ static bool do_copy (bfd *out_bfd, bfd *in_bfd) { bfd_size_type remaining; - bfd_byte buffer[DEFAULT_BUFFERSIZE]; + bfd_byte buffer[8 * 1024]; - if (bfd_seek (in_bfd, (file_ptr) 0, SEEK_SET) != 0) + if (bfd_seek (in_bfd, 0, SEEK_SET) != 0) return false; remaining = arelt_size (in_bfd); - while (remaining >= DEFAULT_BUFFERSIZE) + while (remaining >= sizeof (buffer)) { - if (bfd_bread (buffer, DEFAULT_BUFFERSIZE, in_bfd) != DEFAULT_BUFFERSIZE - || bfd_bwrite (buffer, DEFAULT_BUFFERSIZE, out_bfd) != DEFAULT_BUFFERSIZE) + if (bfd_read (buffer, sizeof (buffer), in_bfd) != sizeof (buffer) + || bfd_write (buffer, sizeof (buffer), out_bfd) != sizeof (buffer)) return false; - remaining -= DEFAULT_BUFFERSIZE; + remaining -= sizeof (buffer); } if (remaining) { - if (bfd_bread (buffer, remaining, in_bfd) != remaining - || bfd_bwrite (buffer, remaining, out_bfd) != remaining) + if (bfd_read (buffer, remaining, in_bfd) != remaining + || bfd_write (buffer, remaining, out_bfd) != remaining) return false; } @@ -2005,7 +2089,7 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, /* Explicit cast to int for compiler. */ BFD_ASSERT ((int)(str_64 + str_32) == stridx); - fhdr = xcoff_ardata_big (abfd); + fhdr = &x_artdata (abfd)->u.bhdr; /* xcoff_write_archive_contents_big passes nextoff in symoff. */ READ20 (fhdr->memoff, prevoff); @@ -2109,8 +2193,12 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, } } - bfd_bwrite (symbol_table, symbol_table_size, abfd); - + if (bfd_write (symbol_table, symbol_table_size, abfd) + != symbol_table_size) + { + free (symbol_table); + return false; + } free (symbol_table); prevoff = nextoff; @@ -2189,8 +2277,12 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, } } - bfd_bwrite (symbol_table, symbol_table_size, abfd); - + if (bfd_write (symbol_table, symbol_table_size, abfd) + != symbol_table_size) + { + free (symbol_table); + return false; + } free (symbol_table); PRINT20 (fhdr->symoff64, nextoff); @@ -2218,7 +2310,8 @@ static bool xcoff_write_archive_contents_old (bfd *abfd) { struct archive_iterator iterator; - struct xcoff_ar_file_hdr fhdr; + struct xcoff_artdata xtdata; + struct xcoff_ar_file_hdr *fhdr = &xtdata.u.hdr; bfd_size_type count; bfd_size_type total_namlen; file_ptr *offsets; @@ -2232,10 +2325,10 @@ xcoff_write_archive_contents_old (bfd *abfd) char *p; char decbuf[XCOFFARMAG_ELEMENT_SIZE + 1]; - memset (&fhdr, 0, sizeof fhdr); - (void) memcpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG); - sprintf (fhdr.firstmemoff, "%d", SIZEOF_AR_FILE_HDR); - sprintf (fhdr.freeoff, "%d", 0); + memset (&xtdata, 0, sizeof (xtdata)); + memcpy (fhdr->magic, XCOFFARMAG, SXCOFFARMAG); + sprintf (fhdr->firstmemoff, "%zu", SIZEOF_AR_FILE_HDR); + sprintf (fhdr->freeoff, "%d", 0); count = 0; total_namlen = 0; @@ -2297,7 +2390,7 @@ xcoff_write_archive_contents_old (bfd *abfd) if (offsets == NULL) return false; - if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR, SEEK_SET) != 0) + if (bfd_seek (abfd, SIZEOF_AR_FILE_HDR, SEEK_SET) != 0) return false; makemap = bfd_has_map (abfd); @@ -2331,9 +2424,9 @@ xcoff_write_archive_contents_old (bfd *abfd) BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); namlen = iterator.current.padded_namlen; - if (bfd_bwrite (ahdrp, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR - || bfd_bwrite (iterator.current.name, namlen, abfd) != namlen - || bfd_bwrite (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG + if (bfd_write (ahdrp, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR + || bfd_write (iterator.current.name, namlen, abfd) != namlen + || bfd_write (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG || bfd_seek (iterator.current.member, 0, SEEK_SET) != 0 || !do_copy (abfd, iterator.current.member) || !do_pad (abfd, iterator.current.trailing_padding)) @@ -2343,13 +2436,13 @@ xcoff_write_archive_contents_old (bfd *abfd) prevoff = iterator.current.offset; } - sprintf (fhdr.lastmemoff, "%ld", (long) prevoff); + sprintf (fhdr->lastmemoff, "%ld", (long) prevoff); /* Write out the member table. */ nextoff = iterator.next.offset; BFD_ASSERT (nextoff == bfd_tell (abfd)); - sprintf (fhdr.memoff, "%ld", (long) nextoff); + sprintf (fhdr->memoff, "%ld", (long) nextoff); memset (&ahdr, 0, sizeof ahdr); sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE @@ -2381,21 +2474,19 @@ xcoff_write_archive_contents_old (bfd *abfd) if (*p == '\0') *p = ' '; - if ((bfd_bwrite (&ahdr, (bfd_size_type) SIZEOF_AR_HDR, abfd) - != SIZEOF_AR_HDR) - || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd) - != SXCOFFARFMAG)) + if ((bfd_write (&ahdr, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR) + || bfd_write (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG) return false; sprintf (decbuf, "%-12ld", (long) count); - if (bfd_bwrite (decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd) + if (bfd_write (decbuf, XCOFFARMAG_ELEMENT_SIZE, abfd) != XCOFFARMAG_ELEMENT_SIZE) 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) + if (bfd_write (decbuf, XCOFFARMAG_ELEMENT_SIZE, abfd) + != XCOFFARMAG_ELEMENT_SIZE) return false; } for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next) @@ -2405,7 +2496,7 @@ xcoff_write_archive_contents_old (bfd *abfd) name = normalize_filename (sub); namlen = strlen (name); - if (bfd_bwrite (name, namlen + 1, abfd) != namlen + 1) + if (bfd_write (name, namlen + 1, abfd) != namlen + 1) return false; } @@ -2414,26 +2505,27 @@ xcoff_write_archive_contents_old (bfd *abfd) /* Write out the armap, if appropriate. */ if (! makemap || ! hasobjects) - sprintf (fhdr.symoff, "%d", 0); + sprintf (fhdr->symoff, "%d", 0); else { BFD_ASSERT (nextoff == bfd_tell (abfd)); - sprintf (fhdr.symoff, "%ld", (long) nextoff); - bfd_ardata (abfd)->tdata = &fhdr; - if (! _bfd_compute_and_write_armap (abfd, 0)) + sprintf (fhdr->symoff, "%ld", (long) nextoff); + bfd_ardata (abfd)->tdata = &xtdata; + bool ret = _bfd_compute_and_write_armap (abfd, 0); + bfd_ardata (abfd)->tdata = NULL; + if (!ret) return false; } /* Write out the archive file header. */ /* We need spaces, not null bytes, in the header. */ - for (p = (char *) &fhdr; p < (char *) &fhdr + SIZEOF_AR_FILE_HDR; p++) + for (p = (char *) fhdr; p < (char *) fhdr + SIZEOF_AR_FILE_HDR; p++) if (*p == '\0') *p = ' '; - 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)) + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || (bfd_write (fhdr, SIZEOF_AR_FILE_HDR, abfd) != SIZEOF_AR_FILE_HDR)) return false; return true; @@ -2442,7 +2534,8 @@ xcoff_write_archive_contents_old (bfd *abfd) static bool xcoff_write_archive_contents_big (bfd *abfd) { - struct xcoff_ar_file_hdr_big fhdr; + struct xcoff_artdata xtdata; + struct xcoff_ar_file_hdr_big *fhdr = &xtdata.u.bhdr; bfd_size_type count; bfd_size_type total_namlen; file_ptr *offsets; @@ -2457,10 +2550,10 @@ xcoff_write_archive_contents_big (bfd *abfd) bfd_vma member_table_size; struct archive_iterator iterator; - memset (&fhdr, 0, SIZEOF_AR_FILE_HDR_BIG); - memcpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG); + memset (&xtdata, 0, sizeof (xtdata)); + memcpy (fhdr->magic, XCOFFARMAGBIG, SXCOFFARMAG); - if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0) + if (bfd_seek (abfd, SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0) return false; /* Calculate count and total_namlen. */ @@ -2559,9 +2652,9 @@ xcoff_write_archive_contents_big (bfd *abfd) BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); namlen = iterator.current.padded_namlen; - if (bfd_bwrite (ahdrp, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG - || bfd_bwrite (iterator.current.name, namlen, abfd) != namlen - || bfd_bwrite (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG + if (bfd_write (ahdrp, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG + || bfd_write (iterator.current.name, namlen, abfd) != namlen + || bfd_write (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG || bfd_seek (iterator.current.member, 0, SEEK_SET) != 0 || !do_copy (abfd, iterator.current.member) || !do_pad (abfd, iterator.current.trailing_padding)) @@ -2576,8 +2669,8 @@ xcoff_write_archive_contents_big (bfd *abfd) if (count) { - PRINT20 (fhdr.firstmemoff, offsets[0]); - PRINT20 (fhdr.lastmemoff, prevoff); + PRINT20 (fhdr->firstmemoff, offsets[0]); + PRINT20 (fhdr->lastmemoff, prevoff); } /* Write out the member table. @@ -2664,12 +2757,12 @@ xcoff_write_archive_contents_big (bfd *abfd) mt += namlen + 1; } - if (bfd_bwrite (member_table, member_table_size, abfd) != member_table_size) + if (bfd_write (member_table, member_table_size, abfd) != member_table_size) return false; free (member_table); - PRINT20 (fhdr.memoff, nextoff); + PRINT20 (fhdr->memoff, nextoff); prevoff = nextoff; nextoff += member_table_size; @@ -2677,24 +2770,26 @@ xcoff_write_archive_contents_big (bfd *abfd) /* Write out the armap, if appropriate. */ if (! makemap || ! hasobjects) - PRINT20 (fhdr.symoff, 0); + PRINT20 (fhdr->symoff, 0); else { BFD_ASSERT (nextoff == bfd_tell (abfd)); - /* Save nextoff in fhdr.symoff so the armap routine can use it. */ - PRINT20 (fhdr.symoff, nextoff); + /* Save nextoff in fhdr->symoff so the armap routine can use it. */ + PRINT20 (fhdr->symoff, nextoff); - bfd_ardata (abfd)->tdata = &fhdr; - if (! _bfd_compute_and_write_armap (abfd, 0)) + bfd_ardata (abfd)->tdata = &xtdata; + bool ret = _bfd_compute_and_write_armap (abfd, 0); + bfd_ardata (abfd)->tdata = NULL; + if (!ret) return false; } /* Write out the archive file header. */ - 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)) + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || (bfd_write (fhdr, SIZEOF_AR_FILE_HDR_BIG, abfd) + != SIZEOF_AR_FILE_HDR_BIG)) return false; return true; @@ -4117,7 +4212,10 @@ 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; + { + free (data_buffer); + return false; + } val = string_table_size; bfd_h_put_32 (abfd, val, &string_table[0]); @@ -4140,7 +4238,7 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, syment.n_scnum = 1; syment.n_sclass = C_HIDEXT; syment.n_numaux = 1; - auxent.x_csect.x_scnlen.l = data_buffer_size; + auxent.x_csect.x_scnlen.u64 = data_buffer_size; auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD; auxent.x_csect.x_smclas = XMC_RW; bfd_coff_swap_sym_out (abfd, &syment, @@ -4267,18 +4365,21 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, filehdr.f_symptr = scnhdr.s_relptr + scnhdr.s_nreloc * RELSZ; bfd_coff_swap_filehdr_out (abfd, &filehdr, filehdr_ext); - bfd_bwrite (filehdr_ext, FILHSZ, abfd); bfd_coff_swap_scnhdr_out (abfd, &scnhdr, scnhdr_ext); - bfd_bwrite (scnhdr_ext, SCNHSZ, abfd); - bfd_bwrite (data_buffer, data_buffer_size, abfd); - bfd_bwrite (reloc_ext, scnhdr.s_nreloc * RELSZ, abfd); - bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd); - bfd_bwrite (string_table, string_table_size, abfd); - + bool ret = true; + if (bfd_write (filehdr_ext, FILHSZ, abfd) != FILHSZ + || bfd_write (scnhdr_ext, SCNHSZ, abfd) != SCNHSZ + || bfd_write (data_buffer, data_buffer_size, abfd) != data_buffer_size + || (bfd_write (reloc_ext, scnhdr.s_nreloc * RELSZ, abfd) + != scnhdr.s_nreloc * RELSZ) + || (bfd_write (syment_ext, filehdr.f_nsyms * SYMESZ, abfd) + != (bfd_size_type) filehdr.f_nsyms * SYMESZ) + || bfd_write (string_table, string_table_size, abfd) != string_table_size) + ret = false; + + free (string_table); free (data_buffer); - data_buffer = NULL; - - return true; + return ret; } @@ -4362,8 +4463,8 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = { }; /* For generic entry points. */ -#define _bfd_xcoff_close_and_cleanup _bfd_archive_close_and_cleanup -#define _bfd_xcoff_bfd_free_cached_info _bfd_bool_bfd_true +#define _bfd_xcoff_close_and_cleanup coff_close_and_cleanup +#define _bfd_xcoff_bfd_free_cached_info coff_bfd_free_cached_info #define _bfd_xcoff_new_section_hook coff_new_section_hook #define _bfd_xcoff_get_section_contents _bfd_generic_get_section_contents #define _bfd_xcoff_get_section_contents_in_window \ diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index c0f6fb42f..a20c01127 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -1,5 +1,5 @@ /* BFD back-end for Renesas Super-H COFF binaries. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain, . Relaxing code written by Ian Lance Taylor, . @@ -544,7 +544,8 @@ sh_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, cache_ptr->addend = 0; \ else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ && ptr->section != (asection *) NULL) \ - cache_ptr->addend = - (ptr->section->vma + ptr->value); \ + cache_ptr->addend = - (ptr->section->vma \ + + COFF_PE_ADDEND_BIAS (ptr)); \ else \ cache_ptr->addend = 0; \ if ((reloc).r_type == R_SH_SWITCH8 \ @@ -717,6 +718,7 @@ sh_relax_section (bfd *abfd, *again = false; if (bfd_link_relocatable (link_info) + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) return true; @@ -905,12 +907,7 @@ 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)->contents = contents; - coff_section_data (abfd, sec)->keep_contents = true; - - obj_coff_keep_syms (abfd) = true; /* Replace the jsr with a bsr. */ @@ -1027,12 +1024,7 @@ 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)->contents = contents; - coff_section_data (abfd, sec)->keep_contents = true; - - obj_coff_keep_syms (abfd) = true; } } @@ -1374,6 +1366,7 @@ sh_relax_delete_bytes (bfd *abfd, bfd_byte *ocontents; if (o == sec + || (o->flags & SEC_HAS_CONTENTS) == 0 || (o->flags & SEC_RELOC) == 0 || o->reloc_count == 0) continue; @@ -1435,8 +1428,6 @@ sh_relax_delete_bytes (bfd *abfd, if (val > addr && val < toaddr) bfd_put_32 (abfd, val - count, ocontents + irelscan->r_vaddr - o->vma); - - coff_section_data (abfd, o)->keep_contents = true; } } } @@ -2876,7 +2867,12 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, name = NULL; else if (sym->_n._n_n._n_zeroes == 0 && sym->_n._n_n._n_offset != 0) - name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset; + { + if (sym->_n._n_n._n_offset < obj_coff_strings_len (input_bfd)) + name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset; + else + name = "?"; + } else { strncpy (buf, sym->_n._n_name, SYMNMLEN); @@ -3079,7 +3075,7 @@ coff_small_new_section_hook (bfd *abfd, asection *section) /* This is copied from bfd_coff_std_swap_table so that we can change the default section alignment power. */ -static bfd_coff_backend_data bfd_coff_small_swap_table = +static const bfd_coff_backend_data bfd_coff_small_swap_table = { coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, coff_swap_aux_out, coff_swap_sym_out, diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c index 17271753a..8f9087970 100644 --- a/bfd/coff-stgo32.c +++ b/bfd/coff-stgo32.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub). - Copyright (C) 1997-2022 Free Software Foundation, Inc. + Copyright (C) 1997-2023 Free Software Foundation, Inc. Written by Robert Hoehne. This file is part of BFD, the Binary File Descriptor library. @@ -248,6 +248,7 @@ static void go32exe_cleanup (bfd *abfd) { abfd->origin = 0; + coff_object_cleanup (abfd); free (go32exe_temp_stub); go32exe_temp_stub = NULL; @@ -277,7 +278,7 @@ go32exe_check_format (bfd *abfd) bfd_set_error (bfd_error_system_call); /* Read in the stub file header, which is a DOS MZ executable. */ - if (bfd_bread (&filehdr_dos, DOS_HDR_SIZE, abfd) != DOS_HDR_SIZE) + if (bfd_read (&filehdr_dos, DOS_HDR_SIZE, abfd) != DOS_HDR_SIZE) goto fail; /* Make sure that this is an MZ executable. */ @@ -298,11 +299,12 @@ go32exe_check_format (bfd *abfd) /* Save now the stub to be used later. Put the stub data to a temporary location first as tdata still does not exist. It may not even be ever created if we are just checking the file format of ABFD. */ - bfd_seek (abfd, 0, SEEK_SET); + if (bfd_seek (abfd, 0, SEEK_SET) != 0) + goto fail; go32exe_temp_stub = bfd_malloc (stubsize); if (go32exe_temp_stub == NULL) goto fail; - if (bfd_bread (go32exe_temp_stub, stubsize, abfd) != stubsize) + if (bfd_read (go32exe_temp_stub, stubsize, abfd) != stubsize) goto fail; go32exe_temp_stub_size = stubsize; @@ -323,7 +325,7 @@ go32exe_check_format (bfd *abfd) bfd_cleanup cleanup = coff_object_p (abfd); if (cleanup == NULL) goto fail; - BFD_ASSERT (cleanup == _bfd_no_cleanup); + BFD_ASSERT (cleanup == coff_object_cleanup); return go32exe_cleanup; @@ -350,7 +352,7 @@ go32exe_write_object_contents (bfd *abfd) abfd->origin = 0; if (bfd_seek (abfd, 0, SEEK_SET) != 0) return false; - if (bfd_bwrite (coff_data (abfd)->stub, stubsize, abfd) != stubsize) + if (bfd_write (coff_data (abfd)->stub, stubsize, abfd) != stubsize) return false; /* Seek back to where we were. */ diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c index fcc857540..6a14d87cd 100644 --- a/bfd/coff-tic30.c +++ b/bfd/coff-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 coff binaries. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c index be2952599..307cc6fb6 100644 --- a/bfd/coff-tic4x.c +++ b/bfd/coff-tic4x.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C4X coff binaries. - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c index 9ec4b2064..55f87a1b6 100644 --- a/bfd/coff-tic54x.c +++ b/bfd/coff-tic54x.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C54X coff binaries. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Timothy Wall (twall@cygnus.com) This file is part of BFD, the Binary File Descriptor library. @@ -109,23 +109,6 @@ bfd_ticoff_get_section_load_page (asection *sect) return page; } -/* Set the architecture appropriately. Allow unkown architectures - (e.g. binary). */ - -static bool -tic54x_set_arch_mach (bfd *abfd, - enum bfd_architecture arch, - unsigned long machine) -{ - if (arch == bfd_arch_unknown) - arch = bfd_arch_tic54x; - - else if (arch != bfd_arch_tic54x) - return false; - - return bfd_default_set_arch_mach (abfd, arch, machine); -} - static bfd_reloc_status_type tic54x_relocation (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, @@ -335,17 +318,6 @@ ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, #include "coffcode.h" -static bool -tic54x_set_section_contents (bfd *abfd, - sec_ptr section, - const void * location, - file_ptr offset, - bfd_size_type bytes_to_do) -{ - return coff_set_section_contents (abfd, section, location, - offset, bytes_to_do); -} - static void tic54x_reloc_processing (arelent *relent, struct internal_reloc *reloc, @@ -448,7 +420,7 @@ const bfd_target tic54x_coff0_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, @@ -510,7 +482,7 @@ const bfd_target tic54x_coff0_beh_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), @@ -573,7 +545,7 @@ const bfd_target tic54x_coff1_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), @@ -636,7 +608,7 @@ const bfd_target tic54x_coff1_beh_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), @@ -699,7 +671,7 @@ const bfd_target tic54x_coff2_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), @@ -762,7 +734,7 @@ const bfd_target tic54x_coff2_beh_vec = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), BFD_JUMP_TABLE_SYMBOLS (coff), BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (tic54x), + BFD_JUMP_TABLE_WRITE (coff), BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c index c2b2d0e4d..57b975c2e 100644 --- a/bfd/coff-x86_64.c +++ b/bfd/coff-x86_64.c @@ -1,5 +1,5 @@ /* BFD back-end for AMD 64 COFF files. - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -20,10 +20,6 @@ Written by Kai Tietz, OneVision Software GmbH&CoKg. */ -/* Note we have to make sure not to include headers twice. - Not all headers are wrapped in #ifdef guards, so we define - PEI_HEADERS to prevent double including here. */ -#ifndef PEI_HEADERS #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -31,7 +27,6 @@ #include "coff/internal.h" #include "libcoff.h" #include "libiberty.h" -#endif #define BADMAG(x) AMD64BADMAG(x) @@ -139,15 +134,19 @@ coff_amd64_reloc (bfd *abfd, break; case bfd_target_elf_flavour: /* Subtract __ImageBase. */ + h = NULL; link_info = _bfd_get_link_info (obfd); - if (link_info == NULL) - return bfd_reloc_dangerous; - h = bfd_link_hash_lookup (link_info->hash, "__ImageBase", - false, false, false); - if (h == NULL) - return bfd_reloc_dangerous; - while (h->type == bfd_link_hash_indirect) - h = h->u.i.link; + if (link_info != NULL) + h = bfd_link_hash_lookup (link_info->hash, "__ImageBase", + false, false, true); + if (h == NULL + || (h->type != bfd_link_hash_defined + && h->type != bfd_link_hash_defweak)) + { + *error_message + = (char *) _("R_AMD64_IMAGEBASE with __ImageBase undefined"); + return bfd_reloc_dangerous; + } /* ELF symbols in relocatable files are section relative, but in nonrelocatable files they are virtual addresses. */ diff -= (h->u.def.value @@ -543,7 +542,8 @@ static reloc_howto_type howto_table[] = cache_ptr->addend = - coffsym->native->u.syment.n_value; \ else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ && ptr->section != NULL) \ - cache_ptr->addend = - (ptr->section->vma + ptr->value); \ + cache_ptr->addend = - (ptr->section->vma \ + + COFF_PE_ADDEND_BIAS (ptr)); \ else \ cache_ptr->addend = 0; \ if (ptr && reloc.r_type < NUM_HOWTOS \ @@ -652,6 +652,20 @@ coff_pe_amd64_relocate_section (bfd *output_bfd, #define coff_relocate_section coff_pe_amd64_relocate_section +static hashval_t +htab_hash_section_index (const void * entry) +{ + const struct bfd_section * sec = entry; + return sec->index; +} + +static int +htab_eq_section_index (const void * e1, const void * e2) +{ + const struct bfd_section * sec1 = e1; + const struct bfd_section * sec2 = e2; + return sec1->index == sec2->index; +} #endif /* COFF_WITH_PE */ /* Convert an rtype to howto for the COFF backend linker. */ @@ -741,22 +755,43 @@ coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, if (rel->r_type == R_AMD64_SECREL) { - bfd_vma osect_vma; + bfd_vma osect_vma = 0; - if (h && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak)) + if (h != NULL + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak)) osect_vma = h->root.u.def.section->output_section->vma; else { + htab_t table = coff_data (abfd)->section_by_index; asection *s; - int i; - /* Sigh, the only way to get the section to offset against - is to find it the hard way. */ - for (s = abfd->sections, i = 1; i < sym->n_scnum; i++) - s = s->next; + if (!table) + { + table = htab_create (10, htab_hash_section_index, + htab_eq_section_index, NULL); + if (table == NULL) + return NULL; + coff_data (abfd)->section_by_index = table; + } + + if (htab_elements (table) == 0) + { + for (s = abfd->sections; s != NULL; s = s->next) + { + void ** slot = htab_find_slot (table, s, INSERT); + + if (slot != NULL) + *slot = s; + } + } + + struct bfd_section needle; - osect_vma = s->output_section->vma; + needle.index = sym->n_scnum - 1; + s = htab_find (table, &needle); + if (s != NULL) + osect_vma = s->output_section->vma; } *addendp -= osect_vma; diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c index 7fb2f1373..702fe6550 100644 --- a/bfd/coff-z80.c +++ b/bfd/coff-z80.c @@ -1,5 +1,5 @@ /* BFD back-end for Zilog Z80 COFF binaries. - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. Contributed by Arnold Metselaar This file is part of BFD, the Binary File Descriptor library. @@ -330,77 +330,92 @@ reloc_processing (arelent *relent, relent->address -= section->vma; } -static void +static bool extra_case (bfd *in_abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, arelent *reloc, bfd_byte *data, - unsigned int *src_ptr, - unsigned int *dst_ptr) + size_t *src_ptr, + size_t *dst_ptr) { asection * input_section = link_order->u.indirect.section; - int val = bfd_coff_reloc16_get_value (reloc, link_info, input_section); + bfd_size_type end = bfd_get_section_limit_octets (in_abfd, input_section); + bfd_size_type reloc_size = bfd_get_reloc_size (reloc->howto); + + if (*src_ptr > end + || reloc_size > end - *src_ptr) + { + link_info->callbacks->einfo + /* xgettext:c-format */ + (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"), + in_abfd, input_section, reloc); + return false; + } + int val = bfd_coff_reloc16_get_value (reloc, link_info, input_section); switch (reloc->howto->type) { case R_OFF8: if (reloc->howto->partial_inplace) - val += (signed char)(bfd_get_8 ( in_abfd, data+*src_ptr) - & reloc->howto->src_mask); - if (val>127 || val<-128) /* Test for overflow. */ - (*link_info->callbacks->reloc_overflow) + val += (signed char) (bfd_get_8 (in_abfd, data + *src_ptr) + & reloc->howto->src_mask); + if (val > 127 || val < -128) + { + link_info->callbacks->reloc_overflow (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), reloc->howto->name, reloc->addend, input_section->owner, input_section, reloc->address); + return false; + } - bfd_put_8 (in_abfd, val, data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + bfd_put_8 (in_abfd, val, data + *dst_ptr); + *dst_ptr += 1; + *src_ptr += 1; break; case R_BYTE3: bfd_put_8 (in_abfd, val >> 24, data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_BYTE2: bfd_put_8 (in_abfd, val >> 16, data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_BYTE1: bfd_put_8 (in_abfd, val >> 8, data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_IMM8: if (reloc->howto->partial_inplace) - val += bfd_get_8 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask; + val += bfd_get_8 (in_abfd, data + *src_ptr) & reloc->howto->src_mask; /* Fall through. */ case R_BYTE0: bfd_put_8 (in_abfd, val, data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_WORD1: bfd_put_16 (in_abfd, val >> 16, data + *dst_ptr); - (*dst_ptr) += 2; - (*src_ptr) += 2; + *dst_ptr += 2; + *src_ptr += 2; break; case R_IMM16: if (reloc->howto->partial_inplace) - val += bfd_get_16 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask; + val += bfd_get_16 (in_abfd, data + *src_ptr) & reloc->howto->src_mask; /* Fall through. */ case R_WORD0: bfd_put_16 (in_abfd, val, data + *dst_ptr); - (*dst_ptr) += 2; - (*src_ptr) += 2; + *dst_ptr += 2; + *src_ptr += 2; break; case R_IMM24: @@ -408,53 +423,62 @@ extra_case (bfd *in_abfd, val += (bfd_get_24 (in_abfd, data + *src_ptr) & reloc->howto->src_mask); bfd_put_24 (in_abfd, val, data + *dst_ptr); - (*dst_ptr) += 3; - (*src_ptr) += 3; + *dst_ptr += 3; + *src_ptr += 3; break; case R_IMM32: if (reloc->howto->partial_inplace) - val += bfd_get_32 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask; + val += bfd_get_32 (in_abfd, data + *src_ptr) & reloc->howto->src_mask; bfd_put_32 (in_abfd, val, data + *dst_ptr); - (*dst_ptr) += 4; - (*src_ptr) += 4; + *dst_ptr += 4; + *src_ptr += 4; break; case R_JR: { - if (reloc->howto->partial_inplace) - val += (signed char)(bfd_get_8 ( in_abfd, data+*src_ptr) - & reloc->howto->src_mask); + if (reloc->howto->partial_inplace) + val += (signed char) (bfd_get_8 (in_abfd, data + *src_ptr) + & reloc->howto->src_mask); bfd_vma dot = (*dst_ptr + input_section->output_offset + input_section->output_section->vma); - int gap = val - dot; + bfd_signed_vma gap = val - dot; if (gap >= 128 || gap < -128) - (*link_info->callbacks->reloc_overflow) - (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), - reloc->howto->name, reloc->addend, input_section->owner, - input_section, reloc->address); + { + link_info->callbacks->reloc_overflow + (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), + reloc->howto->name, reloc->addend, input_section->owner, + input_section, reloc->address); + return false; + } bfd_put_8 (in_abfd, gap, data + *dst_ptr); - (*dst_ptr)++; - (*src_ptr)++; + *dst_ptr += 1; + *src_ptr += 1; break; } case R_IMM16BE: if (reloc->howto->partial_inplace) - val += (bfd_get_8 ( in_abfd, data+*src_ptr+0) * 0x100 + - bfd_get_8 ( in_abfd, data+*src_ptr+1)) & reloc->howto->src_mask; + val += ((bfd_get_8 (in_abfd, data + *src_ptr + 0) * 0x100 + + bfd_get_8 (in_abfd, data + *src_ptr + 1)) + & reloc->howto->src_mask); - bfd_put_8 (in_abfd, val >> 8, data + *dst_ptr+0); - bfd_put_8 (in_abfd, val, data + *dst_ptr+1); - (*dst_ptr) += 2; - (*src_ptr) += 2; + bfd_put_8 (in_abfd, val >> 8, data + *dst_ptr + 0); + bfd_put_8 (in_abfd, val, data + *dst_ptr + 1); + *dst_ptr += 2; + *src_ptr += 2; break; default: - abort (); + link_info->callbacks->einfo + /* xgettext:c-format */ + (_("%X%P: %pB(%pA): relocation \"%pR\" is not supported\n"), + in_abfd, input_section, reloc); + return false; } + return true; } static bool diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c index 974bffc9a..f50e1c819 100644 --- a/bfd/coff-z8k.c +++ b/bfd/coff-z8k.c @@ -1,5 +1,5 @@ /* BFD back-end for Zilog Z800n COFF binaries. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain, . @@ -193,16 +193,28 @@ reloc_processing (arelent *relent, relent->address -= section->vma; } -static void +static bool extra_case (bfd *in_abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, arelent *reloc, bfd_byte *data, - unsigned int *src_ptr, - unsigned int *dst_ptr) + size_t *src_ptr, + size_t *dst_ptr) { asection * input_section = link_order->u.indirect.section; + bfd_size_type end = bfd_get_section_limit_octets (in_abfd, input_section); + bfd_size_type reloc_size = bfd_get_reloc_size (reloc->howto); + + if (*src_ptr > end + || reloc_size > end - *src_ptr) + { + link_info->callbacks->einfo + /* xgettext:c-format */ + (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"), + in_abfd, input_section, reloc); + return false; + } switch (reloc->howto->type) { @@ -210,8 +222,8 @@ extra_case (bfd *in_abfd, bfd_put_8 (in_abfd, bfd_coff_reloc16_get_value (reloc, link_info, input_section), data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_IMM32: @@ -234,27 +246,26 @@ extra_case (bfd *in_abfd, dst = (dst & 0xffff) | ((dst & 0xff0000) << 8) | 0x80000000; bfd_put_32 (in_abfd, dst, data + *dst_ptr); } - (*dst_ptr) += 4; - (*src_ptr) += 4; + *dst_ptr += 4; + *src_ptr += 4; break; case R_IMM4L: bfd_put_8 (in_abfd, ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0xf0) - | (0x0f - & bfd_coff_reloc16_get_value (reloc, link_info, - input_section))), + | (0x0f & bfd_coff_reloc16_get_value (reloc, link_info, + input_section))), data + *dst_ptr); - (*dst_ptr) += 1; - (*src_ptr) += 1; + *dst_ptr += 1; + *src_ptr += 1; break; case R_IMM16: bfd_put_16 (in_abfd, bfd_coff_reloc16_get_value (reloc, link_info, input_section), data + *dst_ptr); - (*dst_ptr) += 2; - (*src_ptr) += 2; + *dst_ptr += 2; + *src_ptr += 2; break; case R_JR: @@ -264,21 +275,22 @@ extra_case (bfd *in_abfd, bfd_vma dot = (*dst_ptr + input_section->output_offset + input_section->output_section->vma); - int gap = dst - dot - 1; /* -1, since we're in the odd byte of the - word and the pc's been incremented. */ - - if (gap & 1) - abort (); - gap /= 2; - if (gap > 127 || gap < -128) - (*link_info->callbacks->reloc_overflow) - (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), - reloc->howto->name, reloc->addend, input_section->owner, - input_section, reloc->address); - - bfd_put_8 (in_abfd, gap, data + *dst_ptr); - (*dst_ptr)++; - (*src_ptr)++; + /* -1, since we're in the odd byte of the word and the pc has + been incremented. */ + bfd_signed_vma gap = dst - dot - 1; + + if ((gap & 1) != 0 || gap > 254 || gap < -256) + { + link_info->callbacks->reloc_overflow + (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), + reloc->howto->name, reloc->addend, input_section->owner, + input_section, reloc->address); + return false; + } + + bfd_put_8 (in_abfd, gap / 2, data + *dst_ptr); + *dst_ptr += 1; + *src_ptr += 1; break; } @@ -289,24 +301,23 @@ extra_case (bfd *in_abfd, bfd_vma dot = (*dst_ptr + input_section->output_offset + input_section->output_section->vma); - int gap = dst - dot - 1; /* -1, since we're in the odd byte of the - word and the pc's been incremented. */ - - if (gap & 1) - abort (); - gap /= 2; + bfd_signed_vma gap = dst - dot - 1; - if (gap > 0 || gap < -127) - (*link_info->callbacks->reloc_overflow) - (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), - reloc->howto->name, reloc->addend, input_section->owner, - input_section, reloc->address); + if ((gap & 1) != 0 || gap > 0 || gap < -254) + { + link_info->callbacks->reloc_overflow + (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), + reloc->howto->name, reloc->addend, input_section->owner, + input_section, reloc->address); + return false; + } bfd_put_8 (in_abfd, - (bfd_get_8 ( in_abfd, data + *dst_ptr) & 0x80) + (-gap & 0x7f), + ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0x80) + + (-gap / 2 & 0x7f)), data + *dst_ptr); - (*dst_ptr)++; - (*src_ptr)++; + *dst_ptr += 1; + *src_ptr += 1; break; } @@ -317,22 +328,23 @@ extra_case (bfd *in_abfd, bfd_vma dot = (*dst_ptr + input_section->output_offset + input_section->output_section->vma); - int gap = dst - dot - 2; + bfd_signed_vma gap = dst - dot - 2; - if (gap & 1) - abort (); - if (gap > 4096 || gap < -4095) - (*link_info->callbacks->reloc_overflow) - (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), - reloc->howto->name, reloc->addend, input_section->owner, - input_section, reloc->address); + if ((gap & 1) != 0 || gap > 4096 || gap < -4095) + { + link_info->callbacks->reloc_overflow + (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), + reloc->howto->name, reloc->addend, input_section->owner, + input_section, reloc->address); + return false; + } - gap /= 2; bfd_put_16 (in_abfd, - (bfd_get_16 ( in_abfd, data + *dst_ptr) & 0xf000) | (-gap & 0x0fff), + ((bfd_get_16 (in_abfd, data + *dst_ptr) & 0xf000) + | (-gap / 2 & 0x0fff)), data + *dst_ptr); - (*dst_ptr) += 2; - (*src_ptr) += 2; + *dst_ptr += 2; + *src_ptr += 2; break; } @@ -343,23 +355,31 @@ extra_case (bfd *in_abfd, bfd_vma dot = (*dst_ptr + input_section->output_offset + input_section->output_section->vma); - int gap = dst - dot - 2; + bfd_signed_vma gap = dst - dot - 2; if (gap > 32767 || gap < -32768) - (*link_info->callbacks->reloc_overflow) - (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), - reloc->howto->name, reloc->addend, input_section->owner, - input_section, reloc->address); - - bfd_put_16 (in_abfd, (bfd_vma) gap, data + *dst_ptr); - (*dst_ptr) += 2; - (*src_ptr) += 2; + { + link_info->callbacks->reloc_overflow + (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr), + reloc->howto->name, reloc->addend, input_section->owner, + input_section, reloc->address); + return false; + } + + bfd_put_16 (in_abfd, gap, data + *dst_ptr); + *dst_ptr += 2; + *src_ptr += 2; break; } default: - abort (); + link_info->callbacks->einfo + /* xgettext:c-format */ + (_("%X%P: %pB(%pA): relocation \"%pR\" is not supported\n"), + in_abfd, input_section, reloc); + return false; } + return true; } #define coff_reloc16_extra_cases extra_case diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index fa57910a8..54f9dcd5e 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for IBM RS/6000 "XCOFF64" files. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Written Clinton Popetz. Contributed by Cygnus Support. @@ -411,10 +411,10 @@ _bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type ATTRIBUTE_UNUSED, if (auxtype != _AUX_CSECT) goto error; - bfd_vma h = H_GET_S32 (abfd, ext->x_csect.x_scnlen_hi); + bfd_vma h = H_GET_32 (abfd, ext->x_csect.x_scnlen_hi); bfd_vma l = H_GET_32 (abfd, ext->x_csect.x_scnlen_lo); - in->x_csect.x_scnlen.l = h << 32 | (l & 0xffffffff); + in->x_csect.x_scnlen.u64 = h << 32 | (l & 0xffffffff); in->x_csect.x_parmhash = H_GET_32 (abfd, ext->x_csect.x_parmhash); in->x_csect.x_snhash = H_GET_16 (abfd, ext->x_csect.x_snhash); @@ -436,7 +436,7 @@ _bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type ATTRIBUTE_UNUSED, = H_GET_64 (abfd, ext->x_fcn.x_lnnoptr); in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_fcn.x_fsize); - in->x_sym.x_fcnary.x_fcn.x_endndx.l + in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = H_GET_32 (abfd, ext->x_fcn.x_endndx); } break; @@ -524,9 +524,9 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type ATTRIBUTE_UNUSED, { bfd_vma temp; - temp = in->x_csect.x_scnlen.l & 0xffffffff; + temp = in->x_csect.x_scnlen.u64 & 0xffffffff; H_PUT_32 (abfd, temp, ext->x_csect.x_scnlen_lo); - temp = in->x_csect.x_scnlen.l >> 32; + temp = in->x_csect.x_scnlen.u64 >> 32; H_PUT_32 (abfd, temp, ext->x_csect.x_scnlen_hi); H_PUT_32 (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash); H_PUT_16 (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash); @@ -542,7 +542,7 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type ATTRIBUTE_UNUSED, H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_fcn.x_lnnoptr); H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_fcn.x_fsize); - H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, + H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext->x_fcn.x_endndx); H_PUT_8 (abfd, _AUX_FCN, ext->x_csect.x_auxtype); } @@ -1811,13 +1811,13 @@ xcoff64_slurp_armap (bfd *abfd) /* This is for the new format. */ struct xcoff_ar_hdr_big hdr; - if (xcoff_ardata (abfd) == NULL) + if (x_artdata (abfd) == NULL) { abfd->has_armap = false; return true; } - off = bfd_scan_vma (xcoff_ardata_big (abfd)->symoff64, + off = bfd_scan_vma (x_artdata (abfd)->u.bhdr.symoff64, (const char **) NULL, 10); if (off == 0) { @@ -1829,8 +1829,7 @@ xcoff64_slurp_armap (bfd *abfd) 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) + if (bfd_read (&hdr, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) return false; /* Skip the name (normally empty). */ @@ -1907,7 +1906,7 @@ xcoff64_archive_p (bfd *abfd) struct xcoff_ar_file_hdr_big hdr; size_t amt = SXCOFFARMAG; - if (bfd_bread (magic, amt, abfd) != amt) + if (bfd_read (magic, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1925,7 +1924,7 @@ xcoff64_archive_p (bfd *abfd) /* Now read the rest of the file header. */ amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG; - if (bfd_bread (&hdr.memoff, amt, abfd) != amt) + if (bfd_read (&hdr.memoff, amt, abfd) != amt) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_wrong_format); @@ -1939,22 +1938,16 @@ xcoff64_archive_p (bfd *abfd) if (bfd_ardata (abfd) == (struct artdata *) NULL) goto error_ret_restore; - /* Already cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache = NULL; - bfd_ardata (abfd)->archive_head = NULL; - bfd_ardata (abfd)->symdefs = NULL; - bfd_ardata (abfd)->extended_names = NULL; - bfd_ardata (abfd)->extended_names_size = 0; */ bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff, (const char **) NULL, 10); - amt = SIZEOF_AR_FILE_HDR_BIG; + amt = sizeof (struct xcoff_artdata); bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt); if (bfd_ardata (abfd)->tdata == NULL) goto error_ret; - memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG); + memcpy (&x_artdata (abfd)->u.bhdr, &hdr, SIZEOF_AR_FILE_HDR_BIG); if (! xcoff64_slurp_armap (abfd)) { @@ -1974,7 +1967,7 @@ xcoff64_archive_p (bfd *abfd) static bfd * xcoff64_openr_next_archived_file (bfd *archive, bfd *last_file) { - if ((xcoff_ardata (archive) == NULL) + if (x_artdata (archive) == NULL || ! xcoff_big_format_p (archive)) { bfd_set_error (bfd_error_invalid_operation); @@ -2239,7 +2232,10 @@ 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; + { + free (data_buffer); + return false; + } val = string_table_size; bfd_put_32 (abfd, val, &string_table[0]); @@ -2265,7 +2261,7 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, syment.n_scnum = 2; syment.n_sclass = C_HIDEXT; syment.n_numaux = 1; - auxent.x_csect.x_scnlen.l = data_buffer_size; + auxent.x_csect.x_scnlen.u64 = data_buffer_size; auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD; auxent.x_csect.x_smclas = XMC_RW; bfd_coff_swap_sym_out (abfd, &syment, @@ -2390,20 +2386,23 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, filehdr.f_symptr = data_scnhdr.s_relptr + data_scnhdr.s_nreloc * RELSZ; bfd_coff_swap_filehdr_out (abfd, &filehdr, filehdr_ext); - bfd_bwrite (filehdr_ext, FILHSZ, abfd); bfd_coff_swap_scnhdr_out (abfd, &text_scnhdr, &scnhdr_ext[SCNHSZ * 0]); bfd_coff_swap_scnhdr_out (abfd, &data_scnhdr, &scnhdr_ext[SCNHSZ * 1]); bfd_coff_swap_scnhdr_out (abfd, &bss_scnhdr, &scnhdr_ext[SCNHSZ * 2]); - bfd_bwrite (scnhdr_ext, 3 * SCNHSZ, abfd); - bfd_bwrite (data_buffer, data_buffer_size, abfd); - bfd_bwrite (reloc_ext, data_scnhdr.s_nreloc * RELSZ, abfd); - bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd); - bfd_bwrite (string_table, string_table_size, abfd); - + bool ret = true; + if (bfd_write (filehdr_ext, FILHSZ, abfd) != FILHSZ + || bfd_write (scnhdr_ext, 3 * SCNHSZ, abfd) != 3 * SCNHSZ + || bfd_write (data_buffer, data_buffer_size, abfd) != data_buffer_size + || (bfd_write (reloc_ext, data_scnhdr.s_nreloc * RELSZ, abfd) + != data_scnhdr.s_nreloc * RELSZ) + || (bfd_write (syment_ext, filehdr.f_nsyms * SYMESZ, abfd) + != (bfd_size_type) filehdr.f_nsyms * SYMESZ) + || bfd_write (string_table, string_table_size, abfd) != string_table_size) + ret = false; + + free (string_table); free (data_buffer); - data_buffer = NULL; - - return true; + return ret; } /* The typical dynamic reloc. */ @@ -2624,8 +2623,8 @@ const bfd_target rs6000_xcoff64_vec = }, /* Generic */ - _bfd_archive_close_and_cleanup, - _bfd_bool_bfd_true, + coff_close_and_cleanup, + coff_bfd_free_cached_info, coff_new_section_hook, _bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window, @@ -2897,8 +2896,8 @@ const bfd_target rs6000_xcoff64_aix_vec = }, /* Generic */ - _bfd_archive_close_and_cleanup, - _bfd_bool_bfd_true, + coff_close_and_cleanup, + coff_bfd_free_cached_info, coff_new_section_hook, _bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window, diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 52027981c..0487555dd 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1,5 +1,5 @@ /* Support for the generic parts of most COFF variants, for BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -134,9 +134,10 @@ SUBSUBSECTION in output BFDs at runtime; if it is false, as it will be by default when generating an executable image, long section names are truncated; if true, the long section names extension is employed. The hook - points to a function that allows the value of the flag to be altered - at runtime, on formats that support long section names at all; on - other formats it points to a stub that returns an error indication. + points to a function that allows the value of a copy of the flag + in coff object tdata to be altered at runtime, on formats that + support long section names at all; on other formats it points + to a stub that returns an error indication. With input BFDs, the flag is set according to whether any long section names are detected while reading the section headers. For a completely @@ -289,31 +290,33 @@ DESCRIPTION <>: CODE_FRAGMENT -. .typedef struct coff_ptr_struct .{ . {* Remembers the offset from the first symbol in the file for -. this symbol. Generated by coff_renumber_symbols. *} +. this symbol. Generated by coff_renumber_symbols. *} . unsigned int offset; . -. {* Should the value of this symbol be renumbered. Used for -. XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. *} -. unsigned int fix_value : 1; +. {* Selects between the elements of the union below. *} +. unsigned int is_sym : 1; . -. {* Should the tag field of this symbol be renumbered. -. Created by coff_pointerize_aux. *} +. {* Selects between the elements of the x_sym.x_tagndx union. If set, +. p is valid and the field will be renumbered. *} . unsigned int fix_tag : 1; . -. {* Should the endidx field of this symbol be renumbered. -. Created by coff_pointerize_aux. *} +. {* Selects between the elements of the x_sym.x_fcnary.x_fcn.x_endndx +. union. If set, p is valid and the field will be renumbered. *} . unsigned int fix_end : 1; . -. {* Should the x_csect.x_scnlen field be renumbered. -. Created by coff_pointerize_aux. *} +. {* Selects between the elements of the x_csect.x_scnlen union. If set, +. p is valid and the field will be renumbered. *} . unsigned int fix_scnlen : 1; . -. {* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the -. index into the line number entries. Set by coff_slurp_symbol_table. *} +. {* If set, u.syment.n_value contains a pointer to a symbol. The final +. value will be the offset field. Used for XCOFF C_BSTAT symbols. *} +. unsigned int fix_value : 1; +. +. {* If set, u.syment.n_value is an index into the line number entries. +. Used for XCOFF C_BINCL/C_EINCL symbols. *} . unsigned int fix_line : 1; . . {* The container for the symbol structure as read and translated @@ -324,15 +327,11 @@ CODE_FRAGMENT . struct internal_syment syment; . } u; . -. {* Selector for the union above. *} -. bool is_sym; -. . {* An extra pointer which can used by format based on COFF (like XCOFF) . to provide extra information to their backend. *} . void *extrap; .} combined_entry_type; . -. .{* Each canonical asymbol really looks like this: *} . .typedef struct coff_symbol_struct @@ -349,10 +348,11 @@ CODE_FRAGMENT . {* Have the line numbers been relocated yet ? *} . bool done_lineno; .} coff_symbol_type; - +. */ #include "libiberty.h" +#include #ifdef COFF_WITH_PE #include "peicode.h" @@ -399,62 +399,8 @@ CODE_FRAGMENT #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 bool bfd_coff_set_long_section_names_allowed - (bfd *, int); -#else /* !defined (COFF_LONG_SECTION_NAMES) */ -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 bool styp_to_sec_flags - (bfd *, void *, const char *, asection *, flagword *); -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 bool coff_new_section_hook - (bfd *, asection *); -static bool coff_set_arch_mach_hook - (bfd *, void *); -static bool coff_write_relocs - (bfd *, int); -static bool coff_set_flags - (bfd *, unsigned int *, unsigned short *); -static bool coff_set_arch_mach - (bfd *, enum bfd_architecture, unsigned long) ATTRIBUTE_UNUSED; -static bool coff_compute_section_file_positions - (bfd *); -static bool coff_write_object_contents - (bfd *) ATTRIBUTE_UNUSED; -static bool coff_set_section_contents - (bfd *, asection *, const void *, file_ptr, bfd_size_type); -static bool coff_slurp_line_table - (bfd *, asection *); -static bool coff_slurp_symbol_table - (bfd *); static enum coff_symbol_classification coff_classify_symbol (bfd *, struct internal_syment *); -static bool coff_slurp_reloc_table - (bfd *, asection *, asymbol **); -static long coff_canonicalize_reloc - (bfd *, asection *, arelent **, asymbol **); -#ifndef coff_mkobject_hook -static void * coff_mkobject_hook - (bfd *, void *, void *); -#endif -#ifdef COFF_WITH_PE -static flagword handle_COMDAT - (bfd *, flagword, void *, const char *, asection *); -#endif -#ifdef TICOFF -static bool ticoff0_bad_format_hook - (bfd *, void * ); -static bool ticoff1_bad_format_hook - (bfd *, void * ); -#endif /* void warning(); */ @@ -462,15 +408,14 @@ static bool ticoff1_bad_format_hook static bool bfd_coff_set_long_section_names_allowed (bfd *abfd, int enable) { - coff_backend_info (abfd)->_bfd_coff_long_section_names = enable; + bfd_coff_long_section_names (abfd) = enable; return true; } #else /* !defined (COFF_LONG_SECTION_NAMES) */ static bool -bfd_coff_set_long_section_names_disallowed (bfd *abfd, int enable) +bfd_coff_set_long_section_names_disallowed (bfd *abfd ATTRIBUTE_UNUSED, + int enable ATTRIBUTE_UNUSED) { - (void) abfd; - (void) enable; return false; } #endif /* defined (COFF_LONG_SECTION_NAMES) */ @@ -908,228 +853,214 @@ styp_to_sec_flags (bfd *abfd, #else /* COFF_WITH_PE */ -static flagword -handle_COMDAT (bfd * abfd, - flagword sec_flags, - void * hdr, - const char *name, - asection *section) +static hashval_t +comdat_hashf (const void *entry) { - struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; - bfd_byte *esymstart, *esym, *esymend; - int seen_state = 0; - char *target_name = NULL; + const struct comdat_hash_entry *fe = entry; + return fe->target_index; +} + +static int +comdat_eqf (const void *e1, const void *e2) +{ + const struct comdat_hash_entry *fe1 = e1; + const struct comdat_hash_entry *fe2 = e2; + return fe1->target_index == fe2->target_index; +} - sec_flags |= SEC_LINK_ONCE; +static void +comdat_delf (void *ent) +{ + struct comdat_hash_entry *e = ent; + free (e->comdat_name); + free (e->symname); + free (e); +} - /* Unfortunately, the PE format stores essential information in - the symbol table, of all places. We need to extract that - information now, so that objdump and the linker will know how - to handle the section without worrying about the symbols. We - can't call slurp_symtab, because the linker doesn't want the - swapped symbols. */ +static struct comdat_hash_entry * +find_flags (htab_t comdat_hash, int target_index) +{ + struct comdat_hash_entry needle; + needle.target_index = target_index; + + return htab_find (comdat_hash, &needle); +} + +static bool +fill_comdat_hash (bfd *abfd) +{ + bfd_byte *esymstart, *esym, *esymend; + + /* Unfortunately, the PE format stores essential information in the + symbol table, of all places. We need to extract that information + now, so that objdump and the linker will know how to handle the + section without worrying about the symbols. We can't call + slurp_symtab, because the linker doesn't want the swapped symbols. */ /* COMDAT sections are special. The first symbol is the section symbol, which tells what kind of COMDAT section it is. The - second symbol is the "comdat symbol" - the one with the - unique name. GNU uses the section symbol for the unique - name; MS uses ".text" for every comdat section. Sigh. - DJ */ + second symbol is the "comdat symbol" - the one with the unique + name. GNU uses the section symbol for the unique name; MS uses + ".text" for every comdat section. Sigh. - DJ. */ - /* This is not mirrored in sec_to_styp_flags(), but there - doesn't seem to be a need to, either, and it would at best be - rather messy. */ + /* This is not mirrored in sec_to_styp_flags(), but there doesn't + seem to be a need to, either, and it would at best be rather messy. */ if (! _bfd_coff_get_external_symbols (abfd)) - return sec_flags; + return true; esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); - while (esym < esymend) + for (struct internal_syment isym; + esym < esymend; + esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd)) { - struct internal_syment isym; char buf[SYMNMLEN + 1]; const char *symname; + flagword sec_flags = SEC_LINK_ONCE; + + bfd_coff_swap_sym_in (abfd, esym, &isym); - bfd_coff_swap_sym_in (abfd, esym, & isym); + /* According to the MSVC documentation, the first TWO entries + with the section # are both of interest to us. The first one + is the "section symbol" (section name). The second is the + comdat symbol name. Here, we've found the first qualifying + entry; we distinguish it from the second with a state flag. - BFD_ASSERT (sizeof (internal_s->s_name) <= SYMNMLEN); + In the case of gas-generated (at least until that is fixed) + .o files, it isn't necessarily the second one. It may be + some other later symbol. - if (isym.n_scnum == section->target_index) + Since gas also doesn't follow MS conventions and emits the + section similar to .text$, where is the + name we're looking for, we distinguish the two as follows: + + If the section name is simply a section name (no $) we + presume it's MS-generated, and look at precisely the second + symbol for the comdat name. If the section name has a $, we + assume it's gas-generated, and look for (whatever + follows the $) as the comdat symbol. */ + + /* All 3 branches use this. */ + symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); + + /* PR 17512 file: 078-11867-0.004 */ + if (symname == NULL) { - /* According to the MSVC documentation, the first - TWO entries with the section # are both of - interest to us. The first one is the "section - symbol" (section name). The second is the comdat - symbol name. Here, we've found the first - qualifying entry; we distinguish it from the - second with a state flag. - - In the case of gas-generated (at least until that - is fixed) .o files, it isn't necessarily the - second one. It may be some other later symbol. - - Since gas also doesn't follow MS conventions and - emits the section similar to .text$, where - is the name we're looking for, we - distinguish the two as follows: - - If the section name is simply a section name (no - $) we presume it's MS-generated, and look at - precisely the second symbol for the comdat name. - If the section name has a $, we assume it's - gas-generated, and look for (whatever - follows the $) as the comdat symbol. */ - - /* All 3 branches use this. */ - symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); - - /* PR 17512 file: 078-11867-0.004 */ - if (symname == NULL) - { - _bfd_error_handler (_("%pB: unable to load COMDAT section name"), - abfd); - break; - } + _bfd_error_handler (_("%pB: unable to load COMDAT section name"), + abfd); + continue; + } - switch (seen_state) - { - case 0: - { - /* The first time we've seen the symbol. */ - union internal_auxent aux; - - /* If it isn't the stuff we're expecting, die; - The MS documentation is vague, but it - appears that the second entry serves BOTH - as the comdat symbol and the defining - symbol record (either C_STAT or C_EXT, - possibly with an aux entry with debug - information if it's a function.) It - appears the only way to find the second one - is to count. (On Intel, they appear to be - adjacent, but on Alpha, they have been - found separated.) - - Here, we think we've found the first one, - but there's some checking we can do to be - sure. */ - - if (! ((isym.n_sclass == C_STAT - || isym.n_sclass == C_EXT) - && BTYPE (isym.n_type) == T_NULL - && isym.n_value == 0)) - { - /* Malformed input files can trigger this test. - cf PR 21781. */ - _bfd_error_handler (_("%pB: error: unexpected symbol '%s' in COMDAT section"), - abfd, symname); - goto breakloop; - } + union internal_auxent aux; - /* FIXME LATER: MSVC generates section names - like .text for comdats. Gas generates - names like .text$foo__Fv (in the case of a - function). See comment above for more. */ + struct comdat_hash_entry needle; + needle.target_index = isym.n_scnum; - if (isym.n_sclass == C_STAT && strcmp (name, symname) != 0) - /* xgettext:c-format */ - _bfd_error_handler (_("%pB: warning: COMDAT symbol '%s'" - " does not match section name '%s'"), - abfd, symname, name); + void **slot + = htab_find_slot (pe_data (abfd)->comdat_hash, &needle, INSERT); + if (slot == NULL) + return false; - seen_state = 1; + if (*slot == NULL) + { + if (isym.n_numaux != 1) + aux.x_scn.x_comdat = 0; + else + { + /* PR 17512: file: e2cfe54f. */ + if (esym + isym.n_numaux * bfd_coff_symesz (abfd) >= esymend) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: warning: no symbol for" + " section '%s' found"), + abfd, symname); + continue; + } + bfd_coff_swap_aux_in (abfd, (esym + bfd_coff_symesz (abfd)), + isym.n_type, isym.n_sclass, 0, + isym.n_numaux, &aux); + } - /* PR 17512: file: e2cfe54f. */ - if (esym + bfd_coff_symesz (abfd) >= esymend) - { - /* xgettext:c-format */ - _bfd_error_handler (_("%pB: warning: no symbol for" - " section '%s' found"), - abfd, symname); - break; - } - /* This is the section symbol. */ - bfd_coff_swap_aux_in (abfd, (esym + bfd_coff_symesz (abfd)), - isym.n_type, isym.n_sclass, - 0, isym.n_numaux, & aux); + /* FIXME: Microsoft uses NODUPLICATES and ASSOCIATIVE, but + gnu uses ANY and SAME_SIZE. Unfortunately, gnu doesn't + do the comdat symbols right. So, until we can fix it to + do the right thing, we are temporarily disabling comdats + for the MS types (they're used in DLLs and C++, but we + don't support *their* C++ libraries anyway - DJ. */ - target_name = strchr (name, '$'); - if (target_name != NULL) - { - /* Gas mode. */ - seen_state = 2; - /* Skip the `$'. */ - target_name += 1; - } + /* Cygwin does not follow the MS style, and uses ANY and + SAME_SIZE where NODUPLICATES and ASSOCIATIVE should be + used. For Interix, we just do the right thing up + front. */ - /* FIXME: Microsoft uses NODUPLICATES and - ASSOCIATIVE, but gnu uses ANY and - SAME_SIZE. Unfortunately, gnu doesn't do - the comdat symbols right. So, until we can - fix it to do the right thing, we are - temporarily disabling comdats for the MS - types (they're used in DLLs and C++, but we - don't support *their* C++ libraries anyway - - DJ. */ - - /* Cygwin does not follow the MS style, and - uses ANY and SAME_SIZE where NODUPLICATES - and ASSOCIATIVE should be used. For - Interix, we just do the right thing up - front. */ - - switch (aux.x_scn.x_comdat) - { - case IMAGE_COMDAT_SELECT_NODUPLICATES: + switch (aux.x_scn.x_comdat) + { + case IMAGE_COMDAT_SELECT_NODUPLICATES: #ifdef STRICT_PE_FORMAT - sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; + sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; #else - sec_flags &= ~SEC_LINK_ONCE; + sec_flags &= ~SEC_LINK_ONCE; #endif - break; + break; - case IMAGE_COMDAT_SELECT_ANY: - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; - break; + case IMAGE_COMDAT_SELECT_ANY: + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; + break; - case IMAGE_COMDAT_SELECT_SAME_SIZE: - sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; - break; + case IMAGE_COMDAT_SELECT_SAME_SIZE: + sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; + break; - case IMAGE_COMDAT_SELECT_EXACT_MATCH: - /* Not yet fully implemented ??? */ - sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; - break; + case IMAGE_COMDAT_SELECT_EXACT_MATCH: + /* Not yet fully implemented ??? */ + sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; + break; - /* debug$S gets this case; other - implications ??? */ + /* debug$S gets this case; other implications ??? */ - /* There may be no symbol... we'll search - the whole table... Is this the right - place to play this game? Or should we do - it when reading it in. */ - case IMAGE_COMDAT_SELECT_ASSOCIATIVE: + /* There may be no symbol. We'll search the whole + table. Is this the right place to play this game? + Or should we do it when reading it in? */ + case IMAGE_COMDAT_SELECT_ASSOCIATIVE: #ifdef STRICT_PE_FORMAT - /* FIXME: This is not currently implemented. */ - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; + /* FIXME: This is not currently implemented. */ + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; #else - sec_flags &= ~SEC_LINK_ONCE; + sec_flags &= ~SEC_LINK_ONCE; #endif - break; + break; - default: /* 0 means "no symbol" */ - /* debug$F gets this case; other - implications ??? */ - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; - break; - } - } + default: /* 0 means "no symbol" */ + /* debug$F gets this case; other implications ??? */ + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; break; + } + + *slot = bfd_zmalloc (sizeof (struct comdat_hash_entry)); + if (*slot == NULL) + return false; + struct comdat_hash_entry *newentry = *slot; + newentry->sec_flags = sec_flags; + newentry->symname = bfd_strdup (symname); + newentry->target_index = isym.n_scnum; + newentry->isym = isym; + newentry->comdat_symbol = -1; + } + else + { + struct comdat_hash_entry *entry = *slot; + + if (entry->comdat_symbol != -1) + continue; - case 2: + char *target_name = strchr (entry->symname, '$'); + if (target_name != NULL) + { /* Gas mode: the first matching on partial name. */ + target_name += 1; #ifndef TARGET_UNDERSCORE #define TARGET_UNDERSCORE 0 #endif @@ -1138,50 +1069,108 @@ handle_COMDAT (bfd * abfd, symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) { /* Not the name we're looking for */ - esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); continue; } - /* Fall through. */ - case 1: - /* MSVC mode: the lexically second symbol (or - drop through from the above). */ - { - char *newname; - size_t amt; - - /* This must the second symbol with the - section #. It is the actual symbol name. - Intel puts the two adjacent, but Alpha (at - least) spreads them out. */ - - amt = sizeof (struct coff_comdat_info); - coff_section_data (abfd, section)->comdat - = (struct coff_comdat_info *) bfd_alloc (abfd, amt); - if (coff_section_data (abfd, section)->comdat == NULL) - abort (); - - coff_section_data (abfd, section)->comdat->symbol = - (esym - esymstart) / bfd_coff_symesz (abfd); - - amt = strlen (symname) + 1; - newname = (char *) bfd_alloc (abfd, amt); - if (newname == NULL) - abort (); - - strcpy (newname, symname); - coff_section_data (abfd, section)->comdat->name - = newname; - } - - goto breakloop; } + /* MSVC mode: the lexically second symbol (or drop through + from the above). */ + /* This must the second symbol with the section #. It is + the actual symbol name. Intel puts the two adjacent, but + Alpha (at least) spreads them out. */ + + entry->comdat_symbol = (esym - esymstart) / bfd_coff_symesz (abfd); + entry->comdat_name = bfd_strdup (symname); } + } + + return true; +} + +static bool +insert_coff_comdat_info (bfd *abfd, asection *section, const char *symname, + long symbol) +{ + struct coff_comdat_info *comdat; + size_t len = strlen (symname) + 1; - esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); + comdat = bfd_alloc (abfd, sizeof (*comdat) + len); + if (comdat == NULL) + return false; + + coff_section_data (abfd, section)->comdat = comdat; + comdat->symbol = symbol; + char *newname = (char *) (comdat + 1); + comdat->name = newname; + memcpy (newname, symname, len); + return true; +} + +static bool +handle_COMDAT (bfd *abfd, flagword *sec_flags, const char *name, + asection *section) +{ + if (pe_data (abfd)->comdat_hash == NULL) + { + pe_data (abfd)->comdat_hash = htab_create (10, comdat_hashf, comdat_eqf, + comdat_delf); + if (pe_data (abfd)->comdat_hash == NULL) + return false; } - breakloop: - return sec_flags; + if (htab_elements (pe_data (abfd)->comdat_hash) == 0) + if (! fill_comdat_hash (abfd)) + return false; + + struct comdat_hash_entry *found + = find_flags (pe_data (abfd)->comdat_hash, section->target_index); + if (found != NULL) + { + struct internal_syment isym = found->isym; + + /* If it isn't the stuff we're expecting, die; The MS + documentation is vague, but it appears that the second entry + serves BOTH as the comdat symbol and the defining symbol + record (either C_STAT or C_EXT, possibly with an aux entry + with debug information if it's a function.) It appears the + only way to find the second one is to count. (On Intel, they + appear to be adjacent, but on Alpha, they have been found + separated.) + + Here, we think we've found the first one, but there's some + checking we can do to be sure. */ + + if (! ((isym.n_sclass == C_STAT || isym.n_sclass == C_EXT) + && BTYPE (isym.n_type) == T_NULL && isym.n_value == 0)) + { + /* Malformed input files can trigger this test. + cf PR 21781. */ + _bfd_error_handler + (_("%pB: error: unexpected symbol '%s' in COMDAT section"), + abfd, found->symname); + return false; + } + + /* FIXME LATER: MSVC generates section names like .text for + comdats. Gas generates names like .text$foo__Fv (in the case + of a function). See comment above for more. */ + + if (isym.n_sclass == C_STAT && strcmp (name, found->symname) != 0) + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: warning: COMDAT symbol '%s'" + " does not match section name '%s'"), + abfd, found->symname, name); + + if (found->comdat_symbol != -1) + { + if (! insert_coff_comdat_info (abfd, section, found->comdat_name, + found->comdat_symbol)) + return false; + } + *sec_flags = *sec_flags | found->sec_flags; + return true; + } + *sec_flags = *sec_flags | SEC_LINK_ONCE; + return true; } @@ -1332,7 +1321,8 @@ styp_to_sec_flags (bfd *abfd, break; case IMAGE_SCN_LNK_COMDAT: /* COMDAT gets very special treatment. */ - sec_flags = handle_COMDAT (abfd, sec_flags, hdr, name, section); + if (!handle_COMDAT (abfd, &sec_flags, name, section)) + result = false; break; default: /* Silently ignore for now. */ @@ -1380,8 +1370,7 @@ styp_to_sec_flags (bfd *abfd, INTERNAL_DEFINITION bfd_coff_backend_data -CODE_FRAGMENT - +INTERNAL .{* COFF symbol classifications. *} . .enum coff_symbol_classification @@ -1402,7 +1391,10 @@ CODE_FRAGMENT . (asection *, struct bfd_link_info *, struct internal_reloc *, . struct coff_link_hash_entry *, struct internal_syment *); . + Special entry points for gdb to swap in coff symbol table parts: + +CODE_FRAGMENT .typedef struct .{ . void (*_bfd_coff_swap_aux_in) @@ -1495,9 +1487,9 @@ Special entry points for gdb to swap in coff symbol table parts: . (bfd *, FILE *, combined_entry_type *, combined_entry_type *, . combined_entry_type *, unsigned int); . -. void (*_bfd_coff_reloc16_extra_cases) +. bool (*_bfd_coff_reloc16_extra_cases) . (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, -. bfd_byte *, unsigned int *, unsigned int *); +. bfd_byte *, size_t *, size_t *); . . int (*_bfd_coff_reloc16_estimate) . (bfd *, asection *, arelent *, unsigned int, @@ -1540,8 +1532,10 @@ Special entry points for gdb to swap in coff symbol table parts: . .} bfd_coff_backend_data; . + +INTERNAL .#define coff_backend_info(abfd) \ -. ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) +. ((const bfd_coff_backend_data *) (abfd)->xvec->backend_data) . .#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \ . ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i)) @@ -1584,7 +1578,7 @@ Special entry points for gdb to swap in coff symbol table parts: .#define bfd_coff_long_filenames(abfd) \ . (coff_backend_info (abfd)->_bfd_coff_long_filenames) .#define bfd_coff_long_section_names(abfd) \ -. (coff_backend_info (abfd)->_bfd_coff_long_section_names) +. (coff_data (abfd)->long_section_names) .#define bfd_coff_set_long_section_names(abfd, enable) \ . ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) .#define bfd_coff_default_section_alignment_power(abfd) \ @@ -1947,9 +1941,9 @@ coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED, file_ptr oldpos = bfd_tell (abfd); bfd_size_type relsz = bfd_coff_relsz (abfd); - if (bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0) != 0) + if (bfd_seek (abfd, hdr->s_relptr, 0) != 0) return; - if (bfd_bread (& dst, relsz, abfd) != relsz) + if (bfd_read (& dst, relsz, abfd) != relsz) return; bfd_coff_swap_reloc_in (abfd, &dst, &n); @@ -2018,9 +2012,9 @@ coff_set_alignment_hook (bfd * abfd, asection * section, void * scnhdr) const file_ptr oldpos = bfd_tell (abfd); const bfd_size_type relsz = bfd_coff_relsz (abfd); - if (bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0) != 0) + if (bfd_seek (abfd, hdr->s_relptr, 0) != 0) return; - if (bfd_bread (& dst, relsz, abfd) != relsz) + if (bfd_read (& dst, relsz, abfd) != relsz) return; bfd_coff_swap_reloc_in (abfd, &dst, &n); @@ -2060,6 +2054,7 @@ coff_mkobject (bfd * abfd) abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt); if (abfd->tdata.coff_obj_data == NULL) return false; + coff = coff_data (abfd); coff->symbols = NULL; coff->conversion_table = NULL; @@ -2067,6 +2062,9 @@ coff_mkobject (bfd * abfd) coff->relocbase = 0; coff->local_toc_sym_map = 0; + bfd_coff_long_section_names (abfd) + = coff_backend_info (abfd)->_bfd_coff_long_section_names; + /* make_abs_section(abfd);*/ return true; @@ -2459,10 +2457,11 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, && indaux + 1 == symbol->u.syment.n_numaux) { BFD_ASSERT (! aux->is_sym); - if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD) + if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD + && aux->u.auxent.x_csect.x_scnlen.u64 < obj_raw_syment_count (abfd)) { aux->u.auxent.x_csect.x_scnlen.p = - table_base + aux->u.auxent.x_csect.x_scnlen.l; + table_base + aux->u.auxent.x_csect.x_scnlen.u64; aux->fix_scnlen = 1; } @@ -2501,21 +2500,21 @@ coff_print_aux (bfd *abfd ATTRIBUTE_UNUSED, if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) != XTY_LD) { BFD_ASSERT (! aux->fix_scnlen); - fprintf (file, "val %5" PRId64, - (int64_t) aux->u.auxent.x_csect.x_scnlen.l); + fprintf (file, "val %5" PRIu64, + aux->u.auxent.x_csect.x_scnlen.u64); } else { fprintf (file, "indx "); if (! aux->fix_scnlen) - fprintf (file, "%4" PRId64, - (int64_t) aux->u.auxent.x_csect.x_scnlen.l); + fprintf (file, "%4" PRIu64, + aux->u.auxent.x_csect.x_scnlen.u64); else fprintf (file, "%4ld", (long) (aux->u.auxent.x_csect.x_scnlen.p - table_base)); } fprintf (file, - " prmhsh %ld snhsh %u typ %d algn %d clss %u stb %ld snstb %u", + " prmhsh %u snhsh %u typ %d algn %d clss %u stb %u snstb %u", aux->u.auxent.x_csect.x_parmhash, (unsigned int) aux->u.auxent.x_csect.x_snhash, SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp), @@ -2611,8 +2610,8 @@ coff_write_relocs (bfd * abfd, int first_undef) /* Add one to count *this* reloc (grr). */ n.r_vaddr = s->reloc_count + 1; coff_swap_reloc_out (abfd, &n, &dst); - if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd), - abfd) != bfd_coff_relsz (abfd)) + if (bfd_write (&dst, bfd_coff_relsz (abfd), abfd) + != bfd_coff_relsz (abfd)) return false; } #endif @@ -2704,8 +2703,8 @@ coff_write_relocs (bfd * abfd, int first_undef) #endif coff_swap_reloc_out (abfd, &n, &dst); - if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd), - abfd) != bfd_coff_relsz (abfd)) + if (bfd_write (&dst, bfd_coff_relsz (abfd), abfd) + != bfd_coff_relsz (abfd)) return false; } @@ -3060,6 +3059,9 @@ coff_compute_section_file_positions (bfd * abfd) sofar += bfd_coff_scnhsz (abfd); #endif + if (coff_data (abfd)->section_by_target_index) + htab_empty (coff_data (abfd)->section_by_target_index); + #ifdef COFF_IMAGE_WITH_PE { /* PE requires the sections to be in memory order when listed in @@ -3227,8 +3229,9 @@ coff_compute_section_file_positions (bfd * abfd) created and not just improve performances with gdb. */ - if ((!strcmp (current->name, _TEXT) - || !strcmp (current->name, _DATA)) + if ((current->flags & SEC_LOAD) != 0 + && (!strcmp (current->name, _TEXT) + || !strcmp (current->name, _DATA)) && (previous == NULL || strcmp(previous->name, _TDATA))) { bfd_vma align = 4096; @@ -3241,7 +3244,8 @@ coff_compute_section_file_positions (bfd * abfd) sofar += align + vma_off - sofar_off; } #endif - if (previous != NULL) + if (previous != NULL + && (previous->flags & SEC_LOAD) != 0) previous->size += sofar - old_sofar; } @@ -3320,7 +3324,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) + || bfd_write (&b, 1, abfd) != 1) return false; } @@ -3344,7 +3348,7 @@ coff_read_word (bfd *abfd, unsigned int *value, unsigned int *pelength) unsigned char b[2]; int status; - status = bfd_bread (b, (bfd_size_type) 2, abfd); + status = bfd_read (b, 2, abfd); if (status < 1) { *value = 0; @@ -3361,29 +3365,83 @@ coff_read_word (bfd *abfd, unsigned int *value, unsigned int *pelength) return true; } +/* Read a two byte number from buffer B returning the result in VALUE. + No more than BUF_SIZE bytes will be read. + Returns true upobn success, false otherwise. + If successful, increases the value stored in PELENGTH by the number + of bytes read. */ + +static bool +coff_read_word_from_buffer (unsigned char * b, + int buf_size, + unsigned int * value, + unsigned int * pelength) +{ + if (buf_size < 1) + { + *value = 0; + return false; + } + + if (buf_size == 1) + { + *value = (unsigned int)b[0]; + *pelength += 1; + } + else + { + *value = (unsigned int)(b[0] + (b[1] << 8)); + *pelength += 2; + } + + return true; +} + +#define COFF_CHECKSUM_BUFFER_SIZE 0x800000 + static unsigned int coff_compute_checksum (bfd *abfd, unsigned int *pelength) { - bool more_data; file_ptr filepos; unsigned int value; unsigned int total; + unsigned char *buf; + int buf_size; total = 0; *pelength = 0; filepos = (file_ptr) 0; + buf = (unsigned char *) bfd_malloc (COFF_CHECKSUM_BUFFER_SIZE); + if (buf == NULL) + return 0; + buf_size = 0; do { + unsigned char *cur_buf; + int cur_buf_size; + if (bfd_seek (abfd, filepos, SEEK_SET) != 0) return 0; - more_data = coff_read_word (abfd, &value, pelength); - total += value; - total = 0xffff & (total + (total >> 0x10)); - filepos += 2; + buf_size = bfd_read (buf, COFF_CHECKSUM_BUFFER_SIZE, abfd); + cur_buf_size = buf_size; + cur_buf = buf; + + while (cur_buf_size > 0) + { + coff_read_word_from_buffer (cur_buf, cur_buf_size, &value, pelength); + cur_buf += 2; + cur_buf_size -= 2; + total += value; + total = 0xffff & (total + (total >> 0x10)); + } + + filepos += buf_size; } - while (more_data); + while (buf_size > 0); + + free (buf); return (0xffff & (total + (total >> 0x10))); } @@ -3406,7 +3464,8 @@ coff_apply_checksum (bfd *abfd) return false; checksum = 0; - bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); + if (bfd_write (&checksum, 4, abfd) != 4) + return false; if (bfd_seek (abfd, peheader, SEEK_SET) != 0) return false; @@ -3418,9 +3477,7 @@ coff_apply_checksum (bfd *abfd) if (bfd_seek (abfd, peheader + 0x58, SEEK_SET) != 0) return false; - bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); - - return true; + return bfd_write (&checksum, 4, abfd) == 4; } #endif /* COFF_IMAGE_WITH_PE */ @@ -3565,18 +3622,55 @@ coff_write_object_contents (bfd * abfd) len = strlen (current->name); if (len > SCNNMLEN) { - /* The s_name field is defined to be NUL-padded but need not be - NUL-terminated. We use a temporary buffer so that we can still - sprintf all eight chars without splatting a terminating NUL - over the first byte of the following member (s_paddr). */ - /* PR 21096: The +20 is to stop a bogus warning from gcc7 about - a possible buffer overflow. */ - char s_name_buf[SCNNMLEN + 1 + 20]; /* An inherent limitation of the /nnnnnnn notation used to indicate the offset of the long name in the string table is that we cannot address entries beyone the ten million byte boundary. */ - if (string_size >= 10000000) + if (string_size < 10000000) + { + /* The s_name field is defined to be NUL-padded but need not + be NUL-terminated. We use a temporary buffer so that we + can still sprintf all eight chars without splatting a + terminating NUL over the first byte of the following + member (s_paddr). */ + /* PR 21096: The +20 is to stop a bogus warning from gcc7 + about a possible buffer overflow. */ + char s_name_buf[SCNNMLEN + 1 + 20]; + + /* We do not need to use snprintf here as we have already + verified that string_size is not too big, plus we have + an overlarge buffer, just in case. */ + sprintf (s_name_buf, "/%lu", (unsigned long) string_size); + /* Then strncpy takes care of any padding for us. */ + strncpy (section.s_name, s_name_buf, SCNNMLEN); + } + else +#ifdef COFF_WITH_PE + { + /* PE use a base 64 encoding for long section names whose + index is very large. But contrary to RFC 4648, there is + no padding: 6 characters must be generated. */ + static const char base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + unsigned long off = string_size; + unsigned i; + + section.s_name[0] = '/'; + section.s_name[1] = '/'; + for (i = SCNNMLEN - 1; i >= 2; i--) + { + section.s_name[i] = base64[off & 0x3f]; + off >>= 6; + } + } +#endif + if (string_size > 0xffffffffUL - (len + 1) +#ifndef COFF_WITH_PE + || string_size >= 10000000 +#endif + ) { bfd_set_error (bfd_error_file_too_big); _bfd_error_handler @@ -3586,12 +3680,6 @@ coff_write_object_contents (bfd * abfd) return false; } - /* We do not need to use snprintf here as we have already verfied - that string_size is not too big, plus we have an overlarge - buffer, just in case. */ - sprintf (s_name_buf, "/%lu", (unsigned long) string_size); - /* 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; } @@ -3714,7 +3802,7 @@ coff_write_object_contents (bfd * abfd) bfd_size_type amt = bfd_coff_scnhsz (abfd); if (bfd_coff_swap_scnhdr_out (abfd, §ion, &buff) == 0 - || bfd_bwrite (& buff, amt, abfd) != amt) + || bfd_write (& buff, amt, abfd) != amt) return false; } @@ -3840,7 +3928,7 @@ coff_write_object_contents (bfd * abfd) scnhdr.s_flags = STYP_OVRFLO; amt = bfd_coff_scnhsz (abfd); if (bfd_coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0 - || bfd_bwrite (& buff, amt, abfd) != amt) + || bfd_write (& buff, amt, abfd) != amt) return false; } } @@ -3849,16 +3937,28 @@ coff_write_object_contents (bfd * abfd) #if defined (COFF_GO32_EXE) || defined (COFF_GO32) /* Pad section headers. */ - if ((abfd->flags & EXEC_P) && abfd->sections != NULL) + if ((abfd->flags & EXEC_P) != 0) { - file_ptr cur_ptr = scn_base - + abfd->section_count * bfd_coff_scnhsz (abfd); - long fill_size = (abfd->sections->filepos - cur_ptr); - bfd_byte *b = bfd_zmalloc (fill_size); - if (b) + asection *s = abfd->sections; + while (s != NULL && s->filepos == 0) + s = s->next; + if (s != NULL) { - bfd_bwrite (b, fill_size, abfd); - free (b); + file_ptr cur_ptr + = scn_base + abfd->section_count * bfd_coff_scnhsz (abfd); + file_ptr fill_size = s->filepos - cur_ptr; + if (fill_size > 0) + { + bfd_byte *b = bfd_zmalloc (fill_size); + if (!b) + return false; + if (bfd_write (b, fill_size, abfd) != (ufile_ptr) fill_size) + { + free (b); + return false; + } + free (b); + } } } #endif @@ -4196,7 +4296,7 @@ coff_write_object_contents (bfd * abfd) #endif /* Now write header. */ - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) + if (bfd_seek (abfd, 0, SEEK_SET) != 0) return false; { @@ -4208,7 +4308,7 @@ coff_write_object_contents (bfd * abfd) return false; bfd_coff_swap_filehdr_out (abfd, & internal_f, buff); - amount = bfd_bwrite (buff, amount, abfd); + amount = bfd_write (buff, amount, abfd); free (buff); @@ -4228,7 +4328,7 @@ coff_write_object_contents (bfd * abfd) return false; coff_swap_aouthdr_out (abfd, & internal_a, buff); - amount = bfd_bwrite (buff, amount, abfd); + amount = bfd_write (buff, amount, abfd); free (buff); @@ -4253,7 +4353,7 @@ coff_write_object_contents (bfd * abfd) size = bfd_coff_aoutsz (abfd); else size = SMALL_AOUTSZ; - if (bfd_bwrite (& buff, (bfd_size_type) size, abfd) != size) + if (bfd_write (&buff, size, abfd) != size) return false; } #endif @@ -4326,7 +4426,7 @@ coff_set_section_contents (bfd * abfd, if (count == 0) return true; - return bfd_bwrite (location, count, abfd) == count; + return bfd_write (location, count, abfd) == count; } static void * @@ -4661,7 +4761,7 @@ coff_slurp_symbol_table (bfd * abfd) #endif #ifdef RS6000COFF_C case C_HIDEXT: -#if ! defined _AIX52 && ! defined AIX_WEAK_SUPPORT +#ifndef AIX_WEAK_SUPPORT case C_AIX_WEAKEXT: #endif #endif @@ -4848,13 +4948,18 @@ coff_slurp_symbol_table (bfd * abfd) case C_BSTAT: dst->symbol.flags = BSF_DEBUGGING; - /* The value is actually a symbol index. Save a pointer - to the symbol instead of the index. FIXME: This - should use a union. */ - src->u.syment.n_value - = (uintptr_t) (native_symbols + src->u.syment.n_value); - dst->symbol.value = src->u.syment.n_value; - src->fix_value = 1; + if (src->u.syment.n_value >= obj_raw_syment_count (abfd)) + dst->symbol.value = 0; + else + { + /* The value is actually a symbol index. Save a pointer + to the symbol instead of the index. FIXME: This + should use a union. */ + src->u.syment.n_value + = (uintptr_t) (native_symbols + src->u.syment.n_value); + dst->symbol.value = src->u.syment.n_value; + src->fix_value = 1; + } break; #endif @@ -4982,7 +5087,7 @@ coff_classify_symbol (bfd *abfd, #endif #ifdef RS6000COFF_C case C_HIDEXT: -#if ! defined _AIX52 && ! defined AIX_WEAK_SUPPORT +#ifndef AIX_WEAK_SUPPORT case C_AIX_WEAKEXT: #endif #endif @@ -5024,11 +5129,11 @@ coff_classify_symbol (bfd *abfd, breaks gas generated objects. */ if (syment->n_value == 0) { - asection *sec; - char * name; + const asection *sec; + const char *name; char buf[SYMNMLEN + 1]; - name = _bfd_coff_internal_syment_name (abfd, syment, buf) + name = _bfd_coff_internal_syment_name (abfd, syment, buf); sec = coff_section_from_bfd_index (abfd, syment->n_scnum); if (sec != NULL && name != NULL && (strcmp (bfd_section_name (sec), name) == 0)) @@ -5089,8 +5194,22 @@ SUBSUBSECTION structure, in a back end specific way. For instance, the 386 uses the @code{r_type} to directly produce an index into a howto table vector. + + o Note that @code{arelent.addend} for COFF is often not what + most people understand as a relocation addend, but rather an + adjustment to the relocation addend stored in section contents + of relocatable object files. The value found in section + contents may also be confusing, depending on both symbol value + and addend somewhat similar to the field value for a + final-linked object. See @code{CALC_ADDEND}. */ +#ifdef COFF_WITH_PE +#define COFF_PE_ADDEND_BIAS(ptr) 0 /* Symbol value not stored in raw data. */ +#else +#define COFF_PE_ADDEND_BIAS(ptr) ((ptr)->value) +#endif + #ifndef CALC_ADDEND #define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \ { \ @@ -5107,7 +5226,8 @@ SUBSUBSECTION cache_ptr->addend = 0; \ else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ && ptr->section != NULL) \ - cache_ptr->addend = - (ptr->section->vma + ptr->value); \ + cache_ptr->addend = - (ptr->section->vma \ + + COFF_PE_ADDEND_BIAS (ptr)); \ else \ cache_ptr->addend = 0; \ } @@ -5320,18 +5440,16 @@ dummy_reloc16_estimate (bfd *abfd ATTRIBUTE_UNUSED, #define coff_reloc16_extra_cases dummy_reloc16_extra_cases -/* This works even if abort is not declared in any header file. */ - -static void +static bool dummy_reloc16_extra_cases (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, struct bfd_link_order *link_order ATTRIBUTE_UNUSED, arelent *reloc ATTRIBUTE_UNUSED, bfd_byte *data ATTRIBUTE_UNUSED, - unsigned int *src_ptr ATTRIBUTE_UNUSED, - unsigned int *dst_ptr ATTRIBUTE_UNUSED) + size_t *src_ptr ATTRIBUTE_UNUSED, + size_t *dst_ptr ATTRIBUTE_UNUSED) { - abort (); + return false; } #endif @@ -5445,7 +5563,9 @@ coff_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, #define coff_SWAP_scnhdr_in coff_swap_scnhdr_in #endif -static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = +#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table + +static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5486,7 +5606,7 @@ static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = #ifdef TICOFF /* COFF0 differs in file/section header size and relocation entry size. */ -static bfd_coff_backend_data ticoff0_swap_table = +static const bfd_coff_backend_data ticoff0_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5528,7 +5648,7 @@ static bfd_coff_backend_data ticoff0_swap_table = #ifdef TICOFF /* COFF1 differs in section header size. */ -static bfd_coff_backend_data ticoff1_swap_table = +static const bfd_coff_backend_data ticoff1_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5693,8 +5813,8 @@ coff_bigobj_swap_aux_in (bfd *abfd, void * ext1, int type, int in_class, - int indx, - int numaux, + int indx ATTRIBUTE_UNUSED, + int numaux ATTRIBUTE_UNUSED, void * in1) { AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) ext1; @@ -5706,14 +5826,7 @@ coff_bigobj_swap_aux_in (bfd *abfd, switch (in_class) { case C_FILE: - if (numaux > 1) - { - if (indx == 0) - memcpy (in->x_file.x_n.x_fname, ext->File.Name, - numaux * sizeof (AUXENT_BIGOBJ)); - } - else - memcpy (in->x_file.x_n.x_fname, ext->File.Name, sizeof (ext->File.Name)); + memcpy (in->x_file.x_n.x_fname, ext->File.Name, sizeof (ext->File.Name)); break; case C_STAT: @@ -5735,7 +5848,7 @@ coff_bigobj_swap_aux_in (bfd *abfd, break; default: - in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex); + in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex); /* Characteristics is ignored. */ break; } @@ -5783,13 +5896,13 @@ coff_bigobj_swap_aux_out (bfd * abfd, break; } - H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->Sym.WeakDefaultSymIndex); + H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->Sym.WeakDefaultSymIndex); H_PUT_32 (abfd, 1, ext->Sym.WeakSearchType); return AUXESZ; } -static bfd_coff_backend_data bigobj_swap_table = +static const bfd_coff_backend_data bigobj_swap_table = { coff_bigobj_swap_aux_in, coff_bigobj_swap_sym_in, coff_SWAP_lineno_in, coff_bigobj_swap_aux_out, coff_bigobj_swap_sym_out, @@ -5819,11 +5932,11 @@ static bfd_coff_backend_data bigobj_swap_table = #endif /* COFF_WITH_PE_BIGOBJ */ #ifndef coff_close_and_cleanup -#define coff_close_and_cleanup _bfd_coff_close_and_cleanup +#define coff_close_and_cleanup _bfd_generic_close_and_cleanup #endif #ifndef coff_bfd_free_cached_info -#define coff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info +#define coff_bfd_free_cached_info _bfd_coff_free_cached_info #endif #ifndef coff_get_section_contents diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 09f5a28c4..c1aacc707 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1,5 +1,5 @@ /* Support for the generic parts of COFF, for BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -42,6 +42,70 @@ #include "libbfd.h" #include "coff/internal.h" #include "libcoff.h" +#include "hashtab.h" + +/* Extract a long section name at STRINDEX and copy it to the bfd objstack. + Return NULL in case of error. */ + +static char * +extract_long_section_name(bfd *abfd, unsigned long strindex) +{ + const char *strings; + char *name; + + strings = _bfd_coff_read_string_table (abfd); + if (strings == NULL) + return NULL; + if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd)) + return NULL; + strings += strindex; + name = (char *) bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1); + if (name == NULL) + return NULL; + strcpy (name, strings); + + return name; +} + +/* Decode a base 64 coded string at STR of length LEN, and write the result + to RES. Return true on success. + Return false in case of invalid character or overflow. */ + +static bool +decode_base64 (const char *str, unsigned len, uint32_t *res) +{ + unsigned i; + uint32_t val; + + val = 0; + for (i = 0; i < len; i++) + { + char c = str[i]; + unsigned d; + + if (c >= 'A' && c <= 'Z') + d = c - 'A'; + else if (c >= 'a' && c <= 'z') + d = c - 'a' + 26; + else if (c >= '0' && c <= '9') + d = c - '0' + 52; + else if (c == '+') + d = 62; + else if (c == '/') + d = 63; + else + return false; + + /* Check for overflow. */ + if ((val >> 26) != 0) + return false; + + val = (val << 6) + d; + } + + *res = val; + return true; +} /* 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. */ @@ -67,32 +131,48 @@ make_a_section_from_file (bfd *abfd, if (bfd_coff_set_long_section_names (abfd, bfd_coff_long_section_names (abfd)) && hdr->s_name[0] == '/') { - char buf[SCNNMLEN]; - long strindex; - char *p; - const char *strings; - /* Flag that this BFD uses long names, even though the format might 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); - memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); - buf[SCNNMLEN - 1] = '\0'; - strindex = strtol (buf, &p, 10); - if (*p == '\0' && strindex >= 0) + + if (hdr->s_name[1] == '/') { - strings = _bfd_coff_read_string_table (abfd); - if (strings == NULL) - return false; - if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd)) + /* LLVM extension: the '/' is followed by another '/' and then by + the index in the strtab encoded in base64 without NUL at the + end. */ + uint32_t strindex; + + /* Decode the index. No overflow is expected as the string table + length is at most 2^32 - 1 (the length is written on the first + four bytes). + Also, contrary to RFC 4648, all the characters must be decoded, + there is no padding. */ + if (!decode_base64 (hdr->s_name + 2, SCNNMLEN - 2, &strindex)) return false; - strings += strindex; - name = (char *) bfd_alloc (abfd, - (bfd_size_type) strlen (strings) + 1 + 1); + + name = extract_long_section_name (abfd, strindex); if (name == NULL) return false; - strcpy (name, strings); + } + else + { + /* PE classic long section name. The '/' is followed by the index + in the strtab. The index is formatted as a decimal string. */ + char buf[SCNNMLEN]; + long strindex; + char *p; + + memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); + buf[SCNNMLEN - 1] = '\0'; + strindex = strtol (buf, &p, 10); + if (*p == '\0' && strindex >= 0) + { + name = extract_long_section_name (abfd, strindex); + if (name == NULL) + return false; + } } } @@ -201,14 +281,24 @@ make_a_section_from_file (bfd *abfd, return result; } +void +coff_object_cleanup (bfd *abfd) +{ + struct coff_tdata *td = coff_data (abfd); + if (td != NULL) + { + if (td->section_by_index) + htab_delete (td->section_by_index); + if (td->section_by_target_index) + htab_delete (td->section_by_target_index); + if (obj_pe (abfd) && pe_data (abfd)->comdat_hash) + htab_delete (pe_data (abfd)->comdat_hash); + } +} + /* Read in a COFF object and make it into a BFD. This is used by ECOFF as well. */ bfd_cleanup -coff_real_object_p (bfd *, - unsigned, - struct internal_filehdr *, - struct internal_aouthdr *); -bfd_cleanup coff_real_object_p (bfd *abfd, unsigned nscns, struct internal_filehdr *internal_f, @@ -278,9 +368,10 @@ coff_real_object_p (bfd *abfd, } _bfd_coff_free_symbols (abfd); - return _bfd_no_cleanup; + return coff_object_cleanup; fail: + coff_object_cleanup (abfd); _bfd_coff_free_symbols (abfd); bfd_release (abfd, tdata); fail2: @@ -322,7 +413,7 @@ coff_object_p (bfd *abfd) aoutsz) in executables. The bfd_coff_swap_aouthdr_in function expects this header to be aoutsz bytes in length, so we use that value in the call to bfd_alloc below. But we must be careful to - only read in f_opthdr bytes in the call to bfd_bread. We should + only read in f_opthdr bytes in the call to bfd_read. We should also attempt to catch corrupt or non-COFF binaries with a strange value for f_opthdr. */ if (! bfd_coff_bad_format_hook (abfd, &internal_f) @@ -355,13 +446,26 @@ coff_object_p (bfd *abfd) : (struct internal_aouthdr *) NULL)); } +static hashval_t +htab_hash_section_target_index (const void * entry) +{ + const struct bfd_section * sec = entry; + return sec->target_index; +} + +static int +htab_eq_section_target_index (const void * e1, const void * e2) +{ + const struct bfd_section * sec1 = e1; + const struct bfd_section * sec2 = e2; + return sec1->target_index == sec2->target_index; +} + /* Get the BFD section from a COFF symbol section number. */ asection * coff_section_from_bfd_index (bfd *abfd, int section_index) { - struct bfd_section *answer = abfd->sections; - if (section_index == N_ABS) return bfd_abs_section_ptr; if (section_index == N_UNDEF) @@ -369,13 +473,47 @@ coff_section_from_bfd_index (bfd *abfd, int section_index) if (section_index == N_DEBUG) return bfd_abs_section_ptr; - while (answer) + struct bfd_section *answer; + htab_t table = coff_data (abfd)->section_by_target_index; + + if (!table) { - if (answer->target_index == section_index) - return answer; - answer = answer->next; + table = htab_create (10, htab_hash_section_target_index, + htab_eq_section_target_index, NULL); + if (table == NULL) + return bfd_und_section_ptr; + coff_data (abfd)->section_by_target_index = table; + } + + if (htab_elements (table) == 0) + { + for (answer = abfd->sections; answer; answer = answer->next) + { + void **slot = htab_find_slot (table, answer, INSERT); + if (slot == NULL) + return bfd_und_section_ptr; + *slot = answer; + } } + struct bfd_section needle; + needle.target_index = section_index; + + answer = htab_find (table, &needle); + if (answer != NULL) + return answer; + + /* Cover the unlikely case of sections added after the first call to + this function. */ + for (answer = abfd->sections; answer; answer = answer->next) + if (answer->target_index == section_index) + { + void **slot = htab_find_slot (table, answer, INSERT); + if (slot != NULL) + *slot = answer; + return answer; + } + /* We should not reach this point, but the SCO 3.2v4 /lib/libc_s.a has a bad symbol table in biglitpow.o. */ return bfd_und_section_ptr; @@ -443,10 +581,7 @@ _bfd_coff_internal_syment_name (bfd *abfd, if (strings == NULL) return NULL; } - /* PR 17910: Only check for string overflow if the length has been set. - Some DLLs, eg those produced by Visual Studio, may not set the length field. */ - if (obj_coff_strings_len (abfd) > 0 - && sym->_n._n_n._n_offset >= obj_coff_strings_len (abfd)) + if (sym->_n._n_n._n_offset >= obj_coff_strings_len (abfd)) return NULL; return strings + sym->_n._n_n._n_offset; } @@ -502,7 +637,7 @@ _bfd_coff_read_internal_relocs (bfd *abfd, } if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0 - || bfd_bread (external_relocs, amt, abfd) != amt) + || bfd_read (external_relocs, amt, abfd) != amt) goto error_return; if (internal_relocs == NULL) @@ -805,19 +940,19 @@ coff_mangle_symbols (bfd *bfd_ptr) BFD_ASSERT (! a->is_sym); if (a->fix_tag) { - a->u.auxent.x_sym.x_tagndx.l = + a->u.auxent.x_sym.x_tagndx.u32 = a->u.auxent.x_sym.x_tagndx.p->offset; a->fix_tag = 0; } if (a->fix_end) { - a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l = + a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 = a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p->offset; a->fix_end = 0; } if (a->fix_scnlen) { - a->u.auxent.x_csect.x_scnlen.l = + a->u.auxent.x_csect.x_scnlen.u64 = a->u.auxent.x_csect.x_scnlen.p->offset; a->fix_scnlen = 0; } @@ -1016,7 +1151,7 @@ coff_write_symbol (bfd *abfd, if (!buf) return false; bfd_coff_swap_sym_out (abfd, &native->u.syment, buf); - if (bfd_bwrite (buf, symesz, abfd) != symesz) + if (bfd_write (buf, symesz, abfd) != symesz) return false; bfd_release (abfd, buf); @@ -1046,7 +1181,7 @@ coff_write_symbol (bfd *abfd, type, n_sclass, (int) j, native->u.syment.n_numaux, buf); - if (bfd_bwrite (buf, auxesz, abfd) != auxesz) + if (bfd_write (buf, auxesz, abfd) != auxesz) return false; } bfd_release (abfd, buf); @@ -1339,8 +1474,7 @@ coff_write_symbols (bfd *abfd) #else #error Change H_PUT_32 #endif - if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd) - != sizeof (buffer)) + if (bfd_write (buffer, sizeof (buffer), abfd) != sizeof (buffer)) return false; if (! _bfd_stringtab_emit (abfd, strtab)) @@ -1399,8 +1533,7 @@ coff_write_linenumbers (bfd *abfd) out.l_lnno = 0; out.l_addr.l_symndx = l->u.offset; bfd_coff_swap_lineno_out (abfd, &out, buff); - if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) - != linesz) + if (bfd_write (buff, linesz, abfd) != linesz) return false; l++; while (l->line_number) @@ -1408,8 +1541,7 @@ coff_write_linenumbers (bfd *abfd) out.l_lnno = l->line_number; out.l_addr.l_symndx = l->u.offset; bfd_coff_swap_lineno_out (abfd, &out, buff); - if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) - != linesz) + if (bfd_write (buff, linesz, abfd) != linesz) return false; l++; } @@ -1437,8 +1569,7 @@ coff_pointerize_aux (bfd *abfd, combined_entry_type *table_base, combined_entry_type *symbol, unsigned int indaux, - combined_entry_type *auxent, - combined_entry_type *table_end) + combined_entry_type *auxent) { unsigned int type = symbol->u.syment.n_type; unsigned int n_sclass = symbol->u.syment.n_sclass; @@ -1466,25 +1597,21 @@ coff_pointerize_aux (bfd *abfd, if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK || n_sclass == C_FCN) - && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0 - && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l - < (long) obj_raw_syment_count (abfd) - && table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l - < table_end) + && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 > 0 + && (auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 + < obj_raw_syment_count (abfd))) { auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = - table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l; + table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32; auxent->fix_end = 1; } /* A negative tagndx is meaningless, but the SCO 3.2v4 cc can generate one, so we must be careful to ignore it. */ - if ((unsigned long) auxent->u.auxent.x_sym.x_tagndx.l - < obj_raw_syment_count (abfd) - && table_base + auxent->u.auxent.x_sym.x_tagndx.l < table_end) + if (auxent->u.auxent.x_sym.x_tagndx.u32 < obj_raw_syment_count (abfd)) { auxent->u.auxent.x_sym.x_tagndx.p = - table_base + auxent->u.auxent.x_sym.x_tagndx.l; + table_base + auxent->u.auxent.x_sym.x_tagndx.u32; auxent->fix_tag = 1; } } @@ -1559,6 +1686,7 @@ _bfd_coff_get_external_symbols (bfd *abfd) size_t symesz; size_t size; void * syms; + ufile_ptr filesize; if (obj_coff_external_syms (abfd) != NULL) return true; @@ -1573,6 +1701,15 @@ _bfd_coff_get_external_symbols (bfd *abfd) if (size == 0) return true; + filesize = bfd_get_file_size (abfd); + if (filesize != 0 + && ((ufile_ptr) obj_sym_filepos (abfd) > filesize + || size > filesize - obj_sym_filepos (abfd))) + { + bfd_set_error (bfd_error_file_truncated); + return false; + } + if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) return false; syms = _bfd_malloc_and_read (abfd, size, size); @@ -1618,8 +1755,7 @@ _bfd_coff_read_string_table (bfd *abfd) if (bfd_seek (abfd, pos + size, SEEK_SET) != 0) return NULL; - if (bfd_bread (extstrsize, (bfd_size_type) sizeof extstrsize, abfd) - != sizeof extstrsize) + if (bfd_read (extstrsize, sizeof extstrsize, abfd) != sizeof extstrsize) { if (bfd_get_error () != bfd_error_file_truncated) return NULL; @@ -1657,7 +1793,7 @@ _bfd_coff_read_string_table (bfd *abfd) they are zero. */ memset (strings, 0, STRING_SIZE_SIZE); - if (bfd_bread (strings + STRING_SIZE_SIZE, strsize - STRING_SIZE_SIZE, abfd) + if (bfd_read (strings + STRING_SIZE_SIZE, strsize - STRING_SIZE_SIZE, abfd) != strsize - STRING_SIZE_SIZE) { free (strings); @@ -1707,8 +1843,6 @@ coff_get_normalized_symtab (bfd *abfd) { combined_entry_type *internal; combined_entry_type *internal_ptr; - combined_entry_type *symbol_ptr; - combined_entry_type *internal_end; size_t symesz; char *raw_src; char *raw_end; @@ -1731,7 +1865,6 @@ coff_get_normalized_symtab (bfd *abfd) internal = (combined_entry_type *) bfd_zalloc (abfd, size); if (internal == NULL && size != 0) return NULL; - internal_end = internal + obj_raw_syment_count (abfd); raw_src = (char *) obj_coff_external_syms (abfd); @@ -1751,52 +1884,32 @@ 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; + combined_entry_type *sym = internal_ptr; /* PR 17512: Prevent buffer overrun. */ - if (symbol_ptr->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz) - { - bfd_release (abfd, internal); - return NULL; - } + if (sym->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz) + return NULL; - for (i = 0; - i < symbol_ptr->u.syment.n_numaux; - i++) + for (i = 0; i < sym->u.syment.n_numaux; i++) { internal_ptr++; raw_src += symesz; bfd_coff_swap_aux_in (abfd, (void *) raw_src, - symbol_ptr->u.syment.n_type, - symbol_ptr->u.syment.n_sclass, - (int) i, symbol_ptr->u.syment.n_numaux, + sym->u.syment.n_type, + sym->u.syment.n_sclass, + (int) i, sym->u.syment.n_numaux, &(internal_ptr->u.auxent)); internal_ptr->is_sym = false; - coff_pointerize_aux (abfd, internal, symbol_ptr, i, - internal_ptr, internal_end); + coff_pointerize_aux (abfd, internal, sym, i, internal_ptr); } - } - /* Free the raw symbols. */ - if (obj_coff_external_syms (abfd) != NULL - && ! obj_coff_keep_syms (abfd)) - { - free (obj_coff_external_syms (abfd)); - obj_coff_external_syms (abfd) = NULL; - } - - for (internal_ptr = internal; internal_ptr < internal_end; - internal_ptr++) - { - BFD_ASSERT (internal_ptr->is_sym); - - if (internal_ptr->u.syment.n_sclass == C_FILE - && internal_ptr->u.syment.n_numaux > 0) + if (sym->u.syment.n_sclass == C_FILE + && sym->u.syment.n_numaux > 0) { - combined_entry_type * aux = internal_ptr + 1; + combined_entry_type * aux = sym + 1; /* Make a file symbol point to the name in the auxent, since the text ".file" is redundant. */ @@ -1812,12 +1925,12 @@ coff_get_normalized_symtab (bfd *abfd) return NULL; } - if ((bfd_size_type)(aux->u.auxent.x_file.x_n.x_n.x_offset) + if ((bfd_size_type) aux->u.auxent.x_file.x_n.x_n.x_offset >= obj_coff_strings_len (abfd)) - internal_ptr->u.syment._n._n_n._n_offset = + sym->u.syment._n._n_n._n_offset = (uintptr_t) _(""); else - internal_ptr->u.syment._n._n_n._n_offset = + sym->u.syment._n._n_n._n_offset = (uintptr_t) (string_table + aux->u.auxent.x_file.x_n.x_n.x_offset); } @@ -1826,31 +1939,35 @@ coff_get_normalized_symtab (bfd *abfd) /* Ordinary short filename, put into memory anyway. The Microsoft PE tools sometimes store a filename in multiple AUX entries. */ - if (internal_ptr->u.syment.n_numaux > 1 - && coff_data (abfd)->pe) - internal_ptr->u.syment._n._n_n._n_offset = - ((uintptr_t) - copy_name (abfd, - aux->u.auxent.x_file.x_n.x_fname, - internal_ptr->u.syment.n_numaux * symesz)); + size_t len; + char *src; + if (sym->u.syment.n_numaux > 1 && obj_pe (abfd)) + { + len = sym->u.syment.n_numaux * symesz; + src = raw_src - (len - symesz); + } else - internal_ptr->u.syment._n._n_n._n_offset = - ((uintptr_t) - copy_name (abfd, - aux->u.auxent.x_file.x_n.x_fname, - (size_t) bfd_coff_filnmlen (abfd))); + { + len = bfd_coff_filnmlen (abfd); + src = aux->u.auxent.x_file.x_n.x_fname; + } + sym->u.syment._n._n_n._n_offset = + (uintptr_t) copy_name (abfd, src, len); } /* Normalize other strings available in C_FILE aux entries. */ - if (!coff_data (abfd)->pe) - for (int numaux = 1; numaux < internal_ptr->u.syment.n_numaux; numaux++) + if (!obj_pe (abfd)) + for (int numaux = 1; + numaux < sym->u.syment.n_numaux; + numaux++) { - aux = internal_ptr + numaux + 1; + aux = sym + numaux + 1; BFD_ASSERT (! aux->is_sym); if (aux->u.auxent.x_file.x_n.x_n.x_zeroes == 0) { - /* The string information is a long one, point into the string table. */ + /* The string information is a long one, point + into the string table. */ if (string_table == NULL) { string_table = _bfd_coff_read_string_table (abfd); @@ -1858,48 +1975,48 @@ coff_get_normalized_symtab (bfd *abfd) return NULL; } - if ((bfd_size_type)(aux->u.auxent.x_file.x_n.x_n.x_offset) + if ((bfd_size_type) aux->u.auxent.x_file.x_n.x_n.x_offset >= obj_coff_strings_len (abfd)) aux->u.auxent.x_file.x_n.x_n.x_offset = (uintptr_t) _(""); else aux->u.auxent.x_file.x_n.x_n.x_offset = (uintptr_t) (string_table - + (aux->u.auxent.x_file.x_n.x_n.x_offset)); + + aux->u.auxent.x_file.x_n.x_n.x_offset); } else aux->u.auxent.x_file.x_n.x_n.x_offset = ((uintptr_t) copy_name (abfd, aux->u.auxent.x_file.x_n.x_fname, - (size_t) bfd_coff_filnmlen (abfd))); + bfd_coff_filnmlen (abfd))); } } else { - if (internal_ptr->u.syment._n._n_n._n_zeroes != 0) + if (sym->u.syment._n._n_n._n_zeroes != 0) { /* This is a "short" name. Make it long. */ - size_t i; char *newstring; /* Find the length of this string without walking into memory that isn't ours. */ - for (i = 0; i < 8; ++i) - if (internal_ptr->u.syment._n._n_name[i] == '\0') + for (i = 0; i < SYMNMLEN; ++i) + if (sym->u.syment._n._n_name[i] == '\0') break; - newstring = (char *) bfd_zalloc (abfd, (bfd_size_type) (i + 1)); + newstring = bfd_alloc (abfd, i + 1); if (newstring == NULL) return NULL; - strncpy (newstring, internal_ptr->u.syment._n._n_name, i); - internal_ptr->u.syment._n._n_n._n_offset = (uintptr_t) newstring; - internal_ptr->u.syment._n._n_n._n_zeroes = 0; + memcpy (newstring, sym->u.syment._n._n_name, i); + newstring[i] = 0; + sym->u.syment._n._n_n._n_offset = (uintptr_t) newstring; + sym->u.syment._n._n_n._n_zeroes = 0; } - else if (internal_ptr->u.syment._n._n_n._n_offset == 0) - internal_ptr->u.syment._n._n_n._n_offset = (uintptr_t) ""; - else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment)) + else if (sym->u.syment._n._n_n._n_offset == 0) + sym->u.syment._n._n_n._n_offset = (uintptr_t) ""; + else if (!bfd_coff_symname_in_debug (abfd, &sym->u.syment)) { /* Long name already. Point symbol at the string in the table. */ @@ -1909,43 +2026,47 @@ coff_get_normalized_symtab (bfd *abfd) if (string_table == NULL) return NULL; } - if (internal_ptr->u.syment._n._n_n._n_offset >= obj_coff_strings_len (abfd) - || string_table + internal_ptr->u.syment._n._n_n._n_offset < string_table) - internal_ptr->u.syment._n._n_n._n_offset = + if (sym->u.syment._n._n_n._n_offset >= obj_coff_strings_len (abfd)) + sym->u.syment._n._n_n._n_offset = (uintptr_t) _(""); else - internal_ptr->u.syment._n._n_n._n_offset = - ((uintptr_t) (string_table - + internal_ptr->u.syment._n._n_n._n_offset)); + sym->u.syment._n._n_n._n_offset = + (uintptr_t) (string_table + + sym->u.syment._n._n_n._n_offset); } else { /* Long name in debug section. Very similar. */ if (debug_sec_data == NULL) - debug_sec_data = build_debug_section (abfd, & debug_sec); - if (debug_sec_data != NULL) { - BFD_ASSERT (debug_sec != NULL); - /* PR binutils/17512: Catch out of range offsets into the debug data. */ - if (internal_ptr->u.syment._n._n_n._n_offset > debug_sec->size - || debug_sec_data + internal_ptr->u.syment._n._n_n._n_offset < debug_sec_data) - internal_ptr->u.syment._n._n_n._n_offset = - (uintptr_t) _(""); - else - internal_ptr->u.syment._n._n_n._n_offset = - (uintptr_t) (debug_sec_data - + internal_ptr->u.syment._n._n_n._n_offset); + debug_sec_data = build_debug_section (abfd, &debug_sec); + if (debug_sec_data == NULL) + return NULL; } + /* PR binutils/17512: Catch out of range offsets into + the debug data. */ + if (sym->u.syment._n._n_n._n_offset >= debug_sec->size) + sym->u.syment._n._n_n._n_offset = + (uintptr_t) _(""); else - internal_ptr->u.syment._n._n_n._n_offset = (uintptr_t) ""; + sym->u.syment._n._n_n._n_offset = + (uintptr_t) (debug_sec_data + + sym->u.syment._n._n_n._n_offset); } } - internal_ptr += internal_ptr->u.syment.n_numaux; + } + + /* Free the raw symbols. */ + if (obj_coff_external_syms (abfd) != NULL + && ! obj_coff_keep_syms (abfd)) + { + free (obj_coff_external_syms (abfd)); + obj_coff_external_syms (abfd) = NULL; } obj_raw_syments (abfd) = internal; BFD_ASSERT (obj_raw_syment_count (abfd) - == (unsigned int) (internal_ptr - internal)); + == (size_t) (internal_ptr - internal)); return internal; } @@ -1994,9 +2115,7 @@ coff_make_empty_symbol (bfd *abfd) /* Make a debugging symbol. */ asymbol * -coff_bfd_make_debug_symbol (bfd *abfd, - void * ptr ATTRIBUTE_UNUSED, - unsigned long sz ATTRIBUTE_UNUSED) +coff_bfd_make_debug_symbol (bfd *abfd) { size_t amt = sizeof (coff_symbol_type); coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_alloc (abfd, amt); @@ -2099,7 +2218,7 @@ coff_print_symbol (bfd *abfd, if (auxp->fix_tag) tagndx = auxp->u.auxent.x_sym.x_tagndx.p - root; else - tagndx = auxp->u.auxent.x_sym.x_tagndx.l; + tagndx = auxp->u.auxent.x_sym.x_tagndx.u32; fprintf (file, "\n"); @@ -2119,8 +2238,8 @@ coff_print_symbol (bfd *abfd, break; case C_DWARF: - fprintf (file, "AUX scnlen 0x%lx nreloc %ld", - (unsigned long) auxp->u.auxent.x_sect.x_scnlen, + fprintf (file, "AUX scnlen %#" PRIx64 " nreloc %" PRId64, + auxp->u.auxent.x_sect.x_scnlen, auxp->u.auxent.x_sect.x_nreloc); break; @@ -2135,7 +2254,7 @@ coff_print_symbol (bfd *abfd, if (auxp->u.auxent.x_scn.x_checksum != 0 || auxp->u.auxent.x_scn.x_associated != 0 || auxp->u.auxent.x_scn.x_comdat != 0) - fprintf (file, " checksum 0x%lx assoc %d comdat %d", + fprintf (file, " checksum 0x%x assoc %d comdat %d", auxp->u.auxent.x_scn.x_checksum, auxp->u.auxent.x_scn.x_associated, auxp->u.auxent.x_scn.x_comdat); @@ -2152,7 +2271,7 @@ coff_print_symbol (bfd *abfd, next = (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p - root); else - next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l; + next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32; llnos = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr; fprintf (file, "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld", @@ -2804,8 +2923,8 @@ _bfd_coff_gc_mark_hook (asection *sec, record indicating that if the weak symbol is not resolved, another external symbol is used instead. */ struct coff_link_hash_entry *h2 = - h->auxbfd->tdata.coff_obj_data->sym_hashes[ - h->aux->x_sym.x_tagndx.l]; + h->auxbfd->tdata.coff_obj_data->sym_hashes + [h->aux->x_sym.x_tagndx.u32]; if (h2 && h2->root.type != bfd_link_hash_undefined) return h2->root.u.def.section; @@ -3141,27 +3260,43 @@ bfd_coff_group_name (bfd *abfd, const asection *sec) } bool -_bfd_coff_close_and_cleanup (bfd *abfd) +_bfd_coff_free_cached_info (bfd *abfd) { - struct coff_tdata *tdata = coff_data (abfd); + struct coff_tdata *tdata; - if (tdata != NULL) + if (bfd_family_coff (abfd) + && (bfd_get_format (abfd) == bfd_object + || bfd_get_format (abfd) == bfd_core) + && (tdata = coff_data (abfd)) != NULL) { + if (tdata->section_by_index) + { + htab_delete (tdata->section_by_index); + tdata->section_by_index = NULL; + } + + if (tdata->section_by_target_index) + { + htab_delete (tdata->section_by_target_index); + tdata->section_by_target_index = NULL; + } + + if (obj_pe (abfd) && pe_data (abfd)->comdat_hash) + { + htab_delete (pe_data (abfd)->comdat_hash); + pe_data (abfd)->comdat_hash = NULL; + } + + _bfd_dwarf2_cleanup_debug_info (abfd, &tdata->dwarf2_find_line_info); + _bfd_stab_cleanup (abfd, &tdata->line_info); + /* PR 25447: Do not clear the keep_syms and keep_strings flags. These may have been set by pe_ILF_build_a_bfd() indicating that the syms and strings pointers are not to be freed. */ - if (bfd_get_format (abfd) == bfd_object - && bfd_family_coff (abfd) - && !_bfd_coff_free_symbols (abfd)) + if (!_bfd_coff_free_symbols (abfd)) return false; - - if (bfd_get_format (abfd) == bfd_object - || bfd_get_format (abfd) == bfd_core) - { - _bfd_dwarf2_cleanup_debug_info (abfd, &tdata->dwarf2_find_line_info); - _bfd_stab_cleanup (abfd, &tdata->line_info); - } } - return _bfd_generic_close_and_cleanup (abfd); + + return _bfd_generic_bfd_free_cached_info (abfd); } diff --git a/bfd/cofflink.c b/bfd/cofflink.c index cd117a445..221f6e818 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -1,5 +1,5 @@ /* COFF specific linker code. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -89,6 +89,34 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry, return (struct bfd_hash_entry *) ret; } +struct bfd_hash_entry * +_decoration_hash_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table, + const char *string) +{ + struct decoration_hash_entry *ret = (struct decoration_hash_entry *) entry; + + /* Allocate the structure if it has not already been allocated by a + subclass. */ + if (ret == NULL) + { + ret = (struct decoration_hash_entry *) + bfd_hash_allocate (table, sizeof (struct decoration_hash_entry)); + if (ret == NULL) + return NULL; + } + + /* Call the allocation method of the superclass. */ + ret = (struct decoration_hash_entry *) + _bfd_link_hash_newfunc ((struct bfd_hash_entry *) ret, table, string); + if (ret != NULL) + { + ret->decorated_link = NULL; + } + + return (struct bfd_hash_entry *) ret; +} + /* Initialize a COFF linker hash table. */ bool @@ -100,7 +128,11 @@ _bfd_coff_link_hash_table_init (struct coff_link_hash_table *table, unsigned int entsize) { memset (&table->stab_info, 0, sizeof (table->stab_info)); - return _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize); + + return bfd_hash_table_init (&table->decoration_hash, + _decoration_hash_newfunc, + sizeof (struct decoration_hash_entry)) + &&_bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize); } /* Create a COFF linker hash table. */ @@ -946,7 +978,7 @@ _bfd_coff_final_link (bfd *abfd, if (rewrite && (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz)) + || bfd_write (flaginfo.outsyms, symesz, abfd) != symesz)) goto error_return; obj_raw_syment_count (abfd) += written; @@ -991,7 +1023,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) + || bfd_write (flaginfo.outsyms, symesz, abfd) != symesz) return false; } @@ -1064,13 +1096,13 @@ _bfd_coff_final_link (bfd *abfd, memset (&incount, 0, sizeof (incount)); incount.r_vaddr = o->reloc_count + 1; bfd_coff_swap_reloc_out (abfd, &incount, excount); - if (bfd_bwrite (excount, relsz, abfd) != relsz) + if (bfd_write (excount, relsz, abfd) != relsz) /* We'll leak, but it's an error anyway. */ goto error_return; free (excount); } - if (bfd_bwrite (external_relocs, - (bfd_size_type) relsz * o->reloc_count, abfd) + if (bfd_write (external_relocs, + (bfd_size_type) relsz * o->reloc_count, abfd) != (bfd_size_type) relsz * o->reloc_count) goto error_return; } @@ -1117,8 +1149,7 @@ _bfd_coff_final_link (bfd *abfd, #error Change H_PUT_32 above #endif - if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd) - != STRING_SIZE_SIZE) + if (bfd_write (strbuf, STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE) return false; if (! _bfd_stringtab_emit (abfd, flaginfo.strtab)) @@ -1168,7 +1199,7 @@ _bfd_coff_final_link (bfd *abfd, static char * dores_com (char *ptr, bfd *output_bfd, int heap) { - if (coff_data(output_bfd)->pe) + if (obj_pe (output_bfd)) { int val = strtoul (ptr, &ptr, 0); @@ -1213,7 +1244,7 @@ process_embedded_commands (bfd *output_bfd, char *e; bfd_byte *copy; - if (!sec) + if (sec == NULL || (sec->flags & SEC_HAS_CONTENTS) == 0) return 1; if (!bfd_malloc_and_get_section (abfd, sec, ©)) @@ -1400,7 +1431,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) output_index = syment_base; outsym = flaginfo->outsyms; - if (coff_data (output_bfd)->pe + if (obj_pe (output_bfd) && ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd)) return false; @@ -1587,7 +1618,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* Ignore fake names invented by compiler; treat them all as the same name. */ if (*name == '~' || *name == '.' || *name == '$' - || (*name == bfd_get_symbol_leading_char (input_bfd) + || (*name + && *name == bfd_get_symbol_leading_char (input_bfd) && (name[1] == '~' || name[1] == '.' || name[1] == '$'))) name = ""; @@ -1617,7 +1649,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) islp = isymp + 2; esl = esym + 2 * isymesz; eslend = ((bfd_byte *) obj_coff_external_syms (input_bfd) - + aux.x_sym.x_fcnary.x_fcn.x_endndx.l * isymesz); + + aux.x_sym.x_fcnary.x_fcn.x_endndx.u32 * isymesz); while (esl < eslend) { const char *elename; @@ -1656,7 +1688,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) bfd_coff_swap_aux_in (input_bfd, (esl + isymesz), islp->n_type, islp->n_sclass, 0, islp->n_numaux, &eleaux); - indx = eleaux.x_sym.x_tagndx.l; + indx = eleaux.x_sym.x_tagndx.u32; /* FIXME: If this tagndx entry refers to a symbol defined later in this file, we just ignore it. @@ -1845,7 +1877,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) pos = obj_sym_filepos (output_bfd); pos += flaginfo->last_file_index * osymesz; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || bfd_bwrite (outsym, osymesz, output_bfd) != osymesz) + || bfd_write (outsym, osymesz, output_bfd) != osymesz) return false; } } @@ -1997,7 +2029,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) || isymp->n_sclass == C_BLOCK || isymp->n_sclass == C_FCN) { - indx = auxp->x_sym.x_fcnary.x_fcn.x_endndx.l; + indx = auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32; if (indx > 0 && indx < obj_raw_syment_count (input_bfd)) { @@ -2014,20 +2046,20 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) indx = output_index; else indx = flaginfo->sym_indices[indx]; - auxp->x_sym.x_fcnary.x_fcn.x_endndx.l = indx; + auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32 = indx; } } - indx = auxp->x_sym.x_tagndx.l; + indx = auxp->x_sym.x_tagndx.u32; if (indx > 0 && indx < obj_raw_syment_count (input_bfd)) { long symindx; symindx = flaginfo->sym_indices[indx]; if (symindx < 0) - auxp->x_sym.x_tagndx.l = 0; + auxp->x_sym.x_tagndx.u32 = 0; else - auxp->x_sym.x_tagndx.l = symindx; + auxp->x_sym.x_tagndx.u32 = symindx; } /* The .bf symbols are supposed to be linked through @@ -2045,7 +2077,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) { if (flaginfo->last_bf_index != -1) { - flaginfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.l = + flaginfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.u32 = *indexp; if ((bfd_size_type) flaginfo->last_bf_index @@ -2087,13 +2119,13 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) pos = obj_sym_filepos (output_bfd); pos += flaginfo->last_bf_index * osymesz; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || (bfd_bwrite (outsym, osymesz, output_bfd) + || (bfd_write (outsym, osymesz, output_bfd) != osymesz)) return false; } } - if (auxp->x_sym.x_fcnary.x_fcn.x_endndx.l != 0) + if (auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32 != 0) flaginfo->last_bf_index = -1; else { @@ -2153,7 +2185,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) continue; if (bfd_seek (input_bfd, o->line_filepos, SEEK_SET) != 0 - || bfd_bread (flaginfo->linenos, linesz * o->lineno_count, + || bfd_read (flaginfo->linenos, linesz * o->lineno_count, input_bfd) != linesz * o->lineno_count) return false; @@ -2243,7 +2275,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) pos += o->output_section->lineno_count * linesz; amt = oeline - flaginfo->linenos; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || bfd_bwrite (flaginfo->linenos, amt, output_bfd) != amt) + || bfd_write (flaginfo->linenos, amt, output_bfd) != amt) return false; o->output_section->lineno_count += amt / linesz; @@ -2273,7 +2305,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) pos = obj_sym_filepos (output_bfd) + syment_base * osymesz; amt = outsym - flaginfo->outsyms; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || bfd_bwrite (flaginfo->outsyms, amt, output_bfd) != amt) + || bfd_write (flaginfo->outsyms, amt, output_bfd) != amt) return false; BFD_ASSERT ((obj_raw_syment_count (output_bfd) @@ -2638,7 +2670,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) pos = obj_sym_filepos (output_bfd); pos += obj_raw_syment_count (output_bfd) * symesz; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz) + || bfd_write (flaginfo->outsyms, symesz, output_bfd) != symesz) { flaginfo->failed = true; return false; @@ -2703,7 +2735,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) bfd_coff_swap_aux_out (output_bfd, auxp, isym.n_type, isym.n_sclass, (int) i, isym.n_numaux, flaginfo->outsyms); - if (bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz) + if (bfd_write (flaginfo->outsyms, symesz, output_bfd) != symesz) { flaginfo->failed = true; return false; @@ -2977,10 +3009,11 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, else { if (h->root.type == bfd_link_hash_defined + /* Defined weak symbols are a GNU extension. */ || h->root.type == bfd_link_hash_defweak) { - /* Defined weak symbols are a GNU extension. */ sec = h->root.u.def.section; + BFD_ASSERT (sec->output_section != NULL); val = (h->root.u.def.value + sec->output_section->vma + sec->output_offset); @@ -3001,8 +3034,8 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, external causes the library member to be linked. See also linker.c: generic_link_check_archive_element. */ struct coff_link_hash_entry *h2 = - h->auxbfd->tdata.coff_obj_data->sym_hashes[ - h->aux->x_sym.x_tagndx.l]; + h->auxbfd->tdata.coff_obj_data->sym_hashes + [h->aux->x_sym.x_tagndx.u32]; if (!h2 || h2->root.type == bfd_link_hash_undefined) { @@ -3057,7 +3090,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, - input_section->vma + input_section->output_offset + input_section->output_section->vma); - if (coff_data (output_bfd)->pe) + if (obj_pe (output_bfd)) addr -= pe_data(output_bfd)->pe_opthdr.ImageBase; if (fwrite (&addr, 1, sizeof (bfd_vma), (FILE *) info->base_file) != sizeof (bfd_vma)) @@ -3087,7 +3120,6 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, return false; case bfd_reloc_overflow: { - /* Ignore any weak undef symbols that may have overflowed. Due to PR ld/19011 the base address is now in the upper 64-bit address range. This means that when _bfd_final_link_relocate calculates @@ -3123,5 +3155,6 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, } } } + return true; } diff --git a/bfd/coffswap.h b/bfd/coffswap.h index dc3343afe..f0677ff88 100644 --- a/bfd/coffswap.h +++ b/bfd/coffswap.h @@ -1,5 +1,5 @@ /* Generic COFF swapping routines, for BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -402,8 +402,8 @@ coff_swap_aux_in (bfd *abfd, void * ext1, int type, int in_class, - int indx, - int numaux, + int indx ATTRIBUTE_UNUSED, + int numaux ATTRIBUTE_UNUSED, void * in1) { AUXENT *ext = (AUXENT *) ext1; @@ -426,14 +426,7 @@ coff_swap_aux_in (bfd *abfd, #if FILNMLEN != E_FILNMLEN #error we need to cope with truncating or extending FILNMLEN #else - if (numaux > 1 && coff_data (abfd)->pe) - { - if (indx == 0) - memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, - numaux * sizeof (AUXENT)); - } - else - memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); + memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN); #endif } goto end; @@ -460,7 +453,7 @@ coff_swap_aux_in (bfd *abfd, break; } - in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx); + in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx); #ifndef NO_TVNDX in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); #endif @@ -469,7 +462,7 @@ coff_swap_aux_in (bfd *abfd, || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); - in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext); + in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext); } else { @@ -552,7 +545,7 @@ coff_swap_aux_out (bfd * abfd, break; } - H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx); + H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx); #ifndef NO_TVNDX H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); #endif @@ -561,7 +554,7 @@ coff_swap_aux_out (bfd * abfd, || ISTAG (in_class)) { PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); - PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); + PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext); } else { diff --git a/bfd/compress.c b/bfd/compress.c index 86422ba01..83564fea1 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -1,5 +1,5 @@ /* Compressed section support (intended for debug sections). - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -32,7 +32,7 @@ #define MAX_COMPRESSION_HEADER_SIZE 24 /* -CODE_FRAGMENT +EXTERNAL .{* Types of compressed DWARF debug sections. *} .enum compressed_debug_section_type .{ @@ -263,9 +263,6 @@ SYNOPSIS DESCRIPTION Return the size of the compression header of SEC in ABFD. - -RETURNS - Return the size of the compression header in bytes. */ int @@ -1068,7 +1065,8 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) || sec->size == 0 || sec->rawsize != 0 || sec->contents != NULL - || sec->compress_status != COMPRESS_SECTION_NONE) + || sec->compress_status != COMPRESS_SECTION_NONE + || _bfd_section_size_insane (abfd, sec)) { bfd_set_error (bfd_error_invalid_operation); return false; @@ -1083,7 +1081,10 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, 0, uncompressed_size)) - return false; + { + free (uncompressed_buffer); + return false; + } sec->contents = uncompressed_buffer; if (bfd_compress_section_contents (abfd, sec) == 0) diff --git a/bfd/config.bfd b/bfd/config.bfd index 0bc27fdce..08129e6a8 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1,6 +1,6 @@ # config.bfd # -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -135,9 +135,7 @@ case $targ in m68*-*-vxworks* | \ m68*-apollo-* | \ m68*-apple-aux* | \ - m68*-bull-sysv* | \ m68*-ericsson-* | \ - m68*-motorola-sysv* | \ m68*-netx-* | \ m88*-*-* | \ maxq-*-coff | \ @@ -198,6 +196,7 @@ fido*) targ_archs=bfd_m68k_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; i[3-7]86) targ_archs=bfd_i386_arch ;; ia16) targ_archs=bfd_i386_arch ;; +kvx) targ_archs=bfd_kvx_arch ;; loongarch*) targ_archs=bfd_loongarch_arch ;; m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;; m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch bfd_m9s12x_arch bfd_m9s12xg_arch" ;; @@ -249,9 +248,9 @@ case "${targ}" in targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec aarch64_pe_le_vec" want64=true ;; - aarch64-*-pe*) + aarch64-*-pe* | aarch64-*-mingw*) targ_defvec=aarch64_pe_le_vec - targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec" + targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec aarch64_elf64_le_vec aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec pdb_vec" want64=true targ_underscore=no ;; @@ -285,7 +284,7 @@ case "${targ}" in targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec" want64=true ;; - aarch64-*-linux* | aarch64-*-netbsd*) + aarch64-*-linux* | aarch64-*-netbsd* | aarch64-*-nto*) targ_defvec=aarch64_elf64_le_vec targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec aarch64_pe_le_vec" want64=true @@ -731,6 +730,11 @@ case "${targ}" in targ_selvecs=i386_elf32_vec want64=true ;; + x86_64-*-gnu*) + targ_defvec=x86_64_elf64_vec + targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec" + want64=true + ;; #endif i[3-7]86-*-lynxos*) targ_defvec=i386_elf32_vec @@ -794,6 +798,20 @@ case "${targ}" in targ_defvec=iq2000_elf32_vec ;; +#ifdef BFD64 + kvx-*-linux*) + targ_defvec=kvx_elf64_vec + targ_selvecs=kvx_elf32_vec + want64=true + ;; + + kvx-*-*) + targ_defvec=kvx_elf64_vec + targ_selvecs=kvx_elf32_vec + want64=true + ;; +#endif + lm32-*-elf | lm32-*-rtems*) targ_defvec=lm32_elf32_vec targ_selvecs=lm32_elf32_fdpic_vec @@ -938,10 +956,20 @@ case "${targ}" in targ_defvec=mips_elf32_be_vec targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" ;; + mips64*el-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_le_vec + targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec" + want64=true + ;; mips64*el-*-linux*) targ_defvec=mips_elf32_ntrad_le_vec targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ;; + mips64*-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_be_vec + targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec" + want64=true + ;; mips64*-*-linux*) targ_defvec=mips_elf32_ntrad_be_vec targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" @@ -1085,18 +1113,6 @@ case "${targ}" in targ_selvecs="rs6000_xcoff64_aix_vec" want64=true ;; - powerpc-*-haiku*) - targ_defvec=powerpc_elf32_vec - targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec pef_vec pef_xlib_vec powerpc_xcoff_vec powerpc_boot_vec" - targ_cflags=-D__HAIKU_TARGET__ - ;; -#ifdef BFD64 - powerpc64-*-aix5.[01]) - targ_defvec=rs6000_xcoff64_aix_vec - targ_selvecs="rs6000_xcoff_vec" - want64=true - ;; -#endif powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*) targ_cflags=-DAIX_WEAK_SUPPORT targ_defvec=rs6000_xcoff_vec @@ -1104,6 +1120,11 @@ case "${targ}" in want64=true ;; #ifdef BFD64 + powerpc64-*-aix5.[01]) + targ_defvec=rs6000_xcoff64_aix_vec + targ_selvecs="rs6000_xcoff_vec" + want64=true + ;; powerpc64-*-aix[5-9]*) targ_cflags=-DAIX_WEAK_SUPPORT targ_defvec=rs6000_xcoff64_aix_vec @@ -1163,6 +1184,11 @@ case "${targ}" in targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec" targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec" ;; + powerpc-*-haiku*) + targ_defvec=powerpc_elf32_vec + targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec pef_vec pef_xlib_vec powerpc_xcoff_vec powerpc_boot_vec" + targ_cflags=-D__HAIKU_TARGET__ + ;; powerpc-*-kaos*) targ_defvec=powerpc_elf32_vec targ_selvecs="powerpc_elf32_le_vec powerpc_boot_vec" @@ -1176,16 +1202,11 @@ case "${targ}" in powerpc-*-macos*) targ_defvec=powerpc_xcoff_vec ;; - powerpc-*-lynxos*) - targ_defvec=powerpc_elf32_vec - targ_selvecs="rs6000_xcoff_vec" - targ_cflags=-DSMALL_ARCHIVE - ;; powerpc-*-nto*) targ_defvec=powerpc_elf32_vec targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec" ;; - powerpc-*-vxworks* | powerpc-*-windiss*) + powerpc-*-vxworks*) targ_defvec=powerpc_elf32_vxworks_vec targ_selvecs="rs6000_xcoff_vec powerpc_elf32_vec powerpc_elf32_le_vec powerpc_boot_vec" targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec" @@ -1495,12 +1516,6 @@ case "${targ}" in ;; esac -if test x"$targ_defvec" = x"aarch64-pe"; then - # Not currently complete (and probably not stable), warn user - echo "*** WARNING BFD aarch64-pe support not complete nor stable" - echo "*** Do not rely on this for production purposes" -fi - # All MIPS ELF targets need a 64-bit bfd_vma. case "${targ_defvec} ${targ_selvecs}" in *mips_elf*) @@ -1533,3 +1548,9 @@ case "${targ_defvec} ${targ_selvecs}" in targ_archs="$targ_archs bfd_iamcu_arch" ;; esac + +case "${targ}" in + mipsisa32r6* | mipsisa64r6*) + targ_cflags="$targ_cflags -DMIPS_DEFAULT_R6=1" + ;; +esac diff --git a/bfd/config.in b/bfd/config.in index e5132df39..7ff3eeebf 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -7,6 +7,9 @@ #endif #define __CONFIG_H__ 1 +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Name of host specific core header file to include in elf.c. */ #undef CORE_HEADER @@ -325,6 +328,18 @@ /* Version number of package */ #undef VERSION +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 diff --git a/bfd/configure b/bfd/configure index 31dfac508..f0a07ff67 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for bfd 2.39.50. +# Generated by GNU Autoconf 2.69 for bfd 2.41.50. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bfd' PACKAGE_TARNAME='bfd' -PACKAGE_VERSION='2.39.50' -PACKAGE_STRING='bfd 2.39.50' +PACKAGE_VERSION='2.41.50' +PACKAGE_STRING='bfd 2.41.50' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bfd 2.39.50 to adapt to many kinds of systems. +\`configure' configures bfd 2.41.50 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1471,7 +1471,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bfd 2.39.50:";; + short | recursive ) echo "Configuration of bfd 2.41.50:";; esac cat <<\_ACEOF @@ -1608,7 +1608,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bfd configure 2.39.50 +bfd configure 2.41.50 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bfd $as_me 2.39.50, which was +It was created by bfd $as_me 2.41.50, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3184,7 +3184,7 @@ fi # Define the identity of the package. PACKAGE='bfd' - VERSION='2.39.50' + VERSION='2.41.50' cat >>confdefs.h <<_ACEOF @@ -6084,7 +6084,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) lt_cv_deplibs_check_method=pass_all ;; @@ -6160,6 +6160,11 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +vxworks*) + # Assume VxWorks cross toolchains are built on Linux, possibly + # as canadian for Windows hosts. + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -7621,23 +7626,25 @@ _LT_EOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) + # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to + # build without first building modern cctools / linker. + case $host_cpu-$host_os in + *-rhapsody* | *-darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) + *-darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + *-darwin*) + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in + UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) + ;; 10.[012][,.]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + *) + ;; + esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then @@ -8896,7 +8903,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9405,7 +9412,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' @@ -9417,7 +9424,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' @@ -10417,7 +10424,12 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + +# uclinux* changes (here and below) have been submitted to the libtool +# project, but have not yet been accepted: they are GCC-local changes +# for the time being. (See +# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) version_type=linux need_lib_prefix=no need_version=no @@ -10665,6 +10677,25 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; +# Shared libraries for VwWorks, >= 7 only at this stage +# and (fpic) still incompatible with "large" code models +# in a few configurations. Only for RTP mode in any case, +# and upon explicit request at configure time. +vxworks7*) + dynamic_linker=no + case ${with_multisubdir}-${enable_shared} in + *large*) + ;; + *mrtp*-yes) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker="$host_os module_loader" + ;; + esac + ;; *) dynamic_linker=no ;; @@ -11106,7 +11137,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11109 "configure" +#line 11140 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11212,7 +11243,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11215 "configure" +#line 11246 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12349,6 +12380,231 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + host64=false target64=false bfd_default_target_size=32 @@ -13703,6 +13959,8 @@ do ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;; ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; + kvx_elf32_vec) tb="$tb elf32-kvx.lo elfxx-kvx.lo elf32.lo $elf $ipa" ;; + kvx_elf64_vec) tb="$tb elf64-kvx.lo elfxx-kvx.lo elf64.lo $elf $ipa"; target_size=64 ;; lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; loongarch_elf32_vec) tb="$tb elf32-loongarch.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf" ;; @@ -14035,7 +14293,6 @@ if test "${target}" = "${host}"; then arm*-*-netbsd* | arm-*-openbsd*) COREFILE=netbsd-core.lo ;; - arm-*-riscix) COREFILE=trad-core.lo ;; hppa*-*-hpux*) COREFILE=hpux-core.lo ;; hppa*-*-hiux*) COREFILE=hpux-core.lo ;; hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; @@ -14045,19 +14302,10 @@ if test "${target}" = "${host}"; then COREFILE=netbsd-core.lo ;; - i[3-7]86-sequent-bsd*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; - i[3-7]86-sequent-sysv4*) ;; - i[3-7]86-sequent-sysv*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; i[3-7]86-*-bsdi) COREFILE= ;; - i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*) + i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386bsd.h"' ;; @@ -14072,13 +14320,6 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/esix.h"' ;; - i[3-7]86-*-sco3.2v5*) - COREFILE=sco5-core.lo - ;; - i[3-7]86-*-sco* | i[3-7]86-*-isc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386sco.h"' - ;; i[3-7]86-*-mach3*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386mach3.h"' @@ -14091,14 +14332,12 @@ if test "${target}" = "${host}"; then CORE_HEADER='"hosts/x86-64linux.h"' esac ;; - i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; - i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; mips*-*-netbsd* | mips*-*-openbsd*) COREFILE=netbsd-core.lo ;; - mips-sgi-irix4*) COREFILE=irix-core.lo ;; - mips-sgi-irix5*) COREFILE=irix-core.lo ;; - mips-sgi-irix6*) COREFILE=irix-core.lo ;; + mips-*-irix*) + COREFILE=irix-core.lo + ;; m68*-*-linux-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/m68klinux.h"' @@ -14170,14 +14409,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext vax-*-netbsd* | vax-*-openbsd*) COREFILE=netbsd-core.lo ;; - vax-*-ultrix2*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; - vax-*-ultrix*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; vax-*-linux-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxlinux.h"' @@ -14195,7 +14426,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac case "$COREFILE" in - aix386-core.lo) COREFLAG=-DAIX386_CORE ;; hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; hpux-core.lo) COREFLAG=-DHPUX_CORE ;; irix-core.lo) COREFLAG=-DIRIX_CORE ;; @@ -14204,7 +14434,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext osf-core.lo) COREFLAG=-DOSF_CORE ;; ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; - sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; esac @@ -15510,6 +15739,7 @@ if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi + : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files @@ -15906,7 +16136,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bfd $as_me 2.39.50, which was +This file was extended by bfd $as_me 2.41.50, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15972,7 +16202,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bfd config.status 2.39.50 +bfd config.status 2.41.50 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/bfd/configure.ac b/bfd/configure.ac index da6933bff..d1e7e3a4b 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2023 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -193,6 +193,8 @@ AM_CONDITIONAL(GENINSRC_NEVER, false) AM_INSTALL_LIBBFD AC_EXEEXT +AC_C_BIGENDIAN + host64=false target64=false bfd_default_target_size=32 @@ -493,6 +495,8 @@ do ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;; ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; + kvx_elf32_vec) tb="$tb elf32-kvx.lo elfxx-kvx.lo elf32.lo $elf $ipa" ;; + kvx_elf64_vec) tb="$tb elf64-kvx.lo elfxx-kvx.lo elf64.lo $elf $ipa"; target_size=64 ;; lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; loongarch_elf32_vec) tb="$tb elf32-loongarch.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf" ;; @@ -812,7 +816,6 @@ if test "${target}" = "${host}"; then arm*-*-netbsd* | arm-*-openbsd*) COREFILE=netbsd-core.lo ;; - arm-*-riscix) COREFILE=trad-core.lo ;; hppa*-*-hpux*) COREFILE=hpux-core.lo ;; hppa*-*-hiux*) COREFILE=hpux-core.lo ;; hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; @@ -822,26 +825,13 @@ if test "${target}" = "${host}"; then COREFILE=netbsd-core.lo ;; -changequote(,)dnl - i[3-7]86-sequent-bsd*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; -changequote(,)dnl - i[3-7]86-sequent-sysv4*) ;; - i[3-7]86-sequent-sysv*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; changequote(,)dnl i[3-7]86-*-bsdi) changequote([,])dnl COREFILE= ;; changequote(,)dnl - i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*) + i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.*) changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386bsd.h"' @@ -863,17 +853,6 @@ changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/esix.h"' ;; -changequote(,)dnl - i[3-7]86-*-sco3.2v5*) -changequote([,])dnl - COREFILE=sco5-core.lo - ;; -changequote(,)dnl - i[3-7]86-*-sco* | i[3-7]86-*-isc*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386sco.h"' - ;; changequote(,)dnl i[3-7]86-*-mach3*) changequote([,])dnl @@ -890,16 +869,12 @@ changequote([,])dnl CORE_HEADER='"hosts/x86-64linux.h"' esac ;; -changequote(,)dnl - i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; - i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; -changequote([,])dnl mips*-*-netbsd* | mips*-*-openbsd*) COREFILE=netbsd-core.lo ;; - mips-sgi-irix4*) COREFILE=irix-core.lo ;; - mips-sgi-irix5*) COREFILE=irix-core.lo ;; - mips-sgi-irix6*) COREFILE=irix-core.lo ;; + mips-*-irix*) + COREFILE=irix-core.lo + ;; m68*-*-linux-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/m68klinux.h"' @@ -955,14 +930,6 @@ changequote([,])dnl vax-*-netbsd* | vax-*-openbsd*) COREFILE=netbsd-core.lo ;; - vax-*-ultrix2*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; - vax-*-ultrix*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; vax-*-linux-*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxlinux.h"' @@ -980,7 +947,6 @@ changequote([,])dnl esac case "$COREFILE" in - aix386-core.lo) COREFLAG=-DAIX386_CORE ;; hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; hpux-core.lo) COREFLAG=-DHPUX_CORE ;; irix-core.lo) COREFLAG=-DIRIX_CORE ;; @@ -989,7 +955,6 @@ changequote([,])dnl osf-core.lo) COREFLAG=-DOSF_CORE ;; ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; - sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; esac diff --git a/bfd/configure.com b/bfd/configure.com index 5dfa7d1db..4fb6855ef 100644 --- a/bfd/configure.com +++ b/bfd/configure.com @@ -7,7 +7,7 @@ $! $! Written by Klaus K"ampf (kkaempf@rmi.de) $! Rewritten by Tristan Gingold (gingold@adacore.com) $! -$! Copyright (C) 2012-2022 Free Software Foundation, Inc. +$! Copyright (C) 2012-2023 Free Software Foundation, Inc. $! $! This file is free software; you can redistribute it and/or modify $! it under the terms of the GNU General Public License as published by diff --git a/bfd/configure.host b/bfd/configure.host index 980ebcd99..69723dce0 100644 --- a/bfd/configure.host +++ b/bfd/configure.host @@ -1,5 +1,5 @@ # -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/bfd/corefile.c b/bfd/corefile.c index 4f70fd925..2fddd0b6e 100644 --- a/bfd/corefile.c +++ b/bfd/corefile.c @@ -1,5 +1,5 @@ /* Core file generic interface routines for BFD. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c index d51f2e3bd..269177821 100644 --- a/bfd/cpu-aarch64.c +++ b/bfd/cpu-aarch64.c @@ -1,5 +1,5 @@ /* BFD support for AArch64. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of BFD, the Binary File Descriptor library. @@ -73,7 +73,9 @@ processors[] = { bfd_mach_aarch64, "cortex-a65" }, { bfd_mach_aarch64, "cortex-a65ae" }, { bfd_mach_aarch64, "cortex-a76ae" }, - { bfd_mach_aarch64, "cortex-a77" } + { bfd_mach_aarch64, "cortex-a77" }, + { bfd_mach_aarch64, "cortex-a720" }, + { bfd_mach_aarch64, "cortex-x4" }, }; static bool diff --git a/bfd/cpu-aarch64.h b/bfd/cpu-aarch64.h index 255649fbd..eccefa896 100644 --- a/bfd/cpu-aarch64.h +++ b/bfd/cpu-aarch64.h @@ -1,5 +1,5 @@ /* ELF AArch64 mapping symbol support - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-alpha.c b/bfd/cpu-alpha.c index 23faa34ae..dee6726d3 100644 --- a/bfd/cpu-alpha.c +++ b/bfd/cpu-alpha.c @@ -1,5 +1,5 @@ /* BFD support for the Alpha architecture. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-amdgcn.c b/bfd/cpu-amdgcn.c index ef51e660e..9d6c26056 100644 --- a/bfd/cpu-amdgcn.c +++ b/bfd/cpu-amdgcn.c @@ -1,6 +1,6 @@ /* BFD support for the AMDGCN GPU architecture. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-arc.c b/bfd/cpu-arc.c index 9be2056c8..390a69dc2 100644 --- a/bfd/cpu-arc.c +++ b/bfd/cpu-arc.c @@ -1,5 +1,5 @@ /* BFD support for the ARC processor - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index 6d77e1222..03482b0da 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -1,5 +1,5 @@ /* BFD support for the ARM processor - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) This file is part of BFD, the Binary File Descriptor library. @@ -418,7 +418,8 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section) different. */ arm_arch_section = bfd_get_section_by_name (abfd, note_section); - if (arm_arch_section == NULL) + if (arm_arch_section == NULL + || (arm_arch_section->flags & SEC_HAS_CONTENTS) == 0) return true; buffer_size = arm_arch_section->size; @@ -521,7 +522,8 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section) different. */ arm_arch_section = bfd_get_section_by_name (abfd, note_section); - if (arm_arch_section == NULL) + if (arm_arch_section == NULL + || (arm_arch_section->flags & SEC_HAS_CONTENTS) == 0) return bfd_mach_arm_unknown; buffer_size = arm_arch_section->size; diff --git a/bfd/cpu-arm.h b/bfd/cpu-arm.h index 48a133ee5..cd4c4db0b 100644 --- a/bfd/cpu-arm.h +++ b/bfd/cpu-arm.h @@ -1,5 +1,5 @@ /* BFD support for the ARM processor - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 38ae6cc98..56ff4707a 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -1,5 +1,5 @@ /* BFD library support routines for the AVR architecture. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Denis Chertykov This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-bfin.c b/bfd/cpu-bfin.c index 9e80bc716..4d3c18045 100644 --- a/bfd/cpu-bfin.c +++ b/bfd/cpu-bfin.c @@ -1,6 +1,6 @@ /* BFD Support for the ADI Blackfin processor. - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-bpf.c b/bfd/cpu-bpf.c index 2d6d61e36..d4801b2d0 100644 --- a/bfd/cpu-bpf.c +++ b/bfd/cpu-bpf.c @@ -1,5 +1,5 @@ /* BFD support for the BPF processor. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. Contributed by Oracle Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-cr16.c b/bfd/cpu-cr16.c index 0f1de7b75..bcd2dacdc 100644 --- a/bfd/cpu-cr16.c +++ b/bfd/cpu-cr16.c @@ -1,5 +1,5 @@ /* BFD support for the CR16 processor. - Copyright (C) 2007-2022 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. Written by M R Swami Reddy This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-cris.c b/bfd/cpu-cris.c index c3bd2e148..3d3c8b800 100644 --- a/bfd/cpu-cris.c +++ b/bfd/cpu-cris.c @@ -1,5 +1,5 @@ /* BFD support for the Axis CRIS architecture. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Axis Communications AB. Written by Hans-Peter Nilsson. diff --git a/bfd/cpu-crx.c b/bfd/cpu-crx.c index 6069d7f2b..8c0c465ea 100644 --- a/bfd/cpu-crx.c +++ b/bfd/cpu-crx.c @@ -1,5 +1,5 @@ /* BFD support for the CRX processor. - Copyright (C) 2004-2022 Free Software Foundation, Inc. + Copyright (C) 2004-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-csky.c b/bfd/cpu-csky.c index ce67c3a09..41fe83adc 100644 --- a/bfd/cpu-csky.c +++ b/bfd/cpu-csky.c @@ -1,5 +1,5 @@ /* BFD support for C-SKY processors. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by C-SKY Microsystems and Mentor Graphics. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-d10v.c b/bfd/cpu-d10v.c index 92949971d..889da2ece 100644 --- a/bfd/cpu-d10v.c +++ b/bfd/cpu-d10v.c @@ -1,5 +1,5 @@ /* BFD support for the D10V processor - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-d30v.c b/bfd/cpu-d30v.c index 9e7b2179b..5a3fab9cd 100644 --- a/bfd/cpu-d30v.c +++ b/bfd/cpu-d30v.c @@ -1,5 +1,5 @@ /* BFD support for the Mitsubishi D30V processor - Copyright (C) 1997-2022 Free Software Foundation, Inc. + Copyright (C) 1997-2023 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-dlx.c b/bfd/cpu-dlx.c index 7337d0976..601f3ce58 100644 --- a/bfd/cpu-dlx.c +++ b/bfd/cpu-dlx.c @@ -1,5 +1,5 @@ /* BFD support for the DLX Microprocessor architecture. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. Hacked by Kuang Hwa Lin This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-epiphany.c b/bfd/cpu-epiphany.c index 273fa2faa..4fabfda8b 100644 --- a/bfd/cpu-epiphany.c +++ b/bfd/cpu-epiphany.c @@ -1,5 +1,5 @@ /* BFD support for the Adapteva EPIPHANY processor. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Contributed by Embecosm on behalf of Adapteva, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-fr30.c b/bfd/cpu-fr30.c index e483f164c..b0fa38c79 100644 --- a/bfd/cpu-fr30.c +++ b/bfd/cpu-fr30.c @@ -1,5 +1,5 @@ /* BFD support for the FR30 processor. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-frv.c b/bfd/cpu-frv.c index 8682cafb2..f89a51ddb 100644 --- a/bfd/cpu-frv.c +++ b/bfd/cpu-frv.c @@ -1,5 +1,5 @@ /* BFD support for the FRV processor. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-ft32.c b/bfd/cpu-ft32.c index 58e6eb2ea..396cb06d3 100644 --- a/bfd/cpu-ft32.c +++ b/bfd/cpu-ft32.c @@ -1,5 +1,5 @@ /* BFD support for the ft32 processor. - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Written by FTDI (support@ftdichip.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c index fb7b45a50..762d3322d 100644 --- a/bfd/cpu-h8300.c +++ b/bfd/cpu-h8300.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Renesas H8/300 architecture. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-h8300.h b/bfd/cpu-h8300.h index 445792587..307a803e7 100644 --- a/bfd/cpu-h8300.h +++ b/bfd/cpu-h8300.h @@ -1,5 +1,5 @@ /* H8/300 functions. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-hppa.c b/bfd/cpu-hppa.c index dda06aa45..3468d711d 100644 --- a/bfd/cpu-hppa.c +++ b/bfd/cpu-hppa.c @@ -1,5 +1,5 @@ /* BFD support for the HP Precision Architecture architecture. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c index e8880ee06..63744122d 100644 --- a/bfd/cpu-i386.c +++ b/bfd/cpu-i386.c @@ -1,5 +1,5 @@ /* BFD support for the Intel 386 architecture. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-ia64-opc.c b/bfd/cpu-ia64-opc.c index 01e3c3f47..70826cd7f 100644 --- a/bfd/cpu-ia64-opc.c +++ b/bfd/cpu-ia64-opc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2022 Free Software Foundation, Inc. +/* Copyright (C) 1998-2023 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-ia64.c b/bfd/cpu-ia64.c index 75997fb2c..335634e36 100644 --- a/bfd/cpu-ia64.c +++ b/bfd/cpu-ia64.c @@ -1,5 +1,5 @@ /* BFD support for the ia64 architecture. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-iamcu.c b/bfd/cpu-iamcu.c index 0a366a379..c0e7250aa 100644 --- a/bfd/cpu-iamcu.c +++ b/bfd/cpu-iamcu.c @@ -1,5 +1,5 @@ /* BFD support for the Intel MCU architecture. - Copyright (C) 2015-2022 Free Software Foundation, Inc. + Copyright (C) 2015-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-ip2k.c b/bfd/cpu-ip2k.c index fb9fe3038..36dcba3d4 100644 --- a/bfd/cpu-ip2k.c +++ b/bfd/cpu-ip2k.c @@ -1,5 +1,5 @@ /* BFD support for the Scenix IP2xxx processor. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c index c7f383d61..b1d2b19c4 100644 --- a/bfd/cpu-iq2000.c +++ b/bfd/cpu-iq2000.c @@ -1,5 +1,5 @@ /* BFD support for the Vitesse IQ2000 processor. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-kvx.c b/bfd/cpu-kvx.c new file mode 100644 index 000000000..61d9d5daf --- /dev/null +++ b/bfd/cpu-kvx.c @@ -0,0 +1,124 @@ +/* BFD support for KVX. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + Contributed by Kalray SA. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING3. If not, + see . */ + +#include "sysdep.h" +#include "bfd.h" +#include "libbfd.h" + +/* This routine is provided two arch_infos and returns if machines + are compatible. +*/ + +static const bfd_arch_info_type * +kvx_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b) +{ + long amach = a->mach, bmach = b->mach; + /* If a & b are for different architecture we can do nothing. */ + if (a->arch != b->arch) + return NULL; + + if ((amach == bfd_mach_kv3_1_64 && bmach == bfd_mach_kv3_1_usr) + || (amach == bfd_mach_kv3_2_64 && bmach == bfd_mach_kv3_2_usr)) + return b; + + if ((bmach == bfd_mach_kv3_1_64 && amach == bfd_mach_kv3_1_usr) + || (bmach == bfd_mach_kv3_2_64 && amach == bfd_mach_kv3_2_usr)) + return a; + + /* Otherwise if either a or b is the 'default' machine + * then it can be polymorphed into the other. + * This will enable to execute merge_private_bfd_data + */ + if (a->the_default) + return b; + + if (b->the_default) + return a; + + /* We do not want to transmute some machine into another one */ + if (amach != bmach) + return NULL; + + /* If a & b are for the same machine then all is well. */ + if (amach == bmach) + return a; + + return NULL; +} + +static bool +scan (const struct bfd_arch_info *info, const char *string) +{ + /* First test for an exact match. */ + if (strcasecmp (string, info->printable_name) == 0) + return true; + + /* Finally check for the default architecture. */ + if (strcasecmp (string, "kvx") == 0) + return info->the_default; + + return false; +} + +#define N(addr_bits, machine, print, default, next) \ +{ \ + 32, /* 32 bits in a word. */ \ + addr_bits, /* bits in an address. */ \ + 8, /* 8 bits in a byte. */ \ + bfd_arch_kvx, \ + machine, /* Machine number. */ \ + "kvx", /* Architecture name. */ \ + print, /* Printable name. */ \ + 4, /* Section align power. */ \ + default, /* Is this the default ? */ \ + kvx_compatible, \ + scan, \ + bfd_arch_default_fill, \ + next, \ + 0 \ +} + + +const bfd_arch_info_type bfd_kv4_1_usr_arch = + N (64 , bfd_mach_kv4_1_usr , "kvx:kv4-1:usr" , false , NULL); + +const bfd_arch_info_type bfd_kv3_2_usr_arch = + N (64 , bfd_mach_kv3_2_usr , "kvx:kv3-2:usr" , false , &bfd_kv4_1_usr_arch); + +const bfd_arch_info_type bfd_kv3_1_usr_arch = + N (64 , bfd_mach_kv3_1_usr , "kvx:kv3-1:usr" , false , &bfd_kv3_2_usr_arch); + +const bfd_arch_info_type bfd_kv4_1_64_arch = + N (64 , bfd_mach_kv4_1_64 , "kvx:kv4-1:64" , false , &bfd_kv3_1_usr_arch); + +const bfd_arch_info_type bfd_kv3_2_64_arch = + N (64 , bfd_mach_kv3_2_64 , "kvx:kv3-2:64" , false , &bfd_kv4_1_64_arch); + +const bfd_arch_info_type bfd_kv3_1_64_arch = + N (64 , bfd_mach_kv3_1_64 , "kvx:kv3-1:64" , false , &bfd_kv3_2_64_arch); + +const bfd_arch_info_type bfd_kv4_1_arch = + N (32 , bfd_mach_kv4_1 , "kvx:kv4-1" , false , &bfd_kv3_1_64_arch); + +const bfd_arch_info_type bfd_kv3_2_arch = + N (32 , bfd_mach_kv3_2 , "kvx:kv3-2" , false , &bfd_kv4_1_arch); + +const bfd_arch_info_type bfd_kvx_arch = + N (32 , bfd_mach_kv3_1 , "kvx:kv3-1" , true , &bfd_kv3_2_arch); diff --git a/bfd/cpu-lm32.c b/bfd/cpu-lm32.c index 5ca1792db..b67a0a71e 100644 --- a/bfd/cpu-lm32.c +++ b/bfd/cpu-lm32.c @@ -1,5 +1,5 @@ /* BFD support for the Lattice Mico32 architecture. - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. Contributed by Jon Beniston This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-loongarch.c b/bfd/cpu-loongarch.c index e866c3e97..f8d9f3229 100644 --- a/bfd/cpu-loongarch.c +++ b/bfd/cpu-loongarch.c @@ -1,5 +1,5 @@ /* BFD support for LoongArch. - Copyright (C) 2021-2022 Free Software Foundation, Inc. + Copyright (C) 2021-2023 Free Software Foundation, Inc. Contributed by Loongson Ltd. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m10200.c b/bfd/cpu-m10200.c index a88c379d4..0911b0ddb 100644 --- a/bfd/cpu-m10200.c +++ b/bfd/cpu-m10200.c @@ -1,5 +1,5 @@ /* BFD support for the Matsushita 10200 processor - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m10300.c b/bfd/cpu-m10300.c index c64d03abc..d61c12726 100644 --- a/bfd/cpu-m10300.c +++ b/bfd/cpu-m10300.c @@ -1,5 +1,5 @@ /* BFD support for the Matsushita 10300 processor - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m32c.c b/bfd/cpu-m32c.c index 1f9f00cbd..7491c75e5 100644 --- a/bfd/cpu-m32c.c +++ b/bfd/cpu-m32c.c @@ -1,5 +1,5 @@ /* BFD support for the M16C/M32C processors. - Copyright (C) 2004-2022 Free Software Foundation, Inc. + Copyright (C) 2004-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m32r.c b/bfd/cpu-m32r.c index 208f9dc73..c534f1944 100644 --- a/bfd/cpu-m32r.c +++ b/bfd/cpu-m32r.c @@ -1,5 +1,5 @@ /* BFD support for the M32R processor. - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m68hc11.c b/bfd/cpu-m68hc11.c index 2771f54a0..3cc502c63 100644 --- a/bfd/cpu-m68hc11.c +++ b/bfd/cpu-m68hc11.c @@ -1,5 +1,5 @@ /* BFD support for the Motorola 68HC11 processor - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m68hc12.c b/bfd/cpu-m68hc12.c index c4030a1e9..085c4cb4d 100644 --- a/bfd/cpu-m68hc12.c +++ b/bfd/cpu-m68hc12.c @@ -1,5 +1,5 @@ /* BFD support for the Motorola 68HC12 processor - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c index 29562f8aa..a1dab049e 100644 --- a/bfd/cpu-m68k.c +++ b/bfd/cpu-m68k.c @@ -1,5 +1,5 @@ /* BFD library support routines for architectures. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m68k.h b/bfd/cpu-m68k.h index 0fe6e61c0..b342804a1 100644 --- a/bfd/cpu-m68k.h +++ b/bfd/cpu-m68k.h @@ -1,5 +1,5 @@ /* BFD library support routines. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m9s12x.c b/bfd/cpu-m9s12x.c index af1a59331..60c55bf72 100644 --- a/bfd/cpu-m9s12x.c +++ b/bfd/cpu-m9s12x.c @@ -1,5 +1,5 @@ /* BFD support for the Freescale 9S12X processor - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-m9s12xg.c b/bfd/cpu-m9s12xg.c index e7fe8dd6a..c7cd3f476 100644 --- a/bfd/cpu-m9s12xg.c +++ b/bfd/cpu-m9s12xg.c @@ -1,5 +1,5 @@ /* BFD support for the Freescale 9S12-XGATE co-processor - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-mcore.c b/bfd/cpu-mcore.c index b132898a0..ab3855bf7 100644 --- a/bfd/cpu-mcore.c +++ b/bfd/cpu-mcore.c @@ -1,5 +1,5 @@ /* BFD library support routines for Motorola's MCore architecture - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-mep.c b/bfd/cpu-mep.c index e0189bbd5..08ee25080 100644 --- a/bfd/cpu-mep.c +++ b/bfd/cpu-mep.c @@ -1,5 +1,5 @@ /* BFD support for the Toshiba Media Engine Processor. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-metag.c b/bfd/cpu-metag.c index a69d95da2..430cac2ee 100644 --- a/bfd/cpu-metag.c +++ b/bfd/cpu-metag.c @@ -1,5 +1,5 @@ /* BFD support for the Imagination Technologies Meta processor. - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Contributed by Imagination Technologies Ltd. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c index 0c1d2b1aa..c14b170f9 100644 --- a/bfd/cpu-microblaze.c +++ b/bfd/cpu-microblaze.c @@ -1,6 +1,6 @@ /* BFD Xilinx MicroBlaze architecture definition - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c index d9a7b6dff..89900954e 100644 --- a/bfd/cpu-mips.c +++ b/bfd/cpu-mips.c @@ -1,5 +1,5 @@ /* bfd back-end for mips support - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -108,6 +108,7 @@ enum I_mipsocteon3, I_xlr, I_interaptiv_mr2, + I_allegrex, I_micromips }; @@ -163,6 +164,7 @@ static const bfd_arch_info_type arch_info_struct[] = 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 (32, 32, bfd_mach_mips_allegrex, "mips:allegrex", false, NN(I_allegrex)), N (64, 64, bfd_mach_mips_micromips, "mips:micromips", false, NULL) }; diff --git a/bfd/cpu-mmix.c b/bfd/cpu-mmix.c index 71071643e..e443abb4a 100644 --- a/bfd/cpu-mmix.c +++ b/bfd/cpu-mmix.c @@ -1,5 +1,5 @@ /* BFD library support routines for MMIX. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-moxie.c b/bfd/cpu-moxie.c index 2a5a16612..5187f58e9 100644 --- a/bfd/cpu-moxie.c +++ b/bfd/cpu-moxie.c @@ -1,5 +1,5 @@ /* BFD support for the moxie processor. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Written by Anthony Green This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c index 2e851ac6d..7ee2530e5 100644 --- a/bfd/cpu-msp430.c +++ b/bfd/cpu-msp430.c @@ -1,5 +1,5 @@ /* BFD library support routines for the MSP architecture. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. Contributed by Dmitry Diky This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-mt.c b/bfd/cpu-mt.c index f1eecf4e1..a754657e0 100644 --- a/bfd/cpu-mt.c +++ b/bfd/cpu-mt.c @@ -1,5 +1,5 @@ /* BFD support for the Morpho Technologies MT processor. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-nds32.c b/bfd/cpu-nds32.c index 815614d18..f34a289a8 100644 --- a/bfd/cpu-nds32.c +++ b/bfd/cpu-nds32.c @@ -1,5 +1,5 @@ /* BFD support for the NDS32 processor - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. Contributed by Andes Technology Corporation. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-nfp.c b/bfd/cpu-nfp.c index ce2b0b712..915c9732f 100644 --- a/bfd/cpu-nfp.c +++ b/bfd/cpu-nfp.c @@ -1,5 +1,5 @@ /* BFD library support routines for the NFP. - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. Contributed by Francois H. Theron This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-nios2.c b/bfd/cpu-nios2.c index 775f00873..ff2a3bf3e 100644 --- a/bfd/cpu-nios2.c +++ b/bfd/cpu-nios2.c @@ -1,5 +1,5 @@ /* BFD support for the Altera Nios II processor. - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. Contributed by Nigel Gray (ngray@altera.com). Contributed by Mentor Graphics, Inc. diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c index 17f06c244..9da32a8c2 100644 --- a/bfd/cpu-ns32k.c +++ b/bfd/cpu-ns32k.c @@ -1,5 +1,5 @@ /* BFD support for the ns32k architecture. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Almost totally rewritten by Ian Dall from initial work by Andrew Cagney. diff --git a/bfd/cpu-or1k.c b/bfd/cpu-or1k.c index d1e81d491..8762ece5e 100644 --- a/bfd/cpu-or1k.c +++ b/bfd/cpu-or1k.c @@ -1,5 +1,5 @@ /* BFD support for the OpenRISC 1000 architecture. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. Contributed for OR32 by Ivan Guzvinec This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-pdp11.c b/bfd/cpu-pdp11.c index 1c057b3da..9c57d9443 100644 --- a/bfd/cpu-pdp11.c +++ b/bfd/cpu-pdp11.c @@ -1,5 +1,5 @@ /* BFD back-end for PDP-11 support. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-pj.c b/bfd/cpu-pj.c index 451cbce30..e36803ca3 100644 --- a/bfd/cpu-pj.c +++ b/bfd/cpu-pj.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Pico Java architecture. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Transmeta. sac@pobox.com This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-powerpc.c b/bfd/cpu-powerpc.c index 977044938..55ddfd24a 100644 --- a/bfd/cpu-powerpc.c +++ b/bfd/cpu-powerpc.c @@ -1,5 +1,5 @@ /* BFD PowerPC CPU definition - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-pru.c b/bfd/cpu-pru.c index 7dc039e18..1db8cd0ce 100644 --- a/bfd/cpu-pru.c +++ b/bfd/cpu-pru.c @@ -1,5 +1,5 @@ /* BFD support for the TI PRU microprocessor. - Copyright (C) 2014-2022 Free Software Foundation, Inc. + Copyright (C) 2014-2023 Free Software Foundation, Inc. Contributed by Dimitar Dimitrov This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-riscv.c b/bfd/cpu-riscv.c index 5deff968a..a478797da 100644 --- a/bfd/cpu-riscv.c +++ b/bfd/cpu-riscv.c @@ -1,5 +1,5 @@ /* BFD backend for RISC-V - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. Contributed by Andrew Waterman (andrew@sifive.com). Based on MIPS target. diff --git a/bfd/cpu-riscv.h b/bfd/cpu-riscv.h index ff037d127..812596db1 100644 --- a/bfd/cpu-riscv.h +++ b/bfd/cpu-riscv.h @@ -1,5 +1,5 @@ /* RISC-V spec version controlling support. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-rl78.c b/bfd/cpu-rl78.c index 6fe95841f..5b25627c7 100644 --- a/bfd/cpu-rl78.c +++ b/bfd/cpu-rl78.c @@ -1,5 +1,5 @@ /* BFD support for the RL78 processor. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-rs6000.c b/bfd/cpu-rs6000.c index 8ee2821a8..1d20a4c78 100644 --- a/bfd/cpu-rs6000.c +++ b/bfd/cpu-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for rs6000 support - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Mimi Phuong-Thao Vo of IBM and John Gilmore of Cygnus Support. diff --git a/bfd/cpu-rx.c b/bfd/cpu-rx.c index 6c85330dd..318c0079f 100644 --- a/bfd/cpu-rx.c +++ b/bfd/cpu-rx.c @@ -1,5 +1,5 @@ /* BFD support for the RX processor. - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-s12z.c b/bfd/cpu-s12z.c index f8e2d3783..5faae8347 100644 --- a/bfd/cpu-s12z.c +++ b/bfd/cpu-s12z.c @@ -1,5 +1,5 @@ /* BFD support for the Freescale 9S12Z processor - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-s390.c b/bfd/cpu-s390.c index ced5ba1a2..fa9f314e5 100644 --- a/bfd/cpu-s390.c +++ b/bfd/cpu-s390.c @@ -1,5 +1,5 @@ /* BFD support for the s390 processor. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c index b78486d62..658989d1f 100644 --- a/bfd/cpu-score.c +++ b/bfd/cpu-score.c @@ -1,5 +1,5 @@ /* BFD support for the score processor - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. Contributed by Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c index 921d96bbd..578ff086c 100644 --- a/bfd/cpu-sh.c +++ b/bfd/cpu-sh.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Renesas / SuperH SH architecture. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -117,9 +117,6 @@ sh_get_arch_from_bfd_mach (unsigned long mach) else i++; - /* Machine not found. */ - BFD_FAIL(); - return SH_ARCH_UNKNOWN_ARCH; } @@ -139,9 +136,6 @@ sh_get_arch_up_from_bfd_mach (unsigned long mach) else i++; - /* Machine not found. */ - BFD_FAIL(); - return SH_ARCH_UNKNOWN_ARCH; } diff --git a/bfd/cpu-sparc.c b/bfd/cpu-sparc.c index f1a64227b..e26dc310e 100644 --- a/bfd/cpu-sparc.c +++ b/bfd/cpu-sparc.c @@ -1,5 +1,5 @@ /* BFD support for the SPARC architecture. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-spu.c b/bfd/cpu-spu.c index 73fa23284..0bfc9f265 100644 --- a/bfd/cpu-spu.c +++ b/bfd/cpu-spu.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2022 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-tic30.c b/bfd/cpu-tic30.c index febf9a561..c52037ddb 100644 --- a/bfd/cpu-tic30.c +++ b/bfd/cpu-tic30.c @@ -1,5 +1,5 @@ /* BFD support for the Texas Instruments TMS320C30 architecture. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-tic4x.c b/bfd/cpu-tic4x.c index 8d5f36600..e9de3f9d2 100644 --- a/bfd/cpu-tic4x.c +++ b/bfd/cpu-tic4x.c @@ -1,5 +1,5 @@ /* bfd back-end for TMS320C[34]x support - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) diff --git a/bfd/cpu-tic54x.c b/bfd/cpu-tic54x.c index 9bc6e67e8..40d8caefa 100644 --- a/bfd/cpu-tic54x.c +++ b/bfd/cpu-tic54x.c @@ -1,5 +1,5 @@ /* BFD support for the Texas Instruments TMS320C54X architecture. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-tic6x.c b/bfd/cpu-tic6x.c index fab445205..8a48d801a 100644 --- a/bfd/cpu-tic6x.c +++ b/bfd/cpu-tic6x.c @@ -1,5 +1,5 @@ /* BFD support for the TI C6X processor. - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-tilegx.c b/bfd/cpu-tilegx.c index da04a7c01..ae35c00d0 100644 --- a/bfd/cpu-tilegx.c +++ b/bfd/cpu-tilegx.c @@ -1,5 +1,5 @@ /* BFD support for the TILE-Gx processor. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-tilepro.c b/bfd/cpu-tilepro.c index 599e9b58a..6911dcceb 100644 --- a/bfd/cpu-tilepro.c +++ b/bfd/cpu-tilepro.c @@ -1,5 +1,5 @@ /* BFD support for the TILEPro processor. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c index 233e1545e..70413e443 100644 --- a/bfd/cpu-v850.c +++ b/bfd/cpu-v850.c @@ -1,5 +1,5 @@ /* BFD support for the NEC V850 processor - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-v850_rh850.c b/bfd/cpu-v850_rh850.c index 09f31c9d0..b471abbcc 100644 --- a/bfd/cpu-v850_rh850.c +++ b/bfd/cpu-v850_rh850.c @@ -1,5 +1,5 @@ /* BFD support for the NEC V850 processor with the RH850 ABI. - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-vax.c b/bfd/cpu-vax.c index d12d9f4fa..2f1d5240a 100644 --- a/bfd/cpu-vax.c +++ b/bfd/cpu-vax.c @@ -1,5 +1,5 @@ /* bfd back-end for vax support - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-visium.c b/bfd/cpu-visium.c index 56dd08257..e24bab237 100644 --- a/bfd/cpu-visium.c +++ b/bfd/cpu-visium.c @@ -1,6 +1,6 @@ /* BFD support for the Visium processor. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-wasm32.c b/bfd/cpu-wasm32.c index 2958a5416..39fd7a9bf 100644 --- a/bfd/cpu-wasm32.c +++ b/bfd/cpu-wasm32.c @@ -1,5 +1,5 @@ /* BFD support for the WebAssembly target - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-xgate.c b/bfd/cpu-xgate.c index 0a9effd88..f5c8992a1 100644 --- a/bfd/cpu-xgate.c +++ b/bfd/cpu-xgate.c @@ -1,5 +1,5 @@ /* BFD support for the Freescale XGATE processor - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-xstormy16.c b/bfd/cpu-xstormy16.c index 9eda370f5..d9e87585b 100644 --- a/bfd/cpu-xstormy16.c +++ b/bfd/cpu-xstormy16.c @@ -1,5 +1,5 @@ /* BFD support for the XSTORMY16 processor. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-xtensa.c b/bfd/cpu-xtensa.c index e9108fdad..ab9c92d8d 100644 --- a/bfd/cpu-xtensa.c +++ b/bfd/cpu-xtensa.c @@ -1,5 +1,5 @@ /* BFD support for the Xtensa processor. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-z80.c b/bfd/cpu-z80.c index e8e4fec9e..f0bd90c6b 100644 --- a/bfd/cpu-z80.c +++ b/bfd/cpu-z80.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Z80 architecture. - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. Contributed by Arnold Metselaar This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/cpu-z8k.c b/bfd/cpu-z8k.c index a57305da9..e92b2579f 100644 --- a/bfd/cpu-z8k.c +++ b/bfd/cpu-z8k.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Z800n architecture. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/development.sh b/bfd/development.sh index f4f15e04b..1fd110e09 100644 --- a/bfd/development.sh +++ b/bfd/development.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is part of GDB. # diff --git a/bfd/doc/aoutx.texi b/bfd/doc/aoutx.texi index 15b472e47..4e64663d5 100644 --- a/bfd/doc/aoutx.texi +++ b/bfd/doc/aoutx.texi @@ -1,7 +1,6 @@ @section a.out backends -@strong{Description}@* BFD supports a number of different flavours of a.out format, though the major differences are only the sizes of the structures on disk, and the shape of the relocation @@ -97,7 +96,6 @@ configuration is selected. @subsection Relocations -@strong{Description}@* The file @file{aoutx.h} provides for both the @emph{standard} and @emph{extended} forms of a.out relocation records. @@ -108,73 +106,44 @@ integer for an addend. @subsection Internal entry points -@strong{Description}@* @file{aoutx.h} exports several routines for accessing the contents of an a.out file, which are gathered and exported in turn by various format specific files (eg sunos.c). @findex aout_@var{size}_swap_exec_header_in @subsubsection @code{aout_@var{size}_swap_exec_header_in} -@strong{Synopsis} -@example -void aout_@var{size}_swap_exec_header_in, - (bfd *abfd, - struct external_exec *bytes, - struct internal_exec *execp); -@end example -@strong{Description}@* +@deftypefn {Function} void aout_@var{size}_swap_exec_header_in, (bfd *abfd, struct external_exec *bytes, struct internal_exec *execp); Swap the information in an executable header @var{raw_bytes} taken from a raw byte stream memory image into the internal exec header structure @var{execp}. +@end deftypefn @findex aout_@var{size}_swap_exec_header_out @subsubsection @code{aout_@var{size}_swap_exec_header_out} -@strong{Synopsis} -@example -void aout_@var{size}_swap_exec_header_out - (bfd *abfd, - struct internal_exec *execp, - struct external_exec *raw_bytes); -@end example -@strong{Description}@* +@deftypefn {Function} void aout_@var{size}_swap_exec_header_out (bfd *abfd, struct internal_exec *execp, struct external_exec *raw_bytes); Swap the information in an internal exec header structure @var{execp} into the buffer @var{raw_bytes} ready for writing to disk. +@end deftypefn @findex aout_@var{size}_some_aout_object_p @subsubsection @code{aout_@var{size}_some_aout_object_p} -@strong{Synopsis} -@example -bfd_cleanup aout_@var{size}_some_aout_object_p - (bfd *abfd, - struct internal_exec *execp, - bfd_cleanup (*callback_to_real_object_p) (bfd *)); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_cleanup aout_@var{size}_some_aout_object_p (bfd *abfd, struct internal_exec *execp, bfd_cleanup (*callback_to_real_object_p) (bfd *)); Some a.out variant thinks that the file open in @var{abfd} checking is an a.out file. Do some more checking, and set up for access if it really is. Call back to the calling environment's "finish up" function just before returning, to handle any last-minute setup. +@end deftypefn @findex aout_@var{size}_mkobject @subsubsection @code{aout_@var{size}_mkobject} -@strong{Synopsis} -@example -bool aout_@var{size}_mkobject, (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool aout_@var{size}_mkobject, (bfd *abfd); Initialize BFD @var{abfd} for use with a.out files. +@end deftypefn @findex aout_@var{size}_machine_type @subsubsection @code{aout_@var{size}_machine_type} -@strong{Synopsis} -@example -enum machine_type aout_@var{size}_machine_type - (enum bfd_architecture arch, - unsigned long machine, - bool *unknown); -@end example -@strong{Description}@* +@deftypefn {Function} enum machine_type aout_@var{size}_machine_type (enum bfd_architecture arch, unsigned long machine, bool *unknown); Keep track of machine architecture and machine type for a.out's. Return the @code{machine_type} for a particular architecture and machine, or @code{M_UNKNOWN} if that exact architecture @@ -183,29 +152,19 @@ and machine can't be represented in a.out format. If the architecture is understood, machine type 0 (default) is always understood. +@end deftypefn @findex aout_@var{size}_set_arch_mach @subsubsection @code{aout_@var{size}_set_arch_mach} -@strong{Synopsis} -@example -bool aout_@var{size}_set_arch_mach, - (bfd *, - enum bfd_architecture arch, - unsigned long machine); -@end example -@strong{Description}@* +@deftypefn {Function} bool aout_@var{size}_set_arch_mach, (bfd *, enum bfd_architecture arch, unsigned long machine); Set the architecture and the machine of the BFD @var{abfd} to the values @var{arch} and @var{machine}. Verify that @var{abfd}'s format can support the architecture required. +@end deftypefn @findex aout_@var{size}_new_section_hook @subsubsection @code{aout_@var{size}_new_section_hook} -@strong{Synopsis} -@example -bool aout_@var{size}_new_section_hook, - (bfd *abfd, - asection *newsect); -@end example -@strong{Description}@* +@deftypefn {Function} bool aout_@var{size}_new_section_hook, (bfd *abfd, asection *newsect); Called by the BFD in response to a @code{bfd_make_section} request. +@end deftypefn diff --git a/bfd/doc/archive.texi b/bfd/doc/archive.texi index 00aa9e367..a8c92aba6 100644 --- a/bfd/doc/archive.texi +++ b/bfd/doc/archive.texi @@ -1,7 +1,6 @@ @section Archives -@strong{Description}@* An archive (or library) is just another BFD. It has a symbol table, although there's not much a user program will do with it. @@ -61,12 +60,7 @@ Archives are supported in BFD in @code{archive.c}. @findex bfd_get_next_mapent @subsubsection @code{bfd_get_next_mapent} -@strong{Synopsis} -@example -symindex bfd_get_next_mapent - (bfd *abfd, symindex previous, carsym **sym); -@end example -@strong{Description}@* +@deftypefn {Function} symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); Step through archive @var{abfd}'s symbol table (if it has one). Successively update @var{sym} with the next symbol's information, returning that symbol's (internal) index into the @@ -79,23 +73,17 @@ got the last one. A @code{carsym} is a canonical archive symbol. The only user-visible element is its name, a null-terminated string. +@end deftypefn @findex bfd_set_archive_head @subsubsection @code{bfd_set_archive_head} -@strong{Synopsis} -@example -bool bfd_set_archive_head (bfd *output, bfd *new_head); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_archive_head (bfd *output, bfd *new_head); Set the head of the chain of BFDs contained in the archive @var{output} to @var{new_head}. +@end deftypefn @findex bfd_openr_next_archived_file @subsubsection @code{bfd_openr_next_archived_file} -@strong{Synopsis} -@example -bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); Provided a BFD, @var{archive}, containing an archive and NULL, open an input BFD on the first contained element and returns that. Subsequent calls should pass the archive and the previous return @@ -104,3 +92,4 @@ is returned when there are no more. Note - if you want to process the bfd returned by this call be sure to call bfd_check_format() on it first. +@end deftypefn diff --git a/bfd/doc/archures.texi b/bfd/doc/archures.texi index bf9fffd46..bcbd72dd2 100644 --- a/bfd/doc/archures.texi +++ b/bfd/doc/archures.texi @@ -24,7 +24,6 @@ BFD's idea of an architecture is implemented in @file{archures.c}. @subsection bfd_architecture -@strong{Description}@* This enum gives the object file's CPU architecture, in a global sense---i.e., what processor family does it belong to? Another field indicates which processor within @@ -140,6 +139,7 @@ enum bfd_architecture #define bfd_mach_mips16000 16000 #define bfd_mach_mips16 16 #define bfd_mach_mips5 5 +#define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31. */ #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 #define bfd_mach_mips_gs464 3003 @@ -481,6 +481,17 @@ enum bfd_architecture bfd_arch_lm32, /* Lattice Mico32. */ #define bfd_mach_lm32 1 bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ +#define bfd_mach_kv3_unknown 0 +#define bfd_mach_kv3_1 1 +#define bfd_mach_kv3_1_64 2 +#define bfd_mach_kv3_1_usr 3 +#define bfd_mach_kv3_2 4 +#define bfd_mach_kv3_2_64 5 +#define bfd_mach_kv3_2_usr 6 +#define bfd_mach_kv4_1 7 +#define bfd_mach_kv4_1_64 8 +#define bfd_mach_kv4_1_usr 9 bfd_arch_tilepro, /* Tilera TILEPro. */ bfd_arch_tilegx, /* Tilera TILE-Gx. */ #define bfd_mach_tilepro 1 @@ -537,7 +548,6 @@ enum bfd_architecture @subsection bfd_arch_info -@strong{Description}@* This structure contains information on architectures for use within BFD. @example @@ -584,52 +594,38 @@ bfd_arch_info_type; @findex bfd_printable_name @subsubsection @code{bfd_printable_name} -@strong{Synopsis} -@example -const char *bfd_printable_name (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_printable_name (bfd *abfd); Return a printable string representing the architecture and machine from the pointer to the architecture info structure. +@end deftypefn @findex bfd_scan_arch @subsubsection @code{bfd_scan_arch} -@strong{Synopsis} -@example -const bfd_arch_info_type *bfd_scan_arch (const char *string); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_arch_info_type *bfd_scan_arch (const char *string); Figure out if BFD supports any cpu which could be described with the name @var{string}. Return a pointer to an @code{arch_info} structure if a machine is found, otherwise NULL. +@end deftypefn @findex bfd_arch_list @subsubsection @code{bfd_arch_list} -@strong{Synopsis} -@example -const char **bfd_arch_list (void); -@end example -@strong{Description}@* +@deftypefn {Function} const char **bfd_arch_list (void); Return a freshly malloced NULL-terminated vector of the names of all the valid BFD architectures. Do not modify the names. +@end deftypefn @findex bfd_arch_get_compatible @subsubsection @code{bfd_arch_get_compatible} -@strong{Synopsis} -@example -const bfd_arch_info_type *bfd_arch_get_compatible - (const bfd *abfd, const bfd *bbfd, bool accept_unknowns); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_arch_info_type *bfd_arch_get_compatible (const bfd *abfd, const bfd *bbfd, bool accept_unknowns); Determine whether two BFDs' architectures and machine types are compatible. Calculates the lowest common denominator between the two architectures and machine types implied by the BFDs and returns a pointer to an @code{arch_info} structure describing the compatible machine. +@end deftypefn @findex bfd_default_arch_struct @subsubsection @code{bfd_default_arch_struct} -@strong{Description}@* The @code{bfd_default_arch_struct} is an item of @code{bfd_arch_info_type} which has been initialized to a fairly generic state. A BFD starts life by pointing to this @@ -637,161 +633,111 @@ structure, until the correct back end has determined the real architecture of the file. @example extern const bfd_arch_info_type bfd_default_arch_struct; + @end example @findex bfd_set_arch_info @subsubsection @code{bfd_set_arch_info} -@strong{Synopsis} -@example -void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); Set the architecture info of @var{abfd} to @var{arg}. +@end deftypefn @findex bfd_default_set_arch_mach @subsubsection @code{bfd_default_set_arch_mach} -@strong{Synopsis} -@example -bool bfd_default_set_arch_mach - (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_default_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach); Set the architecture and machine type in BFD @var{abfd} to @var{arch} and @var{mach}. Find the correct pointer to a structure and insert it into the @code{arch_info} pointer. +@end deftypefn @findex bfd_get_arch @subsubsection @code{bfd_get_arch} -@strong{Synopsis} -@example -enum bfd_architecture bfd_get_arch (const bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} enum bfd_architecture bfd_get_arch (const bfd *abfd); Return the enumerated type which describes the BFD @var{abfd}'s architecture. +@end deftypefn @findex bfd_get_mach @subsubsection @code{bfd_get_mach} -@strong{Synopsis} -@example -unsigned long bfd_get_mach (const bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned long bfd_get_mach (const bfd *abfd); Return the long type which describes the BFD @var{abfd}'s machine. +@end deftypefn @findex bfd_arch_bits_per_byte @subsubsection @code{bfd_arch_bits_per_byte} -@strong{Synopsis} -@example -unsigned int bfd_arch_bits_per_byte (const bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned int bfd_arch_bits_per_byte (const bfd *abfd); Return the number of bits in one of the BFD @var{abfd}'s architecture's bytes. +@end deftypefn @findex bfd_arch_bits_per_address @subsubsection @code{bfd_arch_bits_per_address} -@strong{Synopsis} -@example -unsigned int bfd_arch_bits_per_address (const bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned int bfd_arch_bits_per_address (const bfd *abfd); Return the number of bits in one of the BFD @var{abfd}'s architecture's addresses. +@end deftypefn @findex bfd_default_compatible @subsubsection @code{bfd_default_compatible} -@strong{Synopsis} -@example -const bfd_arch_info_type *bfd_default_compatible - (const bfd_arch_info_type *a, const bfd_arch_info_type *b); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_arch_info_type *bfd_default_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b); The default function for testing for compatibility. +@end deftypefn @findex bfd_default_scan @subsubsection @code{bfd_default_scan} -@strong{Synopsis} -@example -bool bfd_default_scan - (const struct bfd_arch_info *info, const char *string); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_default_scan (const struct bfd_arch_info *info, const char *string); The default function for working out whether this is an architecture hit and a machine hit. +@end deftypefn @findex bfd_get_arch_info @subsubsection @code{bfd_get_arch_info} -@strong{Synopsis} -@example -const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); Return the architecture info struct in @var{abfd}. +@end deftypefn @findex bfd_lookup_arch @subsubsection @code{bfd_lookup_arch} -@strong{Synopsis} -@example -const bfd_arch_info_type *bfd_lookup_arch - (enum bfd_architecture arch, unsigned long machine); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_arch_info_type *bfd_lookup_arch (enum bfd_architecture arch, unsigned long machine); Look for the architecture info structure which matches the arguments @var{arch} and @var{machine}. A machine of 0 matches the machine/architecture structure which marks itself as the default. +@end deftypefn @findex bfd_printable_arch_mach @subsubsection @code{bfd_printable_arch_mach} -@strong{Synopsis} -@example -const char *bfd_printable_arch_mach - (enum bfd_architecture arch, unsigned long machine); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); Return a printable string representing the architecture and machine type. This routine is depreciated. +@end deftypefn @findex bfd_octets_per_byte @subsubsection @code{bfd_octets_per_byte} -@strong{Synopsis} -@example -unsigned int bfd_octets_per_byte (const bfd *abfd, - const asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned int bfd_octets_per_byte (const bfd *abfd, const asection *sec); Return the number of octets (8-bit quantities) per target byte (minimum addressable unit). In most cases, this will be one, but some DSP targets have 16, 32, or even 48 bits per byte. +@end deftypefn @findex bfd_arch_mach_octets_per_byte @subsubsection @code{bfd_arch_mach_octets_per_byte} -@strong{Synopsis} -@example -unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned int bfd_arch_mach_octets_per_byte (enum bfd_architecture arch, unsigned long machine); See bfd_octets_per_byte. This routine is provided for those cases where a bfd * is not available +@end deftypefn @findex bfd_arch_default_fill @subsubsection @code{bfd_arch_default_fill} -@strong{Synopsis} -@example -void *bfd_arch_default_fill (bfd_size_type count, - bool is_bigendian, - bool code); -@end example -@strong{Description}@* +@deftypefn {Function} void *bfd_arch_default_fill (bfd_size_type count, bool is_bigendian, bool code); 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. +@end deftypefn diff --git a/bfd/doc/bfd.info b/bfd/doc/bfd.info index e4209ee1e..8a64cf252 100644 --- a/bfd/doc/bfd.info +++ b/bfd/doc/bfd.info @@ -2,7 +2,7 @@ This is bfd.info, produced by makeinfo version 6.8 from bfd.texi. This file documents the BFD library. - Copyright (C) 1991-2022 Free Software Foundation, Inc. + Copyright (C) 1991-2023 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -298,9 +298,9 @@ File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up * typedef bfd:: * Error reporting:: +* Initialization:: * Miscellaneous:: * Memory Usage:: -* Initialization:: * Sections:: * Symbols:: * Archives:: @@ -328,28 +328,6 @@ the BFD and to data in the BFD. Here is the structure that defines the type 'bfd'. It contains the major data about the file and pointers to the rest of the data. - - enum bfd_direction - { - no_direction = 0, - read_direction = 1, - write_direction = 2, - both_direction = 3 - }; - - enum bfd_plugin_format - { - bfd_plugin_unknown = 0, - bfd_plugin_yes = 1, - bfd_plugin_no = 2 - }; - - struct bfd_build_id - { - bfd_size_type size; - bfd_byte data[1]; - }; - struct bfd { /* The filename the application opened the BFD with. */ @@ -473,17 +451,15 @@ major data about the file and pointers to the rest of the data. /* Compress sections in this BFD with SHF_COMPRESSED zstd. */ #define BFD_COMPRESS_ZSTD 0x400000 - /* Flags bits to be saved in bfd_preserve_save. */ - #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ - | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ - | BFD_USE_ELF_STT_COMMON | BFD_COMPRESS_ZSTD) + /* Don't generate ELF section header. */ + #define BFD_NO_SECTION_HEADER 0x800000 /* Flags bits which are for BFD use only. */ #define BFD_FLAGS_FOR_BFD_USE_MASK \ (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ - | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON \ + | BFD_NO_SECTION_HEADER) /* The format which belongs to the BFD. (object, core, etc.) */ ENUM_BITFIELD (bfd_format) format : 3; @@ -491,6 +467,20 @@ major data about the file and pointers to the rest of the data. /* The direction with which the BFD was opened. */ ENUM_BITFIELD (bfd_direction) direction : 2; + /* POSIX.1-2017 (IEEE Std 1003.1) says of fopen : "When a file is + opened with update mode ('+' as the second or third character in + the mode argument), both input and output may be performed on + the associated stream. However, the application shall ensure + that output is not directly followed by input without an + intervening call to fflush() or to a file positioning function + (fseek(), fsetpos(), or rewind()), and input is not directly + followed by output without an intervening call to a file + positioning function, unless the input operation encounters + end-of-file." + This field tracks the last IO operation, so that bfd can insert + a seek when IO direction changes. */ + ENUM_BITFIELD (bfd_last_io) last_io : 2; + /* Is the file descriptor being cached? That is, can it be closed as needed, and re-opened when accessed later? */ unsigned int cacheable : 1; @@ -638,8 +628,6 @@ major data about the file and pointers to the rest of the data. struct tekhex_data_struct *tekhex_data; struct elf_obj_tdata *elf_obj_data; struct mmo_data_struct *mmo_data; - struct sun_core_struct *sun_core_data; - struct sco5_core_struct *sco5_core_data; struct trad_core_struct *trad_core_data; struct som_data_struct *som_data; struct hpux_core_struct *hpux_core_data; @@ -648,7 +636,6 @@ major data about the file and pointers to the rest of the data. struct lynx_core_struct *lynx_core_data; struct osf_core_struct *osf_core_data; struct cisco_core_struct *cisco_core_data; - struct versados_data_struct *versados_data; struct netbsd_core_struct *netbsd_core_data; struct mach_o_data_struct *mach_o_data; struct mach_o_fat_data_struct *mach_o_fat_data; @@ -672,239 +659,9 @@ major data about the file and pointers to the rest of the data. const struct bfd_build_id *build_id; }; - static inline const char * - bfd_get_filename (const bfd *abfd) - { - return abfd->filename; - } - - static inline bool - bfd_get_cacheable (const bfd *abfd) - { - return abfd->cacheable; - } - - static inline enum bfd_format - bfd_get_format (const bfd *abfd) - { - return abfd->format; - } - - static inline flagword - bfd_get_file_flags (const bfd *abfd) - { - return abfd->flags; - } - - static inline bfd_vma - bfd_get_start_address (const bfd *abfd) - { - return abfd->start_address; - } - - static inline unsigned int - bfd_get_symcount (const bfd *abfd) - { - return abfd->symcount; - } - - static inline unsigned int - bfd_get_dynamic_symcount (const bfd *abfd) - { - return abfd->dynsymcount; - } - - static inline struct bfd_symbol ** - bfd_get_outsymbols (const bfd *abfd) - { - return abfd->outsymbols; - } - - static inline unsigned int - bfd_count_sections (const bfd *abfd) - { - return abfd->section_count; - } - - static inline bool - bfd_has_map (const bfd *abfd) - { - return abfd->has_armap; - } - - static inline bool - bfd_is_thin_archive (const bfd *abfd) - { - return abfd->is_thin_archive; - } - - static inline void * - bfd_usrdata (const bfd *abfd) - { - return abfd->usrdata; - } - - /* See note beside bfd_set_section_userdata. */ - static inline bool - bfd_set_cacheable (bfd * abfd, bool val) - { - abfd->cacheable = val; - return true; - } - - static inline void - bfd_set_thin_archive (bfd *abfd, bool val) - { - abfd->is_thin_archive = val; - } - - static inline void - bfd_set_usrdata (bfd *abfd, void *val) - { - abfd->usrdata = val; - } - - static inline asection * - bfd_asymbol_section (const asymbol *sy) - { - return sy->section; - } - - static inline bfd_vma - bfd_asymbol_value (const asymbol *sy) - { - return sy->section->vma + sy->value; - } - - static inline const char * - bfd_asymbol_name (const asymbol *sy) - { - return sy->name; - } - - static inline struct bfd * - bfd_asymbol_bfd (const asymbol *sy) - { - return sy->the_bfd; - } - - static inline void - bfd_set_asymbol_name (asymbol *sy, const char *name) - { - sy->name = name; - } - - static inline bfd_size_type - bfd_get_section_limit_octets (const bfd *abfd, const asection *sec) - { - if (abfd->direction != write_direction && sec->rawsize != 0) - return sec->rawsize; - return sec->size; - } - - /* Find the address one past the end of SEC. */ - static inline bfd_size_type - bfd_get_section_limit (const bfd *abfd, const asection *sec) - { - return (bfd_get_section_limit_octets (abfd, sec) - / bfd_octets_per_byte (abfd, sec)); - } - - static inline bfd_size_type - bfd_get_section_alloc_size (const bfd *abfd, const asection *sec) - { - if (abfd->direction != write_direction && sec->rawsize > sec->size) - return sec->rawsize; - return sec->size; - } - - /* Functions to handle insertion and deletion of a bfd's sections. These - only handle the list pointers, ie. do not adjust section_count, - target_index etc. */ - static inline void - bfd_section_list_remove (bfd *abfd, asection *s) - { - asection *next = s->next; - asection *prev = s->prev; - if (prev) - prev->next = next; - else - abfd->sections = next; - if (next) - next->prev = prev; - else - abfd->section_last = prev; - } - - static inline void - bfd_section_list_append (bfd *abfd, asection *s) - { - s->next = 0; - if (abfd->section_last) - { - s->prev = abfd->section_last; - abfd->section_last->next = s; - } - else - { - s->prev = 0; - abfd->sections = s; - } - abfd->section_last = s; - } - - static inline void - bfd_section_list_prepend (bfd *abfd, asection *s) - { - s->prev = 0; - if (abfd->sections) - { - s->next = abfd->sections; - abfd->sections->prev = s; - } - else - { - s->next = 0; - abfd->section_last = s; - } - abfd->sections = s; - } - - static inline void - bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s) - { - asection *next = a->next; - s->next = next; - s->prev = a; - a->next = s; - if (next) - next->prev = s; - else - abfd->section_last = s; - } - - static inline void - bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s) - { - asection *prev = b->prev; - s->prev = prev; - s->next = b; - b->prev = s; - if (prev) - prev->next = s; - else - abfd->sections = s; - } - - 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; - } -  -File: bfd.info, Node: Error reporting, Next: Miscellaneous, Prev: typedef bfd, Up: BFD front end +File: bfd.info, Node: Error reporting, Next: Initialization, Prev: typedef bfd, Up: BFD front end 2.2 Error reporting =================== @@ -924,7 +681,6 @@ check 'errno'. The values returned by 'bfd_get_error' are defined by the enumerated type 'bfd_error_type'. - typedef enum bfd_error { bfd_error_no_error = 0, @@ -957,52 +713,54 @@ type 'bfd_error_type'. 2.2.1.1 'bfd_get_error' ....................... -*Synopsis* - bfd_error_type bfd_get_error (void); - *Description* -Return the current BFD error condition. + -- Function: bfd_error_type bfd_get_error (void); + Return the current BFD error condition. 2.2.1.2 'bfd_set_error' ....................... -*Synopsis* - void bfd_set_error (bfd_error_type error_tag); - *Description* -Set the BFD error condition to be ERROR_TAG. + -- Function: void bfd_set_error (bfd_error_type error_tag); + Set the BFD error condition to be ERROR_TAG. - ERROR_TAG must not be bfd_error_on_input. Use bfd_set_input_error -for input errors instead. + ERROR_TAG must not be bfd_error_on_input. Use bfd_set_input_error + for input errors instead. 2.2.1.3 'bfd_set_input_error' ............................. -*Synopsis* - void bfd_set_input_error (bfd *input, bfd_error_type error_tag); - *Description* -Set the BFD error condition to be bfd_error_on_input. INPUT is the -input bfd where the error occurred, and ERROR_TAG the bfd_error_type -error. + -- Function: void bfd_set_input_error (bfd *input, bfd_error_type + error_tag); + Set the BFD error condition to be bfd_error_on_input. INPUT is the + input bfd where the error occurred, and ERROR_TAG the + bfd_error_type error. 2.2.1.4 'bfd_errmsg' .................... -*Synopsis* - const char *bfd_errmsg (bfd_error_type error_tag); - *Description* -Return a string describing the error ERROR_TAG, or the system error if -ERROR_TAG is 'bfd_error_system_call'. + -- Function: const char *bfd_errmsg (bfd_error_type error_tag); + Return a string describing the error ERROR_TAG, or the system error + if ERROR_TAG is 'bfd_error_system_call'. 2.2.1.5 'bfd_perror' .................... -*Synopsis* - void bfd_perror (const char *message); - *Description* -Print to the standard error stream a string describing the last BFD -error that occurred, or the last system error if the last BFD error was -a system call failure. If MESSAGE is non-NULL and non-empty, the error -string printed is preceded by MESSAGE, a colon, and a space. It is -followed by a newline. + -- Function: void bfd_perror (const char *message); + Print to the standard error stream a string describing the last BFD + error that occurred, or the last system error if the last BFD error + was a system call failure. If MESSAGE is non-NULL and non-empty, + the error string printed is preceded by MESSAGE, a colon, and a + space. It is followed by a newline. + +2.2.1.6 'bfd_asprintf' +...................... + + -- Function: char *bfd_asprintf (const char *fmt, ...); + Primarily for error reporting, this function is like libiberty's + xasprintf except that it can return NULL on no memory and the + returned string should not be freed. Uses a single malloc'd buffer + managed by libbfd, _bfd_error_buf. Be aware that a call to this + function frees the result of any previous call. bfd_errmsg + (bfd_error_on_input) also calls this function. 2.2.2 BFD error handler ----------------------- @@ -1013,59 +771,52 @@ the program. The BFD error handler acts like vprintf. - typedef void (*bfd_error_handler_type) (const char *, va_list); 2.2.2.1 '_bfd_error_handler' ............................ -*Synopsis* - void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; - *Description* -This is the default routine to handle BFD error messages. Like fprintf -(stderr, ...), but also handles some extra format specifiers. + -- Function: void _bfd_error_handler (const char *fmt, ...) + ATTRIBUTE_PRINTF_1; + This is the default routine to handle BFD error messages. Like + fprintf (stderr, ...), but also handles some extra format + specifiers. - %pA section name from section. For group components, prints group -name too. %pB file name from bfd. For archive components, prints -archive too. + %pA section name from section. For group components, prints group + name too. %pB file name from bfd. For archive components, prints + archive too. - Beware: Only supports a maximum of 9 format arguments. + Beware: Only supports a maximum of 9 format arguments. 2.2.2.2 'bfd_set_error_handler' ............................... -*Synopsis* - bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); - *Description* -Set the BFD error handler function. Returns the previous function. + -- Function: bfd_error_handler_type bfd_set_error_handler + (bfd_error_handler_type); + Set the BFD error handler function. Returns the previous function. 2.2.2.3 '_bfd_set_error_handler_caching' ........................................ -*Synopsis* - bfd_error_handler_type _bfd_set_error_handler_caching (bfd *); - *Description* -Set the BFD error handler function to one that stores messages to the -per_xvec_warn array. Returns the previous function. + -- Function: bfd_error_handler_type _bfd_set_error_handler_caching (bfd + *); + Set the BFD error handler function to one that stores messages to + the per_xvec_warn array. Returns the previous function. 2.2.2.4 'bfd_set_error_program_name' .................................... -*Synopsis* - void bfd_set_error_program_name (const char *); - *Description* -Set the program name to use when printing a BFD error. This is printed -before the error message followed by a colon and space. The string must -not be changed after it is passed to this function. + -- Function: void bfd_set_error_program_name (const char *); + Set the program name to use when printing a BFD error. This is + printed before the error message followed by a colon and space. + The string must not be changed after it is passed to this function. 2.2.2.5 '_bfd_get_error_program_name' ..................................... -*Synopsis* - const char *_bfd_get_error_program_name (void); - *Description* -Get the program name used when printing a BFD error. + -- Function: const char *_bfd_get_error_program_name (void); + Get the program name used when printing a BFD error. 2.2.3 BFD assert handler ------------------------ @@ -1077,7 +828,6 @@ with an error, or mark the current BFD operation as failed, so it is recommended to override the default handler, which just calls _bfd_error_handler and continues. - typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, const char *bfd_file, @@ -1087,13 +837,28 @@ _bfd_error_handler and continues. 2.2.3.1 'bfd_set_assert_handler' ................................ -*Synopsis* - bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); - *Description* -Set the BFD assert handler function. Returns the previous function. + -- Function: bfd_assert_handler_type bfd_set_assert_handler + (bfd_assert_handler_type); + Set the BFD assert handler function. Returns the previous + function.  -File: bfd.info, Node: Miscellaneous, Next: Memory Usage, Prev: Error reporting, Up: BFD front end +File: bfd.info, Node: Initialization, Next: Miscellaneous, Prev: Error reporting, Up: BFD front end + +2.2.3.2 'bfd_init' +.................. + + -- Function: unsigned int bfd_init (void); + This routine must be called before any other BFD function to + initialize magical internal data structures. Returns a magic + number, which may be used to check that the bfd library is + configured as expected by users. + /* Value returned by bfd_init. */ + #define BFD_INIT_MAGIC (sizeof (struct bfd_section)) + + + +File: bfd.info, Node: Miscellaneous, Next: Memory Usage, Prev: Initialization, Up: BFD front end 2.3 Miscellaneous ================= @@ -1104,196 +869,171 @@ File: bfd.info, Node: Miscellaneous, Next: Memory Usage, Prev: Error reportin 2.3.1.1 'bfd_get_reloc_upper_bound' ................................... -*Synopsis* - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); - *Description* -Return the number of bytes required to store the relocation information -associated with section SECT attached to bfd ABFD. If an error occurs, -return -1. + -- Function: long bfd_get_reloc_upper_bound (bfd *abfd, asection + *sect); + Return the number of bytes required to store the relocation + information associated with section SECT attached to bfd ABFD. If + an error occurs, return -1. 2.3.1.2 'bfd_canonicalize_reloc' ................................ -*Synopsis* - long bfd_canonicalize_reloc - (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); - *Description* -Call the back end associated with the open BFD ABFD and translate the -external form of the relocation information attached to SEC into the -internal canonical form. Place the table into memory at LOC, which has -been preallocated, usually by a call to 'bfd_get_reloc_upper_bound'. -Returns the number of relocs, or -1 on error. + -- Function: long bfd_canonicalize_reloc (bfd *abfd, asection *sec, + arelent **loc, asymbol **syms); + Call the back end associated with the open BFD ABFD and translate + the external form of the relocation information attached to SEC + into the internal canonical form. Place the table into memory at + LOC, which has been preallocated, usually by a call to + 'bfd_get_reloc_upper_bound'. Returns the number of relocs, or -1 + on error. - The SYMS table is also needed for horrible internal magic reasons. + The SYMS table is also needed for horrible internal magic reasons. 2.3.1.3 'bfd_set_reloc' ....................... -*Synopsis* - void bfd_set_reloc - (bfd *abfd, asection *sec, arelent **rel, unsigned int count); - *Description* -Set the relocation pointer and count within section SEC to the values -REL and COUNT. The argument ABFD is ignored. - #define bfd_set_reloc(abfd, asect, location, count) \ - BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) + -- Function: void bfd_set_reloc (bfd *abfd, asection *sec, arelent + **rel, unsigned int count); + Set the relocation pointer and count within section SEC to the + values REL and COUNT. The argument ABFD is ignored. + #define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) 2.3.1.4 'bfd_set_file_flags' ............................ -*Synopsis* - bool bfd_set_file_flags (bfd *abfd, flagword flags); - *Description* -Set the flag word in the BFD ABFD to the value FLAGS. + -- Function: bool bfd_set_file_flags (bfd *abfd, flagword flags); + Set the flag word in the BFD ABFD to the value FLAGS. - Possible errors are: + Possible errors are: - * 'bfd_error_wrong_format' - The target bfd was not of object format. - * 'bfd_error_invalid_operation' - The target bfd was open for - reading. - * 'bfd_error_invalid_operation' - The flag word contained a bit which - was not applicable to the type of file. E.g., an attempt was made - to set the 'D_PAGED' bit on a BFD format which does not support - demand paging. + * 'bfd_error_wrong_format' - The target bfd was not of object + format. + * 'bfd_error_invalid_operation' - The target bfd was open for + reading. + * 'bfd_error_invalid_operation' - The flag word contained a bit + which was not applicable to the type of file. E.g., an + attempt was made to set the 'D_PAGED' bit on a BFD format + which does not support demand paging. 2.3.1.5 'bfd_get_arch_size' ........................... -*Synopsis* - int bfd_get_arch_size (bfd *abfd); - *Description* -Returns the normalized architecture address size, in bits, as determined -by the object file's format. By normalized, we mean either 32 or 64. -For ELF, this information is included in the header. Use -bfd_arch_bits_per_address for number of bits in the architecture -address. + -- Function: int bfd_get_arch_size (bfd *abfd); + Returns the normalized architecture address size, in bits, as + determined by the object file's format. By normalized, we mean + either 32 or 64. For ELF, this information is included in the + header. Use bfd_arch_bits_per_address for number of bits in the + architecture address. - *Returns* -Returns the arch size in bits if known, '-1' otherwise. + Returns the arch size in bits if known, '-1' otherwise. 2.3.1.6 'bfd_get_sign_extend_vma' ................................. -*Synopsis* - int bfd_get_sign_extend_vma (bfd *abfd); - *Description* -Indicates if the target architecture "naturally" sign extends an -address. Some architectures implicitly sign extend address values when -they are converted to types larger than the size of an address. For -instance, bfd_get_start_address() will return an address sign extended -to fill a bfd_vma when this is the case. + -- Function: int bfd_get_sign_extend_vma (bfd *abfd); + Indicates if the target architecture "naturally" sign extends an + address. Some architectures implicitly sign extend address values + when they are converted to types larger than the size of an + address. For instance, bfd_get_start_address() will return an + address sign extended to fill a bfd_vma when this is the case. - *Returns* -Returns '1' if the target architecture is known to sign extend -addresses, '0' if the target architecture is known to not sign extend -addresses, and '-1' otherwise. + Returns '1' if the target architecture is known to sign extend + addresses, '0' if the target architecture is known to not sign + extend addresses, and '-1' otherwise. 2.3.1.7 'bfd_set_start_address' ............................... -*Synopsis* - bool bfd_set_start_address (bfd *abfd, bfd_vma vma); - *Description* -Make VMA the entry point of output BFD ABFD. + -- Function: bool bfd_set_start_address (bfd *abfd, bfd_vma vma); + Make VMA the entry point of output BFD ABFD. - *Returns* -Returns 'TRUE' on success, 'FALSE' otherwise. + Returns 'TRUE' on success, 'FALSE' otherwise. 2.3.1.8 'bfd_get_gp_size' ......................... -*Synopsis* - unsigned int bfd_get_gp_size (bfd *abfd); - *Description* -Return the maximum size of objects to be optimized using the GP register -under MIPS ECOFF. This is typically set by the '-G' argument to the -compiler, assembler or linker. + -- Function: unsigned int bfd_get_gp_size (bfd *abfd); + Return the maximum size of objects to be optimized using the GP + register under MIPS ECOFF. This is typically set by the '-G' + argument to the compiler, assembler or linker. 2.3.1.9 'bfd_set_gp_size' ......................... -*Synopsis* - void bfd_set_gp_size (bfd *abfd, unsigned int i); - *Description* -Set the maximum size of objects to be optimized using the GP register -under ECOFF or MIPS ELF. This is typically set by the '-G' argument to -the compiler, assembler or linker. + -- Function: void bfd_set_gp_size (bfd *abfd, unsigned int i); + Set the maximum size of objects to be optimized using the GP + register under ECOFF or MIPS ELF. This is typically set by the '-G' + argument to the compiler, assembler or linker. 2.3.1.10 'bfd_set_gp_value' ........................... -*Synopsis* - void bfd_set_gp_value (bfd *abfd, bfd_vma v); - *Description* -Allow external access to the fucntion to set the GP value. This is -specifically added for gdb-compile support. + -- Function: void bfd_set_gp_value (bfd *abfd, bfd_vma v); + Allow external access to the fucntion to set the GP value. This is + specifically added for gdb-compile support. 2.3.1.11 'bfd_scan_vma' ....................... -*Synopsis* - bfd_vma bfd_scan_vma (const char *string, const char **end, int base); - *Description* -Convert, like 'strtoul', a numerical expression STRING into a 'bfd_vma' -integer, and return that integer. (Though without as many bells and -whistles as 'strtoul'.) The expression is assumed to be unsigned (i.e., -positive). If given a BASE, it is used as the base for conversion. A -base of 0 causes the function to interpret the string in hex if a -leading "0x" or "0X" is found, otherwise in octal if a leading zero is -found, otherwise in decimal. + -- Function: bfd_vma bfd_scan_vma (const char *string, const char + **end, int base); + Convert, like 'strtoul', a numerical expression STRING into a + 'bfd_vma' integer, and return that integer. (Though without as + many bells and whistles as 'strtoul'.) The expression is assumed + to be unsigned (i.e., positive). If given a BASE, it is used as + the base for conversion. A base of 0 causes the function to + interpret the string in hex if a leading "0x" or "0X" is found, + otherwise in octal if a leading zero is found, otherwise in + decimal. - If the value would overflow, the maximum 'bfd_vma' value is returned. + If the value would overflow, the maximum 'bfd_vma' value is + returned. 2.3.1.12 'bfd_copy_private_header_data' ....................................... -*Synopsis* - bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); - *Description* -Copy private BFD header information from the BFD IBFD to the the BFD -OBFD. This copies information that may require sections to exist, but -does not require symbol tables. Return 'true' on success, 'false' on -error. Possible error returns are: + -- Function: bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); + Copy private BFD header information from the BFD IBFD to the the + BFD OBFD. This copies information that may require sections to + exist, but does not require symbol tables. Return 'true' on + success, 'false' on error. Possible error returns are: - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OBFD. - #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OBFD. + #define bfd_copy_private_header_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) 2.3.1.13 'bfd_copy_private_bfd_data' .................................... -*Synopsis* - bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); - *Description* -Copy private BFD information from the BFD IBFD to the the BFD OBFD. -Return 'TRUE' on success, 'FALSE' on error. Possible error returns are: + -- Function: bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); + Copy private BFD information from the BFD IBFD to the the BFD OBFD. + Return 'TRUE' on success, 'FALSE' on error. Possible error returns + are: - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OBFD. - #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OBFD. + #define bfd_copy_private_bfd_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) 2.3.1.14 'bfd_set_private_flags' ................................ -*Synopsis* - bool bfd_set_private_flags (bfd *abfd, flagword flags); - *Description* -Set private BFD flag information in the BFD ABFD. Return 'TRUE' on -success, 'FALSE' on error. Possible error returns are: + -- Function: bool bfd_set_private_flags (bfd *abfd, flagword flags); + Set private BFD flag information in the BFD ABFD. Return 'TRUE' on + success, 'FALSE' on error. Possible error returns are: - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OBFD. - #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OBFD. + #define bfd_set_private_flags(abfd, flags) \ + BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) 2.3.1.15 'Other functions' .......................... -*Description* The following functions exist but have not yet been documented. #define bfd_sizeof_headers(abfd, info) \ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info)) @@ -1394,59 +1134,68 @@ The following functions exist but have not yet been documented. #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) - extern bfd_byte *bfd_get_relocated_section_contents - (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, - bool, asymbol **); +2.3.1.16 'bfd_get_relocated_section_contents' +............................................. + + -- Function: bfd_byte *bfd_get_relocated_section_contents (bfd *, + struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, + bool, asymbol **); + Read and relocate the indirect link_order section, into DATA (if + non-NULL) or to a malloc'd buffer. Return the buffer, or NULL on + errors. + +2.3.1.17 'bfd_record_phdr' +.......................... + + -- Function: bool bfd_record_phdr (bfd *, unsigned long, bool, + flagword, bool, bfd_vma, bool, bool, unsigned int, struct + bfd_section **); + Record information about an ELF program header. + +2.3.1.18 'bfd_sprintf_vma' +.......................... + + -- Function: void bfd_sprintf_vma (bfd *, char *, bfd_vma); void + bfd_fprintf_vma (bfd *, void *, bfd_vma); + bfd_sprintf_vma and bfd_fprintf_vma display an address in the + target's address size. -2.3.1.16 'bfd_alt_mach_code' +2.3.1.19 'bfd_alt_mach_code' ............................ -*Synopsis* - bool bfd_alt_mach_code (bfd *abfd, int alternative); - *Description* -When more than one machine code number is available for the same machine -type, this function can be used to switch between the preferred one -(alternative == 0) and any others. Currently, only ELF supports this -feature, with up to two alternate machine codes. + -- Function: bool bfd_alt_mach_code (bfd *abfd, int alternative); + When more than one machine code number is available for the same + machine type, this function can be used to switch between the + preferred one (alternative == 0) and any others. Currently, only + ELF supports this feature, with up to two alternate machine codes. -2.3.1.17 'bfd_emul_get_maxpagesize' +2.3.1.20 'bfd_emul_get_maxpagesize' ................................... -*Synopsis* - bfd_vma bfd_emul_get_maxpagesize (const char *); - *Description* -Returns the maximum page size, in bytes, as determined by emulation. + -- Function: bfd_vma bfd_emul_get_maxpagesize (const char *); + Returns the maximum page size, in bytes, as determined by + emulation. - *Returns* -Returns the maximum page size in bytes for ELF, 0 otherwise. - -2.3.1.18 'bfd_emul_get_commonpagesize' +2.3.1.21 'bfd_emul_get_commonpagesize' ...................................... -*Synopsis* - bfd_vma bfd_emul_get_commonpagesize (const char *); - *Description* -Returns the common page size, in bytes, as determined by emulation. - - *Returns* -Returns the common page size in bytes for ELF, 0 otherwise. + -- Function: bfd_vma bfd_emul_get_commonpagesize (const char *); + Returns the common page size, in bytes, as determined by emulation. -2.3.1.19 'bfd_demangle' +2.3.1.22 'bfd_demangle' ....................... -*Synopsis* - char *bfd_demangle (bfd *, const char *, int); - *Description* -Wrapper around cplus_demangle. Strips leading underscores and other -such chars that would otherwise confuse the demangler. If passed a g++ -v3 ABI mangled name, returns a buffer allocated with malloc holding the -demangled name. Returns NULL otherwise and on memory alloc failure. + -- Function: char *bfd_demangle (bfd *, const char *, int); + Wrapper around cplus_demangle. Strips leading underscores and + other such chars that would otherwise confuse the demangler. If + passed a g++ v3 ABI mangled name, returns a buffer allocated with + malloc holding the demangled name. Returns NULL otherwise and on + memory alloc failure. -2.3.1.20 'struct bfd_iovec' +2.3.1.23 'struct bfd_iovec' ........................... -*Description* The 'struct bfd_iovec' contains the internal file I/O class. Each 'BFD' has an instance of this class and all file I/O is routed through it (it is assumed that the instance implements all methods listed below). @@ -1482,68 +1231,119 @@ is assumed that the instance implements all methods listed below). }; extern const struct bfd_iovec _bfd_memory_iovec; -2.3.1.21 'bfd_get_mtime' + +2.3.1.24 'bfd_read' +................... + + -- Function: bfd_size_type bfd_read (void *, bfd_size_type, bfd *) + ATTRIBUTE_WARN_UNUSED_RESULT; + Attempt to read SIZE bytes from ABFD's iostream to PTR. Return the + amount read. + +2.3.1.25 'bfd_write' +.................... + + -- Function: bfd_size_type bfd_write (const void *, bfd_size_type, bfd + *) ATTRIBUTE_WARN_UNUSED_RESULT; + Attempt to write SIZE bytes to ABFD's iostream from PTR. Return the + amount written. + +2.3.1.26 'bfd_tell' +................... + + -- Function: file_ptr bfd_tell (bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; + Return ABFD's iostream file position. + +2.3.1.27 'bfd_flush' +.................... + + -- Function: int bfd_flush (bfd *); + Flush ABFD's iostream pending IO. + +2.3.1.28 'bfd_stat' +................... + + -- Function: int bfd_stat (bfd *, struct stat *) + ATTRIBUTE_WARN_UNUSED_RESULT; + Call fstat on ABFD's iostream. Return 0 on success, and a negative + value on failure. + +2.3.1.29 'bfd_seek' +................... + + -- Function: int bfd_seek (bfd *, file_ptr, int) + ATTRIBUTE_WARN_UNUSED_RESULT; + Call fseek on ABFD's iostream. Return 0 on success, and a negative + value on failure. + +2.3.1.30 'bfd_get_mtime' ........................ -*Synopsis* - long bfd_get_mtime (bfd *abfd); - *Description* -Return the file modification time (as read from the file system, or from -the archive header for archive members). + -- Function: long bfd_get_mtime (bfd *abfd); + Return the file modification time (as read from the file system, or + from the archive header for archive members). -2.3.1.22 'bfd_get_size' +2.3.1.31 'bfd_get_size' ....................... -*Synopsis* - ufile_ptr bfd_get_size (bfd *abfd); - *Description* -Return the file size (as read from file system) for the file associated -with BFD ABFD. - - The initial motivation for, and use of, this routine is not so we can -get the exact size of the object the BFD applies to, since that might -not be generally possible (archive members for example). It would be -ideal if someone could eventually modify it so that such results were -guaranteed. - - Instead, we want to ask questions like "is this NNN byte sized object -I'm about to try read from file offset YYY reasonable?" As as example -of where we might do this, some object formats use string tables for -which the first 'sizeof (long)' bytes of the table contain the size of -the table itself, including the size bytes. If an application tries to -read what it thinks is one of these string tables, without some way to -validate the size, and for some reason the size is wrong (byte swapping -error, wrong location for the string table, etc.), the only clue is -likely to be a read error when it tries to read the table, or a "virtual -memory exhausted" error when it tries to allocate 15 bazillon bytes of -space for the 15 bazillon byte table it is about to read. This function -at least allows us to answer the question, "is the size reasonable?". - - A return value of zero indicates the file size is unknown. - -2.3.1.23 'bfd_get_file_size' + -- Function: ufile_ptr bfd_get_size (bfd *abfd); + Return the file size (as read from file system) for the file + associated with BFD ABFD. + + The initial motivation for, and use of, this routine is not so we + can get the exact size of the object the BFD applies to, since that + might not be generally possible (archive members for example). It + would be ideal if someone could eventually modify it so that such + results were guaranteed. + + Instead, we want to ask questions like "is this NNN byte sized + object I'm about to try read from file offset YYY reasonable?" As + as example of where we might do this, some object formats use + string tables for which the first 'sizeof (long)' bytes of the + table contain the size of the table itself, including the size + bytes. If an application tries to read what it thinks is one of + these string tables, without some way to validate the size, and for + some reason the size is wrong (byte swapping error, wrong location + for the string table, etc.), the only clue is likely to be a read + error when it tries to read the table, or a "virtual memory + exhausted" error when it tries to allocate 15 bazillon bytes of + space for the 15 bazillon byte table it is about to read. This + function at least allows us to answer the question, "is the size + reasonable?". + + A return value of zero indicates the file size is unknown. + +2.3.1.32 'bfd_get_file_size' ............................ -*Synopsis* - ufile_ptr bfd_get_file_size (bfd *abfd); - *Description* -Return the file size (as read from file system) for the file associated -with BFD ABFD. It supports both normal files and archive elements. + -- Function: ufile_ptr bfd_get_file_size (bfd *abfd); + Return the file size (as read from file system) for the file + associated with BFD ABFD. It supports both normal files and + archive elements. -2.3.1.24 'bfd_mmap' +2.3.1.33 'bfd_mmap' ................... -*Synopsis* - void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, - int prot, int flags, file_ptr offset, - void **map_addr, bfd_size_type *map_len); - *Description* -Return mmap()ed region of the file, if possible and implemented. LEN -and OFFSET do not need to be page aligned. The page aligned address and -length are written to MAP_ADDR and MAP_LEN. + -- Function: void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset, void **map_addr, + bfd_size_type *map_len) ATTRIBUTE_WARN_UNUSED_RESULT; + Return mmap()ed region of the file, if possible and implemented. + LEN and OFFSET do not need to be page aligned. The page aligned + address and length are written to MAP_ADDR and MAP_LEN. + +2.3.1.34 'bfd_get_current_time' +............................... + + -- Function: time_t bfd_get_current_time (time_t now); + Returns the current time. + + If the environment variable SOURCE_DATE_EPOCH is defined then this + is parsed and its value is returned. Otherwise if the paramter NOW + is non-zero, then that is returned. Otherwise the result of the + system call "time(NULL)" is returned.  -File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: Miscellaneous, Up: BFD front end +File: bfd.info, Node: Memory Usage, Next: Sections, Prev: Miscellaneous, Up: BFD front end 2.4 Memory Usage ================ @@ -1569,34 +1369,9 @@ operation and reopen the BFD again, to get a fresh copy of the data structures.  -File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end - -2.5 Initialization -================== - -2.5.1 Initialization functions ------------------------------- - -These are the functions that handle initializing a BFD. - -2.5.1.1 'bfd_init' -.................. - -*Synopsis* - unsigned int bfd_init (void); - *Description* -This routine must be called before any other BFD function to initialize -magical internal data structures. Returns a magic number, which may be -used to check that the bfd library is configured as expected by users. - - /* Value returned by bfd_init. */ - - #define BFD_INIT_MAGIC (sizeof (struct bfd_section)) - - -File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end +File: bfd.info, Node: Sections, Next: Symbols, Prev: Memory Usage, Up: BFD front end -2.6 Sections +2.5 Sections ============ The raw data contained within a BFD is maintained through the section @@ -1616,7 +1391,7 @@ the list.  File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections -2.6.1 Section input +2.5.1 Section input ------------------- When a BFD is opened for reading, the section structures are created and @@ -1645,7 +1420,7 @@ to determine the size of the data.  File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections -2.6.2 Section output +2.5.2 Section output -------------------- To write a new object style BFD, the various sections to be written have @@ -1682,7 +1457,7 @@ look like: size 0x103 | output_section --------| -2.6.3 Link orders +2.5.3 Link orders ----------------- The data within a section is stored in a "link_order". These are much @@ -1703,12 +1478,11 @@ so it does it on a link_order by link_order basis.  File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections -2.6.4 typedef asection +2.5.4 typedef asection ---------------------- Here is the section structure: - typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1910,6 +1684,9 @@ Here is the section structure: TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section has the SHF_X86_64_LARGE flag. This is ELF x86-64 only. */ + #define SEC_ELF_LARGE 0x10000000 + /* Conditionally link this section; do not link if there are no references found to any symbol in the section. This is for TI TMS320C54X only. */ @@ -2057,7 +1834,7 @@ Here is the section structure: /* If the SEC_IN_MEMORY flag is set, this points to the actual contents. */ - unsigned char *contents; + bfd_byte *contents; /* Attached line number information. */ alent *lineno; @@ -2113,530 +1890,303 @@ Here is the section structure: } asection; - static inline const char * - bfd_section_name (const asection *sec) - { - return sec->name; - } - - static inline bfd_size_type - bfd_section_size (const asection *sec) - { - return sec->size; - } - - static inline bfd_vma - bfd_section_vma (const asection *sec) - { - return sec->vma; - } - - static inline bfd_vma - bfd_section_lma (const asection *sec) - { - return sec->lma; - } - - static inline unsigned int - bfd_section_alignment (const asection *sec) - { - return sec->alignment_power; - } - - static inline flagword - bfd_section_flags (const asection *sec) - { - return sec->flags; - } - - static inline void * - bfd_section_userdata (const asection *sec) - { - return sec->userdata; - } - static inline bool - bfd_is_com_section (const asection *sec) - { - return (sec->flags & SEC_IS_COMMON) != 0; - } - - /* Note: the following are provided as inline functions rather than macros - 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 bool - bfd_set_section_userdata (asection *sec, void *val) - { - sec->userdata = val; - return true; - } - - static inline bool - bfd_set_section_vma (asection *sec, bfd_vma val) - { - sec->vma = sec->lma = val; - sec->user_set_vma = true; - return true; - } - - static inline bool - bfd_set_section_lma (asection *sec, bfd_vma val) - { - sec->lma = val; - return true; - } - - static inline bool - bfd_set_section_alignment (asection *sec, unsigned int val) - { - if (val >= sizeof (bfd_vma) * 8 - 1) - return false; - sec->alignment_power = val; - return true; - } - - /* These sections are global, and are managed by BFD. The application - and target back end are not permitted to change the values in - these sections. */ - extern asection _bfd_std_section[4]; - - #define BFD_ABS_SECTION_NAME "*ABS*" - #define BFD_UND_SECTION_NAME "*UND*" - #define BFD_COM_SECTION_NAME "*COM*" - #define BFD_IND_SECTION_NAME "*IND*" - - /* Pointer to the common section. */ - #define bfd_com_section_ptr (&_bfd_std_section[0]) - /* Pointer to the undefined section. */ - #define bfd_und_section_ptr (&_bfd_std_section[1]) - /* Pointer to the absolute section. */ - #define bfd_abs_section_ptr (&_bfd_std_section[2]) - /* Pointer to the indirect section. */ - #define bfd_ind_section_ptr (&_bfd_std_section[3]) - - static inline bool - bfd_is_und_section (const asection *sec) - { - return sec == bfd_und_section_ptr; - } - - static inline bool - bfd_is_abs_section (const asection *sec) - { - return sec == bfd_abs_section_ptr; - } - - static inline bool - bfd_is_ind_section (const asection *sec) - { - return sec == bfd_ind_section_ptr; - } - - static inline bool - bfd_is_const_section (const asection *sec) - { - return (sec >= _bfd_std_section - && sec < _bfd_std_section + (sizeof (_bfd_std_section) - / sizeof (_bfd_std_section[0]))); - } - - /* Return TRUE if input section SEC has been discarded. */ - static inline bool - discarded_section (const asection *sec) - { - return (!bfd_is_abs_section (sec) - && bfd_is_abs_section (sec->output_section) - && sec->sec_info_type != SEC_INFO_TYPE_MERGE - && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS); - } - - #define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \ - /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \ - { NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \ - \ - /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ - 0, 0, 1, 0, \ - \ - /* segment_mark, sec_info_type, use_rela_p, */ \ - 0, 0, 0, \ - \ - /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \ - 0, 0, 0, 0, 0, 0, \ - \ - /* vma, lma, size, rawsize, compressed_size, */ \ - 0, 0, 0, 0, 0, \ - \ - /* output_offset, output_section, relocation, orelocation, */ \ - 0, &SEC, NULL, NULL, \ - \ - /* reloc_count, alignment_power, filepos, rel_filepos, */ \ - 0, 0, 0, 0, \ - \ - /* line_filepos, userdata, contents, lineno, lineno_count, */ \ - 0, NULL, NULL, NULL, 0, \ - \ - /* entsize, kept_section, moving_line_filepos, */ \ - 0, NULL, 0, \ - \ - /* target_index, used_by_bfd, constructor_chain, owner, */ \ - 0, NULL, NULL, NULL, \ - \ - /* symbol, symbol_ptr_ptr, */ \ - (struct bfd_symbol *) SYM, &SEC.symbol, \ - \ - /* map_head, map_tail, already_assigned, type */ \ - { NULL }, { NULL }, NULL, 0 \ - \ - } - - /* We use a macro to initialize the static asymbol structures because - traditional C does not permit us to initialize a union member while - gcc warns if we don't initialize it. - the_bfd, name, value, attr, section [, udata] */ - #ifdef __STDC__ - #define GLOBAL_SYM_INIT(NAME, SECTION) \ - { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }} - #else - #define GLOBAL_SYM_INIT(NAME, SECTION) \ - { 0, NAME, 0, BSF_SECTION_SYM, SECTION } - #endif -  File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections -2.6.5 Section prototypes +2.5.5 Section prototypes ------------------------ These are the functions exported by the section handling part of BFD. -2.6.5.1 'bfd_section_list_clear' +2.5.5.1 'bfd_section_list_clear' ................................ -*Synopsis* - void bfd_section_list_clear (bfd *); - *Description* -Clears the section list, and also resets the section count and hash -table entries. + -- Function: void bfd_section_list_clear (bfd *); + Clears the section list, and also resets the section count and hash + table entries. -2.6.5.2 'bfd_get_section_by_name' +2.5.5.2 'bfd_get_section_by_name' ................................. -*Synopsis* - asection *bfd_get_section_by_name (bfd *abfd, const char *name); - *Description* -Return the most recently created section attached to ABFD named NAME. -Return NULL if no such section exists. + -- Function: asection *bfd_get_section_by_name (bfd *abfd, const char + *name); + Return the most recently created section attached to ABFD named + NAME. Return NULL if no such section exists. -2.6.5.3 'bfd_get_next_section_by_name' +2.5.5.3 'bfd_get_next_section_by_name' ...................................... -*Synopsis* - asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); - *Description* -Given SEC is a section returned by 'bfd_get_section_by_name', return the -next most recently created section attached to the same BFD with the -same name, or if no such section exists in the same BFD and IBFD is -non-NULL, the next section with the same name in any input BFD following -IBFD. Return NULL on finding no section. + -- Function: asection *bfd_get_next_section_by_name (bfd *ibfd, + asection *sec); + Given SEC is a section returned by 'bfd_get_section_by_name', + return the next most recently created section attached to the same + BFD with the same name, or if no such section exists in the same + BFD and IBFD is non-NULL, the next section with the same name in + any input BFD following IBFD. Return NULL on finding no section. -2.6.5.4 'bfd_get_linker_section' +2.5.5.4 'bfd_get_linker_section' ................................ -*Synopsis* - asection *bfd_get_linker_section (bfd *abfd, const char *name); - *Description* -Return the linker created section attached to ABFD named NAME. Return -NULL if no such section exists. + -- Function: asection *bfd_get_linker_section (bfd *abfd, const char + *name); + Return the linker created section attached to ABFD named NAME. + Return NULL if no such section exists. -2.6.5.5 'bfd_get_section_by_name_if' +2.5.5.5 'bfd_get_section_by_name_if' .................................... -*Synopsis* - asection *bfd_get_section_by_name_if - (bfd *abfd, - const char *name, - bool (*func) (bfd *abfd, asection *sect, void *obj), - void *obj); - *Description* -Call the provided function FUNC for each section attached to the BFD -ABFD whose name matches NAME, passing OBJ as an argument. The function -will be called as if by + -- Function: asection *bfd_get_section_by_name_if (bfd *abfd, const + char *name, bool (*func) (bfd *abfd, asection *sect, void + *obj), void *obj); + Call the provided function FUNC for each section attached to the + BFD ABFD whose name matches NAME, passing OBJ as an argument. The + function will be called as if by - func (abfd, the_section, obj); + func (abfd, the_section, obj); - It returns the first section for which FUNC returns true, otherwise -'NULL'. + It returns the first section for which FUNC returns true, otherwise + 'NULL'. -2.6.5.6 'bfd_get_unique_section_name' +2.5.5.6 'bfd_get_unique_section_name' ..................................... -*Synopsis* - char *bfd_get_unique_section_name - (bfd *abfd, const char *templat, int *count); - *Description* -Invent a section name that is unique in ABFD by tacking a dot and a -digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then it -specifies the first number tried as a suffix to generate a unique name. -The value pointed to by COUNT will be incremented in this case. + -- Function: char *bfd_get_unique_section_name (bfd *abfd, const char + *templat, int *count); + Invent a section name that is unique in ABFD by tacking a dot and a + digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then + it specifies the first number tried as a suffix to generate a + unique name. The value pointed to by COUNT will be incremented in + this case. -2.6.5.7 'bfd_make_section_old_way' +2.5.5.7 'bfd_make_section_old_way' .................................. -*Synopsis* - asection *bfd_make_section_old_way (bfd *abfd, const char *name); - *Description* -Create a new empty section called NAME and attach it to the end of the -chain of sections for the BFD ABFD. An attempt to create a section with -a name which is already in use returns its pointer without changing the -section chain. + -- Function: asection *bfd_make_section_old_way (bfd *abfd, const char + *name); + Create a new empty section called NAME and attach it to the end of + the chain of sections for the BFD ABFD. An attempt to create a + section with a name which is already in use returns its pointer + without changing the section chain. - It has the funny name since this is the way it used to be before it -was rewritten.... + It has the funny name since this is the way it used to be before it + was rewritten.... - Possible errors are: + Possible errors are: - * 'bfd_error_invalid_operation' - If output has already started for - this BFD. - * 'bfd_error_no_memory' - If memory allocation fails. + * 'bfd_error_invalid_operation' - If output has already started + for this BFD. + * 'bfd_error_no_memory' - If memory allocation fails. -2.6.5.8 'bfd_make_section_anyway_with_flags' +2.5.5.8 'bfd_make_section_anyway_with_flags' ............................................ -*Synopsis* - asection *bfd_make_section_anyway_with_flags - (bfd *abfd, const char *name, flagword flags); - *Description* -Create a new empty section called NAME and attach it to the end of the -chain of sections for ABFD. Create a new section even if there is -already a section with that name. Also set the attributes of the new -section to the value FLAGS. + -- Function: asection *bfd_make_section_anyway_with_flags (bfd *abfd, + const char *name, flagword flags); + Create a new empty section called NAME and attach it to the end of + the chain of sections for ABFD. Create a new section even if there + is already a section with that name. Also set the attributes of + the new section to the value FLAGS. - Return 'NULL' and set 'bfd_error' on error; possible errors are: + Return 'NULL' and set 'bfd_error' on error; possible errors are: - * 'bfd_error_invalid_operation' - If output has already started for - ABFD. - * 'bfd_error_no_memory' - If memory allocation fails. + * 'bfd_error_invalid_operation' - If output has already started + for ABFD. + * 'bfd_error_no_memory' - If memory allocation fails. -2.6.5.9 'bfd_make_section_anyway' +2.5.5.9 'bfd_make_section_anyway' ................................. -*Synopsis* - asection *bfd_make_section_anyway (bfd *abfd, const char *name); - *Description* -Create a new empty section called NAME and attach it to the end of the -chain of sections for ABFD. Create a new section even if there is -already a section with that name. + -- Function: asection *bfd_make_section_anyway (bfd *abfd, const char + *name); + Create a new empty section called NAME and attach it to the end of + the chain of sections for ABFD. Create a new section even if there + is already a section with that name. - Return 'NULL' and set 'bfd_error' on error; possible errors are: + Return 'NULL' and set 'bfd_error' on error; possible errors are: - * 'bfd_error_invalid_operation' - If output has already started for - ABFD. - * 'bfd_error_no_memory' - If memory allocation fails. + * 'bfd_error_invalid_operation' - If output has already started + for ABFD. + * 'bfd_error_no_memory' - If memory allocation fails. -2.6.5.10 'bfd_make_section_with_flags' +2.5.5.10 'bfd_make_section_with_flags' ...................................... -*Synopsis* - asection *bfd_make_section_with_flags - (bfd *, const char *name, flagword flags); - *Description* -Like 'bfd_make_section_anyway', but return 'NULL' (without calling -bfd_set_error ()) without changing the section chain if there is already -a section named NAME. Also set the attributes of the new section to the -value FLAGS. If there is an error, return 'NULL' and set 'bfd_error'. + -- Function: asection *bfd_make_section_with_flags (bfd *, const char + *name, flagword flags); + Like 'bfd_make_section_anyway', but return 'NULL' (without calling + bfd_set_error ()) without changing the section chain if there is + already a section named NAME. Also set the attributes of the new + section to the value FLAGS. If there is an error, return 'NULL' + and set 'bfd_error'. -2.6.5.11 'bfd_make_section' +2.5.5.11 'bfd_make_section' ........................... -*Synopsis* - asection *bfd_make_section (bfd *, const char *name); - *Description* -Like 'bfd_make_section_anyway', but return 'NULL' (without calling -bfd_set_error ()) without changing the section chain if there is already -a section named NAME. If there is an error, return 'NULL' and set -'bfd_error'. + -- Function: asection *bfd_make_section (bfd *, const char *name); + Like 'bfd_make_section_anyway', but return 'NULL' (without calling + bfd_set_error ()) without changing the section chain if there is + already a section named NAME. If there is an error, return 'NULL' + and set 'bfd_error'. -2.6.5.12 'bfd_set_section_flags' +2.5.5.12 'bfd_set_section_flags' ................................ -*Synopsis* - bool bfd_set_section_flags (asection *sec, flagword flags); - *Description* -Set the attributes of the section SEC to the value FLAGS. Return 'TRUE' -on success, 'FALSE' on error. Possible error returns are: + -- Function: bool bfd_set_section_flags (asection *sec, flagword + flags); + Set the attributes of the section SEC to the value FLAGS. Return + 'TRUE' on success, 'FALSE' on error. Possible error returns are: - * 'bfd_error_invalid_operation' - The section cannot have one or more - of the attributes requested. For example, a .bss section in - 'a.out' may not have the 'SEC_HAS_CONTENTS' field set. + * 'bfd_error_invalid_operation' - The section cannot have one or + more of the attributes requested. For example, a .bss section + in 'a.out' may not have the 'SEC_HAS_CONTENTS' field set. -2.6.5.13 'bfd_rename_section' +2.5.5.13 'bfd_rename_section' ............................. -*Synopsis* - void bfd_rename_section - (asection *sec, const char *newname); - *Description* -Rename section SEC to NEWNAME. + -- Function: void bfd_rename_section (asection *sec, const char + *newname); + Rename section SEC to NEWNAME. -2.6.5.14 'bfd_map_over_sections' +2.5.5.14 'bfd_map_over_sections' ................................ -*Synopsis* - void bfd_map_over_sections - (bfd *abfd, - void (*func) (bfd *abfd, asection *sect, void *obj), - void *obj); - *Description* -Call the provided function FUNC for each section attached to the BFD -ABFD, passing OBJ as an argument. The function will be called as if by + -- Function: void bfd_map_over_sections (bfd *abfd, void (*func) (bfd + *abfd, asection *sect, void *obj), void *obj); + Call the provided function FUNC for each section attached to the + BFD ABFD, passing OBJ as an argument. The function will be called + as if by - func (abfd, the_section, obj); + func (abfd, the_section, obj); - This is the preferred method for iterating over sections; an -alternative would be to use a loop: + This is the preferred method for iterating over sections; an + alternative would be to use a loop: - asection *p; - for (p = abfd->sections; p != NULL; p = p->next) - func (abfd, p, ...) + asection *p; + for (p = abfd->sections; p != NULL; p = p->next) + func (abfd, p, ...) -2.6.5.15 'bfd_sections_find_if' +2.5.5.15 'bfd_sections_find_if' ............................... -*Synopsis* - asection *bfd_sections_find_if - (bfd *abfd, - bool (*operation) (bfd *abfd, asection *sect, void *obj), - void *obj); - *Description* -Call the provided function OPERATION for each section attached to the -BFD ABFD, passing OBJ as an argument. The function will be called as if -by + -- Function: asection *bfd_sections_find_if (bfd *abfd, bool + (*operation) (bfd *abfd, asection *sect, void *obj), void + *obj); + Call the provided function OPERATION for each section attached to + the BFD ABFD, passing OBJ as an argument. The function will be + called as if by - operation (abfd, the_section, obj); + operation (abfd, the_section, obj); - It returns the first section for which OPERATION returns true. + It returns the first section for which OPERATION returns true. -2.6.5.16 'bfd_set_section_size' +2.5.5.16 'bfd_set_section_size' ............................... -*Synopsis* - bool bfd_set_section_size (asection *sec, bfd_size_type val); - *Description* -Set SEC to the size VAL. If the operation is ok, then 'TRUE' is -returned, else 'FALSE'. + -- Function: bool bfd_set_section_size (asection *sec, bfd_size_type + val); + Set SEC to the size VAL. If the operation is ok, then 'TRUE' is + returned, else 'FALSE'. - Possible error returns: + Possible error returns: - * 'bfd_error_invalid_operation' - Writing has started to the BFD, so - setting the size is invalid. + * 'bfd_error_invalid_operation' - Writing has started to the + BFD, so setting the size is invalid. -2.6.5.17 'bfd_set_section_contents' +2.5.5.17 'bfd_set_section_contents' ................................... -*Synopsis* - bool bfd_set_section_contents - (bfd *abfd, asection *section, const void *data, - file_ptr offset, bfd_size_type count); - *Description* -Sets the contents of the section SECTION in BFD ABFD to the data -starting in memory at LOCATION. The data is written to the output -section starting at offset OFFSET for COUNT octets. - - Normally 'TRUE' is returned, but 'FALSE' is returned if there was an -error. Possible error returns are: - - * 'bfd_error_no_contents' - The output section does not have the - 'SEC_HAS_CONTENTS' attribute, so nothing can be written to it. - * 'bfd_error_bad_value' - The section is unable to contain all of the - data. - * 'bfd_error_invalid_operation' - The BFD is not writeable. - * and some more too. - This routine is front end to the back end function -'_bfd_set_section_contents'. - -2.6.5.18 'bfd_get_section_contents' + -- Function: bool bfd_set_section_contents (bfd *abfd, asection + *section, const void *data, file_ptr offset, bfd_size_type + count); + Sets the contents of the section SECTION in BFD ABFD to the data + starting in memory at LOCATION. The data is written to the output + section starting at offset OFFSET for COUNT octets. + + Normally 'TRUE' is returned, but 'FALSE' is returned if there was + an error. Possible error returns are: + + * 'bfd_error_no_contents' - The output section does not have the + 'SEC_HAS_CONTENTS' attribute, so nothing can be written to it. + * 'bfd_error_bad_value' - The section is unable to contain all + of the data. + * 'bfd_error_invalid_operation' - The BFD is not writeable. + * and some more too. + This routine is front end to the back end function + '_bfd_set_section_contents'. + +2.5.5.18 'bfd_get_section_contents' ................................... -*Synopsis* - bool bfd_get_section_contents - (bfd *abfd, asection *section, void *location, file_ptr offset, - bfd_size_type count); - *Description* -Read data from SECTION in BFD ABFD into memory starting at LOCATION. -The data is read at an offset of OFFSET from the start of the input -section, and is read for COUNT bytes. - - If the contents of a constructor with the 'SEC_CONSTRUCTOR' flag set -are requested or if the section does not have the 'SEC_HAS_CONTENTS' -flag set, then the LOCATION is filled with zeroes. If no errors occur, -'TRUE' is returned, else 'FALSE'. - -2.6.5.19 'bfd_malloc_and_get_section' + -- Function: bool bfd_get_section_contents (bfd *abfd, asection + *section, void *location, file_ptr offset, bfd_size_type + count); + Read data from SECTION in BFD ABFD into memory starting at + LOCATION. The data is read at an offset of OFFSET from the start + of the input section, and is read for COUNT bytes. + + If the contents of a constructor with the 'SEC_CONSTRUCTOR' flag + set are requested or if the section does not have the + 'SEC_HAS_CONTENTS' flag set, then the LOCATION is filled with + zeroes. If no errors occur, 'TRUE' is returned, else 'FALSE'. + +2.5.5.19 'bfd_malloc_and_get_section' ..................................... -*Synopsis* - bool bfd_malloc_and_get_section - (bfd *abfd, asection *section, bfd_byte **buf); - *Description* -Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by -this function. + -- Function: bool bfd_malloc_and_get_section (bfd *abfd, asection + *section, bfd_byte **buf); + Read all data from SECTION in BFD ABFD into a buffer, *BUF, + malloc'd by this function. Return 'true' on success, 'false' on + failure in which case *BUF will be NULL. -2.6.5.20 'bfd_copy_private_section_data' +2.5.5.20 'bfd_copy_private_section_data' ........................................ -*Synopsis* - bool bfd_copy_private_section_data - (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); - *Description* -Copy private section information from ISEC in the BFD IBFD to the -section OSEC in the BFD OBFD. Return 'TRUE' on success, 'FALSE' on -error. Possible error returns are: - - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OSEC. - #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) - -2.6.5.21 'bfd_generic_is_group_section' + -- Function: bool bfd_copy_private_section_data (bfd *ibfd, asection + *isec, bfd *obfd, asection *osec); + Copy private section information from ISEC in the BFD IBFD to the + section OSEC in the BFD OBFD. Return 'TRUE' on success, 'FALSE' on + error. Possible error returns are: + + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OSEC. + #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) + +2.5.5.21 'bfd_generic_is_group_section' ....................................... -*Synopsis* - bool bfd_generic_is_group_section (bfd *, const asection *sec); - *Description* -Returns TRUE if SEC is a member of a group. + -- Function: bool bfd_generic_is_group_section (bfd *, const asection + *sec); + Returns TRUE if SEC is a member of a group. -2.6.5.22 'bfd_generic_group_name' +2.5.5.22 'bfd_generic_group_name' ................................. -*Synopsis* - const char *bfd_generic_group_name (bfd *, const asection *sec); - *Description* -Returns group name if SEC is a member of a group. + -- Function: const char *bfd_generic_group_name (bfd *, const asection + *sec); + Returns group name if SEC is a member of a group. -2.6.5.23 'bfd_generic_discard_group' +2.5.5.23 'bfd_generic_discard_group' .................................... -*Synopsis* - bool bfd_generic_discard_group (bfd *abfd, asection *group); - *Description* -Remove all members of GROUP from the output. + -- Function: bool bfd_generic_discard_group (bfd *abfd, asection + *group); + Remove all members of GROUP from the output. -2.6.5.24 '_bfd_section_size_insane' +2.5.5.24 '_bfd_section_size_insane' ................................... -*Synopsis* - bool _bfd_section_size_insane (bfd *abfd, asection *sec); - *Description* -Returns true if the given section has a size that indicates it cannot be -read from file. Return false if the size is OK or* this function can't -say one way or the other. + -- Function: bool _bfd_section_size_insane (bfd *abfd, asection *sec); + Returns true if the given section has a size that indicates it + cannot be read from file. Return false if the size is OK or* this + function can't say one way or the other.  File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end -2.7 Symbols +2.6 Symbols =========== BFD tries to maintain as much symbol information as it can when it moves @@ -2670,7 +2220,7 @@ scenes" information will be still available.  File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols -2.7.1 Reading symbols +2.6.1 Reading symbols --------------------- There are two stages to reading a symbol table from a BFD: allocating @@ -2707,7 +2257,7 @@ the BFD; it is freed when the BFD is closed.  File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols -2.7.2 Writing symbols +2.6.2 Writing symbols --------------------- Writing of a symbol table is automatic when a BFD open for writing is @@ -2755,7 +2305,7 @@ of sections. A symbol pointing to a section which is not one of  File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols -2.7.3 Mini Symbols +2.6.3 Mini Symbols ------------------ Mini symbols provide read-only access to the symbol table. They use @@ -2778,12 +2328,11 @@ value may or may not be the same as the value from  File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols -2.7.4 typedef asymbol +2.6.4 typedef asymbol --------------------- An 'asymbol' has the form: - typedef struct bfd_symbol { /* A pointer to the BFD which owns the symbol. This information @@ -2934,13 +2483,12 @@ An 'asymbol' has the form:  File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols -2.7.5 Symbol handling functions +2.6.5 Symbol handling functions ------------------------------- -2.7.5.1 'bfd_get_symtab_upper_bound' +2.6.5.1 'bfd_get_symtab_upper_bound' .................................... -*Description* Return the number of bytes required to store a vector of pointers to 'asymbols' for all the symbols in the BFD ABFD, including a terminal NULL pointer. If there are no symbols in the BFD, then return 0. If an @@ -2949,45 +2497,40 @@ error occurs, return -1. BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) -2.7.5.2 'bfd_is_local_label' +2.6.5.2 'bfd_is_local_label' ............................ -*Synopsis* - bool bfd_is_local_label (bfd *abfd, asymbol *sym); - *Description* -Return TRUE if the given symbol SYM in the BFD ABFD is a compiler -generated local label, else return FALSE. + -- Function: bool bfd_is_local_label (bfd *abfd, asymbol *sym); + Return TRUE if the given symbol SYM in the BFD ABFD is a compiler + generated local label, else return FALSE. -2.7.5.3 'bfd_is_local_label_name' +2.6.5.3 'bfd_is_local_label_name' ................................. -*Synopsis* - bool bfd_is_local_label_name (bfd *abfd, const char *name); - *Description* -Return TRUE if a symbol with the name NAME in the BFD ABFD is a compiler -generated local label, else return FALSE. This just checks whether the -name has the form of a local label. - #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + -- Function: bool bfd_is_local_label_name (bfd *abfd, const char + *name); + Return TRUE if a symbol with the name NAME in the BFD ABFD is a + compiler generated local label, else return FALSE. This just checks + whether the name has the form of a local label. + #define bfd_is_local_label_name(abfd, name) \ + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) -2.7.5.4 'bfd_is_target_special_symbol' +2.6.5.4 'bfd_is_target_special_symbol' ...................................... -*Synopsis* - bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); - *Description* -Return TRUE iff a symbol SYM in the BFD ABFD is something special to the -particular target represented by the BFD. Such symbols should normally -not be mentioned to the user. - #define bfd_is_target_special_symbol(abfd, sym) \ - BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) + -- Function: bool bfd_is_target_special_symbol (bfd *abfd, asymbol + *sym); + Return TRUE iff a symbol SYM in the BFD ABFD is something special + to the particular target represented by the BFD. Such symbols + should normally not be mentioned to the user. + #define bfd_is_target_special_symbol(abfd, sym) \ + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) -2.7.5.5 'bfd_canonicalize_symtab' +2.6.5.5 'bfd_canonicalize_symtab' ................................. -*Description* Read the symbols from the BFD ABFD, and fills in the vector LOCATION with pointers to the symbols and a trailing NULL. Return the actual number of symbol pointers, not including the NULL. @@ -2995,28 +2538,25 @@ number of symbol pointers, not including the NULL. BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) -2.7.5.6 'bfd_set_symtab' +2.6.5.6 'bfd_set_symtab' ........................ -*Synopsis* - bool bfd_set_symtab - (bfd *abfd, asymbol **location, unsigned int count); - *Description* -Arrange that when the output BFD ABFD is closed, the table LOCATION of -COUNT pointers to symbols will be written. + -- Function: bool bfd_set_symtab (bfd *abfd, asymbol **location, + unsigned int count); + Arrange that when the output BFD ABFD is closed, the table LOCATION + of COUNT pointers to symbols will be written. -2.7.5.7 'bfd_print_symbol_vandf' +2.6.5.7 'bfd_print_symbol_vandf' ................................ -*Synopsis* - void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); - *Description* -Print the value and flags of the SYMBOL supplied to the stream FILE. + -- Function: void bfd_print_symbol_vandf (bfd *abfd, void *file, + asymbol *symbol); + Print the value and flags of the SYMBOL supplied to the stream + FILE. -2.7.5.8 'bfd_make_empty_symbol' +2.6.5.8 'bfd_make_empty_symbol' ............................... -*Description* Create a new 'asymbol' structure for the BFD ABFD and return a pointer to it. @@ -3028,81 +2568,67 @@ problems later on. BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) -2.7.5.9 '_bfd_generic_make_empty_symbol' +2.6.5.9 '_bfd_generic_make_empty_symbol' ........................................ -*Synopsis* - asymbol *_bfd_generic_make_empty_symbol (bfd *); - *Description* -Create a new 'asymbol' structure for the BFD ABFD and return a pointer -to it. Used by core file routines, binary back-end and anywhere else -where no private info is needed. + -- Function: asymbol *_bfd_generic_make_empty_symbol (bfd *); + Create a new 'asymbol' structure for the BFD ABFD and return a + pointer to it. Used by core file routines, binary back-end and + anywhere else where no private info is needed. -2.7.5.10 'bfd_make_debug_symbol' +2.6.5.10 'bfd_make_debug_symbol' ................................ -*Description* Create a new 'asymbol' structure for the BFD ABFD, to be used as a -debugging symbol. Further details of its use have yet to be worked out. - #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) +debugging symbol. + #define bfd_make_debug_symbol(abfd) \ + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd)) -2.7.5.11 'bfd_decode_symclass' +2.6.5.11 'bfd_decode_symclass' .............................. -*Description* -Return a character corresponding to the symbol class of SYMBOL, or '?' -for an unknown class. - - *Synopsis* - int bfd_decode_symclass (asymbol *symbol); + -- Function: int bfd_decode_symclass (asymbol *symbol); + Return a character corresponding to the symbol class of SYMBOL, or + '?' for an unknown class. -2.7.5.12 'bfd_is_undefined_symclass' +2.6.5.12 'bfd_is_undefined_symclass' .................................... -*Description* -Returns non-zero if the class symbol returned by bfd_decode_symclass -represents an undefined symbol. Returns zero otherwise. - - *Synopsis* - bool bfd_is_undefined_symclass (int symclass); + -- Function: bool bfd_is_undefined_symclass (int symclass); + Returns non-zero if the class symbol returned by + bfd_decode_symclass represents an undefined symbol. Returns zero + otherwise. -2.7.5.13 'bfd_symbol_info' +2.6.5.13 'bfd_symbol_info' .......................... -*Description* -Fill in the basic info about symbol that nm needs. Additional info may -be added by the back-ends after calling this function. + -- Function: void bfd_symbol_info (asymbol *symbol, symbol_info *ret); + Fill in the basic info about symbol that nm needs. Additional info + may be added by the back-ends after calling this function. - *Synopsis* - void bfd_symbol_info (asymbol *symbol, symbol_info *ret); - -2.7.5.14 'bfd_copy_private_symbol_data' +2.6.5.14 'bfd_copy_private_symbol_data' ....................................... -*Synopsis* - bool bfd_copy_private_symbol_data - (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); - *Description* -Copy private symbol information from ISYM in the BFD IBFD to the symbol -OSYM in the BFD OBFD. Return 'TRUE' on success, 'FALSE' on error. -Possible error returns are: + -- Function: bool bfd_copy_private_symbol_data (bfd *ibfd, asymbol + *isym, bfd *obfd, asymbol *osym); + Copy private symbol information from ISYM in the BFD IBFD to the + symbol OSYM in the BFD OBFD. Return 'TRUE' on success, 'FALSE' on + error. Possible error returns are: - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OSEC. - #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ - BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ - (ibfd, isymbol, obfd, osymbol)) + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OSEC. + #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol))  File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end -2.8 Archives +2.7 Archives ============ -*Description* An archive (or library) is just another BFD. It has a symbol table, although there's not much a user program will do with it. @@ -3151,52 +2677,49 @@ anyway, so this shouldn't be much of a restriction. Archives are supported in BFD in 'archive.c'. -2.8.1 Archive functions +2.7.1 Archive functions ----------------------- -2.8.1.1 'bfd_get_next_mapent' +2.7.1.1 'bfd_get_next_mapent' ............................. -*Synopsis* - symindex bfd_get_next_mapent - (bfd *abfd, symindex previous, carsym **sym); - *Description* -Step through archive ABFD's symbol table (if it has one). Successively -update SYM with the next symbol's information, returning that symbol's -(internal) index into the symbol table. + -- Function: symindex bfd_get_next_mapent (bfd *abfd, symindex + previous, carsym **sym); + Step through archive ABFD's symbol table (if it has one). + Successively update SYM with the next symbol's information, + returning that symbol's (internal) index into the symbol table. - Supply 'BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first -one; returns 'BFD_NO_MORE_SYMBOLS' when you've already got the last one. + Supply 'BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first + one; returns 'BFD_NO_MORE_SYMBOLS' when you've already got the last + one. - A 'carsym' is a canonical archive symbol. The only user-visible -element is its name, a null-terminated string. + A 'carsym' is a canonical archive symbol. The only user-visible + element is its name, a null-terminated string. -2.8.1.2 'bfd_set_archive_head' +2.7.1.2 'bfd_set_archive_head' .............................. -*Synopsis* - bool bfd_set_archive_head (bfd *output, bfd *new_head); - *Description* -Set the head of the chain of BFDs contained in the archive OUTPUT to -NEW_HEAD. + -- Function: bool bfd_set_archive_head (bfd *output, bfd *new_head); + Set the head of the chain of BFDs contained in the archive OUTPUT + to NEW_HEAD. -2.8.1.3 'bfd_openr_next_archived_file' +2.7.1.3 'bfd_openr_next_archived_file' ...................................... -*Synopsis* - bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); - *Description* -Provided a BFD, ARCHIVE, containing an archive and NULL, open an input -BFD on the first contained element and returns that. Subsequent calls -should pass the archive and the previous return value to return a -created BFD to the next contained element. NULL is returned when there -are no more. Note - if you want to process the bfd returned by this -call be sure to call bfd_check_format() on it first. + -- Function: bfd *bfd_openr_next_archived_file (bfd *archive, bfd + *previous); + Provided a BFD, ARCHIVE, containing an archive and NULL, open an + input BFD on the first contained element and returns that. + Subsequent calls should pass the archive and the previous return + value to return a created BFD to the next contained element. NULL + is returned when there are no more. Note - if you want to process + the bfd returned by this call be sure to call bfd_check_format() on + it first.  File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end -2.9 File formats +2.8 File formats ================ A format is a BFD concept of high level file contents type. The formats @@ -3211,81 +2734,75 @@ supported by BFD are: * 'bfd_core' The BFD contains the result of an executable core dump. -2.9.1 File format functions +2.8.1 File format functions --------------------------- -2.9.1.1 'bfd_check_format' +2.8.1.1 'bfd_check_format' .......................... -*Synopsis* - bool bfd_check_format (bfd *abfd, bfd_format format); - *Description* -Verify if the file attached to the BFD ABFD is compatible with the -format FORMAT (i.e., one of 'bfd_object', 'bfd_archive' or 'bfd_core'). + -- Function: bool bfd_check_format (bfd *abfd, bfd_format format); + Verify if the file attached to the BFD ABFD is compatible with the + format FORMAT (i.e., one of 'bfd_object', 'bfd_archive' or + 'bfd_core'). - If the BFD has been set to a specific target before the call, only -the named target and format combination is checked. If the target has -not been set, or has been set to 'default', then all the known target -backends is interrogated to determine a match. If the default target -matches, it is used. If not, exactly one target must recognize the -file, or an error results. + If the BFD has been set to a specific target before the call, only + the named target and format combination is checked. If the target + has not been set, or has been set to 'default', then all the known + target backends is interrogated to determine a match. If the + default target matches, it is used. If not, exactly one target + must recognize the file, or an error results. - The function returns 'TRUE' on success, otherwise 'FALSE' with one of -the following error codes: + The function returns 'TRUE' on success, otherwise 'FALSE' with one + of the following error codes: - * 'bfd_error_invalid_operation' - if 'format' is not one of - 'bfd_object', 'bfd_archive' or 'bfd_core'. + * 'bfd_error_invalid_operation' - if 'format' is not one of + 'bfd_object', 'bfd_archive' or 'bfd_core'. - * 'bfd_error_system_call' - if an error occured during a read - even - some file mismatches can cause bfd_error_system_calls. + * 'bfd_error_system_call' - if an error occured during a read - + even some file mismatches can cause bfd_error_system_calls. - * 'file_not_recognised' - none of the backends recognised the file - format. + * 'file_not_recognised' - none of the backends recognised the + file format. - * 'bfd_error_file_ambiguously_recognized' - more than one backend - recognised the file format. + * 'bfd_error_file_ambiguously_recognized' - more than one + backend recognised the file format. -2.9.1.2 'bfd_check_format_matches' +2.8.1.2 'bfd_check_format_matches' .................................. -*Synopsis* - bool bfd_check_format_matches - (bfd *abfd, bfd_format format, char ***matching); - *Description* -Like 'bfd_check_format', except when it returns FALSE with 'bfd_errno' -set to 'bfd_error_file_ambiguously_recognized'. In that case, if -MATCHING is not NULL, it will be filled in with a NULL-terminated list -of the names of the formats that matched, allocated with 'malloc'. Then -the user may choose a format and try again. + -- Function: bool bfd_check_format_matches (bfd *abfd, bfd_format + format, char ***matching); + Like 'bfd_check_format', except when it returns FALSE with + 'bfd_errno' set to 'bfd_error_file_ambiguously_recognized'. In + that case, if MATCHING is not NULL, it will be filled in with a + NULL-terminated list of the names of the formats that matched, + allocated with 'malloc'. Then the user may choose a format and try + again. - When done with the list that MATCHING points to, the caller should -free it. + When done with the list that MATCHING points to, the caller should + free it. -2.9.1.3 'bfd_set_format' +2.8.1.3 'bfd_set_format' ........................ -*Synopsis* - bool bfd_set_format (bfd *abfd, bfd_format format); - *Description* -This function sets the file format of the BFD ABFD to the format FORMAT. -If the target set in the BFD does not support the format requested, the -format is invalid, or the BFD is not open for writing, then an error -occurs. + -- Function: bool bfd_set_format (bfd *abfd, bfd_format format); + This function sets the file format of the BFD ABFD to the format + FORMAT. If the target set in the BFD does not support the format + requested, the format is invalid, or the BFD is not open for + writing, then an error occurs. -2.9.1.4 'bfd_format_string' +2.8.1.4 'bfd_format_string' ........................... -*Synopsis* - const char *bfd_format_string (bfd_format format); - *Description* -Return a pointer to a const string 'invalid', 'object', 'archive', -'core', or 'unknown', depending upon the value of FORMAT. + -- Function: const char *bfd_format_string (bfd_format format); + Return a pointer to a const string 'invalid', 'object', 'archive', + 'core', or 'unknown', depending upon the value of FORMAT.  File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end -2.10 Relocations -================ +2.9 Relocations +=============== BFD maintains relocations in much the same way it maintains symbols: they are left alone until required, then read in en-masse and translated @@ -3307,46 +2824,12 @@ and fill in the right bits of the structures.  File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations -2.10.1 typedef arelent ----------------------- +2.9.1 typedef arelent +--------------------- This is the structure of a relocation entry: - - typedef enum bfd_reloc_status - { - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* Target specific meaning. */ - bfd_reloc_other, - - /* The symbol to relocate against was undefined. */ - bfd_reloc_undefined, - - /* The relocation was performed, but may not be ok. If this type is - returned, the error_message argument to bfd_perform_relocation - will be set. */ - bfd_reloc_dangerous - } - bfd_reloc_status_type; - - typedef const struct reloc_howto_struct reloc_howto_type; - - typedef struct reloc_cache_entry + struct reloc_cache_entry { /* A pointer into the canonical table of pointers. */ struct bfd_symbol **sym_ptr_ptr; @@ -3360,11 +2843,9 @@ This is the structure of a relocation entry: /* Pointer to how to perform the required relocation. */ reloc_howto_type *howto; - } - arelent; + }; - *Description* -Here is a description of each of the fields within an 'arelent': + Here is a description of each of the fields within an 'arelent': * 'sym_ptr_ptr' The symbol table pointer points to a pointer to the symbol associated @@ -3476,13 +2957,12 @@ back end would normally have a relocation instruction set and turn relocations into pointers to the correct structure on input - but it would be possible to create each howto field on demand. -2.10.1.1 'enum complain_overflow' -................................. +2.9.1.1 'enum complain_overflow' +................................ Indicates what sort of overflow checking should be done when performing a relocation. - enum complain_overflow { /* Do not complain on overflow. */ @@ -3502,8 +2982,9 @@ a relocation. complain_overflow_unsigned }; -2.10.1.2 'reloc_howto_type' -........................... + +2.9.1.2 'reloc_howto_type' +.......................... The 'reloc_howto_type' is a structure which contains all the information that libbfd needs to know to tie up a back end's data. @@ -3565,6 +3046,11 @@ that libbfd needs to know to tie up a back end's data. empty (e.g., ELF); this flag signals the fact. */ unsigned int pcrel_offset:1; + /* Whether bfd_install_relocation should just install the addend, + or should follow the practice of some older object formats and + install a value including the symbol. */ + unsigned int install_addend:1; + /* src_mask selects the part of the instruction (or data) to be used in the relocation sum. If the target relocations don't have an addend in the reloc, eg. ELF USE_REL, src_mask will normally equal @@ -3591,20 +3077,20 @@ that libbfd needs to know to tie up a back end's data. }; -2.10.1.3 'The HOWTO Macro' -.......................... +2.9.1.3 'The HOWTO Macro' +......................... -*Description* The HOWTO macro fills in a reloc_howto_type (a typedef for const struct reloc_howto_struct). + #define HOWTO_INSTALL_ADDEND 0 #define HOWTO_RSIZE(sz) ((sz) < 0 ? -(sz) : (sz)) #define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ inplace, src_mask, dst_mask, pcrel_off) \ { (unsigned) type, HOWTO_RSIZE (size), bits, right, left, ovf, \ - size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } + size < 0, pcrel, inplace, pcrel_off, HOWTO_INSTALL_ADDEND, \ + src_mask, dst_mask, func, name } - *Description* -This is used to fill in an empty howto entry in an array. + This is used to fill in an empty howto entry in an array. #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 1, 0, false, 0, complain_overflow_dont, NULL, \ NULL, false, 0, 0, false) @@ -3616,10 +3102,9 @@ This is used to fill in an empty howto entry in an array. } -2.10.1.4 'arelent_chain' -........................ +2.9.1.4 'arelent_chain' +....................... -*Description* How relocs are tied together in an 'asection': typedef struct relent_chain { @@ -3629,92 +3114,72 @@ How relocs are tied together in an 'asection': arelent_chain; -2.10.1.5 'bfd_check_overflow' -............................. +2.9.1.5 'bfd_check_overflow' +............................ + + -- Function: bfd_reloc_status_type bfd_check_overflow (enum + complain_overflow how, unsigned int bitsize, unsigned int + rightshift, unsigned int addrsize, bfd_vma relocation); + Perform overflow checking on RELOCATION which has BITSIZE + significant bits and will be shifted right by RIGHTSHIFT bits, on a + machine with addresses containing ADDRSIZE significant bits. The + result is either of 'bfd_reloc_ok' or 'bfd_reloc_overflow'. + +2.9.1.6 'bfd_reloc_offset_in_range' +................................... -*Synopsis* - bfd_reloc_status_type bfd_check_overflow - (enum complain_overflow how, - unsigned int bitsize, - unsigned int rightshift, - unsigned int addrsize, - bfd_vma relocation); - *Description* -Perform overflow checking on RELOCATION which has BITSIZE significant -bits and will be shifted right by RIGHTSHIFT bits, on a machine with -addresses containing ADDRSIZE significant bits. The result is either of -'bfd_reloc_ok' or 'bfd_reloc_overflow'. - -2.10.1.6 'bfd_reloc_offset_in_range' -.................................... + -- Function: bool bfd_reloc_offset_in_range (reloc_howto_type *howto, + bfd *abfd, asection *section, bfd_size_type offset); + Returns TRUE if the reloc described by HOWTO can be applied at + OFFSET octets in SECTION. -*Synopsis* - bool bfd_reloc_offset_in_range - (reloc_howto_type *howto, - bfd *abfd, - asection *section, - bfd_size_type offset); - *Description* -Returns TRUE if the reloc described by HOWTO can be applied at OFFSET -octets in SECTION. - -2.10.1.7 'bfd_perform_relocation' -................................. +2.9.1.7 'bfd_perform_relocation' +................................ -*Synopsis* - bfd_reloc_status_type bfd_perform_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, - asection *input_section, - bfd *output_bfd, - char **error_message); - *Description* -If OUTPUT_BFD is supplied to this function, the generated image will be -relocatable; the relocations are copied to the output file after they -have been changed to reflect the new state of the world. There are two -ways of reflecting the results of partial linkage in an output file: by -modifying the output data in place, and by modifying the relocation -record. Some native formats (e.g., basic a.out and basic coff) have no -way of specifying an addend in the relocation type, so the addend has to -go in the output data. This is no big deal since in these formats the -output data slot will always be big enough for the addend. Complex -reloc types with addends were invented to solve just this problem. The -ERROR_MESSAGE argument is set to an error message if this return -'bfd_reloc_dangerous'. - -2.10.1.8 'bfd_install_relocation' -................................. + -- Function: bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, + arelent *reloc_entry, void *data, asection *input_section, bfd + *output_bfd, char **error_message); + If OUTPUT_BFD is supplied to this function, the generated image + will be relocatable; the relocations are copied to the output file + after they have been changed to reflect the new state of the world. + There are two ways of reflecting the results of partial linkage in + an output file: by modifying the output data in place, and by + modifying the relocation record. Some native formats (e.g., basic + a.out and basic coff) have no way of specifying an addend in the + relocation type, so the addend has to go in the output data. This + is no big deal since in these formats the output data slot will + always be big enough for the addend. Complex reloc types with + addends were invented to solve just this problem. The + ERROR_MESSAGE argument is set to an error message if this return + 'bfd_reloc_dangerous'. + +2.9.1.8 'bfd_install_relocation' +................................ + + -- Function: bfd_reloc_status_type bfd_install_relocation (bfd *abfd, + arelent *reloc_entry, void *data, bfd_vma data_start, asection + *input_section, char **error_message); + This looks remarkably like 'bfd_perform_relocation', except it does + not expect that the section contents have been filled in. I.e., + it's suitable for use when creating, rather than applying a + relocation. -*Synopsis* - bfd_reloc_status_type bfd_install_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, bfd_vma data_start, - asection *input_section, - char **error_message); - *Description* -This looks remarkably like 'bfd_perform_relocation', except it does not -expect that the section contents have been filled in. I.e., it's -suitable for use when creating, rather than applying a relocation. - - For now, this function should be considered reserved for the -assembler. + For now, this function should be considered reserved for the + assembler.  File: bfd.info, Node: howto manager, Prev: typedef arelent, Up: Relocations -2.10.2 The howto manager ------------------------- +2.9.2 The howto manager +----------------------- When an application wants to create a relocation, but doesn't know what the target machine might call it, it can find out by using this bit of code. -2.10.2.1 'bfd_reloc_code_type' -.............................. +2.9.2.1 'bfd_reloc_code_real_type' +.................................. -*Description* The insides of a reloc code. The idea is that, eventually, there will be one enumerator for every type of relocation we ever do. Pass one of these values to 'bfd_reloc_type_lookup', and it'll return a howto @@ -5602,6 +5067,8 @@ attributes. -- : BFD_RELOC_RISCV_SET16 -- : BFD_RELOC_RISCV_SET32 -- : BFD_RELOC_RISCV_32_PCREL + -- : BFD_RELOC_RISCV_SET_ULEB128 + -- : BFD_RELOC_RISCV_SUB_ULEB128 RISC-V relocations. -- : BFD_RELOC_RL78_NEG8 -- : BFD_RELOC_RL78_NEG16 @@ -6495,6 +5962,102 @@ attributes. This is a 64 bit reloc that stores the 32 bit offset value in two words (with an imm instruction). The relocation is relative offset from start of TEXT. + -- : BFD_RELOC_KVX_RELOC_START + KVX pseudo relocation code to mark the start of the KVX relocation + enumerators. N.B. the order of the enumerators is important as + several tables in the KVX bfd backend are indexed by these + enumerators; make sure they are all synced."; + -- : BFD_RELOC_KVX_NONE + KVX null relocation code. + -- : BFD_RELOC_KVX_16 + -- : BFD_RELOC_KVX_32 + -- : BFD_RELOC_KVX_64 + -- : BFD_RELOC_KVX_S16_PCREL + -- : BFD_RELOC_KVX_PCREL17 + -- : BFD_RELOC_KVX_PCREL27 + -- : BFD_RELOC_KVX_32_PCREL + -- : BFD_RELOC_KVX_S37_PCREL_LO10 + -- : BFD_RELOC_KVX_S37_PCREL_UP27 + -- : BFD_RELOC_KVX_S43_PCREL_LO10 + -- : BFD_RELOC_KVX_S43_PCREL_UP27 + -- : BFD_RELOC_KVX_S43_PCREL_EX6 + -- : BFD_RELOC_KVX_S64_PCREL_LO10 + -- : BFD_RELOC_KVX_S64_PCREL_UP27 + -- : BFD_RELOC_KVX_S64_PCREL_EX27 + -- : BFD_RELOC_KVX_64_PCREL + -- : BFD_RELOC_KVX_S16 + -- : BFD_RELOC_KVX_S32_LO5 + -- : BFD_RELOC_KVX_S32_UP27 + -- : BFD_RELOC_KVX_S37_LO10 + -- : BFD_RELOC_KVX_S37_UP27 + -- : BFD_RELOC_KVX_S37_GOTOFF_LO10 + -- : BFD_RELOC_KVX_S37_GOTOFF_UP27 + -- : BFD_RELOC_KVX_S43_GOTOFF_LO10 + -- : BFD_RELOC_KVX_S43_GOTOFF_UP27 + -- : BFD_RELOC_KVX_S43_GOTOFF_EX6 + -- : BFD_RELOC_KVX_32_GOTOFF + -- : BFD_RELOC_KVX_64_GOTOFF + -- : BFD_RELOC_KVX_32_GOT + -- : BFD_RELOC_KVX_S37_GOT_LO10 + -- : BFD_RELOC_KVX_S37_GOT_UP27 + -- : BFD_RELOC_KVX_S43_GOT_LO10 + -- : BFD_RELOC_KVX_S43_GOT_UP27 + -- : BFD_RELOC_KVX_S43_GOT_EX6 + -- : BFD_RELOC_KVX_64_GOT + -- : BFD_RELOC_KVX_GLOB_DAT + -- : BFD_RELOC_KVX_COPY + -- : BFD_RELOC_KVX_JMP_SLOT + -- : BFD_RELOC_KVX_RELATIVE + -- : BFD_RELOC_KVX_S43_LO10 + -- : BFD_RELOC_KVX_S43_UP27 + -- : BFD_RELOC_KVX_S43_EX6 + -- : BFD_RELOC_KVX_S64_LO10 + -- : BFD_RELOC_KVX_S64_UP27 + -- : BFD_RELOC_KVX_S64_EX27 + -- : BFD_RELOC_KVX_S37_GOTADDR_LO10 + -- : BFD_RELOC_KVX_S37_GOTADDR_UP27 + -- : BFD_RELOC_KVX_S43_GOTADDR_LO10 + -- : BFD_RELOC_KVX_S43_GOTADDR_UP27 + -- : BFD_RELOC_KVX_S43_GOTADDR_EX6 + -- : BFD_RELOC_KVX_S64_GOTADDR_LO10 + -- : BFD_RELOC_KVX_S64_GOTADDR_UP27 + -- : BFD_RELOC_KVX_S64_GOTADDR_EX27 + -- : BFD_RELOC_KVX_64_DTPMOD + -- : BFD_RELOC_KVX_64_DTPOFF + -- : BFD_RELOC_KVX_S37_TLS_DTPOFF_LO10 + -- : BFD_RELOC_KVX_S37_TLS_DTPOFF_UP27 + -- : BFD_RELOC_KVX_S43_TLS_DTPOFF_LO10 + -- : BFD_RELOC_KVX_S43_TLS_DTPOFF_UP27 + -- : BFD_RELOC_KVX_S43_TLS_DTPOFF_EX6 + -- : BFD_RELOC_KVX_S37_TLS_GD_LO10 + -- : BFD_RELOC_KVX_S37_TLS_GD_UP27 + -- : BFD_RELOC_KVX_S43_TLS_GD_LO10 + -- : BFD_RELOC_KVX_S43_TLS_GD_UP27 + -- : BFD_RELOC_KVX_S43_TLS_GD_EX6 + -- : BFD_RELOC_KVX_S37_TLS_LD_LO10 + -- : BFD_RELOC_KVX_S37_TLS_LD_UP27 + -- : BFD_RELOC_KVX_S43_TLS_LD_LO10 + -- : BFD_RELOC_KVX_S43_TLS_LD_UP27 + -- : BFD_RELOC_KVX_S43_TLS_LD_EX6 + -- : BFD_RELOC_KVX_64_TPOFF + -- : BFD_RELOC_KVX_S37_TLS_IE_LO10 + -- : BFD_RELOC_KVX_S37_TLS_IE_UP27 + -- : BFD_RELOC_KVX_S43_TLS_IE_LO10 + -- : BFD_RELOC_KVX_S43_TLS_IE_UP27 + -- : BFD_RELOC_KVX_S43_TLS_IE_EX6 + -- : BFD_RELOC_KVX_S37_TLS_LE_LO10 + -- : BFD_RELOC_KVX_S37_TLS_LE_UP27 + -- : BFD_RELOC_KVX_S43_TLS_LE_LO10 + -- : BFD_RELOC_KVX_S43_TLS_LE_UP27 + -- : BFD_RELOC_KVX_S43_TLS_LE_EX6 + -- : BFD_RELOC_KVX_8 + KVX Relocations. + -- : BFD_RELOC_KVX_RELOC_END + KVX pseudo relocation code to mark the end of the KVX relocation + enumerators that have direct mapping to ELF reloc codes. There are + a few more enumerators after this one; those are mainly used by the + KVX assembler for the internal fixup or to select one of the above + enumerators. -- : BFD_RELOC_AARCH64_RELOC_START AArch64 pseudo relocation code to mark the start of the AArch64 relocation enumerators. N.B. the order of the enumerators is @@ -7043,10 +6606,9 @@ attributes. -- : BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD Tilera TILE-Gx Relocations. -- : BFD_RELOC_BPF_64 - -- : BFD_RELOC_BPF_32 - -- : BFD_RELOC_BPF_16 - -- : BFD_RELOC_BPF_DISP16 -- : BFD_RELOC_BPF_DISP32 + -- : BFD_RELOC_BPF_DISPCALL32 + -- : BFD_RELOC_BPF_DISP16 Linux eBPF relocations. -- : BFD_RELOC_EPIPHANY_SIMM8 Adapteva EPIPHANY - 8 bit signed pc-relative displacement @@ -7230,197 +6792,165 @@ attributes. -- : BFD_RELOC_LARCH_TLS_GD_HI20 -- : BFD_RELOC_LARCH_32_PCREL -- : BFD_RELOC_LARCH_RELAX + -- : BFD_RELOC_LARCH_DELETE + -- : BFD_RELOC_LARCH_ALIGN + -- : BFD_RELOC_LARCH_PCREL20_S2 + -- : BFD_RELOC_LARCH_CFA + -- : BFD_RELOC_LARCH_ADD6 + -- : BFD_RELOC_LARCH_SUB6 + -- : BFD_RELOC_LARCH_ADD_ULEB128 + -- : BFD_RELOC_LARCH_SUB_ULEB128 + -- : BFD_RELOC_LARCH_64_PCREL LARCH relocations. - typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; -2.10.2.2 'bfd_reloc_type_lookup' -................................ -*Synopsis* - reloc_howto_type *bfd_reloc_type_lookup - (bfd *abfd, bfd_reloc_code_real_type code); - reloc_howto_type *bfd_reloc_name_lookup - (bfd *abfd, const char *reloc_name); - *Description* -Return a pointer to a howto structure which, when invoked, will perform -the relocation CODE on data from the architecture noted. +2.9.2.2 'bfd_reloc_type_lookup' +............................... -2.10.2.3 'bfd_default_reloc_type_lookup' -........................................ + -- Function: reloc_howto_type *bfd_reloc_type_lookup (bfd *abfd, + bfd_reloc_code_real_type code); reloc_howto_type + *bfd_reloc_name_lookup (bfd *abfd, const char *reloc_name); + Return a pointer to a howto structure which, when invoked, will + perform the relocation CODE on data from the architecture noted. -*Synopsis* - reloc_howto_type *bfd_default_reloc_type_lookup - (bfd *abfd, bfd_reloc_code_real_type code); - *Description* -Provides a default relocation lookup routine for any architecture. +2.9.2.3 'bfd_default_reloc_type_lookup' +....................................... -2.10.2.4 'bfd_get_reloc_code_name' -.................................. + -- Function: reloc_howto_type *bfd_default_reloc_type_lookup (bfd + *abfd, bfd_reloc_code_real_type code); + Provides a default relocation lookup routine for any architecture. -*Synopsis* - const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); - *Description* -Provides a printable name for the supplied relocation code. Useful -mainly for printing error messages. +2.9.2.4 'bfd_get_reloc_code_name' +................................. -2.10.2.5 'bfd_generic_relax_section' -.................................... + -- Function: const char *bfd_get_reloc_code_name + (bfd_reloc_code_real_type code); + Provides a printable name for the supplied relocation code. Useful + mainly for printing error messages. -*Synopsis* - bool bfd_generic_relax_section - (bfd *abfd, - asection *section, - struct bfd_link_info *, - bool *); - *Description* -Provides default handling for relaxing for back ends which don't do -relaxing. - -2.10.2.6 'bfd_generic_gc_sections' -.................................. +2.9.2.5 'bfd_generic_relax_section' +................................... -*Synopsis* - bool bfd_generic_gc_sections - (bfd *, struct bfd_link_info *); - *Description* -Provides default handling for relaxing for back ends which don't do -section gc - i.e., does nothing. + -- Function: bool bfd_generic_relax_section (bfd *abfd, asection + *section, struct bfd_link_info *, bool *); + Provides default handling for relaxing for back ends which don't do + relaxing. -2.10.2.7 'bfd_generic_lookup_section_flags' -........................................... +2.9.2.6 'bfd_generic_gc_sections' +................................. -*Synopsis* - bool bfd_generic_lookup_section_flags - (struct bfd_link_info *, struct flag_info *, asection *); - *Description* -Provides default handling for section flags lookup - i.e., does nothing. -Returns FALSE if the section should be omitted, otherwise TRUE. + -- Function: bool bfd_generic_gc_sections (bfd *, struct bfd_link_info + *); + Provides default handling for relaxing for back ends which don't do + section gc - i.e., does nothing. -2.10.2.8 'bfd_generic_merge_sections' -..................................... +2.9.2.7 'bfd_generic_lookup_section_flags' +.......................................... -*Synopsis* - bool bfd_generic_merge_sections - (bfd *, struct bfd_link_info *); - *Description* -Provides default handling for SEC_MERGE section merging for back ends -which don't have SEC_MERGE support - i.e., does nothing. - -2.10.2.9 'bfd_generic_get_relocated_section_contents' -..................................................... - -*Synopsis* - bfd_byte *bfd_generic_get_relocated_section_contents - (bfd *abfd, - struct bfd_link_info *link_info, - struct bfd_link_order *link_order, - bfd_byte *data, - bool relocatable, - asymbol **symbols); - *Description* -Provides default handling of relocation effort for back ends which can't -be bothered to do it efficiently. - -2.10.2.10 '_bfd_generic_set_reloc' -.................................. + -- Function: bool bfd_generic_lookup_section_flags (struct + bfd_link_info *, struct flag_info *, asection *); + Provides default handling for section flags lookup - i.e., does + nothing. Returns FALSE if the section should be omitted, otherwise + TRUE. -*Synopsis* - void _bfd_generic_set_reloc - (bfd *abfd, - sec_ptr section, - arelent **relptr, - unsigned int count); - *Description* -Installs a new set of internal relocations in SECTION. +2.9.2.8 'bfd_generic_merge_sections' +.................................... -2.10.2.11 '_bfd_unrecognized_reloc' -................................... + -- Function: bool bfd_generic_merge_sections (bfd *, struct + bfd_link_info *); + Provides default handling for SEC_MERGE section merging for back + ends which don't have SEC_MERGE support - i.e., does nothing. -*Synopsis* - bool _bfd_unrecognized_reloc - (bfd * abfd, - sec_ptr section, - unsigned int r_type); - *Description* -Reports an unrecognized reloc. Written as a function in order to reduce -code duplication. Returns FALSE so that it can be called from a return -statement. +2.9.2.9 'bfd_generic_get_relocated_section_contents' +.................................................... + + -- Function: bfd_byte *bfd_generic_get_relocated_section_contents (bfd + *abfd, struct bfd_link_info *link_info, struct bfd_link_order + *link_order, bfd_byte *data, bool relocatable, asymbol + **symbols); + Provides default handling of relocation effort for back ends which + can't be bothered to do it efficiently. + +2.9.2.10 '_bfd_generic_set_reloc' +................................. + + -- Function: void _bfd_generic_set_reloc (bfd *abfd, sec_ptr section, + arelent **relptr, unsigned int count); + Installs a new set of internal relocations in SECTION. + +2.9.2.11 '_bfd_unrecognized_reloc' +.................................. + + -- Function: bool _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, + unsigned int r_type); + Reports an unrecognized reloc. Written as a function in order to + reduce code duplication. Returns FALSE so that it can be called + from a return statement.  File: bfd.info, Node: Core Files, Next: Targets, Prev: Relocations, Up: BFD front end -2.11 Core files +2.10 Core files =============== -2.11.1 Core file functions +2.10.1 Core file functions -------------------------- -*Description* These are functions pertaining to core files. -2.11.1.1 'bfd_core_file_failing_command' +2.10.1.1 'bfd_core_file_failing_command' ........................................ -*Synopsis* - const char *bfd_core_file_failing_command (bfd *abfd); - *Description* -Return a read-only string explaining which program was running when it -failed and produced the core file ABFD. + -- Function: const char *bfd_core_file_failing_command (bfd *abfd); + Return a read-only string explaining which program was running when + it failed and produced the core file ABFD. -2.11.1.2 'bfd_core_file_failing_signal' +2.10.1.2 'bfd_core_file_failing_signal' ....................................... -*Synopsis* - int bfd_core_file_failing_signal (bfd *abfd); - *Description* -Returns the signal number which caused the core dump which generated the -file the BFD ABFD is attached to. + -- Function: int bfd_core_file_failing_signal (bfd *abfd); + Returns the signal number which caused the core dump which + generated the file the BFD ABFD is attached to. -2.11.1.3 'bfd_core_file_pid' +2.10.1.3 'bfd_core_file_pid' ............................ -*Synopsis* - int bfd_core_file_pid (bfd *abfd); - *Description* -Returns the PID of the process the core dump the BFD ABFD is attached to -was generated from. + -- Function: int bfd_core_file_pid (bfd *abfd); + Returns the PID of the process the core dump the BFD ABFD is + attached to was generated from. -2.11.1.4 'core_file_matches_executable_p' +2.10.1.4 'core_file_matches_executable_p' ......................................... -*Synopsis* - bool core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); - *Description* -Return 'TRUE' if the core file attached to CORE_BFD was generated by a -run of the executable file attached to EXEC_BFD, 'FALSE' otherwise. + -- Function: bool core_file_matches_executable_p (bfd *core_bfd, bfd + *exec_bfd); + Return 'TRUE' if the core file attached to CORE_BFD was generated + by a run of the executable file attached to EXEC_BFD, 'FALSE' + otherwise. -2.11.1.5 'generic_core_file_matches_executable_p' +2.10.1.5 'generic_core_file_matches_executable_p' ................................................. -*Synopsis* - bool generic_core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); - *Description* -Return TRUE if the core file attached to CORE_BFD was generated by a run -of the executable file attached to EXEC_BFD. The match is based on -executable basenames only. + -- Function: bool generic_core_file_matches_executable_p (bfd + *core_bfd, bfd *exec_bfd); + Return TRUE if the core file attached to CORE_BFD was generated by + a run of the executable file attached to EXEC_BFD. The match is + based on executable basenames only. - Note: When not able to determine the core file failing command or the -executable name, we still return TRUE even though we're not sure that -core file and executable match. This is to avoid generating a false -warning in situations where we really don't know whether they match or -not. + Note: When not able to determine the core file failing command or + the executable name, we still return TRUE even though we're not + sure that core file and executable match. This is to avoid + generating a false warning in situations where we really don't know + whether they match or not.  File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end -2.12 Targets +2.11 Targets ============ -*Description* Each port of BFD to a different machine requires the creation of a target back end. All the back end provides to the root part of BFD is a structure containing pointers to functions which perform certain low @@ -7466,10 +6996,9 @@ right.  File: bfd.info, Node: bfd_target, Prev: Targets, Up: Targets -2.12.1 bfd_target +2.11.1 bfd_target ----------------- -*Description* This structure contains everything that BFD knows about a target. It includes things like its byte order, name, and which routines to call to do various operations. @@ -7518,41 +7047,6 @@ implements access to a different target under BFD, defines one of these. FIXME, these names should be rationalised with the names of the entry points which call them. Too bad we can't have one macro to define them both! - enum bfd_flavour - { - /* N.B. Update bfd_flavour_name if you change this. */ - bfd_target_unknown_flavour, - bfd_target_aout_flavour, - bfd_target_coff_flavour, - bfd_target_ecoff_flavour, - bfd_target_xcoff_flavour, - bfd_target_elf_flavour, - bfd_target_tekhex_flavour, - bfd_target_srec_flavour, - bfd_target_verilog_flavour, - bfd_target_ihex_flavour, - bfd_target_som_flavour, - bfd_target_os9k_flavour, - bfd_target_versados_flavour, - bfd_target_msdos_flavour, - bfd_target_ovax_flavour, - bfd_target_evax_flavour, - bfd_target_mmo_flavour, - bfd_target_mach_o_flavour, - bfd_target_pef_flavour, - bfd_target_pef_xlib_flavour, - bfd_target_sym_flavour - }; - - enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; - - /* Forward declaration. */ - typedef struct bfd_link_info _bfd_link_info; - - /* Forward declaration. */ - typedef struct flag_info flag_info; - - typedef void (*bfd_cleanup) (bfd *); typedef struct bfd_target { @@ -7633,7 +7127,6 @@ both! The general target vector. These vectors are initialized using the BFD_JUMP_TABLE macros. - /* Generic entry points. */ #define BFD_JUMP_TABLE_GENERIC(NAME) \ NAME##_close_and_cleanup, \ @@ -7793,7 +7286,7 @@ BFD_JUMP_TABLE macros. 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); + (*_bfd_make_debug_symbol) (bfd *); #define bfd_read_minisymbols(b, d, m, s) \ BFD_SEND (b, _read_minisymbols, (b, d, m, s)) long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *); @@ -8041,113 +7534,93 @@ to find an alternative output format that is suitable. } - /* Cached _bfd_check_format messages are put in this. */ - struct per_xvec_message - { - struct per_xvec_message *next; - char message[]; - }; - - -2.12.1.1 '_bfd_per_xvec_warn' +2.11.1.1 '_bfd_per_xvec_warn' ............................. -*Synopsis* - struct per_xvec_message **_bfd_per_xvec_warn (const bfd_target *, size_t); - *Description* -Return a location for the given target xvec to use for warnings specific -to that target. If TARG is NULL, returns the array of per_xvec_message -pointers, otherwise if ALLOC is zero, returns a pointer to a pointer to -the list of messages for TARG, otherwise (both TARG and ALLOC non-zero), -allocates a new per_xvec_message with space for a string of ALLOC bytes -and returns a pointer to a pointer to it. May return a pointer to a -NULL pointer on allocation failure. - -2.12.1.2 'bfd_set_default_target' + -- Function: struct per_xvec_message **_bfd_per_xvec_warn (const + bfd_target *, size_t); + Return a location for the given target xvec to use for warnings + specific to that target. If TARG is NULL, returns the array of + per_xvec_message pointers, otherwise if ALLOC is zero, returns a + pointer to a pointer to the list of messages for TARG, otherwise + (both TARG and ALLOC non-zero), allocates a new per_xvec_message + with space for a string of ALLOC bytes and returns a pointer to a + pointer to it. May return a pointer to a NULL pointer on + allocation failure. + +2.11.1.2 'bfd_set_default_target' ................................. -*Synopsis* - bool bfd_set_default_target (const char *name); - *Description* -Set the default target vector to use when recognizing a BFD. This takes -the name of the target, which may be a BFD target name or a -configuration triplet. + -- Function: bool bfd_set_default_target (const char *name); + Set the default target vector to use when recognizing a BFD. This + takes the name of the target, which may be a BFD target name or a + configuration triplet. -2.12.1.3 'bfd_find_target' +2.11.1.3 'bfd_find_target' .......................... -*Synopsis* - const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); - *Description* -Return a pointer to the transfer vector for the object target named -TARGET_NAME. If TARGET_NAME is 'NULL', choose the one in the -environment variable 'GNUTARGET'; if that is null or not defined, then -choose the first entry in the target list. Passing in the string -"default" or setting the environment variable to "default" will cause -the first entry in the target list to be returned, and -"target_defaulted" will be set in the BFD if ABFD isn't 'NULL'. This -causes 'bfd_check_format' to loop over all the targets to find the one -that matches the file being read. - -2.12.1.4 'bfd_get_target_info' + -- Function: const bfd_target *bfd_find_target (const char + *target_name, bfd *abfd); + Return a pointer to the transfer vector for the object target named + TARGET_NAME. If TARGET_NAME is 'NULL', choose the one in the + environment variable 'GNUTARGET'; if that is null or not defined, + then choose the first entry in the target list. Passing in the + string "default" or setting the environment variable to "default" + will cause the first entry in the target list to be returned, and + "target_defaulted" will be set in the BFD if ABFD isn't 'NULL'. + This causes 'bfd_check_format' to loop over all the targets to find + the one that matches the file being read. + +2.11.1.4 'bfd_get_target_info' .............................. -*Synopsis* - const bfd_target *bfd_get_target_info (const char *target_name, - bfd *abfd, - bool *is_bigendian, - int *underscoring, - const char **def_target_arch); - *Description* -Return a pointer to the transfer vector for the object target named -TARGET_NAME. If TARGET_NAME is 'NULL', choose the one in the -environment variable 'GNUTARGET'; if that is null or not defined, then -choose the first entry in the target list. Passing in the string -"default" or setting the environment variable to "default" will cause -the first entry in the target list to be returned, and -"target_defaulted" will be set in the BFD if ABFD isn't 'NULL'. This -causes 'bfd_check_format' to loop over all the targets to find the one -that matches the file being read. If IS_BIGENDIAN is not 'NULL', then -set this value to target's endian mode. True for big-endian, FALSE for -little-endian or for invalid target. If UNDERSCORING is not 'NULL', -then set this value to target's underscoring mode. Zero for -none-underscoring, -1 for invalid target, else the value of target -vector's symbol underscoring. If DEF_TARGET_ARCH is not 'NULL', then -set it to the architecture string specified by the target_name. - -2.12.1.5 'bfd_target_list' + -- Function: const bfd_target *bfd_get_target_info (const char + *target_name, bfd *abfd, bool *is_bigendian, int + *underscoring, const char **def_target_arch); + Return a pointer to the transfer vector for the object target named + TARGET_NAME. If TARGET_NAME is 'NULL', choose the one in the + environment variable 'GNUTARGET'; if that is null or not defined, + then choose the first entry in the target list. Passing in the + string "default" or setting the environment variable to "default" + will cause the first entry in the target list to be returned, and + "target_defaulted" will be set in the BFD if ABFD isn't 'NULL'. + This causes 'bfd_check_format' to loop over all the targets to find + the one that matches the file being read. If IS_BIGENDIAN is not + 'NULL', then set this value to target's endian mode. True for + big-endian, FALSE for little-endian or for invalid target. If + UNDERSCORING is not 'NULL', then set this value to target's + underscoring mode. Zero for none-underscoring, -1 for invalid + target, else the value of target vector's symbol underscoring. If + DEF_TARGET_ARCH is not 'NULL', then set it to the architecture + string specified by the target_name. + +2.11.1.5 'bfd_target_list' .......................... -*Synopsis* - const char ** bfd_target_list (void); - *Description* -Return a freshly malloced NULL-terminated vector of the names of all the -valid BFD targets. Do not modify the names. + -- Function: const char ** bfd_target_list (void); + Return a freshly malloced NULL-terminated vector of the names of + all the valid BFD targets. Do not modify the names. -2.12.1.6 'bfd_iterate_over_targets' +2.11.1.6 'bfd_iterate_over_targets' ................................... -*Synopsis* - const bfd_target *bfd_iterate_over_targets - (int (*func) (const bfd_target *, void *), - void *data); - *Description* -Call FUNC for each target in the list of BFD target vectors, passing -DATA to FUNC. Stop iterating if FUNC returns a non-zero result, and -return that target vector. Return NULL if FUNC always returns zero. + -- Function: const bfd_target *bfd_iterate_over_targets (int (*func) + (const bfd_target *, void *), void *data); + Call FUNC for each target in the list of BFD target vectors, + passing DATA to FUNC. Stop iterating if FUNC returns a non-zero + result, and return that target vector. Return NULL if FUNC always + returns zero. -2.12.1.7 'bfd_flavour_name' +2.11.1.7 'bfd_flavour_name' ........................... -*Synopsis* - const char *bfd_flavour_name (enum bfd_flavour flavour); - *Description* -Return the string form of FLAVOUR. + -- Function: const char *bfd_flavour_name (enum bfd_flavour flavour); + Return the string form of FLAVOUR.  File: bfd.info, Node: Architectures, Next: Opening and Closing, Prev: Targets, Up: BFD front end -2.13 Architectures +2.12 Architectures ================== BFD keeps one atom in a BFD describing the architecture of the data @@ -8171,10 +7644,9 @@ a machine field of 0). BFD's idea of an architecture is implemented in 'archures.c'. -2.13.1 bfd_architecture +2.12.1 bfd_architecture ----------------------- -*Description* This enum gives the object file's CPU architecture, in a global sense--i.e., what processor family does it belong to? Another field indicates which processor within the family is in use. The machine @@ -8288,6 +7760,7 @@ architecture, containing, for example, 68020 for Motorola 68020. #define bfd_mach_mips16000 16000 #define bfd_mach_mips16 16 #define bfd_mach_mips5 5 + #define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31. */ #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 #define bfd_mach_mips_gs464 3003 @@ -8629,6 +8102,17 @@ architecture, containing, for example, 68020 for Motorola 68020. bfd_arch_lm32, /* Lattice Mico32. */ #define bfd_mach_lm32 1 bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ + #define bfd_mach_kv3_unknown 0 + #define bfd_mach_kv3_1 1 + #define bfd_mach_kv3_1_64 2 + #define bfd_mach_kv3_1_usr 3 + #define bfd_mach_kv3_2 4 + #define bfd_mach_kv3_2_64 5 + #define bfd_mach_kv3_2_usr 6 + #define bfd_mach_kv4_1 7 + #define bfd_mach_kv4_1_64 8 + #define bfd_mach_kv4_1_usr 9 bfd_arch_tilepro, /* Tilera TILEPro. */ bfd_arch_tilegx, /* Tilera TILE-Gx. */ #define bfd_mach_tilepro 1 @@ -8681,10 +8165,9 @@ architecture, containing, for example, 68020 for Motorola 68020. bfd_arch_last }; -2.13.2 bfd_arch_info +2.12.2 bfd_arch_info -------------------- -*Description* This structure contains information on architectures for use within BFD. typedef struct bfd_arch_info @@ -8726,726 +8209,836 @@ This structure contains information on architectures for use within BFD. bfd_arch_info_type; -2.13.2.1 'bfd_printable_name' +2.12.2.1 'bfd_printable_name' ............................. -*Synopsis* - const char *bfd_printable_name (bfd *abfd); - *Description* -Return a printable string representing the architecture and machine from -the pointer to the architecture info structure. + -- Function: const char *bfd_printable_name (bfd *abfd); + Return a printable string representing the architecture and machine + from the pointer to the architecture info structure. -2.13.2.2 'bfd_scan_arch' +2.12.2.2 'bfd_scan_arch' ........................ -*Synopsis* - const bfd_arch_info_type *bfd_scan_arch (const char *string); - *Description* -Figure out if BFD supports any cpu which could be described with the -name STRING. Return a pointer to an 'arch_info' structure if a machine -is found, otherwise NULL. + -- Function: const bfd_arch_info_type *bfd_scan_arch (const char + *string); + Figure out if BFD supports any cpu which could be described with + the name STRING. Return a pointer to an 'arch_info' structure if a + machine is found, otherwise NULL. -2.13.2.3 'bfd_arch_list' +2.12.2.3 'bfd_arch_list' ........................ -*Synopsis* - const char **bfd_arch_list (void); - *Description* -Return a freshly malloced NULL-terminated vector of the names of all the -valid BFD architectures. Do not modify the names. + -- Function: const char **bfd_arch_list (void); + Return a freshly malloced NULL-terminated vector of the names of + all the valid BFD architectures. Do not modify the names. -2.13.2.4 'bfd_arch_get_compatible' +2.12.2.4 'bfd_arch_get_compatible' .................................. -*Synopsis* - const bfd_arch_info_type *bfd_arch_get_compatible - (const bfd *abfd, const bfd *bbfd, bool accept_unknowns); - *Description* -Determine whether two BFDs' architectures and machine types are -compatible. Calculates the lowest common denominator between the two -architectures and machine types implied by the BFDs and returns a -pointer to an 'arch_info' structure describing the compatible machine. + -- Function: const bfd_arch_info_type *bfd_arch_get_compatible (const + bfd *abfd, const bfd *bbfd, bool accept_unknowns); + Determine whether two BFDs' architectures and machine types are + compatible. Calculates the lowest common denominator between the + two architectures and machine types implied by the BFDs and returns + a pointer to an 'arch_info' structure describing the compatible + machine. -2.13.2.5 'bfd_default_arch_struct' +2.12.2.5 'bfd_default_arch_struct' .................................. -*Description* The 'bfd_default_arch_struct' is an item of 'bfd_arch_info_type' which has been initialized to a fairly generic state. A BFD starts life by pointing to this structure, until the correct back end has determined the real architecture of the file. extern const bfd_arch_info_type bfd_default_arch_struct; -2.13.2.6 'bfd_set_arch_info' + +2.12.2.6 'bfd_set_arch_info' ............................ -*Synopsis* - void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); - *Description* -Set the architecture info of ABFD to ARG. + -- Function: void bfd_set_arch_info (bfd *abfd, const + bfd_arch_info_type *arg); + Set the architecture info of ABFD to ARG. -2.13.2.7 'bfd_default_set_arch_mach' +2.12.2.7 'bfd_default_set_arch_mach' .................................... -*Synopsis* - bool bfd_default_set_arch_mach - (bfd *abfd, enum bfd_architecture arch, unsigned long mach); - *Description* -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. + -- Function: bool bfd_default_set_arch_mach (bfd *abfd, enum + bfd_architecture arch, unsigned long mach); + 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. -2.13.2.8 'bfd_get_arch' +2.12.2.8 'bfd_get_arch' ....................... -*Synopsis* - enum bfd_architecture bfd_get_arch (const bfd *abfd); - *Description* -Return the enumerated type which describes the BFD ABFD's architecture. + -- Function: enum bfd_architecture bfd_get_arch (const bfd *abfd); + Return the enumerated type which describes the BFD ABFD's + architecture. -2.13.2.9 'bfd_get_mach' +2.12.2.9 'bfd_get_mach' ....................... -*Synopsis* - unsigned long bfd_get_mach (const bfd *abfd); - *Description* -Return the long type which describes the BFD ABFD's machine. + -- Function: unsigned long bfd_get_mach (const bfd *abfd); + Return the long type which describes the BFD ABFD's machine. -2.13.2.10 'bfd_arch_bits_per_byte' +2.12.2.10 'bfd_arch_bits_per_byte' .................................. -*Synopsis* - unsigned int bfd_arch_bits_per_byte (const bfd *abfd); - *Description* -Return the number of bits in one of the BFD ABFD's architecture's bytes. + -- Function: unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + Return the number of bits in one of the BFD ABFD's architecture's + bytes. -2.13.2.11 'bfd_arch_bits_per_address' +2.12.2.11 'bfd_arch_bits_per_address' ..................................... -*Synopsis* - unsigned int bfd_arch_bits_per_address (const bfd *abfd); - *Description* -Return the number of bits in one of the BFD ABFD's architecture's -addresses. + -- Function: unsigned int bfd_arch_bits_per_address (const bfd *abfd); + Return the number of bits in one of the BFD ABFD's architecture's + addresses. -2.13.2.12 'bfd_default_compatible' +2.12.2.12 'bfd_default_compatible' .................................. -*Synopsis* - const bfd_arch_info_type *bfd_default_compatible - (const bfd_arch_info_type *a, const bfd_arch_info_type *b); - *Description* -The default function for testing for compatibility. + -- Function: const bfd_arch_info_type *bfd_default_compatible (const + bfd_arch_info_type *a, const bfd_arch_info_type *b); + The default function for testing for compatibility. -2.13.2.13 'bfd_default_scan' +2.12.2.13 'bfd_default_scan' ............................ -*Synopsis* - bool bfd_default_scan - (const struct bfd_arch_info *info, const char *string); - *Description* -The default function for working out whether this is an architecture hit -and a machine hit. + -- Function: bool bfd_default_scan (const struct bfd_arch_info *info, + const char *string); + The default function for working out whether this is an + architecture hit and a machine hit. -2.13.2.14 'bfd_get_arch_info' +2.12.2.14 'bfd_get_arch_info' ............................. -*Synopsis* - const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); - *Description* -Return the architecture info struct in ABFD. + -- Function: const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); + Return the architecture info struct in ABFD. -2.13.2.15 'bfd_lookup_arch' +2.12.2.15 'bfd_lookup_arch' ........................... -*Synopsis* - const bfd_arch_info_type *bfd_lookup_arch - (enum bfd_architecture arch, unsigned long machine); - *Description* -Look for the architecture info structure which matches the arguments -ARCH and MACHINE. A machine of 0 matches the machine/architecture -structure which marks itself as the default. + -- Function: const bfd_arch_info_type *bfd_lookup_arch (enum + bfd_architecture arch, unsigned long machine); + Look for the architecture info structure which matches the + arguments ARCH and MACHINE. A machine of 0 matches the + machine/architecture structure which marks itself as the default. -2.13.2.16 'bfd_printable_arch_mach' +2.12.2.16 'bfd_printable_arch_mach' ................................... -*Synopsis* - const char *bfd_printable_arch_mach - (enum bfd_architecture arch, unsigned long machine); - *Description* -Return a printable string representing the architecture and machine -type. + -- Function: const char *bfd_printable_arch_mach (enum bfd_architecture + arch, unsigned long machine); + Return a printable string representing the architecture and machine + type. - This routine is depreciated. + This routine is depreciated. -2.13.2.17 'bfd_octets_per_byte' +2.12.2.17 'bfd_octets_per_byte' ............................... -*Synopsis* - unsigned int bfd_octets_per_byte (const bfd *abfd, - const asection *sec); - *Description* -Return the number of octets (8-bit quantities) per target byte (minimum -addressable unit). In most cases, this will be one, but some DSP -targets have 16, 32, or even 48 bits per byte. + -- Function: unsigned int bfd_octets_per_byte (const bfd *abfd, const + asection *sec); + Return the number of octets (8-bit quantities) per target byte + (minimum addressable unit). In most cases, this will be one, but + some DSP targets have 16, 32, or even 48 bits per byte. -2.13.2.18 'bfd_arch_mach_octets_per_byte' +2.12.2.18 'bfd_arch_mach_octets_per_byte' ......................................... -*Synopsis* - unsigned int bfd_arch_mach_octets_per_byte - (enum bfd_architecture arch, unsigned long machine); - *Description* -See bfd_octets_per_byte. + -- Function: unsigned int bfd_arch_mach_octets_per_byte (enum + bfd_architecture arch, unsigned long machine); + See bfd_octets_per_byte. - This routine is provided for those cases where a bfd * is not -available + This routine is provided for those cases where a bfd * is not + available -2.13.2.19 'bfd_arch_default_fill' +2.12.2.19 'bfd_arch_default_fill' ................................. -*Synopsis* - void *bfd_arch_default_fill (bfd_size_type count, - bool is_bigendian, - bool code); - *Description* -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. + -- Function: void *bfd_arch_default_fill (bfd_size_type count, bool + is_bigendian, bool code); + 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.  File: bfd.info, Node: Opening and Closing, Next: Internal, Prev: Architectures, Up: BFD front end - /* Set to N to open the next N BFDs using an alternate id space. */ - extern unsigned int bfd_use_reserved_id; - -2.14 Opening and closing BFDs +2.13 Opening and closing BFDs ============================= -2.14.1 Functions for opening and closing +2.13.1 Functions for opening and closing ---------------------------------------- -2.14.1.1 'bfd_fopen' +2.13.1.1 '_bfd_new_bfd' +....................... + + -- Function: bfd *_bfd_new_bfd (void); + Return a new BFD. All BFD's are allocated through this routine. + +2.13.1.2 '_bfd_new_bfd_contained_in' +.................................... + + -- Function: bfd *_bfd_new_bfd_contained_in (bfd *); + Allocate a new BFD as a member of archive OBFD. + +2.13.1.3 '_bfd_free_cached_info' +................................ + + -- Function: bool _bfd_free_cached_info (bfd *); + Free objalloc memory. + +2.13.1.4 'bfd_fopen' .................... -*Synopsis* - bfd *bfd_fopen (const char *filename, const char *target, - const char *mode, int fd); - *Description* -Open the file FILENAME with the target TARGET. Return a pointer to the -created BFD. If FD is not -1, then 'fdopen' is used to open the file; -otherwise, 'fopen' is used. MODE is passed directly to 'fopen' or -'fdopen'. + -- Function: bfd *bfd_fopen (const char *filename, const char *target, + const char *mode, int fd); + Open the file FILENAME with the target TARGET. Return a pointer to + the created BFD. If FD is not -1, then 'fdopen' is used to open the + file; otherwise, 'fopen' is used. MODE is passed directly to + 'fopen' or 'fdopen'. - Calls 'bfd_find_target', so TARGET is interpreted as by that -function. + Calls 'bfd_find_target', so TARGET is interpreted as by that + function. - The new BFD is marked as cacheable iff FD is -1. + The new BFD is marked as cacheable iff FD is -1. - If 'NULL' is returned then an error has occured. Possible errors are -'bfd_error_no_memory', 'bfd_error_invalid_target' or 'system_call' -error. + If 'NULL' is returned then an error has occured. Possible errors + are 'bfd_error_no_memory', 'bfd_error_invalid_target' or + 'system_call' error. - On error, FD is always closed. + On error, FD is always closed. - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. -2.14.1.2 'bfd_openr' +2.13.1.5 'bfd_openr' .................... -*Synopsis* - bfd *bfd_openr (const char *filename, const char *target); - *Description* -Open the file FILENAME (using 'fopen') with the target TARGET. Return a -pointer to the created BFD. + -- Function: bfd *bfd_openr (const char *filename, const char *target); + Open the file FILENAME (using 'fopen') with the target TARGET. + Return a pointer to the created BFD. - Calls 'bfd_find_target', so TARGET is interpreted as by that -function. + Calls 'bfd_find_target', so TARGET is interpreted as by that + function. - If 'NULL' is returned then an error has occured. Possible errors are -'bfd_error_no_memory', 'bfd_error_invalid_target' or 'system_call' -error. + If 'NULL' is returned then an error has occured. Possible errors + are 'bfd_error_no_memory', 'bfd_error_invalid_target' or + 'system_call' error. - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. -2.14.1.3 'bfd_fdopenr' +2.13.1.6 'bfd_fdopenr' ...................... -*Synopsis* - bfd *bfd_fdopenr (const char *filename, const char *target, int fd); - *Description* -'bfd_fdopenr' is to 'bfd_fopenr' much like 'fdopen' is to 'fopen'. It -opens a BFD on a file already described by the FD supplied. - - When the file is later 'bfd_close'd, the file descriptor will be -closed. If the caller desires that this file descriptor be cached by -BFD (opened as needed, closed as needed to free descriptors for other -opens), with the supplied FD used as an initial file descriptor (but -subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the -returned BFD. The default is to assume no caching; the file descriptor -will remain open until 'bfd_close', and will not be affected by BFD -operations on other files. + -- Function: bfd *bfd_fdopenr (const char *filename, const char + *target, int fd); + 'bfd_fdopenr' is to 'bfd_fopenr' much like 'fdopen' is to 'fopen'. + It opens a BFD on a file already described by the FD supplied. + + When the file is later 'bfd_close'd, the file descriptor will be + closed. If the caller desires that this file descriptor be cached + by BFD (opened as needed, closed as needed to free descriptors for + other opens), with the supplied FD used as an initial file + descriptor (but subject to closure at any time), call + bfd_set_cacheable(bfd, 1) on the returned BFD. The default is to + assume no caching; the file descriptor will remain open until + 'bfd_close', and will not be affected by BFD operations on other + files. - Possible errors are 'bfd_error_no_memory', 'bfd_error_invalid_target' -and 'bfd_error_system_call'. + Possible errors are 'bfd_error_no_memory', + 'bfd_error_invalid_target' and 'bfd_error_system_call'. - On error, FD is closed. + On error, FD is closed. - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. -2.14.1.4 'bfd_fdopenw' +2.13.1.7 'bfd_fdopenw' ...................... -*Synopsis* - bfd *bfd_fdopenw (const char *filename, const char *target, int fd); - *Description* -'bfd_fdopenw' is exactly like 'bfd_fdopenr' with the exception that the -resulting BFD is suitable for output. + -- Function: bfd *bfd_fdopenw (const char *filename, const char + *target, int fd); + 'bfd_fdopenw' is exactly like 'bfd_fdopenr' with the exception that + the resulting BFD is suitable for output. -2.14.1.5 'bfd_openstreamr' +2.13.1.8 'bfd_openstreamr' .......................... -*Synopsis* - bfd *bfd_openstreamr (const char * filename, const char * target, - void * stream); - *Description* -Open a BFD for read access on an existing stdio stream. When the BFD is -passed to 'bfd_close', the stream will be closed. + -- Function: bfd *bfd_openstreamr (const char * filename, const char * + target, void * stream); + Open a BFD for read access on an existing stdio stream. When the + BFD is passed to 'bfd_close', the stream will be closed. - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. -2.14.1.6 'bfd_openr_iovec' +2.13.1.9 'bfd_openr_iovec' .......................... -*Synopsis* - bfd *bfd_openr_iovec (const char *filename, const char *target, - void *(*open_func) (struct bfd *nbfd, - void *open_closure), - void *open_closure, - file_ptr (*pread_func) (struct bfd *nbfd, - void *stream, - void *buf, - file_ptr nbytes, - file_ptr offset), - int (*close_func) (struct bfd *nbfd, - void *stream), - int (*stat_func) (struct bfd *abfd, - void *stream, - struct stat *sb)); - *Description* -Create and return a BFD backed by a read-only STREAM. The STREAM is -created using OPEN_FUNC, accessed using PREAD_FUNC and destroyed using -CLOSE_FUNC. - - Calls 'bfd_find_target', so TARGET is interpreted as by that -function. + -- Function: bfd *bfd_openr_iovec (const char *filename, const char + *target, void *(*open_func) (struct bfd *nbfd, void + *open_closure), void *open_closure, file_ptr (*pread_func) + (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, + file_ptr offset), int (*close_func) (struct bfd *nbfd, void + *stream), int (*stat_func) (struct bfd *abfd, void *stream, + struct stat *sb)); + Create and return a BFD backed by a read-only STREAM. The STREAM + is created using OPEN_FUNC, accessed using PREAD_FUNC and destroyed + using CLOSE_FUNC. + + Calls 'bfd_find_target', so TARGET is interpreted as by that + function. + + Calls OPEN_FUNC (which can call 'bfd_zalloc' and + 'bfd_get_filename') to obtain the read-only stream backing the BFD. + OPEN_FUNC either succeeds returning the non-'NULL' STREAM, or fails + returning 'NULL' (setting 'bfd_error'). + + Calls PREAD_FUNC to request NBYTES of data from STREAM starting at + OFFSET (e.g., via a call to 'bfd_read'). PREAD_FUNC either + succeeds returning the number of bytes read (which can be less than + NBYTES when end-of-file), or fails returning -1 (setting + 'bfd_error'). + + Calls CLOSE_FUNC when the BFD is later closed using 'bfd_close'. + CLOSE_FUNC either succeeds returning 0, or fails returning -1 + (setting 'bfd_error'). + + Calls STAT_FUNC to fill in a stat structure for bfd_stat, + bfd_get_size, and bfd_get_mtime calls. STAT_FUNC returns 0 on + success, or returns -1 on failure (setting 'bfd_error'). + + If 'bfd_openr_iovec' returns 'NULL' then an error has occurred. + Possible errors are 'bfd_error_no_memory', + 'bfd_error_invalid_target' and 'bfd_error_system_call'. + + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. + +2.13.1.10 'bfd_openw' +..................... - Calls OPEN_FUNC (which can call 'bfd_zalloc' and 'bfd_get_filename') -to obtain the read-only stream backing the BFD. OPEN_FUNC either -succeeds returning the non-'NULL' STREAM, or fails returning 'NULL' -(setting 'bfd_error'). + -- Function: bfd *bfd_openw (const char *filename, const char *target); + Create a BFD, associated with file FILENAME, using the file format + TARGET, and return a pointer to it. - Calls PREAD_FUNC to request NBYTES of data from STREAM starting at -OFFSET (e.g., via a call to 'bfd_read'). PREAD_FUNC either succeeds -returning the number of bytes read (which can be less than NBYTES when -end-of-file), or fails returning -1 (setting 'bfd_error'). + Possible errors are 'bfd_error_system_call', 'bfd_error_no_memory', + 'bfd_error_invalid_target'. - Calls CLOSE_FUNC when the BFD is later closed using 'bfd_close'. -CLOSE_FUNC either succeeds returning 0, or fails returning -1 (setting -'bfd_error'). + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. - Calls STAT_FUNC to fill in a stat structure for bfd_stat, -bfd_get_size, and bfd_get_mtime calls. STAT_FUNC returns 0 on success, -or returns -1 on failure (setting 'bfd_error'). +2.13.1.11 'bfd_elf_bfd_from_remote_memory' +.......................................... - If 'bfd_openr_iovec' returns 'NULL' then an error has occurred. -Possible errors are 'bfd_error_no_memory', 'bfd_error_invalid_target' -and 'bfd_error_system_call'. + -- Function: bfd *bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma + ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int + (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, + bfd_size_type len)); + Create a new BFD as if by bfd_openr. Rather than opening a file, + reconstruct an ELF file by reading the segments out of remote + memory based on the ELF file header at EHDR_VMA and the ELF program + headers it points to. If non-zero, SIZE is the known extent of the + object. If not null, *LOADBASEP is filled in with the difference + between the VMAs from which the segments were read, and the VMAs + the file headers (and hence BFD's idea of each section's VMA) put + them at. + + The function TARGET_READ_MEMORY is called to copy LEN bytes from + the remote memory at target address VMA into the local buffer at + MYADDR; it should return zero on success or an errno code on + failure. TEMPL must be a BFD for an ELF target with the word size + and byte order found in the remote memory. + +2.13.1.12 'bfd_close' +..................... - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + -- Function: bool bfd_close (bfd *abfd); + Close a BFD. If the BFD was open for writing, then pending + operations are completed and the file written out and closed. If + the created file is executable, then 'chmod' is called to mark it + as such. -2.14.1.7 'bfd_openw' -.................... + All memory attached to the BFD is released. -*Synopsis* - bfd *bfd_openw (const char *filename, const char *target); - *Description* -Create a BFD, associated with file FILENAME, using the file format -TARGET, and return a pointer to it. + The file descriptor associated with the BFD is closed (even if it + was passed in to BFD by 'bfd_fdopenr'). - Possible errors are 'bfd_error_system_call', 'bfd_error_no_memory', -'bfd_error_invalid_target'. + 'TRUE' is returned if all is ok, otherwise 'FALSE'. - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. +2.13.1.13 'bfd_close_all_done' +.............................. -2.14.1.8 'bfd_close' -.................... + -- Function: bool bfd_close_all_done (bfd *); + Close a BFD. Differs from 'bfd_close' since it does not complete + any pending operations. This routine would be used if the + application had just used BFD for swapping and didn't want to use + any of the writing code. -*Synopsis* - bool bfd_close (bfd *abfd); - *Description* -Close a BFD. If the BFD was open for writing, then pending operations -are completed and the file written out and closed. If the created file -is executable, then 'chmod' is called to mark it as such. + If the created file is executable, then 'chmod' is called to mark + it as such. - All memory attached to the BFD is released. + All memory attached to the BFD is released. - The file descriptor associated with the BFD is closed (even if it was -passed in to BFD by 'bfd_fdopenr'). + 'TRUE' is returned if all is ok, otherwise 'FALSE'. - *Returns* -'TRUE' is returned if all is ok, otherwise 'FALSE'. +2.13.1.14 'bfd_create' +...................... + + -- Function: bfd *bfd_create (const char *filename, bfd *templ); + Create a new BFD in the manner of 'bfd_openw', but without opening + a file. The new BFD takes the target from the target used by + TEMPL. The format is always set to 'bfd_object'. -2.14.1.9 'bfd_close_all_done' + A copy of the FILENAME argument is stored in the newly created BFD. + It can be accessed via the bfd_get_filename() macro. + +2.13.1.15 'bfd_make_writable' ............................. -*Synopsis* - bool bfd_close_all_done (bfd *); - *Description* -Close a BFD. Differs from 'bfd_close' since it does not complete any -pending operations. This routine would be used if the application had -just used BFD for swapping and didn't want to use any of the writing -code. + -- Function: bool bfd_make_writable (bfd *abfd); + Takes a BFD as created by 'bfd_create' and converts it into one + like as returned by 'bfd_openw'. It does this by converting the + BFD to BFD_IN_MEMORY. It's assumed that you will call + 'bfd_make_readable' on this bfd later. - If the created file is executable, then 'chmod' is called to mark it -as such. + 'TRUE' is returned if all is ok, otherwise 'FALSE'. - All memory attached to the BFD is released. +2.13.1.16 'bfd_make_readable' +............................. - *Returns* -'TRUE' is returned if all is ok, otherwise 'FALSE'. + -- Function: bool bfd_make_readable (bfd *abfd); + Takes a BFD as created by 'bfd_create' and 'bfd_make_writable' and + converts it into one like as returned by 'bfd_openr'. It does this + by writing the contents out to the memory buffer, then reversing + the direction. -2.14.1.10 'bfd_create' -...................... + 'TRUE' is returned if all is ok, otherwise 'FALSE'. -*Synopsis* - bfd *bfd_create (const char *filename, bfd *templ); - *Description* -Create a new BFD in the manner of 'bfd_openw', but without opening a -file. The new BFD takes the target from the target used by TEMPL. The -format is always set to 'bfd_object'. +2.13.1.17 'bfd_calc_gnu_debuglink_crc32' +........................................ - A copy of the FILENAME argument is stored in the newly created BFD. -It can be accessed via the bfd_get_filename() macro. + -- Function: uint32_t bfd_calc_gnu_debuglink_crc32 (uint32_t crc, const + bfd_byte *buf, bfd_size_type len); + Computes a CRC value as used in the .gnu_debuglink section. + Advances the previously computed CRC value by computing and adding + in the crc32 for LEN bytes of BUF. -2.14.1.11 'bfd_make_writable' -............................. + Return the updated CRC32 value. -*Synopsis* - bool bfd_make_writable (bfd *abfd); - *Description* -Takes a BFD as created by 'bfd_create' and converts it into one like as -returned by 'bfd_openw'. It does this by converting the BFD to -BFD_IN_MEMORY. It's assumed that you will call 'bfd_make_readable' on -this bfd later. +2.13.1.18 'bfd_get_debug_link_info' +................................... - *Returns* -'TRUE' is returned if all is ok, otherwise 'FALSE'. + -- Function: char *bfd_get_debug_link_info (bfd *abfd, uint32_t + *crc32_out); + Extracts the filename and CRC32 value for any separate debug + information file associated with ABFD. -2.14.1.12 'bfd_make_readable' -............................. + Returns the filename of the associated debug information file, or + NULL if there is no such file. If the filename was found then the + contents of CRC32_OUT are updated to hold the corresponding CRC32 + value for the file. -*Synopsis* - bool bfd_make_readable (bfd *abfd); - *Description* -Takes a BFD as created by 'bfd_create' and 'bfd_make_writable' and -converts it into one like as returned by 'bfd_openr'. It does this by -writing the contents out to the memory buffer, then reversing the -direction. + The returned filename is allocated with 'malloc'; freeing it is the + responsibility of the caller. - *Returns* -'TRUE' is returned if all is ok, otherwise 'FALSE'. +2.13.1.19 'bfd_get_alt_debug_link_info' +....................................... -2.14.1.13 'bfd_alloc' -..................... + -- Function: char *bfd_get_alt_debug_link_info (bfd * abfd, + bfd_size_type *buildid_len, bfd_byte **buildid_out); + Fetch the filename and BuildID value for any alternate debuginfo + associated with ABFD. Return NULL if no such info found, otherwise + return filename and update BUILDID_LEN and BUILDID_OUT. The + returned filename and build_id are allocated with 'malloc'; freeing + them is the responsibility of the caller. -*Synopsis* - void *bfd_alloc (bfd *abfd, bfd_size_type wanted); - *Description* -Allocate a block of WANTED bytes of memory attached to 'abfd' and return -a pointer to it. +2.13.1.20 'bfd_follow_gnu_debuglink' +.................................... -2.14.1.14 'bfd_zalloc' -...................... + -- Function: char *bfd_follow_gnu_debuglink (bfd *abfd, const char + *dir); + Takes a BFD and searches it for a .gnu_debuglink section. If this + section is found, it examines the section for the name and checksum + of a '.debug' file containing auxiliary debugging information. It + then searches the filesystem for this .debug file in some standard + locations, including the directory tree rooted at DIR, and if found + returns the full filename. -*Synopsis* - void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); - *Description* -Allocate a block of WANTED bytes of zeroed memory attached to 'abfd' and -return a pointer to it. + If DIR is NULL, the search will take place starting at the current + directory. -2.14.1.15 'bfd_calc_gnu_debuglink_crc32' -........................................ + Returns 'NULL' on any errors or failure to locate the .debug file, + otherwise a pointer to a heap-allocated string containing the + filename. The caller is responsible for freeing this string. -*Synopsis* - unsigned long bfd_calc_gnu_debuglink_crc32 - (unsigned long crc, const unsigned char *buf, bfd_size_type len); - *Description* -Computes a CRC value as used in the .gnu_debuglink section. Advances -the previously computed CRC value by computing and adding in the crc32 -for LEN bytes of BUF. +2.13.1.21 'bfd_follow_gnu_debugaltlink' +....................................... - *Returns* -Return the updated CRC32 value. + -- Function: char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char + *dir); + Takes a BFD and searches it for a .gnu_debugaltlink section. If + this section is found, it examines the section for the name of a + file containing auxiliary debugging information. It then searches + the filesystem for this file in a set of standard locations, + including the directory tree rooted at DIR, and if found returns + the full filename. -2.14.1.16 'bfd_get_debug_link_info_1' -..................................... + If DIR is NULL, the search will take place starting at the current + directory. -*Synopsis* - char *bfd_get_debug_link_info_1 (bfd *abfd, void *crc32_out); - *Description* -Extracts the filename and CRC32 value for any separate debug information -file associated with ABFD. + Returns 'NULL' on any errors or failure to locate the debug file, + otherwise a pointer to a heap-allocated string containing the + filename. The caller is responsible for freeing this string. - The CRC32_OUT parameter is an untyped pointer because this routine is -used as a 'get_func_type' function, but it is expected to be an unsigned -long pointer. +2.13.1.22 'bfd_create_gnu_debuglink_section' +............................................ - *Returns* -The filename of the associated debug information file, or NULL if there -is no such file. If the filename was found then the contents of -CRC32_OUT are updated to hold the corresponding CRC32 value for the -file. + -- Function: struct bfd_section *bfd_create_gnu_debuglink_section (bfd + *abfd, const char *filename); + Takes a BFD and adds a .gnu_debuglink section to it. The section + is sized to be big enough to contain a link to the specified + FILENAME. - The returned filename is allocated with 'malloc'; freeing it is the -responsibility of the caller. + A pointer to the new section is returned if all is ok. Otherwise + 'NULL' is returned and bfd_error is set. -2.14.1.17 'bfd_get_debug_link_info' -................................... +2.13.1.23 'bfd_fill_in_gnu_debuglink_section' +............................................. -*Synopsis* - char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out); - *Description* -Extracts the filename and CRC32 value for any separate debug information -file associated with ABFD. + -- Function: bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct + bfd_section *sect, const char *filename); + Takes a BFD and containing a .gnu_debuglink section SECT and fills + in the contents of the section to contain a link to the specified + FILENAME. The filename should be absolute or relative to the + current directory. - *Returns* -The filename of the associated debug information file, or NULL if there -is no such file. If the filename was found then the contents of -CRC32_OUT are updated to hold the corresponding CRC32 value for the -file. + 'TRUE' is returned if all is ok. Otherwise 'FALSE' is returned and + bfd_error is set. - The returned filename is allocated with 'malloc'; freeing it is the -responsibility of the caller. +2.13.1.24 'bfd_follow_build_id_debuglink' +......................................... -2.14.1.18 'bfd_get_alt_debug_link_info' -....................................... + -- Function: char *bfd_follow_build_id_debuglink (bfd *abfd, const char + *dir); + Takes ABFD and searches it for a .note.gnu.build-id section. If + this section is found, it extracts the value of the NT_GNU_BUILD_ID + note, which should be a hexadecimal value NNNN+NN (for 32+ hex + digits). It then searches the filesystem for a file named + .BUILD-ID/NN/NN+NN.DEBUG in a set of standard locations, including + the directory tree rooted at DIR. The filename of the first + matching file to be found is returned. A matching file should + contain a .note.gnu.build-id section with the same NNNN+NN note as + ABFD, although this check is currently not implemented. + + If DIR is NULL, the search will take place starting at the current + directory. + + Returns 'NULL' on any errors or failure to locate the debug file, + otherwise a pointer to a heap-allocated string containing the + filename. The caller is responsible for freeing this string. + +2.13.1.25 'bfd_set_filename' +............................ -*Synopsis* - char *bfd_get_alt_debug_link_info (bfd * abfd, - bfd_size_type *buildid_len, - bfd_byte **buildid_out); - *Description* -Fetch the filename and BuildID value for any alternate debuginfo -associated with ABFD. Return NULL if no such info found, otherwise -return filename and update BUILDID_LEN and BUILDID_OUT. The returned -filename and build_id are allocated with 'malloc'; freeing them is the -responsibility of the caller. - -2.14.1.19 'separate_debug_file_exists' -...................................... + -- Function: const char *bfd_set_filename (bfd *abfd, const char + *filename); + Set the filename of ABFD, copying the FILENAME parameter to + bfd_alloc'd memory owned by ABFD. Returns a pointer the newly + allocated name, or NULL if the allocation failed. -*Synopsis* - bool separate_debug_file_exists - (char *name, void *crc32_p); - *Description* -Checks to see if NAME is a file and if its contents match CRC32, which -is a pointer to an 'unsigned long' containing a CRC32. + +File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end - The CRC32_P parameter is an untyped pointer because this routine is -used as a 'check_func_type' function. +2.14 Implementation details +=========================== -2.14.1.20 'separate_alt_debug_file_exists' -.......................................... +2.14.1 Internal functions +------------------------- -*Synopsis* - bool separate_alt_debug_file_exists - (char *name, void *unused); - *Description* -Checks to see if NAME is a file. +These routines are used within BFD. They are not intended for export, +but are documented here for completeness. -2.14.1.21 'find_separate_debug_file' -.................................... +2.14.1.1 'bfd_malloc' +..................... -*Synopsis* - char *find_separate_debug_file - (bfd *abfd, const char *dir, bool include_dirs, - get_func_type get, check_func_type check, void *data); - *Description* -Searches for a debug information file corresponding to ABFD. - - The name of the separate debug info file is returned by the GET -function. This function scans various fixed locations in the -filesystem, including the file tree rooted at DIR. If the INCLUDE_DIRS -parameter is true then the directory components of ABFD's filename will -be included in the searched locations. - - DATA is passed unmodified to the GET and CHECK functions. It is -generally used to implement build-id-like matching in the callback -functions. - - *Returns* -Returns the filename of the first file to be found which receives a TRUE -result from the CHECK function. Returns NULL if no valid file could be -found. - -2.14.1.22 'bfd_follow_gnu_debuglink' -.................................... + -- Function: void *bfd_malloc (bfd_size_type *size*); + Returns a pointer to an allocated block of memory that is at least + SIZE bytes long. If SIZE is 0 then it will be treated as if it + were 1. If SIZE is too big then NULL will be returned. Returns + NULL upon error and sets bfd_error. -*Synopsis* - char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); - *Description* -Takes a BFD and searches it for a .gnu_debuglink section. If this -section is found, it examines the section for the name and checksum of a -'.debug' file containing auxiliary debugging information. It then -searches the filesystem for this .debug file in some standard locations, -including the directory tree rooted at DIR, and if found returns the -full filename. - - If DIR is NULL, the search will take place starting at the current -directory. - - *Returns* -'NULL' on any errors or failure to locate the .debug file, otherwise a -pointer to a heap-allocated string containing the filename. The caller -is responsible for freeing this string. - -2.14.1.23 'bfd_follow_gnu_debugaltlink' -....................................... +2.14.1.2 'bfd_realloc' +...................... -*Synopsis* - char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); - *Description* -Takes a BFD and searches it for a .gnu_debugaltlink section. If this -section is found, it examines the section for the name of a file -containing auxiliary debugging information. It then searches the -filesystem for this file in a set of standard locations, including the -directory tree rooted at DIR, and if found returns the full filename. + -- Function: void *bfd_realloc (void **mem*, bfd_size_type *size*); + Returns a pointer to an allocated block of memory that is at least + SIZE bytes long. If SIZE is 0 then it will be treated as if it + were 1. If SIZE is too big then NULL will be returned. If MEM is + not NULL then it must point to an allocated block of memory. If + this block is large enough then MEM may be used as the return value + for this function, but this is not guaranteed. - If DIR is NULL, the search will take place starting at the current -directory. + If MEM is not returned then the first N bytes in the returned block + will be identical to the first N bytes in region pointed to by MEM, + where N is the lessor of SIZE and the length of the region of + memory currently addressed by MEM. - *Returns* -'NULL' on any errors or failure to locate the debug file, otherwise a -pointer to a heap-allocated string containing the filename. The caller -is responsible for freeing this string. + Returns NULL upon error and sets bfd_error. -2.14.1.24 'bfd_create_gnu_debuglink_section' -............................................ +2.14.1.3 'bfd_realloc_or_free' +.............................. -*Synopsis* - struct bfd_section *bfd_create_gnu_debuglink_section - (bfd *abfd, const char *filename); - *Description* -Takes a BFD and adds a .gnu_debuglink section to it. The section is -sized to be big enough to contain a link to the specified FILENAME. + -- Function: void *bfd_realloc_or_free (void **mem*, bfd_size_type + *size*); + Returns a pointer to an allocated block of memory that is at least + SIZE bytes long. If SIZE is 0 then no memory will be allocated, + MEM will be freed, and NULL will be returned. This will not cause + bfd_error to be set. - *Returns* -A pointer to the new section is returned if all is ok. Otherwise 'NULL' -is returned and bfd_error is set. + If SIZE is too big then NULL will be returned and bfd_error will be + set. If MEM is not NULL then it must point to an allocated block + of memory. If this block is large enough then MEM may be used as + the return value for this function, but this is not guaranteed. -2.14.1.25 'bfd_fill_in_gnu_debuglink_section' -............................................. + If MEM is not returned then the first N bytes in the returned block + will be identical to the first N bytes in region pointed to by MEM, + where N is the lessor of SIZE and the length of the region of + memory currently addressed by MEM. -*Synopsis* - bool bfd_fill_in_gnu_debuglink_section - (bfd *abfd, struct bfd_section *sect, const char *filename); - *Description* -Takes a BFD and containing a .gnu_debuglink section SECT and fills in -the contents of the section to contain a link to the specified FILENAME. -The filename should be relative to the current directory. +2.14.1.4 'bfd_zmalloc' +...................... - *Returns* -'TRUE' is returned if all is ok. Otherwise 'FALSE' is returned and -bfd_error is set. + -- Function: void *bfd_zmalloc (bfd_size_type *size*); + Returns a pointer to an allocated block of memory that is at least + SIZE bytes long. If SIZE is 0 then it will be treated as if it + were 1. If SIZE is too big then NULL will be returned. Returns + NULL upon error and sets bfd_error. -2.14.1.26 'get_build_id' -........................ + If NULL is not returned then the allocated block of memory will + have been cleared. -*Synopsis* - struct bfd_build_id * get_build_id (bfd *abfd); - *Description* -Finds the build-id associated with ABFD. If the build-id is extracted -from the note section then a build-id structure is built for it, using -memory allocated to ABFD, and this is then attached to the ABFD. +2.14.1.5 'bfd_alloc' +.................... - *Returns* -Returns a pointer to the build-id structure if a build-id could be -found. If no build-id is found NULL is returned and error code is set. + -- Function: void *bfd_alloc (bfd *abfd, bfd_size_type wanted); + Allocate a block of WANTED bytes of memory attached to 'abfd' and + return a pointer to it. -2.14.1.27 'get_build_id_name' -............................. +2.14.1.6 'bfd_zalloc' +..................... -*Synopsis* - char * get_build_id_name (bfd *abfd, void *build_id_out_p) - *Description* -Searches ABFD for a build-id, and then constructs a pathname from it. -The path is computed as .build-id/NN/NN+NN.debug where NNNN+NN is the -build-id value as a hexadecimal string. - - *Returns* -Returns the constructed filename or NULL upon error. It is the caller's -responsibility to free the memory used to hold the filename. If a -filename is returned then the BUILD_ID_OUT_P parameter (which points to -a 'struct bfd_build_id' pointer) is set to a pointer to the build_id -structure. - -2.14.1.28 'check_build_id_file' -............................... + -- Function: void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); + Allocate a block of WANTED bytes of zeroed memory attached to + 'abfd' and return a pointer to it. -*Synopsis* - bool check_build_id_file (char *name, void *buildid_p); - *Description* -Checks to see if NAME is a readable file and if its build-id matches -BUILDID. +2.14.1.7 'bfd_release' +...................... - *Returns* -Returns TRUE if the file exists, is readable, and contains a build-id -which matches the build-id pointed at by BUILD_ID_P (which is really a -'struct bfd_build_id **'). + -- Function: void bfd_release (bfd *, void *); + Free a block allocated for a BFD. Note: Also frees all more + recently allocated blocks! -2.14.1.29 'bfd_follow_build_id_debuglink' -......................................... +2.14.1.8 'bfd_write_bigendian_4byte_int' +........................................ -*Synopsis* - char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); - *Description* -Takes ABFD and searches it for a .note.gnu.build-id section. If this -section is found, it extracts the value of the NT_GNU_BUILD_ID note, -which should be a hexadecimal value NNNN+NN (for 32+ hex digits). It -then searches the filesystem for a file named .BUILD-ID/NN/NN+NN.DEBUG -in a set of standard locations, including the directory tree rooted at -DIR. The filename of the first matching file to be found is returned. -A matching file should contain a .note.gnu.build-id section with the -same NNNN+NN note as ABFD, although this check is currently not -implemented. - - If DIR is NULL, the search will take place starting at the current -directory. - - *Returns* -'NULL' on any errors or failure to locate the debug file, otherwise a -pointer to a heap-allocated string containing the filename. The caller -is responsible for freeing this string. - -2.14.1.30 'bfd_set_filename' -............................ + -- Function: bool bfd_write_bigendian_4byte_int (bfd *, unsigned int); + Write a 4 byte integer I to the output BFD ABFD, in big endian + order regardless of what else is going on. This is useful in + archives. -*Synopsis* - const char *bfd_set_filename (bfd *abfd, const char *filename); - *Description* -Set the filename of ABFD, copying the FILENAME parameter to bfd_alloc'd -memory owned by ABFD. Returns a pointer the newly allocated name, or -NULL if the allocation failed. +2.14.1.9 'bfd_put_size' +....................... - -File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end +2.14.1.10 'bfd_get_size' +........................ + +These macros as used for reading and writing raw data in sections; each +access (except for bytes) is vectored through the target format of the +BFD and mangled accordingly. The mangling performs any necessary endian +translations and removes alignment restrictions. Note that types +accepted and returned by these macros are identical so they can be +swapped around in macros--for example, 'libaout.h' defines 'GET_WORD' to +either 'bfd_get_32' or 'bfd_get_64'. + + In the put routines, VAL must be a 'bfd_vma'. If we are on a system +without prototypes, the caller is responsible for making sure that is +true, with a cast if necessary. We don't cast them in the macro +definitions because that would prevent 'lint' or 'gcc -Wall' from +detecting sins such as passing a pointer. To detect calling these with +less than a 'bfd_vma', use 'gcc -Wconversion' on a host with 64 bit +'bfd_vma''s. + + /* Byte swapping macros for user section data. */ + + #define bfd_put_8(abfd, val, ptr) \ + ((void) (*((bfd_byte *) (ptr)) = (val) & 0xff)) + #define bfd_put_signed_8 \ + bfd_put_8 + #define bfd_get_8(abfd, ptr) \ + ((bfd_vma) *(const bfd_byte *) (ptr) & 0xff) + #define bfd_get_signed_8(abfd, ptr) \ + ((((bfd_signed_vma) *(const bfd_byte *) (ptr) & 0xff) ^ 0x80) - 0x80) + + #define bfd_put_16(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) + #define bfd_put_signed_16 \ + bfd_put_16 + #define bfd_get_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx16, (ptr)) + #define bfd_get_signed_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) + + #define bfd_put_24(abfd, val, ptr) \ + do \ + if (bfd_big_endian (abfd)) \ + bfd_putb24 ((val), (ptr)); \ + else \ + bfd_putl24 ((val), (ptr)); \ + while (0) + + bfd_vma bfd_getb24 (const void *p); + bfd_vma bfd_getl24 (const void *p); + + #define bfd_get_24(abfd, ptr) \ + (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr)) + + #define bfd_put_32(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx32, ((val),(ptr))) + #define bfd_put_signed_32 \ + bfd_put_32 + #define bfd_get_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx32, (ptr)) + #define bfd_get_signed_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_32, (ptr)) + + #define bfd_put_64(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx64, ((val), (ptr))) + #define bfd_put_signed_64 \ + bfd_put_64 + #define bfd_get_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx64, (ptr)) + #define bfd_get_signed_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) + + #define bfd_get(bits, abfd, ptr) \ + ((bits) == 8 ? bfd_get_8 (abfd, ptr) \ + : (bits) == 16 ? bfd_get_16 (abfd, ptr) \ + : (bits) == 32 ? bfd_get_32 (abfd, ptr) \ + : (bits) == 64 ? bfd_get_64 (abfd, ptr) \ + : (abort (), (bfd_vma) - 1)) + + #define bfd_put(bits, abfd, val, ptr) \ + ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ + : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ + : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ + : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ + : (abort (), (void) 0)) + + +2.14.1.11 'bfd_h_put_size' +.......................... + +These macros have the same function as their 'bfd_get_x' brethren, +except that they are used for removing information for the header +records of object files. Believe it or not, some object files keep +their header records in big endian order and their data in little endian +order. + + /* Byte swapping macros for file header data. */ + + #define bfd_h_put_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) + #define bfd_h_put_signed_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) + #define bfd_h_get_8(abfd, ptr) \ + bfd_get_8 (abfd, ptr) + #define bfd_h_get_signed_8(abfd, ptr) \ + bfd_get_signed_8 (abfd, ptr) + + #define bfd_h_put_16(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx16, (val, ptr)) + #define bfd_h_put_signed_16 \ + bfd_h_put_16 + #define bfd_h_get_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx16, (ptr)) + #define bfd_h_get_signed_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr)) + + #define bfd_h_put_32(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx32, (val, ptr)) + #define bfd_h_put_signed_32 \ + bfd_h_put_32 + #define bfd_h_get_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx32, (ptr)) + #define bfd_h_get_signed_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr)) + + #define bfd_h_put_64(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx64, (val, ptr)) + #define bfd_h_put_signed_64 \ + bfd_h_put_64 + #define bfd_h_get_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx64, (ptr)) + #define bfd_h_get_signed_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) + + /* Aliases for the above, which should eventually go away. */ + + #define H_PUT_64 bfd_h_put_64 + #define H_PUT_32 bfd_h_put_32 + #define H_PUT_16 bfd_h_put_16 + #define H_PUT_8 bfd_h_put_8 + #define H_PUT_S64 bfd_h_put_signed_64 + #define H_PUT_S32 bfd_h_put_signed_32 + #define H_PUT_S16 bfd_h_put_signed_16 + #define H_PUT_S8 bfd_h_put_signed_8 + #define H_GET_64 bfd_h_get_64 + #define H_GET_32 bfd_h_get_32 + #define H_GET_16 bfd_h_get_16 + #define H_GET_8 bfd_h_get_8 + #define H_GET_S64 bfd_h_get_signed_64 + #define H_GET_S32 bfd_h_get_signed_32 + #define H_GET_S16 bfd_h_get_signed_16 + #define H_GET_S8 bfd_h_get_signed_8 + + + +2.14.1.12 'Byte swapping routines.' +................................... + + -- Function: uint64_t bfd_getb64 (const void *); uint64_t bfd_getl64 + (const void *); int64_t bfd_getb_signed_64 (const void *); + int64_t bfd_getl_signed_64 (const void *); bfd_vma bfd_getb32 + (const void *); bfd_vma bfd_getl32 (const void *); + bfd_signed_vma bfd_getb_signed_32 (const void *); + bfd_signed_vma bfd_getl_signed_32 (const void *); bfd_vma + bfd_getb16 (const void *); bfd_vma bfd_getl16 (const void *); + bfd_signed_vma bfd_getb_signed_16 (const void *); + bfd_signed_vma bfd_getl_signed_16 (const void *); void + bfd_putb64 (uint64_t, void *); void bfd_putl64 (uint64_t, void + *); void bfd_putb32 (bfd_vma, void *); void bfd_putl32 + (bfd_vma, void *); void bfd_putb24 (bfd_vma, void *); void + bfd_putl24 (bfd_vma, void *); void bfd_putb16 (bfd_vma, void + *); void bfd_putl16 (bfd_vma, void *); uint64_t bfd_get_bits + (const void *, int, bool); void bfd_put_bits (uint64_t, void + *, int, bool); + Read and write integers in a particular endian order. getb and + putb functions handle big-endian, getl and putl handle + little-endian. bfd_get_bits and bfd_put_bits specify big-endian by + passing TRUE in the last parameter, little-endian by passing FALSE. + +2.14.1.13 'bfd_log2' +.................... + + -- Function: unsigned int bfd_log2 (bfd_vma x); + Return the log base 2 of the value supplied, rounded up. E.g., an + X of 1025 returns 11. A X of 0 returns 0.  File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end @@ -9468,48 +9061,40 @@ opens the one wanted, returning its file handle. 2.15.1.1 'bfd_cache_init' ......................... -*Synopsis* - bool bfd_cache_init (bfd *abfd); - *Description* -Add a newly opened BFD to the cache. + -- Function: bool bfd_cache_init (bfd *abfd); + Add a newly opened BFD to the cache. 2.15.1.2 'bfd_cache_close' .......................... -*Synopsis* - bool bfd_cache_close (bfd *abfd); - *Description* -Remove the BFD ABFD from the cache. If the attached file is open, then -close it too. + -- Function: bool bfd_cache_close (bfd *abfd); + Remove the BFD ABFD from the cache. If the attached file is open, + then close it too. - *Returns* -'FALSE' is returned if closing the file fails, 'TRUE' is returned if all -is well. + 'FALSE' is returned if closing the file fails, 'TRUE' is returned + if all is well. 2.15.1.3 'bfd_cache_close_all' .............................. -*Synopsis* - bool bfd_cache_close_all (void); - *Description* -Remove all BFDs from the cache. If the attached file is open, then -close it too. + -- Function: bool bfd_cache_close_all (void); + Remove all BFDs from the cache. If the attached file is open, then + close it too. Note - despite its name this function will close a + BFD even if it is not marked as being cacheable, ie even if + bfd_get_cacheable() returns false. - *Returns* -'FALSE' is returned if closing one of the file fails, 'TRUE' is returned -if all is well. + 'FALSE' is returned if closing one of the file fails, 'TRUE' is + returned if all is well. 2.15.1.4 'bfd_open_file' ........................ -*Synopsis* - FILE* bfd_open_file (bfd *abfd); - *Description* -Call the OS to open a file for ABFD. Return the 'FILE *' (possibly -'NULL') that results from this operation. Set up the BFD so that future -accesses know the file is open. If the 'FILE *' returned is 'NULL', -then it won't have been put in the cache, so it won't have to be removed -from it. + -- Function: FILE* bfd_open_file (bfd *abfd); + Call the OS to open a file for ABFD. Return the 'FILE *' (possibly + 'NULL') that results from this operation. Set up the BFD so that + future accesses know the file is open. If the 'FILE *' returned is + 'NULL', then it won't have been put in the cache, so it won't have + to be removed from it.  File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end @@ -9856,142 +9441,119 @@ the output file at the end of 'NAME(aout,final_link)'. 2.16.3.4 'bfd_link_split_section' ................................. -*Synopsis* - bool bfd_link_split_section (bfd *abfd, asection *sec); - *Description* -Return nonzero if SEC should be split during a reloceatable or final -link. - #define bfd_link_split_section(abfd, sec) \ - BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) + -- Function: bool bfd_link_split_section (bfd *abfd, asection *sec); + Return nonzero if SEC should be split during a reloceatable or + final link. + #define bfd_link_split_section(abfd, sec) \ + BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) 2.16.3.5 'bfd_section_already_linked' ..................................... -*Synopsis* - bool bfd_section_already_linked (bfd *abfd, - asection *sec, - struct bfd_link_info *info); - *Description* -Check if DATA has been already linked during a reloceatable or final -link. Return TRUE if it has. - #define bfd_section_already_linked(abfd, sec, info) \ - BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) + -- Function: bool bfd_section_already_linked (bfd *abfd, asection *sec, + struct bfd_link_info *info); + Check if DATA has been already linked during a reloceatable or + final link. Return TRUE if it has. + #define bfd_section_already_linked(abfd, sec, info) \ + BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) 2.16.3.6 'bfd_generic_define_common_symbol' ........................................... -*Synopsis* - bool bfd_generic_define_common_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); - *Description* -Convert common symbol H into a defined symbol. Return TRUE on success -and FALSE on failure. - #define bfd_define_common_symbol(output_bfd, info, h) \ - BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) + -- Function: bool bfd_generic_define_common_symbol (bfd *output_bfd, + struct bfd_link_info *info, struct bfd_link_hash_entry *h); + Convert common symbol H into a defined symbol. Return TRUE on + success and FALSE on failure. + #define bfd_define_common_symbol(output_bfd, info, h) \ + BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) 2.16.3.7 '_bfd_generic_link_hide_symbol' ........................................ -*Synopsis* - void _bfd_generic_link_hide_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); - *Description* -Hide symbol H. This is an internal function. It should not be called -from outside the BFD library. - #define bfd_link_hide_symbol(output_bfd, info, h) \ - BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h)) + -- Function: void _bfd_generic_link_hide_symbol (bfd *output_bfd, + struct bfd_link_info *info, struct bfd_link_hash_entry *h); + Hide symbol H. This is an internal function. It should not be + called from outside the BFD library. + #define bfd_link_hide_symbol(output_bfd, info, h) \ + BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h)) 2.16.3.8 'bfd_generic_define_start_stop' ........................................ -*Synopsis* - struct bfd_link_hash_entry *bfd_generic_define_start_stop - (struct bfd_link_info *info, - const char *symbol, asection *sec); - *Description* -Define a __start, __stop, .startof. or .sizeof. symbol. Return the -symbol or NULL if no such undefined symbol exists. - #define bfd_define_start_stop(output_bfd, info, symbol, sec) \ - BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec)) + -- Function: struct bfd_link_hash_entry *bfd_generic_define_start_stop + (struct bfd_link_info *info, const char *symbol, asection + *sec); + Define a __start, __stop, .startof. or .sizeof. symbol. Return + the symbol or NULL if no such undefined symbol exists. + #define bfd_define_start_stop(output_bfd, info, symbol, sec) \ + BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec)) 2.16.3.9 'bfd_find_version_for_sym' ................................... -*Synopsis* - struct bfd_elf_version_tree * bfd_find_version_for_sym - (struct bfd_elf_version_tree *verdefs, - const char *sym_name, bool *hide); - *Description* -Search an elf version script tree for symbol versioning info and export -/ don't-export status for a given symbol. Return non-NULL on success -and NULL on failure; also sets the output 'hide' boolean parameter. + -- Function: struct bfd_elf_version_tree * bfd_find_version_for_sym + (struct bfd_elf_version_tree *verdefs, const char *sym_name, + bool *hide); + Search an elf version script tree for symbol versioning info and + export / don't-export status for a given symbol. Return non-NULL + on success and NULL on failure; also sets the output 'hide' boolean + parameter. 2.16.3.10 'bfd_hide_sym_by_version' ................................... -*Synopsis* - bool bfd_hide_sym_by_version - (struct bfd_elf_version_tree *verdefs, const char *sym_name); - *Description* -Search an elf version script tree for symbol versioning info for a given -symbol. Return TRUE if the symbol is hidden. + -- Function: bool bfd_hide_sym_by_version (struct bfd_elf_version_tree + *verdefs, const char *sym_name); + Search an elf version script tree for symbol versioning info for a + given symbol. Return TRUE if the symbol is hidden. 2.16.3.11 'bfd_link_check_relocs' ................................. -*Synopsis* - bool bfd_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); - *Description* -Checks the relocs in ABFD for validity. Does not execute the relocs. -Return TRUE if everything is OK, FALSE otherwise. This is the external -entry point to this code. + -- Function: bool bfd_link_check_relocs (bfd *abfd, struct + bfd_link_info *info); + Checks the relocs in ABFD for validity. Does not execute the + relocs. Return TRUE if everything is OK, FALSE otherwise. This is + the external entry point to this code. 2.16.3.12 '_bfd_generic_link_check_relocs' .......................................... -*Synopsis* - bool _bfd_generic_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); - *Description* -Stub function for targets that do not implement reloc checking. Return -TRUE. This is an internal function. It should not be called from -outside the BFD library. + -- Function: bool _bfd_generic_link_check_relocs (bfd *abfd, struct + bfd_link_info *info); + Stub function for targets that do not implement reloc checking. + Return TRUE. This is an internal function. It should not be called + from outside the BFD library. 2.16.3.13 'bfd_merge_private_bfd_data' ...................................... -*Synopsis* - bool bfd_merge_private_bfd_data - (bfd *ibfd, struct bfd_link_info *info); - *Description* -Merge private BFD information from the BFD IBFD to the the output file -BFD when linking. Return 'TRUE' on success, 'FALSE' on error. Possible -error returns are: + -- Function: bool bfd_merge_private_bfd_data (bfd *ibfd, struct + bfd_link_info *info); + Merge private BFD information from the BFD IBFD to the the output + file BFD when linking. Return 'TRUE' on success, 'FALSE' on error. + Possible error returns are: + + * 'bfd_error_no_memory' - Not enough memory exists to create + private data for OBFD. + #define bfd_merge_private_bfd_data(ibfd, info) \ + BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \ + (ibfd, info)) - * 'bfd_error_no_memory' - Not enough memory exists to create private - data for OBFD. - #define bfd_merge_private_bfd_data(ibfd, info) \ - BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \ - (ibfd, info)) 2.16.3.14 '_bfd_generic_verify_endian_match' ............................................ -*Synopsis* - bool _bfd_generic_verify_endian_match - (bfd *ibfd, struct bfd_link_info *info); - *Description* -Can be used from / for bfd_merge_private_bfd_data to check that -endianness matches between input and output file. Returns TRUE for a -match, otherwise returns FALSE and emits an error. + -- Function: bool _bfd_generic_verify_endian_match (bfd *ibfd, struct + bfd_link_info *info); + Can be used from / for bfd_merge_private_bfd_data to check that + endianness matches between input and output file. Returns TRUE for + a match, otherwise returns FALSE and emits an error.  File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end @@ -10203,9 +9765,8 @@ routine of the hash table type your hash table is derived from. return (struct bfd_hash_entry *) ret; } - *Description* -The creation routine for the linker hash table, which is in 'linker.c', -looks just like this example. FUNCTION_NAME is + The creation routine for the linker hash table, which is in +'linker.c', looks just like this example. FUNCTION_NAME is '_bfd_link_hash_newfunc'. ENTRY_TYPE is 'struct bfd_link_hash_entry'. BASE_NEWFUNC is 'bfd_hash_newfunc', the creation routine for a basic hash table. @@ -10242,6 +9803,130 @@ a.out backend linker hash table, which is derived from the linker hash table, uses macros for the lookup and traversal routines. These are 'aout_link_hash_lookup' and 'aout_link_hash_traverse' in aoutx.h. +2.17.4.4 'bfd_hash_table_init_n' +................................ + + -- Function: bool bfd_hash_table_init_n (struct bfd_hash_table *, + struct bfd_hash_entry *(* *newfunc*) (struct bfd_hash_entry *, + struct bfd_hash_table *, const char *), unsigned int + *entsize*, unsigned int *size*); + Create a new hash table, given a number of entries. + +2.17.4.5 'bfd_hash_table_init' +.............................. + + -- Function: bool bfd_hash_table_init (struct bfd_hash_table *, struct + bfd_hash_entry *(* *newfunc*) (struct bfd_hash_entry *, struct + bfd_hash_table *, const char *), unsigned int *entsize*); + Create a new hash table with the default number of entries. + +2.17.4.6 'bfd_hash_table_free' +.............................. + + -- Function: void bfd_hash_table_free (struct bfd_hash_table *); + Free a hash table. + +2.17.4.7 'bfd_hash_lookup' +.......................... + + -- Function: struct bfd_hash_entry *bfd_hash_lookup (struct + bfd_hash_table *, const char *, bool *create*, bool *copy*); + Look up a string in a hash table. + +2.17.4.8 'bfd_hash_insert' +.......................... + + -- Function: struct bfd_hash_entry *bfd_hash_insert (struct + bfd_hash_table *, const char *, unsigned long *hash*); + Insert an entry in a hash table. + +2.17.4.9 'bfd_hash_rename' +.......................... + + -- Function: void bfd_hash_rename (struct bfd_hash_table *, const char + *, struct bfd_hash_entry *); + Rename an entry in a hash table. + +2.17.4.10 'bfd_hash_replace' +............................ + + -- Function: void bfd_hash_replace (struct bfd_hash_table *, struct + bfd_hash_entry * *old*, struct bfd_hash_entry * *new*); + Replace an entry in a hash table. + +2.17.4.11 'bfd_hash_allocate' +............................. + + -- Function: void *bfd_hash_allocate (struct bfd_hash_table *, unsigned + int *size*); + Allocate space in a hash table. + +2.17.4.12 'bfd_hash_newfunc' +............................ + + -- Function: struct bfd_hash_entry *bfd_hash_newfunc (struct + bfd_hash_entry *, struct bfd_hash_table *, const char *); + Base method for creating a new hash table entry. + +2.17.4.13 'bfd_hash_traverse' +............................. + + -- Function: void bfd_hash_traverse (struct bfd_hash_table *, bool (*) + (struct bfd_hash_entry *, void *), void *); + Traverse a hash table. + +2.17.4.14 'bfd_hash_set_default_size' +..................................... + + -- Function: unsigned int bfd_hash_set_default_size (unsigned int); + Set hash table default size. + +2.17.4.15 '_bfd_stringtab_init' +............................... + + -- Function: struct bfd_strtab_hash *_bfd_stringtab_init (void); + Create a new strtab. + +2.17.4.16 '_bfd_xcoff_stringtab_init' +..................................... + + -- Function: struct bfd_strtab_hash *_bfd_xcoff_stringtab_init (bool + *isxcoff64*); + Create a new strtab in which the strings are output in the format + used in the XCOFF .debug section: a two byte length precedes each + string. + +2.17.4.17 '_bfd_stringtab_free' +............................... + + -- Function: void _bfd_stringtab_free (struct bfd_strtab_hash *); + Free a strtab. + +2.17.4.18 '_bfd_stringtab_add' +.............................. + + -- Function: bfd_size_type _bfd_stringtab_add (struct bfd_strtab_hash + *, const char *, bool *hash*, bool *copy*); + Get the index of a string in a strtab, adding it if it is not + already present. If HASH is FALSE, we don't really use the hash + table, and we don't eliminate duplicate strings. If COPY is true + then store a copy of STR if creating a new entry. + +2.17.4.19 '_bfd_stringtab_size' +............................... + + -- Function: bfd_size_type _bfd_stringtab_size (struct bfd_strtab_hash + *); + Get the number of bytes in a strtab. + +2.17.4.20 '_bfd_stringtab_emit' +............................... + + -- Function: bool _bfd_stringtab_emit (bfd *, struct bfd_strtab_hash + *); + Write out a strtab. ABFD must already be at the right location in + the file. +  File: bfd.info, Node: BFD back ends, Next: GNU Free Documentation License, Prev: BFD front end, Up: Top @@ -10270,7 +9955,6 @@ File: bfd.info, Node: aout, Next: coff, Prev: What to Put Where, Up: BFD bac 3.2 a.out backends ================== -*Description* BFD supports a number of different flavours of a.out format, though the major differences are only the sizes of the structures on disk, and the shape of the relocation information. @@ -10348,7 +10032,6 @@ selected. 3.2.1 Relocations ----------------- -*Description* The file 'aoutx.h' provides for both the _standard_ and _extended_ forms of a.out relocation records. @@ -10359,7 +10042,6 @@ addend. 3.2.2 Internal entry points --------------------------- -*Description* 'aoutx.h' exports several routines for accessing the contents of an a.out file, which are gathered and exported in turn by various format specific files (eg sunos.c). @@ -10367,88 +10049,65 @@ specific files (eg sunos.c). 3.2.2.1 'aout_SIZE_swap_exec_header_in' ....................................... -*Synopsis* - void aout_SIZE_swap_exec_header_in, - (bfd *abfd, - struct external_exec *bytes, - struct internal_exec *execp); - *Description* -Swap the information in an executable header RAW_BYTES taken from a raw -byte stream memory image into the internal exec header structure EXECP. + -- Function: void aout_SIZE_swap_exec_header_in, (bfd *abfd, struct + external_exec *bytes, struct internal_exec *execp); + Swap the information in an executable header RAW_BYTES taken from a + raw byte stream memory image into the internal exec header + structure EXECP. 3.2.2.2 'aout_SIZE_swap_exec_header_out' ........................................ -*Synopsis* - void aout_SIZE_swap_exec_header_out - (bfd *abfd, - struct internal_exec *execp, - struct external_exec *raw_bytes); - *Description* -Swap the information in an internal exec header structure EXECP into the -buffer RAW_BYTES ready for writing to disk. + -- Function: void aout_SIZE_swap_exec_header_out (bfd *abfd, struct + internal_exec *execp, struct external_exec *raw_bytes); + Swap the information in an internal exec header structure EXECP + into the buffer RAW_BYTES ready for writing to disk. 3.2.2.3 'aout_SIZE_some_aout_object_p' ...................................... -*Synopsis* - bfd_cleanup aout_SIZE_some_aout_object_p - (bfd *abfd, - struct internal_exec *execp, - bfd_cleanup (*callback_to_real_object_p) (bfd *)); - *Description* -Some a.out variant thinks that the file open in ABFD checking is an -a.out file. Do some more checking, and set up for access if it really -is. Call back to the calling environment's "finish up" function just -before returning, to handle any last-minute setup. + -- Function: bfd_cleanup aout_SIZE_some_aout_object_p (bfd *abfd, + struct internal_exec *execp, bfd_cleanup + (*callback_to_real_object_p) (bfd *)); + Some a.out variant thinks that the file open in ABFD checking is an + a.out file. Do some more checking, and set up for access if it + really is. Call back to the calling environment's "finish up" + function just before returning, to handle any last-minute setup. 3.2.2.4 'aout_SIZE_mkobject' ............................ -*Synopsis* - bool aout_SIZE_mkobject, (bfd *abfd); - *Description* -Initialize BFD ABFD for use with a.out files. + -- Function: bool aout_SIZE_mkobject, (bfd *abfd); + Initialize BFD ABFD for use with a.out files. 3.2.2.5 'aout_SIZE_machine_type' ................................ -*Synopsis* - enum machine_type aout_SIZE_machine_type - (enum bfd_architecture arch, - unsigned long machine, - bool *unknown); - *Description* -Keep track of machine architecture and machine type for a.out's. Return -the 'machine_type' for a particular architecture and machine, or -'M_UNKNOWN' if that exact architecture and machine can't be represented -in a.out format. + -- Function: enum machine_type aout_SIZE_machine_type (enum + bfd_architecture arch, unsigned long machine, bool *unknown); + Keep track of machine architecture and machine type for a.out's. + Return the 'machine_type' for a particular architecture and + machine, or 'M_UNKNOWN' if that exact architecture and machine + can't be represented in a.out format. - If the architecture is understood, machine type 0 (default) is always -understood. + If the architecture is understood, machine type 0 (default) is + always understood. 3.2.2.6 'aout_SIZE_set_arch_mach' ................................. -*Synopsis* - bool aout_SIZE_set_arch_mach, - (bfd *, - enum bfd_architecture arch, - unsigned long machine); - *Description* -Set the architecture and the machine of the BFD ABFD to the values ARCH -and MACHINE. Verify that ABFD's format can support the architecture -required. + -- Function: bool aout_SIZE_set_arch_mach, (bfd *, enum + bfd_architecture arch, unsigned long machine); + Set the architecture and the machine of the BFD ABFD to the values + ARCH and MACHINE. Verify that ABFD's format can support the + architecture required. 3.2.2.7 'aout_SIZE_new_section_hook' .................................... -*Synopsis* - bool aout_SIZE_new_section_hook, - (bfd *abfd, - asection *newsect); - *Description* -Called by the BFD in response to a 'bfd_make_section' request. + -- Function: bool aout_SIZE_new_section_hook, (bfd *abfd, asection + *newsect); + Called by the BFD in response to a 'bfd_make_section' request.  File: bfd.info, Node: coff, Next: elf, Prev: aout, Up: BFD back ends @@ -10554,9 +10213,10 @@ backend data structure. The flag controls the generation of long section names in output BFDs at runtime; if it is false, as it will be by default when generating an executable image, long section names are truncated; if true, the long section names extension is employed. The -hook points to a function that allows the value of the flag to be -altered at runtime, on formats that support long section names at all; -on other formats it points to a stub that returns an error indication. +hook points to a function that allows the value of a copy of the flag in +coff object tdata to be altered at runtime, on formats that support long +section names at all; on other formats it points to a stub that returns +an error indication. With input BFDs, the flag is set according to whether any long section names are detected while reading the section headers. For a @@ -10687,35 +10347,36 @@ writes out the table to the file. 3.3.2.6 'coff_symbol_type' .......................... -*Description* The hidden information for an 'asymbol' is described in a 'combined_entry_type': - typedef struct coff_ptr_struct { /* Remembers the offset from the first symbol in the file for - this symbol. Generated by coff_renumber_symbols. */ + this symbol. Generated by coff_renumber_symbols. */ unsigned int offset; - /* Should the value of this symbol be renumbered. Used for - XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */ - unsigned int fix_value : 1; + /* Selects between the elements of the union below. */ + unsigned int is_sym : 1; - /* Should the tag field of this symbol be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_sym.x_tagndx union. If set, + p is valid and the field will be renumbered. */ unsigned int fix_tag : 1; - /* Should the endidx field of this symbol be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_sym.x_fcnary.x_fcn.x_endndx + union. If set, p is valid and the field will be renumbered. */ unsigned int fix_end : 1; - /* Should the x_csect.x_scnlen field be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_csect.x_scnlen union. If set, + p is valid and the field will be renumbered. */ unsigned int fix_scnlen : 1; - /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the - index into the line number entries. Set by coff_slurp_symbol_table. */ + /* If set, u.syment.n_value contains a pointer to a symbol. The final + value will be the offset field. Used for XCOFF C_BSTAT symbols. */ + unsigned int fix_value : 1; + + /* If set, u.syment.n_value is an index into the line number entries. + Used for XCOFF C_BINCL/C_EINCL symbols. */ unsigned int fix_line : 1; /* The container for the symbol structure as read and translated @@ -10726,15 +10387,11 @@ The hidden information for an 'asymbol' is described in a struct internal_syment syment; } u; - /* Selector for the union above. */ - bool is_sym; - /* An extra pointer which can used by format based on COFF (like XCOFF) to provide extra information to their backend. */ void *extrap; } combined_entry_type; - /* Each canonical asymbol really looks like this: */ typedef struct coff_symbol_struct @@ -10752,30 +10409,10 @@ The hidden information for an 'asymbol' is described in a bool done_lineno; } coff_symbol_type; + 3.3.2.7 'bfd_coff_backend_data' ............................... - /* COFF symbol classifications. */ - - enum coff_symbol_classification - { - /* Global symbol. */ - COFF_SYMBOL_GLOBAL, - /* Common symbol. */ - COFF_SYMBOL_COMMON, - /* Undefined symbol. */ - COFF_SYMBOL_UNDEFINED, - /* Local symbol. */ - COFF_SYMBOL_LOCAL, - /* PE section symbol. */ - COFF_SYMBOL_PE_SECTION - }; - - typedef asection * (*coff_gc_mark_hook_fn) - (asection *, struct bfd_link_info *, struct internal_reloc *, - struct coff_link_hash_entry *, struct internal_syment *); - - Special entry points for gdb to swap in coff symbol table parts: typedef struct { void (*_bfd_coff_swap_aux_in) @@ -10868,9 +10505,9 @@ The hidden information for an 'asymbol' is described in a (bfd *, FILE *, combined_entry_type *, combined_entry_type *, combined_entry_type *, unsigned int); - void (*_bfd_coff_reloc16_extra_cases) + bool (*_bfd_coff_reloc16_extra_cases) (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, - bfd_byte *, unsigned int *, unsigned int *); + bfd_byte *, size_t *, size_t *); int (*_bfd_coff_reloc16_estimate) (bfd *, asection *, arelent *, unsigned int, @@ -10913,150 +10550,6 @@ The hidden information for an 'asymbol' is described in a } bfd_coff_backend_data; - #define coff_backend_info(abfd) \ - ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) - - #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \ - ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i)) - - #define bfd_coff_swap_sym_in(a,e,i) \ - ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i)) - - #define bfd_coff_swap_lineno_in(a,e,i) \ - ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i)) - - #define bfd_coff_swap_reloc_out(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o)) - - #define bfd_coff_swap_lineno_out(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o)) - - #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \ - ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o)) - - #define bfd_coff_swap_sym_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o)) - - #define bfd_coff_swap_scnhdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o)) - - #define bfd_coff_swap_filehdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o)) - - #define bfd_coff_swap_aouthdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o)) - - #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz) - #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz) - #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz) - #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz) - #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz) - #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz) - #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz) - #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen) - #define bfd_coff_long_filenames(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_long_filenames) - #define bfd_coff_long_section_names(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_long_section_names) - #define bfd_coff_set_long_section_names(abfd, enable) \ - ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) - #define bfd_coff_default_section_alignment_power(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) - #define bfd_coff_max_nscns(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_max_nscns) - - #define bfd_coff_swap_filehdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) - - #define bfd_coff_swap_aouthdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o)) - - #define bfd_coff_swap_scnhdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o)) - - #define bfd_coff_swap_reloc_in(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o)) - - #define bfd_coff_bad_format_hook(abfd, filehdr) \ - ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr)) - - #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\ - ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr)) - #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\ - ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\ - (abfd, filehdr, aouthdr)) - - #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\ - ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\ - (abfd, scnhdr, name, section, flags_ptr)) - - #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\ - ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr)) - - #define bfd_coff_slurp_symbol_table(abfd)\ - ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd)) - - #define bfd_coff_symname_in_debug(abfd, sym)\ - ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) - - #define bfd_coff_force_symnames_in_strings(abfd)\ - (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) - - #define bfd_coff_debug_string_prefix_length(abfd)\ - (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) - - #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ - ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ - (abfd, file, base, symbol, aux, indaux)) - - #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\ - reloc, data, src_ptr, dst_ptr)\ - ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\ - (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)) - - #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\ - ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\ - (abfd, section, reloc, shrink, link_info)) - - #define bfd_coff_classify_symbol(abfd, sym)\ - ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\ - (abfd, sym)) - - #define bfd_coff_compute_section_file_positions(abfd)\ - ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\ - (abfd)) - - #define bfd_coff_start_final_link(obfd, info)\ - ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\ - (obfd, info)) - #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\ - ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\ - (obfd, info, ibfd, o, con, rel, isyms, secs)) - #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\ - ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\ - (abfd, sec, rel, h, sym, addendp)) - #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\ - ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\ - (obfd, info, ibfd, sec, rel, adjustedp)) - #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\ - value, string, cp, coll, hashp)\ - ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\ - (info, abfd, name, flags, section, value, string, cp, coll, hashp)) - - #define bfd_coff_link_output_has_begun(a,p) \ - ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p)) - #define bfd_coff_final_link_postscript(a,p) \ - ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p)) - - #define bfd_coff_have_print_pdata(a) \ - (coff_backend_info (a)->_bfd_coff_print_pdata) - #define bfd_coff_print_pdata(a,p) \ - ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) - - /* Macro: Returns true if the bfd is a PE executable as opposed to a - PE object file. */ - #define bfd_pei_p(abfd) \ - (startswith ((abfd)->xvec->name, "pei-")) 3.3.2.8 Writing relocations ........................... @@ -11112,6 +10605,13 @@ Coff relocations are easily transformed into the internal BFD form back end specific way. For instance, the 386 uses the 'r_type' to directly produce an index into a howto table vector. + * Note that 'arelent.addend' for COFF is often not what most people + understand as a relocation addend, but rather an adjustment to the + relocation addend stored in section contents of relocatable object + files. The value found in section contents may also be confusing, + depending on both symbol value and addend somewhat similar to the + field value for a final-linked object. See 'CALC_ADDEND'. +  File: bfd.info, Node: elf, Next: mmo, Prev: coff, Up: BFD back ends @@ -11961,2767 +11461,3178 @@ BFD Index [index] * Menu: +* *bfd_alloc: Internal. (line 74) +* *bfd_arch_default_fill: Architectures. (line 741) +* *bfd_asprintf: Error reporting. (line 94) +* *bfd_create: Opening and Closing. + (line 226) +* *bfd_default_reloc_type_lookup: howto manager. (line 3651) +* *bfd_demangle: Miscellaneous. (line 329) +* *bfd_elf_bfd_from_remote_memory: Opening and Closing. + (line 172) +* *bfd_fdopenr: Opening and Closing. + (line 71) +* *bfd_fdopenw: Opening and Closing. + (line 97) +* *bfd_follow_build_id_debuglink: Opening and Closing. + (line 360) +* *bfd_follow_gnu_debugaltlink: Opening and Closing. + (line 316) +* *bfd_follow_gnu_debuglink: Opening and Closing. + (line 297) +* *bfd_fopen: Opening and Closing. + (line 30) +* *bfd_generic_get_relocated_section_contents: howto manager. + (line 3699) +* *bfd_get_alt_debug_link_info: Opening and Closing. + (line 286) +* *bfd_get_debug_link_info: Opening and Closing. + (line 270) +* *bfd_get_linker_section: section prototypes. (line 37) +* *bfd_get_next_section_by_name: section prototypes. (line 26) +* *bfd_get_relocated_section_contents: Miscellaneous. (line 281) +* *bfd_get_section_by_name: section prototypes. (line 18) +* *bfd_get_section_by_name_if: section prototypes. (line 45) +* *bfd_get_unique_section_name: section prototypes. (line 60) +* *bfd_hash_allocate: Write Other Derived Routines. + (line 83) +* *bfd_make_section: section prototypes. (line 132) +* *bfd_make_section_anyway: section prototypes. (line 106) +* *bfd_make_section_anyway_with_flags: section prototypes. (line 90) +* *bfd_make_section_old_way: section prototypes. (line 71) +* *bfd_make_section_with_flags: section prototypes. (line 121) +* *bfd_malloc: Internal. (line 15) +* *bfd_mmap: Miscellaneous. (line 467) +* *bfd_openr: Opening and Closing. + (line 54) +* *bfd_openr_iovec: Opening and Closing. + (line 116) +* *bfd_openr_next_archived_file: Archives. (line 83) +* *bfd_openstreamr: Opening and Closing. + (line 105) +* *bfd_openw: Opening and Closing. + (line 159) +* *bfd_realloc: Internal. (line 24) +* *bfd_realloc_or_free: Internal. (line 42) +* *bfd_reloc_type_lookup: howto manager. (line 3642) +* *bfd_sections_find_if: section prototypes. (line 178) +* *bfd_zalloc: Internal. (line 81) +* *bfd_zmalloc: Internal. (line 62) +* *_bfd_generic_make_empty_symbol: symbol handling functions. + (line 91) +* *_bfd_new_bfd: Opening and Closing. + (line 12) +* *_bfd_new_bfd_contained_in: Opening and Closing. + (line 18) * _bfd_error_handler: Error reporting. (line 112) +* _bfd_error_handler <1>: Error reporting. (line 117) * _bfd_final_link_relocate: Relocating the section contents. (line 22) +* _bfd_free_cached_info: Opening and Closing. + (line 20) +* _bfd_free_cached_info <1>: Opening and Closing. + (line 24) * _bfd_generic_link_add_archive_symbols: Adding symbols from an archive. (line 15) * _bfd_generic_link_add_one_symbol: Adding symbols from an object file. (line 19) * _bfd_generic_link_check_relocs: Writing the symbol table. - (line 144) + (line 126) +* _bfd_generic_link_check_relocs <1>: Writing the symbol table. + (line 130) * _bfd_generic_link_hide_symbol: Writing the symbol table. - (line 83) + (line 75) +* _bfd_generic_link_hide_symbol <1>: Writing the symbol table. + (line 79) * _bfd_generic_make_empty_symbol: symbol handling functions. - (line 96) -* _bfd_generic_set_reloc: howto manager. (line 3621) + (line 87) +* _bfd_generic_set_reloc: howto manager. (line 3705) +* _bfd_generic_set_reloc <1>: howto manager. (line 3709) * _bfd_generic_verify_endian_match: Writing the symbol table. - (line 172) -* _bfd_get_error_program_name: Error reporting. (line 155) + (line 151) +* _bfd_generic_verify_endian_match <1>: Writing the symbol table. + (line 155) +* _bfd_get_error_program_name: Error reporting. (line 151) * _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table. (line 6) * _bfd_link_final_link in target vector: Performing the Final Link. (line 6) * _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table. (line 6) -* _bfd_per_xvec_warn: bfd_target. (line 584) +* _bfd_new_bfd: Opening and Closing. + (line 8) +* _bfd_new_bfd_contained_in: Opening and Closing. + (line 14) +* _bfd_per_xvec_warn: bfd_target. (line 539) * _bfd_relocate_contents: Relocating the section contents. (line 22) -* _bfd_section_size_insane: section prototypes. (line 320) -* _bfd_set_error_handler_caching: Error reporting. (line 136) -* _bfd_unrecognized_reloc: howto manager. (line 3633) -* aout_SIZE_machine_type: aout. (line 145) -* aout_SIZE_mkobject: aout. (line 137) -* aout_SIZE_new_section_hook: aout. (line 175) -* aout_SIZE_set_arch_mach: aout. (line 162) -* aout_SIZE_some_aout_object_p: aout. (line 123) -* aout_SIZE_swap_exec_header_in: aout. (line 99) -* aout_SIZE_swap_exec_header_out: aout. (line 111) -* arelent_chain: typedef arelent. (line 311) +* _bfd_section_size_insane: section prototypes. (line 283) +* _bfd_section_size_insane <1>: section prototypes. (line 287) +* _bfd_set_error_handler_caching: Error reporting. (line 135) +* _bfd_set_error_handler_caching <1>: Error reporting. (line 139) +* _bfd_stringtab_add: Write Other Derived Routines. + (line 127) +* _bfd_stringtab_add <1>: Write Other Derived Routines. + (line 131) +* _bfd_stringtab_emit: Write Other Derived Routines. + (line 144) +* _bfd_stringtab_emit <1>: Write Other Derived Routines. + (line 148) +* _bfd_stringtab_free: Write Other Derived Routines. + (line 121) +* _bfd_stringtab_free <1>: Write Other Derived Routines. + (line 125) +* _bfd_stringtab_init: Write Other Derived Routines. + (line 106) +* _bfd_stringtab_size: Write Other Derived Routines. + (line 137) +* _bfd_stringtab_size <1>: Write Other Derived Routines. + (line 141) +* _bfd_unrecognized_reloc: howto manager. (line 3712) +* _bfd_unrecognized_reloc <1>: howto manager. (line 3716) +* _bfd_xcoff_stringtab_init: Write Other Derived Routines. + (line 112) +* aout_SIZE_machine_type: aout. (line 130) +* aout_SIZE_mkobject: aout. (line 124) +* aout_SIZE_mkobject,: aout. (line 128) +* aout_SIZE_new_section_hook: aout. (line 152) +* aout_SIZE_new_section_hook,: aout. (line 156) +* aout_SIZE_set_arch_mach: aout. (line 143) +* aout_SIZE_set_arch_mach,: aout. (line 147) +* aout_SIZE_some_aout_object_p: aout. (line 113) +* aout_SIZE_some_aout_object_p <1>: aout. (line 117) +* aout_SIZE_swap_exec_header_in: aout. (line 96) +* aout_SIZE_swap_exec_header_in,: aout. (line 100) +* aout_SIZE_swap_exec_header_out: aout. (line 105) +* aout_SIZE_swap_exec_header_out <1>: aout. (line 109) +* arelent_chain: typedef arelent. (line 280) * BFD: Overview. (line 6) * BFD canonical format: Canonical format. (line 11) -* bfd_alloc: Opening and Closing. - (line 248) -* bfd_alt_mach_code: Miscellaneous. (line 306) -* bfd_arch_bits_per_address: Architectures. (line 674) -* bfd_arch_bits_per_byte: Architectures. (line 666) -* bfd_arch_default_fill: Architectures. (line 756) -* bfd_arch_get_compatible: Architectures. (line 609) -* bfd_arch_list: Architectures. (line 600) -* bfd_arch_mach_octets_per_byte: Architectures. (line 744) -* BFD_ARELOC_BFIN_ADD: howto manager. (line 1159) -* BFD_ARELOC_BFIN_ADDR: howto manager. (line 1193) -* BFD_ARELOC_BFIN_AND: howto manager. (line 1173) -* BFD_ARELOC_BFIN_COMP: howto manager. (line 1187) -* BFD_ARELOC_BFIN_CONST: howto manager. (line 1157) -* BFD_ARELOC_BFIN_DIV: howto manager. (line 1165) -* BFD_ARELOC_BFIN_HWPAGE: howto manager. (line 1191) -* BFD_ARELOC_BFIN_LAND: howto manager. (line 1179) -* BFD_ARELOC_BFIN_LEN: howto manager. (line 1183) -* BFD_ARELOC_BFIN_LOR: howto manager. (line 1181) -* BFD_ARELOC_BFIN_LSHIFT: howto manager. (line 1169) -* BFD_ARELOC_BFIN_MOD: howto manager. (line 1167) -* BFD_ARELOC_BFIN_MULT: howto manager. (line 1163) -* BFD_ARELOC_BFIN_NEG: howto manager. (line 1185) -* BFD_ARELOC_BFIN_OR: howto manager. (line 1175) -* BFD_ARELOC_BFIN_PAGE: howto manager. (line 1189) -* BFD_ARELOC_BFIN_PUSH: howto manager. (line 1155) -* BFD_ARELOC_BFIN_RSHIFT: howto manager. (line 1171) -* BFD_ARELOC_BFIN_SUB: howto manager. (line 1161) -* BFD_ARELOC_BFIN_XOR: howto manager. (line 1177) -* bfd_cache_close: File Caching. (line 25) -* bfd_cache_close_all: File Caching. (line 38) +* bfd_alloc: Internal. (line 70) +* bfd_alt_mach_code: Miscellaneous. (line 303) +* bfd_alt_mach_code <1>: Miscellaneous. (line 307) +* bfd_architecture: Architectures. (line 655) +* bfd_arch_bits_per_address: Architectures. (line 671) +* bfd_arch_bits_per_byte: Architectures. (line 664) +* bfd_arch_default_fill: Architectures. (line 737) +* bfd_arch_get_compatible: Architectures. (line 614) +* bfd_arch_info_type: Architectures. (line 602) +* bfd_arch_info_type <1>: Architectures. (line 618) +* bfd_arch_info_type <2>: Architectures. (line 682) +* bfd_arch_info_type <3>: Architectures. (line 697) +* bfd_arch_info_type <4>: Architectures. (line 703) +* bfd_arch_list: Architectures. (line 607) +* bfd_arch_mach_octets_per_byte: Architectures. (line 727) +* BFD_ARELOC_BFIN_ADD: howto manager. (line 1158) +* BFD_ARELOC_BFIN_ADDR: howto manager. (line 1192) +* BFD_ARELOC_BFIN_AND: howto manager. (line 1172) +* BFD_ARELOC_BFIN_COMP: howto manager. (line 1186) +* BFD_ARELOC_BFIN_CONST: howto manager. (line 1156) +* BFD_ARELOC_BFIN_DIV: howto manager. (line 1164) +* BFD_ARELOC_BFIN_HWPAGE: howto manager. (line 1190) +* BFD_ARELOC_BFIN_LAND: howto manager. (line 1178) +* BFD_ARELOC_BFIN_LEN: howto manager. (line 1182) +* BFD_ARELOC_BFIN_LOR: howto manager. (line 1180) +* BFD_ARELOC_BFIN_LSHIFT: howto manager. (line 1168) +* BFD_ARELOC_BFIN_MOD: howto manager. (line 1166) +* BFD_ARELOC_BFIN_MULT: howto manager. (line 1162) +* BFD_ARELOC_BFIN_NEG: howto manager. (line 1184) +* BFD_ARELOC_BFIN_OR: howto manager. (line 1174) +* BFD_ARELOC_BFIN_PAGE: howto manager. (line 1188) +* BFD_ARELOC_BFIN_PUSH: howto manager. (line 1154) +* BFD_ARELOC_BFIN_RSHIFT: howto manager. (line 1170) +* BFD_ARELOC_BFIN_SUB: howto manager. (line 1160) +* BFD_ARELOC_BFIN_XOR: howto manager. (line 1176) +* bfd_asprintf: Error reporting. (line 90) +* bfd_cache_close: File Caching. (line 23) +* bfd_cache_close <1>: File Caching. (line 27) +* bfd_cache_close_all: File Caching. (line 33) +* bfd_cache_close_all <1>: File Caching. (line 37) * bfd_cache_init: File Caching. (line 17) +* bfd_cache_init <1>: File Caching. (line 21) * bfd_calc_gnu_debuglink_crc32: Opening and Closing. - (line 266) -* bfd_canonicalize_reloc: Miscellaneous. (line 18) + (line 255) +* bfd_calc_gnu_debuglink_crc32 <1>: Opening and Closing. + (line 259) +* bfd_canonicalize_reloc: Miscellaneous. (line 17) +* bfd_canonicalize_reloc <1>: Miscellaneous. (line 21) * bfd_canonicalize_symtab: symbol handling functions. - (line 52) + (line 47) * bfd_check_format: Formats. (line 20) -* bfd_check_format_matches: Formats. (line 51) -* bfd_check_overflow: typedef arelent. (line 324) +* bfd_check_format <1>: Formats. (line 24) +* bfd_check_format_matches: Formats. (line 50) +* bfd_check_format_matches <1>: Formats. (line 54) +* bfd_check_overflow: typedef arelent. (line 292) +* bfd_check_overflow <1>: typedef arelent. (line 296) * bfd_close: Opening and Closing. - (line 170) + (line 190) +* bfd_close <1>: Opening and Closing. + (line 194) * bfd_close_all_done: Opening and Closing. - (line 188) -* bfd_coff_backend_data: coff. (line 300) -* bfd_copy_private_bfd_data: Miscellaneous. (line 168) -* bfd_copy_private_header_data: Miscellaneous. (line 151) -* bfd_copy_private_section_data: section prototypes. (line 279) + (line 206) +* bfd_close_all_done <1>: Opening and Closing. + (line 210) +* bfd_coff_backend_data: coff. (line 299) +* bfd_copy_private_bfd_data: Miscellaneous. (line 147) +* bfd_copy_private_bfd_data <1>: Miscellaneous. (line 151) +* bfd_copy_private_header_data: Miscellaneous. (line 132) +* bfd_copy_private_header_data <1>: Miscellaneous. (line 136) +* bfd_copy_private_section_data: section prototypes. (line 247) +* bfd_copy_private_section_data <1>: section prototypes. (line 251) * bfd_copy_private_symbol_data: symbol handling functions. - (line 145) -* bfd_core_file_failing_command: Core Files. (line 11) -* bfd_core_file_failing_signal: Core Files. (line 20) -* bfd_core_file_pid: Core Files. (line 29) + (line 126) +* bfd_copy_private_symbol_data <1>: symbol handling functions. + (line 130) +* bfd_core_file_failing_command: Core Files. (line 10) +* bfd_core_file_failing_signal: Core Files. (line 17) +* bfd_core_file_failing_signal <1>: Core Files. (line 21) +* bfd_core_file_pid: Core Files. (line 24) +* bfd_core_file_pid <1>: Core Files. (line 28) * bfd_create: Opening and Closing. - (line 207) + (line 222) * bfd_create_gnu_debuglink_section: Opening and Closing. - (line 422) + (line 331) * bfd_decode_symclass: symbol handling functions. - (line 116) -* bfd_default_arch_struct: Architectures. (line 621) -* bfd_default_compatible: Architectures. (line 683) -* bfd_default_reloc_type_lookup: howto manager. (line 3545) -* bfd_default_scan: Architectures. (line 692) -* bfd_default_set_arch_mach: Architectures. (line 639) -* bfd_demangle: Miscellaneous. (line 339) -* bfd_emul_get_commonpagesize: Miscellaneous. (line 328) -* bfd_emul_get_maxpagesize: Miscellaneous. (line 317) -* bfd_errmsg: Error reporting. (line 79) + (line 104) +* bfd_decode_symclass <1>: symbol handling functions. + (line 108) +* bfd_default_arch_struct: Architectures. (line 625) +* bfd_default_compatible: Architectures. (line 678) +* bfd_default_reloc_type_lookup: howto manager. (line 3647) +* bfd_default_scan: Architectures. (line 685) +* bfd_default_scan <1>: Architectures. (line 689) +* bfd_default_set_arch_mach: Architectures. (line 642) +* bfd_default_set_arch_mach <1>: Architectures. (line 646) +* bfd_demangle: Miscellaneous. (line 325) +* bfd_elf_bfd_from_remote_memory: Opening and Closing. + (line 168) +* bfd_elf_version_tree: Writing the symbol table. + (line 102) +* bfd_emul_get_commonpagesize: Miscellaneous. (line 319) +* bfd_emul_get_commonpagesize <1>: Miscellaneous. (line 323) +* bfd_emul_get_maxpagesize: Miscellaneous. (line 312) +* bfd_emul_get_maxpagesize <1>: Miscellaneous. (line 316) +* bfd_errmsg: Error reporting. (line 73) * bfd_fdopenr: Opening and Closing. - (line 56) + (line 67) * bfd_fdopenw: Opening and Closing. - (line 82) + (line 93) * bfd_fill_in_gnu_debuglink_section: Opening and Closing. - (line 436) -* bfd_find_target: bfd_target. (line 609) + (line 343) +* bfd_fill_in_gnu_debuglink_section <1>: Opening and Closing. + (line 347) +* bfd_find_target: bfd_target. (line 562) * bfd_find_version_for_sym: Writing the symbol table. - (line 111) -* bfd_flavour_name: bfd_target. (line 672) + (line 98) +* bfd_flavour_name: bfd_target. (line 617) +* bfd_flush: Miscellaneous. (line 396) +* bfd_flush <1>: Miscellaneous. (line 400) * bfd_follow_build_id_debuglink: Opening and Closing. - (line 496) + (line 356) * bfd_follow_gnu_debugaltlink: Opening and Closing. - (line 402) + (line 312) * bfd_follow_gnu_debuglink: Opening and Closing. - (line 381) + (line 293) * bfd_fopen: Opening and Closing. - (line 11) -* bfd_format_string: Formats. (line 78) + (line 26) +* bfd_format_string: Formats. (line 74) * bfd_generic_define_common_symbol: Writing the symbol table. - (line 69) + (line 64) +* bfd_generic_define_common_symbol <1>: Writing the symbol table. + (line 68) * bfd_generic_define_start_stop: Writing the symbol table. - (line 97) -* bfd_generic_discard_group: section prototypes. (line 312) -* bfd_generic_gc_sections: howto manager. (line 3576) -* bfd_generic_get_relocated_section_contents: howto manager. (line 3606) -* bfd_generic_group_name: section prototypes. (line 304) -* bfd_generic_is_group_section: section prototypes. (line 296) -* bfd_generic_lookup_section_flags: howto manager. (line 3586) -* bfd_generic_merge_sections: howto manager. (line 3596) -* bfd_generic_relax_section: howto manager. (line 3563) + (line 86) +* bfd_generic_discard_group: section prototypes. (line 276) +* bfd_generic_discard_group <1>: section prototypes. (line 280) +* bfd_generic_gc_sections: howto manager. (line 3670) +* bfd_generic_gc_sections <1>: howto manager. (line 3674) +* bfd_generic_get_relocated_section_contents: howto manager. (line 3695) +* bfd_generic_group_name: section prototypes. (line 269) +* bfd_generic_is_group_section: section prototypes. (line 262) +* bfd_generic_is_group_section <1>: section prototypes. (line 266) +* bfd_generic_lookup_section_flags: howto manager. (line 3678) +* bfd_generic_lookup_section_flags <1>: howto manager. (line 3682) +* bfd_generic_merge_sections: howto manager. (line 3687) +* bfd_generic_merge_sections <1>: howto manager. (line 3691) +* bfd_generic_relax_section: howto manager. (line 3662) +* bfd_generic_relax_section <1>: howto manager. (line 3666) +* bfd_getb64: Internal. (line 260) * bfd_get_alt_debug_link_info: Opening and Closing. - (line 320) -* bfd_get_arch: Architectures. (line 650) -* bfd_get_arch_info: Architectures. (line 702) -* bfd_get_arch_size: Miscellaneous. (line 63) + (line 282) +* bfd_get_arch: Architectures. (line 651) +* bfd_get_arch_info: Architectures. (line 693) +* bfd_get_arch_size: Miscellaneous. (line 58) +* bfd_get_arch_size <1>: Miscellaneous. (line 62) +* bfd_get_current_time: Miscellaneous. (line 473) +* bfd_get_current_time <1>: Miscellaneous. (line 477) * bfd_get_debug_link_info: Opening and Closing. - (line 302) -* bfd_get_debug_link_info_1: Opening and Closing. - (line 280) -* bfd_get_error: Error reporting. (line 49) -* bfd_get_file_size: Miscellaneous. (line 428) -* bfd_get_gp_size: Miscellaneous. (line 106) -* bfd_get_linker_section: section prototypes. (line 37) + (line 266) +* bfd_get_error: Error reporting. (line 48) +* bfd_get_error <1>: Error reporting. (line 53) +* bfd_get_file_size: Miscellaneous. (line 455) +* bfd_get_file_size <1>: Miscellaneous. (line 459) +* bfd_get_gp_size: Miscellaneous. (line 92) +* bfd_get_linker_section: section prototypes. (line 33) * bfd_get_mach: Architectures. (line 658) -* bfd_get_mtime: Miscellaneous. (line 389) -* bfd_get_next_mapent: Archives. (line 57) -* bfd_get_next_section_by_name: section prototypes. (line 25) -* bfd_get_reloc_code_name: howto manager. (line 3554) +* bfd_get_mtime: Miscellaneous. (line 418) +* bfd_get_mtime <1>: Miscellaneous. (line 422) +* bfd_get_next_mapent: Archives. (line 56) +* bfd_get_next_mapent <1>: Archives. (line 60) +* bfd_get_next_section_by_name: section prototypes. (line 22) +* bfd_get_relocated_section_contents: Miscellaneous. (line 277) +* bfd_get_reloc_code_name: howto manager. (line 3654) * bfd_get_reloc_upper_bound: Miscellaneous. (line 8) -* bfd_get_section_by_name: section prototypes. (line 16) -* bfd_get_section_by_name_if: section prototypes. (line 46) -* bfd_get_section_contents: section prototypes. (line 252) -* bfd_get_sign_extend_vma: Miscellaneous. (line 78) -* bfd_get_size: Miscellaneous. (line 398) +* bfd_get_reloc_upper_bound <1>: Miscellaneous. (line 12) +* bfd_get_section_by_name: section prototypes. (line 14) +* bfd_get_section_by_name_if: section prototypes. (line 41) +* bfd_get_section_contents: section prototypes. (line 223) +* bfd_get_section_contents <1>: section prototypes. (line 227) +* bfd_get_sign_extend_vma: Miscellaneous. (line 70) +* bfd_get_sign_extend_vma <1>: Miscellaneous. (line 74) +* bfd_get_size: Miscellaneous. (line 425) +* bfd_get_size <1>: Miscellaneous. (line 429) +* bfd_get_size <2>: Internal. (line 102) * bfd_get_symtab_upper_bound: symbol handling functions. (line 5) -* bfd_get_target_info: bfd_target. (line 625) -* bfd_get_unique_section_name: section prototypes. (line 65) +* bfd_get_target_info: bfd_target. (line 577) +* bfd_get_unique_section_name: section prototypes. (line 56) * bfd_hash_allocate: Creating and Freeing a Hash Table. (line 17) +* bfd_hash_allocate <1>: Write Other Derived Routines. + (line 79) +* bfd_hash_entry: Write Other Derived Routines. + (line 55) +* bfd_hash_entry <1>: Write Other Derived Routines. + (line 62) +* bfd_hash_entry <2>: Write Other Derived Routines. + (line 90) +* bfd_hash_insert: Write Other Derived Routines. + (line 58) * bfd_hash_lookup: Looking Up or Entering a String. (line 6) +* bfd_hash_lookup <1>: Write Other Derived Routines. + (line 51) * bfd_hash_newfunc: Creating and Freeing a Hash Table. (line 12) +* bfd_hash_newfunc <1>: Write Other Derived Routines. + (line 86) +* bfd_hash_rename: Write Other Derived Routines. + (line 65) +* bfd_hash_rename <1>: Write Other Derived Routines. + (line 69) +* bfd_hash_replace: Write Other Derived Routines. + (line 72) +* bfd_hash_replace <1>: Write Other Derived Routines. + (line 76) * bfd_hash_set_default_size: Creating and Freeing a Hash Table. (line 25) +* bfd_hash_set_default_size <1>: Write Other Derived Routines. + (line 100) * bfd_hash_table_free: Creating and Freeing a Hash Table. (line 21) +* bfd_hash_table_free <1>: Write Other Derived Routines. + (line 45) +* bfd_hash_table_free <2>: Write Other Derived Routines. + (line 49) * bfd_hash_table_init: Creating and Freeing a Hash Table. (line 6) +* bfd_hash_table_init <1>: Write Other Derived Routines. + (line 37) +* bfd_hash_table_init <2>: Write Other Derived Routines. + (line 41) * bfd_hash_table_init_n: Creating and Freeing a Hash Table. (line 6) +* bfd_hash_table_init_n <1>: Write Other Derived Routines. + (line 28) +* bfd_hash_table_init_n <2>: Write Other Derived Routines. + (line 32) * bfd_hash_traverse: Traversing a Hash Table. (line 6) +* bfd_hash_traverse <1>: Write Other Derived Routines. + (line 93) +* bfd_hash_traverse <2>: Write Other Derived Routines. + (line 97) * bfd_hide_sym_by_version: Writing the symbol table. - (line 123) -* bfd_init: Initialization. (line 10) -* bfd_install_relocation: typedef arelent. (line 378) + (line 109) +* bfd_hide_sym_by_version <1>: Writing the symbol table. + (line 113) +* bfd_h_put_size: Internal. (line 188) +* bfd_init: Initialization. (line 3) +* bfd_install_relocation: typedef arelent. (line 331) +* bfd_install_relocation <1>: typedef arelent. (line 335) * bfd_is_local_label: symbol handling functions. - (line 17) + (line 16) +* bfd_is_local_label <1>: symbol handling functions. + (line 20) * bfd_is_local_label_name: symbol handling functions. - (line 26) + (line 23) +* bfd_is_local_label_name <1>: symbol handling functions. + (line 27) * bfd_is_target_special_symbol: symbol handling functions. + (line 35) +* bfd_is_target_special_symbol <1>: symbol handling functions. (line 39) * bfd_is_undefined_symclass: symbol handling functions. - (line 125) -* bfd_iterate_over_targets: bfd_target. (line 660) + (line 111) +* bfd_is_undefined_symclass <1>: symbol handling functions. + (line 115) +* bfd_iterate_over_targets: bfd_target. (line 607) * bfd_link_check_relocs: Writing the symbol table. - (line 133) + (line 117) +* bfd_link_check_relocs <1>: Writing the symbol table. + (line 121) +* bfd_link_hash_entry: Writing the symbol table. + (line 90) * bfd_link_split_section: Writing the symbol table. (line 43) -* bfd_lookup_arch: Architectures. (line 710) +* bfd_link_split_section <1>: Writing the symbol table. + (line 47) +* bfd_log2: Internal. (line 280) +* bfd_lookup_arch: Architectures. (line 699) * bfd_make_debug_symbol: symbol handling functions. - (line 106) + (line 95) * bfd_make_empty_symbol: symbol handling functions. - (line 81) + (line 73) * bfd_make_readable: Opening and Closing. - (line 234) -* bfd_make_section: section prototypes. (line 143) -* bfd_make_section_anyway: section prototypes. (line 115) -* bfd_make_section_anyway_with_flags: section prototypes. (line 97) -* bfd_make_section_old_way: section prototypes. (line 77) -* bfd_make_section_with_flags: section prototypes. (line 131) + (line 244) +* bfd_make_readable <1>: Opening and Closing. + (line 248) +* bfd_make_section: section prototypes. (line 128) +* bfd_make_section_anyway: section prototypes. (line 102) +* bfd_make_section_anyway_with_flags: section prototypes. (line 86) +* bfd_make_section_old_way: section prototypes. (line 67) +* bfd_make_section_with_flags: section prototypes. (line 117) * bfd_make_writable: Opening and Closing. - (line 220) -* bfd_malloc_and_get_section: section prototypes. (line 269) -* bfd_map_over_sections: section prototypes. (line 176) + (line 233) +* bfd_make_writable <1>: Opening and Closing. + (line 237) +* bfd_malloc: Internal. (line 11) +* bfd_malloc_and_get_section: section prototypes. (line 238) +* bfd_malloc_and_get_section <1>: section prototypes. (line 242) +* bfd_map_over_sections: section prototypes. (line 156) +* bfd_map_over_sections <1>: section prototypes. (line 160) * bfd_merge_private_bfd_data: Writing the symbol table. - (line 155) -* bfd_mmap: Miscellaneous. (line 437) -* bfd_octets_per_byte: Architectures. (line 733) + (line 135) +* bfd_merge_private_bfd_data <1>: Writing the symbol table. + (line 139) +* bfd_mmap: Miscellaneous. (line 463) +* bfd_octets_per_byte: Architectures. (line 718) * bfd_openr: Opening and Closing. - (line 37) + (line 50) * bfd_openr_iovec: Opening and Closing. - (line 104) -* bfd_openr_next_archived_file: Archives. (line 83) + (line 112) +* bfd_openr_next_archived_file: Archives. (line 79) * bfd_openstreamr: Opening and Closing. - (line 91) + (line 101) * bfd_openw: Opening and Closing. (line 155) -* bfd_open_file: File Caching. (line 51) -* bfd_perform_relocation: typedef arelent. (line 353) -* bfd_perror: Error reporting. (line 88) -* bfd_printable_arch_mach: Architectures. (line 721) -* bfd_printable_name: Architectures. (line 581) +* bfd_open_file: File Caching. (line 45) +* bfd_open_file <1>: File Caching. (line 49) +* bfd_perform_relocation: typedef arelent. (line 311) +* bfd_perform_relocation <1>: typedef arelent. (line 315) +* bfd_perror: Error reporting. (line 80) +* bfd_perror <1>: Error reporting. (line 84) +* bfd_printable_arch_mach: Architectures. (line 708) +* bfd_printable_name: Architectures. (line 591) * bfd_print_symbol_vandf: symbol handling functions. - (line 73) -* BFD_RELOC_12_PCREL: howto manager. (line 37) -* BFD_RELOC_14: howto manager. (line 30) -* BFD_RELOC_16: howto manager. (line 29) -* BFD_RELOC_16_BASEREL: howto manager. (line 91) -* BFD_RELOC_16_GOTOFF: howto manager. (line 50) -* BFD_RELOC_16_GOT_PCREL: howto manager. (line 47) -* BFD_RELOC_16_PCREL: howto manager. (line 36) -* BFD_RELOC_16_PCREL_S2: howto manager. (line 101) -* BFD_RELOC_16_PLTOFF: howto manager. (line 62) -* BFD_RELOC_16_PLT_PCREL: howto manager. (line 58) -* BFD_RELOC_16_SECIDX: howto manager. (line 44) -* BFD_RELOC_23_PCREL_S2: howto manager. (line 102) -* BFD_RELOC_24: howto manager. (line 28) -* BFD_RELOC_24_PCREL: howto manager. (line 35) -* BFD_RELOC_24_PLT_PCREL: howto manager. (line 57) -* BFD_RELOC_26: howto manager. (line 27) -* BFD_RELOC_32: howto manager. (line 26) -* BFD_RELOC_32_BASEREL: howto manager. (line 90) -* BFD_RELOC_32_GOTOFF: howto manager. (line 49) -* BFD_RELOC_32_GOT_PCREL: howto manager. (line 46) -* BFD_RELOC_32_PCREL: howto manager. (line 34) -* BFD_RELOC_32_PCREL_S2: howto manager. (line 100) -* BFD_RELOC_32_PLTOFF: howto manager. (line 61) -* BFD_RELOC_32_PLT_PCREL: howto manager. (line 56) -* BFD_RELOC_32_SECREL: howto manager. (line 43) -* BFD_RELOC_386_COPY: howto manager. (line 524) -* BFD_RELOC_386_GLOB_DAT: howto manager. (line 525) -* BFD_RELOC_386_GOT32: howto manager. (line 522) -* BFD_RELOC_386_GOT32X: howto manager. (line 546) -* BFD_RELOC_386_GOTOFF: howto manager. (line 528) -* BFD_RELOC_386_GOTPC: howto manager. (line 529) -* BFD_RELOC_386_IRELATIVE: howto manager. (line 545) -* BFD_RELOC_386_JUMP_SLOT: howto manager. (line 526) -* BFD_RELOC_386_PLT32: howto manager. (line 523) -* BFD_RELOC_386_RELATIVE: howto manager. (line 527) -* BFD_RELOC_386_TLS_DESC: howto manager. (line 544) -* BFD_RELOC_386_TLS_DESC_CALL: howto manager. (line 543) -* BFD_RELOC_386_TLS_DTPMOD32: howto manager. (line 539) -* BFD_RELOC_386_TLS_DTPOFF32: howto manager. (line 540) -* BFD_RELOC_386_TLS_GD: howto manager. (line 534) -* BFD_RELOC_386_TLS_GOTDESC: howto manager. (line 542) -* BFD_RELOC_386_TLS_GOTIE: howto manager. (line 532) -* BFD_RELOC_386_TLS_IE: howto manager. (line 531) -* BFD_RELOC_386_TLS_IE_32: howto manager. (line 537) -* BFD_RELOC_386_TLS_LDM: howto manager. (line 535) -* BFD_RELOC_386_TLS_LDO_32: howto manager. (line 536) -* BFD_RELOC_386_TLS_LE: howto manager. (line 533) -* BFD_RELOC_386_TLS_LE_32: howto manager. (line 538) -* BFD_RELOC_386_TLS_TPOFF: howto manager. (line 530) -* BFD_RELOC_386_TLS_TPOFF32: howto manager. (line 541) -* BFD_RELOC_390_12: howto manager. (line 1965) -* BFD_RELOC_390_20: howto manager. (line 2046) -* BFD_RELOC_390_COPY: howto manager. (line 1971) -* BFD_RELOC_390_GLOB_DAT: howto manager. (line 1973) -* BFD_RELOC_390_GOT12: howto manager. (line 1967) -* BFD_RELOC_390_GOT16: howto manager. (line 1981) -* BFD_RELOC_390_GOT20: howto manager. (line 2047) -* BFD_RELOC_390_GOT64: howto manager. (line 2001) -* BFD_RELOC_390_GOTENT: howto manager. (line 2005) -* BFD_RELOC_390_GOTOFF64: howto manager. (line 2007) -* BFD_RELOC_390_GOTPC: howto manager. (line 1979) -* BFD_RELOC_390_GOTPCDBL: howto manager. (line 1999) -* BFD_RELOC_390_GOTPLT12: howto manager. (line 2009) -* BFD_RELOC_390_GOTPLT16: howto manager. (line 2011) -* BFD_RELOC_390_GOTPLT20: howto manager. (line 2048) -* BFD_RELOC_390_GOTPLT32: howto manager. (line 2013) -* BFD_RELOC_390_GOTPLT64: howto manager. (line 2015) -* BFD_RELOC_390_GOTPLTENT: howto manager. (line 2017) -* BFD_RELOC_390_IRELATIVE: howto manager. (line 2051) -* BFD_RELOC_390_JMP_SLOT: howto manager. (line 1975) -* BFD_RELOC_390_PC12DBL: howto manager. (line 1983) -* BFD_RELOC_390_PC16DBL: howto manager. (line 1987) -* BFD_RELOC_390_PC24DBL: howto manager. (line 1991) -* BFD_RELOC_390_PC32DBL: howto manager. (line 1995) -* BFD_RELOC_390_PLT12DBL: howto manager. (line 1985) -* BFD_RELOC_390_PLT16DBL: howto manager. (line 1989) -* BFD_RELOC_390_PLT24DBL: howto manager. (line 1993) -* BFD_RELOC_390_PLT32: howto manager. (line 1969) -* BFD_RELOC_390_PLT32DBL: howto manager. (line 1997) -* BFD_RELOC_390_PLT64: howto manager. (line 2003) -* BFD_RELOC_390_PLTOFF16: howto manager. (line 2019) -* BFD_RELOC_390_PLTOFF32: howto manager. (line 2021) -* BFD_RELOC_390_PLTOFF64: howto manager. (line 2023) -* BFD_RELOC_390_RELATIVE: howto manager. (line 1977) -* BFD_RELOC_390_TLS_DTPMOD: howto manager. (line 2042) -* BFD_RELOC_390_TLS_DTPOFF: howto manager. (line 2043) -* BFD_RELOC_390_TLS_GD32: howto manager. (line 2028) -* BFD_RELOC_390_TLS_GD64: howto manager. (line 2029) -* BFD_RELOC_390_TLS_GDCALL: howto manager. (line 2026) -* BFD_RELOC_390_TLS_GOTIE12: howto manager. (line 2030) -* BFD_RELOC_390_TLS_GOTIE20: howto manager. (line 2049) -* BFD_RELOC_390_TLS_GOTIE32: howto manager. (line 2031) -* BFD_RELOC_390_TLS_GOTIE64: howto manager. (line 2032) -* BFD_RELOC_390_TLS_IE32: howto manager. (line 2035) -* BFD_RELOC_390_TLS_IE64: howto manager. (line 2036) -* BFD_RELOC_390_TLS_IEENT: howto manager. (line 2037) -* BFD_RELOC_390_TLS_LDCALL: howto manager. (line 2027) -* BFD_RELOC_390_TLS_LDM32: howto manager. (line 2033) -* BFD_RELOC_390_TLS_LDM64: howto manager. (line 2034) -* BFD_RELOC_390_TLS_LDO32: howto manager. (line 2040) -* BFD_RELOC_390_TLS_LDO64: howto manager. (line 2041) -* BFD_RELOC_390_TLS_LE32: howto manager. (line 2038) -* BFD_RELOC_390_TLS_LE64: howto manager. (line 2039) -* BFD_RELOC_390_TLS_LOAD: howto manager. (line 2025) -* BFD_RELOC_390_TLS_TPOFF: howto manager. (line 2044) -* BFD_RELOC_64: howto manager. (line 25) -* BFD_RELOC_64_PCREL: howto manager. (line 33) -* BFD_RELOC_64_PLTOFF: howto manager. (line 60) -* BFD_RELOC_64_PLT_PCREL: howto manager. (line 55) -* BFD_RELOC_68K_GLOB_DAT: howto manager. (line 71) -* BFD_RELOC_68K_JMP_SLOT: howto manager. (line 72) -* BFD_RELOC_68K_RELATIVE: howto manager. (line 73) -* BFD_RELOC_68K_TLS_GD16: howto manager. (line 75) -* BFD_RELOC_68K_TLS_GD32: howto manager. (line 74) -* BFD_RELOC_68K_TLS_GD8: howto manager. (line 76) -* BFD_RELOC_68K_TLS_IE16: howto manager. (line 84) -* BFD_RELOC_68K_TLS_IE32: howto manager. (line 83) -* BFD_RELOC_68K_TLS_IE8: howto manager. (line 85) -* BFD_RELOC_68K_TLS_LDM16: howto manager. (line 78) -* BFD_RELOC_68K_TLS_LDM32: howto manager. (line 77) -* BFD_RELOC_68K_TLS_LDM8: howto manager. (line 79) -* BFD_RELOC_68K_TLS_LDO16: howto manager. (line 81) -* BFD_RELOC_68K_TLS_LDO32: howto manager. (line 80) -* BFD_RELOC_68K_TLS_LDO8: howto manager. (line 82) -* BFD_RELOC_68K_TLS_LE16: howto manager. (line 87) -* BFD_RELOC_68K_TLS_LE32: howto manager. (line 86) -* BFD_RELOC_68K_TLS_LE8: howto manager. (line 88) -* BFD_RELOC_8: howto manager. (line 31) -* BFD_RELOC_8_BASEREL: howto manager. (line 95) -* BFD_RELOC_8_FFnn: howto manager. (line 98) -* BFD_RELOC_8_GOTOFF: howto manager. (line 54) -* BFD_RELOC_8_GOT_PCREL: howto manager. (line 48) -* BFD_RELOC_8_PCREL: howto manager. (line 38) -* BFD_RELOC_8_PLTOFF: howto manager. (line 66) -* BFD_RELOC_8_PLT_PCREL: howto manager. (line 59) -* BFD_RELOC_AARCH64_16: howto manager. (line 2805) -* BFD_RELOC_AARCH64_16_PCREL: howto manager. (line 2811) -* BFD_RELOC_AARCH64_32: howto manager. (line 2804) -* BFD_RELOC_AARCH64_32_PCREL: howto manager. (line 2810) -* BFD_RELOC_AARCH64_64: howto manager. (line 2803) -* BFD_RELOC_AARCH64_64_PCREL: howto manager. (line 2809) -* BFD_RELOC_AARCH64_ADD_LO12: howto manager. (line 2884) -* BFD_RELOC_AARCH64_ADR_GOT_PAGE: howto manager. (line 2930) -* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: howto manager. (line 2880) -* BFD_RELOC_AARCH64_ADR_HI21_PCREL: howto manager. (line 2877) -* BFD_RELOC_AARCH64_ADR_LO21_PCREL: howto manager. (line 2874) -* BFD_RELOC_AARCH64_BRANCH19: howto manager. (line 2896) -* BFD_RELOC_AARCH64_CALL26: howto manager. (line 2904) -* BFD_RELOC_AARCH64_COPY: howto manager. (line 3097) -* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP: howto manager. (line 3121) -* BFD_RELOC_AARCH64_GLOB_DAT: howto manager. (line 3099) -* BFD_RELOC_AARCH64_GOT_LD_PREL19: howto manager. (line 2924) -* BFD_RELOC_AARCH64_IRELATIVE: howto manager. (line 3113) -* BFD_RELOC_AARCH64_JUMP26: howto manager. (line 2900) -* BFD_RELOC_AARCH64_JUMP_SLOT: howto manager. (line 3101) -* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14: howto manager. (line 2951) -* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: howto manager. (line 2938) -* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15: howto manager. (line 2948) -* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15: howto manager. (line 2954) -* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: howto manager. (line 2934) -* BFD_RELOC_AARCH64_LDST128_LO12: howto manager. (line 2920) -* BFD_RELOC_AARCH64_LDST16_LO12: howto manager. (line 2908) -* BFD_RELOC_AARCH64_LDST32_LO12: howto manager. (line 2912) -* BFD_RELOC_AARCH64_LDST64_LO12: howto manager. (line 2916) -* BFD_RELOC_AARCH64_LDST8_LO12: howto manager. (line 2888) -* BFD_RELOC_AARCH64_LDST_LO12: howto manager. (line 3124) -* BFD_RELOC_AARCH64_LD_GOT_LO12_NC: howto manager. (line 3142) -* BFD_RELOC_AARCH64_LD_LO19_PCREL: howto manager. (line 2870) -* BFD_RELOC_AARCH64_MOVW_G0: howto manager. (line 2814) -* BFD_RELOC_AARCH64_MOVW_G0_NC: howto manager. (line 2817) -* BFD_RELOC_AARCH64_MOVW_G0_S: howto manager. (line 2835) -* BFD_RELOC_AARCH64_MOVW_G1: howto manager. (line 2820) -* BFD_RELOC_AARCH64_MOVW_G1_NC: howto manager. (line 2823) -* BFD_RELOC_AARCH64_MOVW_G1_S: howto manager. (line 2839) -* BFD_RELOC_AARCH64_MOVW_G2: howto manager. (line 2826) -* BFD_RELOC_AARCH64_MOVW_G2_NC: howto manager. (line 2829) -* BFD_RELOC_AARCH64_MOVW_G2_S: howto manager. (line 2843) -* BFD_RELOC_AARCH64_MOVW_G3: howto manager. (line 2832) -* BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC: howto manager. (line 2942) -* BFD_RELOC_AARCH64_MOVW_GOTOFF_G1: howto manager. (line 2945) -* BFD_RELOC_AARCH64_MOVW_PREL_G0: howto manager. (line 2847) -* BFD_RELOC_AARCH64_MOVW_PREL_G0_NC: howto manager. (line 2851) -* BFD_RELOC_AARCH64_MOVW_PREL_G1: howto manager. (line 2855) -* BFD_RELOC_AARCH64_MOVW_PREL_G1_NC: howto manager. (line 2858) -* BFD_RELOC_AARCH64_MOVW_PREL_G2: howto manager. (line 2861) -* BFD_RELOC_AARCH64_MOVW_PREL_G2_NC: howto manager. (line 2864) -* BFD_RELOC_AARCH64_MOVW_PREL_G3: howto manager. (line 2867) -* BFD_RELOC_AARCH64_NONE: howto manager. (line 2801) -* BFD_RELOC_AARCH64_NULL: howto manager. (line 2799) -* BFD_RELOC_AARCH64_RELATIVE: howto manager. (line 3103) -* BFD_RELOC_AARCH64_RELOC_END: howto manager. (line 3115) -* BFD_RELOC_AARCH64_RELOC_START: howto manager. (line 2794) -* BFD_RELOC_AARCH64_TLSDESC: howto manager. (line 3111) -* BFD_RELOC_AARCH64_TLSDESC_ADD: howto manager. (line 3093) -* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: howto manager. (line 3085) -* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: howto manager. (line 3079) -* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: howto manager. (line 3077) -* BFD_RELOC_AARCH64_TLSDESC_CALL: howto manager. (line 3095) -* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager. (line 3083) -* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: howto manager. (line 3081) -* BFD_RELOC_AARCH64_TLSDESC_LDR: howto manager. (line 3091) -* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC: howto manager. (line 3148) -* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: howto manager. (line 3075) -* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: howto manager. (line 3089) -* BFD_RELOC_AARCH64_TLSDESC_OFF_G1: howto manager. (line 3087) -* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: howto manager. (line 2964) -* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: howto manager. (line 2957) -* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21: howto manager. (line 2962) -* BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC: howto manager. (line 2968) -* BFD_RELOC_AARCH64_TLSGD_MOVW_G1: howto manager. (line 2970) + (line 65) +* bfd_print_symbol_vandf <1>: symbol handling functions. + (line 69) +* bfd_put_size: Internal. (line 99) +* bfd_read: Miscellaneous. (line 374) +* bfd_read <1>: Miscellaneous. (line 378) +* bfd_realloc: Internal. (line 20) +* bfd_realloc_or_free: Internal. (line 38) +* bfd_record_phdr: Miscellaneous. (line 287) +* bfd_record_phdr <1>: Miscellaneous. (line 291) +* bfd_release: Internal. (line 84) +* bfd_release <1>: Internal. (line 88) +* BFD_RELOC_12_PCREL: howto manager. (line 36) +* BFD_RELOC_14: howto manager. (line 29) +* BFD_RELOC_16: howto manager. (line 28) +* BFD_RELOC_16_BASEREL: howto manager. (line 90) +* BFD_RELOC_16_GOTOFF: howto manager. (line 49) +* BFD_RELOC_16_GOT_PCREL: howto manager. (line 46) +* BFD_RELOC_16_PCREL: howto manager. (line 35) +* BFD_RELOC_16_PCREL_S2: howto manager. (line 100) +* BFD_RELOC_16_PLTOFF: howto manager. (line 61) +* BFD_RELOC_16_PLT_PCREL: howto manager. (line 57) +* BFD_RELOC_16_SECIDX: howto manager. (line 43) +* BFD_RELOC_23_PCREL_S2: howto manager. (line 101) +* BFD_RELOC_24: howto manager. (line 27) +* BFD_RELOC_24_PCREL: howto manager. (line 34) +* BFD_RELOC_24_PLT_PCREL: howto manager. (line 56) +* BFD_RELOC_26: howto manager. (line 26) +* BFD_RELOC_32: howto manager. (line 25) +* BFD_RELOC_32_BASEREL: howto manager. (line 89) +* BFD_RELOC_32_GOTOFF: howto manager. (line 48) +* BFD_RELOC_32_GOT_PCREL: howto manager. (line 45) +* BFD_RELOC_32_PCREL: howto manager. (line 33) +* BFD_RELOC_32_PCREL_S2: howto manager. (line 99) +* BFD_RELOC_32_PLTOFF: howto manager. (line 60) +* BFD_RELOC_32_PLT_PCREL: howto manager. (line 55) +* BFD_RELOC_32_SECREL: howto manager. (line 42) +* BFD_RELOC_386_COPY: howto manager. (line 523) +* BFD_RELOC_386_GLOB_DAT: howto manager. (line 524) +* BFD_RELOC_386_GOT32: howto manager. (line 521) +* BFD_RELOC_386_GOT32X: howto manager. (line 545) +* BFD_RELOC_386_GOTOFF: howto manager. (line 527) +* BFD_RELOC_386_GOTPC: howto manager. (line 528) +* BFD_RELOC_386_IRELATIVE: howto manager. (line 544) +* BFD_RELOC_386_JUMP_SLOT: howto manager. (line 525) +* BFD_RELOC_386_PLT32: howto manager. (line 522) +* BFD_RELOC_386_RELATIVE: howto manager. (line 526) +* BFD_RELOC_386_TLS_DESC: howto manager. (line 543) +* BFD_RELOC_386_TLS_DESC_CALL: howto manager. (line 542) +* BFD_RELOC_386_TLS_DTPMOD32: howto manager. (line 538) +* BFD_RELOC_386_TLS_DTPOFF32: howto manager. (line 539) +* BFD_RELOC_386_TLS_GD: howto manager. (line 533) +* BFD_RELOC_386_TLS_GOTDESC: howto manager. (line 541) +* BFD_RELOC_386_TLS_GOTIE: howto manager. (line 531) +* BFD_RELOC_386_TLS_IE: howto manager. (line 530) +* BFD_RELOC_386_TLS_IE_32: howto manager. (line 536) +* BFD_RELOC_386_TLS_LDM: howto manager. (line 534) +* BFD_RELOC_386_TLS_LDO_32: howto manager. (line 535) +* BFD_RELOC_386_TLS_LE: howto manager. (line 532) +* BFD_RELOC_386_TLS_LE_32: howto manager. (line 537) +* BFD_RELOC_386_TLS_TPOFF: howto manager. (line 529) +* BFD_RELOC_386_TLS_TPOFF32: howto manager. (line 540) +* BFD_RELOC_390_12: howto manager. (line 1966) +* BFD_RELOC_390_20: howto manager. (line 2047) +* BFD_RELOC_390_COPY: howto manager. (line 1972) +* BFD_RELOC_390_GLOB_DAT: howto manager. (line 1974) +* BFD_RELOC_390_GOT12: howto manager. (line 1968) +* BFD_RELOC_390_GOT16: howto manager. (line 1982) +* BFD_RELOC_390_GOT20: howto manager. (line 2048) +* BFD_RELOC_390_GOT64: howto manager. (line 2002) +* BFD_RELOC_390_GOTENT: howto manager. (line 2006) +* BFD_RELOC_390_GOTOFF64: howto manager. (line 2008) +* BFD_RELOC_390_GOTPC: howto manager. (line 1980) +* BFD_RELOC_390_GOTPCDBL: howto manager. (line 2000) +* BFD_RELOC_390_GOTPLT12: howto manager. (line 2010) +* BFD_RELOC_390_GOTPLT16: howto manager. (line 2012) +* BFD_RELOC_390_GOTPLT20: howto manager. (line 2049) +* BFD_RELOC_390_GOTPLT32: howto manager. (line 2014) +* BFD_RELOC_390_GOTPLT64: howto manager. (line 2016) +* BFD_RELOC_390_GOTPLTENT: howto manager. (line 2018) +* BFD_RELOC_390_IRELATIVE: howto manager. (line 2052) +* BFD_RELOC_390_JMP_SLOT: howto manager. (line 1976) +* BFD_RELOC_390_PC12DBL: howto manager. (line 1984) +* BFD_RELOC_390_PC16DBL: howto manager. (line 1988) +* BFD_RELOC_390_PC24DBL: howto manager. (line 1992) +* BFD_RELOC_390_PC32DBL: howto manager. (line 1996) +* BFD_RELOC_390_PLT12DBL: howto manager. (line 1986) +* BFD_RELOC_390_PLT16DBL: howto manager. (line 1990) +* BFD_RELOC_390_PLT24DBL: howto manager. (line 1994) +* BFD_RELOC_390_PLT32: howto manager. (line 1970) +* BFD_RELOC_390_PLT32DBL: howto manager. (line 1998) +* BFD_RELOC_390_PLT64: howto manager. (line 2004) +* BFD_RELOC_390_PLTOFF16: howto manager. (line 2020) +* BFD_RELOC_390_PLTOFF32: howto manager. (line 2022) +* BFD_RELOC_390_PLTOFF64: howto manager. (line 2024) +* BFD_RELOC_390_RELATIVE: howto manager. (line 1978) +* BFD_RELOC_390_TLS_DTPMOD: howto manager. (line 2043) +* BFD_RELOC_390_TLS_DTPOFF: howto manager. (line 2044) +* BFD_RELOC_390_TLS_GD32: howto manager. (line 2029) +* BFD_RELOC_390_TLS_GD64: howto manager. (line 2030) +* BFD_RELOC_390_TLS_GDCALL: howto manager. (line 2027) +* BFD_RELOC_390_TLS_GOTIE12: howto manager. (line 2031) +* BFD_RELOC_390_TLS_GOTIE20: howto manager. (line 2050) +* BFD_RELOC_390_TLS_GOTIE32: howto manager. (line 2032) +* BFD_RELOC_390_TLS_GOTIE64: howto manager. (line 2033) +* BFD_RELOC_390_TLS_IE32: howto manager. (line 2036) +* BFD_RELOC_390_TLS_IE64: howto manager. (line 2037) +* BFD_RELOC_390_TLS_IEENT: howto manager. (line 2038) +* BFD_RELOC_390_TLS_LDCALL: howto manager. (line 2028) +* BFD_RELOC_390_TLS_LDM32: howto manager. (line 2034) +* BFD_RELOC_390_TLS_LDM64: howto manager. (line 2035) +* BFD_RELOC_390_TLS_LDO32: howto manager. (line 2041) +* BFD_RELOC_390_TLS_LDO64: howto manager. (line 2042) +* BFD_RELOC_390_TLS_LE32: howto manager. (line 2039) +* BFD_RELOC_390_TLS_LE64: howto manager. (line 2040) +* BFD_RELOC_390_TLS_LOAD: howto manager. (line 2026) +* BFD_RELOC_390_TLS_TPOFF: howto manager. (line 2045) +* BFD_RELOC_64: howto manager. (line 24) +* BFD_RELOC_64_PCREL: howto manager. (line 32) +* BFD_RELOC_64_PLTOFF: howto manager. (line 59) +* BFD_RELOC_64_PLT_PCREL: howto manager. (line 54) +* BFD_RELOC_68K_GLOB_DAT: howto manager. (line 70) +* BFD_RELOC_68K_JMP_SLOT: howto manager. (line 71) +* BFD_RELOC_68K_RELATIVE: howto manager. (line 72) +* BFD_RELOC_68K_TLS_GD16: howto manager. (line 74) +* BFD_RELOC_68K_TLS_GD32: howto manager. (line 73) +* BFD_RELOC_68K_TLS_GD8: howto manager. (line 75) +* BFD_RELOC_68K_TLS_IE16: howto manager. (line 83) +* BFD_RELOC_68K_TLS_IE32: howto manager. (line 82) +* BFD_RELOC_68K_TLS_IE8: howto manager. (line 84) +* BFD_RELOC_68K_TLS_LDM16: howto manager. (line 77) +* BFD_RELOC_68K_TLS_LDM32: howto manager. (line 76) +* BFD_RELOC_68K_TLS_LDM8: howto manager. (line 78) +* BFD_RELOC_68K_TLS_LDO16: howto manager. (line 80) +* BFD_RELOC_68K_TLS_LDO32: howto manager. (line 79) +* BFD_RELOC_68K_TLS_LDO8: howto manager. (line 81) +* BFD_RELOC_68K_TLS_LE16: howto manager. (line 86) +* BFD_RELOC_68K_TLS_LE32: howto manager. (line 85) +* BFD_RELOC_68K_TLS_LE8: howto manager. (line 87) +* BFD_RELOC_8: howto manager. (line 30) +* BFD_RELOC_8_BASEREL: howto manager. (line 94) +* BFD_RELOC_8_FFnn: howto manager. (line 97) +* BFD_RELOC_8_GOTOFF: howto manager. (line 53) +* BFD_RELOC_8_GOT_PCREL: howto manager. (line 47) +* BFD_RELOC_8_PCREL: howto manager. (line 37) +* BFD_RELOC_8_PLTOFF: howto manager. (line 65) +* BFD_RELOC_8_PLT_PCREL: howto manager. (line 58) +* BFD_RELOC_AARCH64_16: howto manager. (line 2902) +* BFD_RELOC_AARCH64_16_PCREL: howto manager. (line 2908) +* BFD_RELOC_AARCH64_32: howto manager. (line 2901) +* BFD_RELOC_AARCH64_32_PCREL: howto manager. (line 2907) +* BFD_RELOC_AARCH64_64: howto manager. (line 2900) +* BFD_RELOC_AARCH64_64_PCREL: howto manager. (line 2906) +* BFD_RELOC_AARCH64_ADD_LO12: howto manager. (line 2981) +* BFD_RELOC_AARCH64_ADR_GOT_PAGE: howto manager. (line 3027) +* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: howto manager. (line 2977) +* BFD_RELOC_AARCH64_ADR_HI21_PCREL: howto manager. (line 2974) +* BFD_RELOC_AARCH64_ADR_LO21_PCREL: howto manager. (line 2971) +* BFD_RELOC_AARCH64_BRANCH19: howto manager. (line 2993) +* BFD_RELOC_AARCH64_CALL26: howto manager. (line 3001) +* BFD_RELOC_AARCH64_COPY: howto manager. (line 3194) +* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP: howto manager. (line 3218) +* BFD_RELOC_AARCH64_GLOB_DAT: howto manager. (line 3196) +* BFD_RELOC_AARCH64_GOT_LD_PREL19: howto manager. (line 3021) +* BFD_RELOC_AARCH64_IRELATIVE: howto manager. (line 3210) +* BFD_RELOC_AARCH64_JUMP26: howto manager. (line 2997) +* BFD_RELOC_AARCH64_JUMP_SLOT: howto manager. (line 3198) +* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14: howto manager. (line 3048) +* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: howto manager. (line 3035) +* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15: howto manager. (line 3045) +* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15: howto manager. (line 3051) +* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: howto manager. (line 3031) +* BFD_RELOC_AARCH64_LDST128_LO12: howto manager. (line 3017) +* BFD_RELOC_AARCH64_LDST16_LO12: howto manager. (line 3005) +* BFD_RELOC_AARCH64_LDST32_LO12: howto manager. (line 3009) +* BFD_RELOC_AARCH64_LDST64_LO12: howto manager. (line 3013) +* BFD_RELOC_AARCH64_LDST8_LO12: howto manager. (line 2985) +* BFD_RELOC_AARCH64_LDST_LO12: howto manager. (line 3221) +* BFD_RELOC_AARCH64_LD_GOT_LO12_NC: howto manager. (line 3239) +* BFD_RELOC_AARCH64_LD_LO19_PCREL: howto manager. (line 2967) +* BFD_RELOC_AARCH64_MOVW_G0: howto manager. (line 2911) +* BFD_RELOC_AARCH64_MOVW_G0_NC: howto manager. (line 2914) +* BFD_RELOC_AARCH64_MOVW_G0_S: howto manager. (line 2932) +* BFD_RELOC_AARCH64_MOVW_G1: howto manager. (line 2917) +* BFD_RELOC_AARCH64_MOVW_G1_NC: howto manager. (line 2920) +* BFD_RELOC_AARCH64_MOVW_G1_S: howto manager. (line 2936) +* BFD_RELOC_AARCH64_MOVW_G2: howto manager. (line 2923) +* BFD_RELOC_AARCH64_MOVW_G2_NC: howto manager. (line 2926) +* BFD_RELOC_AARCH64_MOVW_G2_S: howto manager. (line 2940) +* BFD_RELOC_AARCH64_MOVW_G3: howto manager. (line 2929) +* BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC: howto manager. (line 3039) +* BFD_RELOC_AARCH64_MOVW_GOTOFF_G1: howto manager. (line 3042) +* BFD_RELOC_AARCH64_MOVW_PREL_G0: howto manager. (line 2944) +* BFD_RELOC_AARCH64_MOVW_PREL_G0_NC: howto manager. (line 2948) +* BFD_RELOC_AARCH64_MOVW_PREL_G1: howto manager. (line 2952) +* BFD_RELOC_AARCH64_MOVW_PREL_G1_NC: howto manager. (line 2955) +* BFD_RELOC_AARCH64_MOVW_PREL_G2: howto manager. (line 2958) +* BFD_RELOC_AARCH64_MOVW_PREL_G2_NC: howto manager. (line 2961) +* BFD_RELOC_AARCH64_MOVW_PREL_G3: howto manager. (line 2964) +* BFD_RELOC_AARCH64_NONE: howto manager. (line 2898) +* BFD_RELOC_AARCH64_NULL: howto manager. (line 2896) +* BFD_RELOC_AARCH64_RELATIVE: howto manager. (line 3200) +* BFD_RELOC_AARCH64_RELOC_END: howto manager. (line 3212) +* BFD_RELOC_AARCH64_RELOC_START: howto manager. (line 2891) +* BFD_RELOC_AARCH64_TLSDESC: howto manager. (line 3208) +* BFD_RELOC_AARCH64_TLSDESC_ADD: howto manager. (line 3190) +* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: howto manager. (line 3182) +* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: howto manager. (line 3176) +* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: howto manager. (line 3174) +* BFD_RELOC_AARCH64_TLSDESC_CALL: howto manager. (line 3192) +* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager. (line 3180) +* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: howto manager. (line 3178) +* BFD_RELOC_AARCH64_TLSDESC_LDR: howto manager. (line 3188) +* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC: howto manager. (line 3245) +* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: howto manager. (line 3172) +* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: howto manager. (line 3186) +* BFD_RELOC_AARCH64_TLSDESC_OFF_G1: howto manager. (line 3184) +* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: howto manager. (line 3061) +* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: howto manager. (line 3054) +* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21: howto manager. (line 3059) +* BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC: howto manager. (line 3065) +* BFD_RELOC_AARCH64_TLSGD_MOVW_G1: howto manager. (line 3067) * BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: howto manager. - (line 2972) + (line 3069) * BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: howto manager. - (line 2976) + (line 3073) * BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: howto manager. - (line 2974) + (line 3071) * BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC: howto manager. - (line 3145) -* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 2978) + (line 3242) +* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 3075) * BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC: howto manager. - (line 2980) -* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager. (line 2982) -* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12: howto manager. (line 2984) -* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: howto manager. (line 2986) -* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC: howto manager. (line 2988) -* BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC: howto manager. (line 2991) -* BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21: howto manager. (line 2995) -* BFD_RELOC_AARCH64_TLSLD_ADR_PREL21: howto manager. (line 2998) -* BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12: howto manager. (line 3001) + (line 3077) +* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager. (line 3079) +* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12: howto manager. (line 3081) +* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: howto manager. (line 3083) +* BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC: howto manager. (line 3085) +* BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC: howto manager. (line 3088) +* BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21: howto manager. (line 3092) +* BFD_RELOC_AARCH64_TLSLD_ADR_PREL21: howto manager. (line 3095) +* BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12: howto manager. (line 3098) * BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC: howto manager. - (line 3004) -* BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12: howto manager. (line 3007) + (line 3101) +* BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12: howto manager. (line 3104) * BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC: howto manager. - (line 3010) -* BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12: howto manager. (line 3013) + (line 3107) +* BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12: howto manager. (line 3110) * BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC: howto manager. - (line 3016) -* BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12: howto manager. (line 3019) + (line 3113) +* BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12: howto manager. (line 3116) * BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC: howto manager. - (line 3022) -* BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12: howto manager. (line 3128) + (line 3119) +* BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12: howto manager. (line 3225) * BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC: howto manager. - (line 3132) -* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0: howto manager. (line 3025) -* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: howto manager. (line 3027) -* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1: howto manager. (line 3029) -* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC: howto manager. (line 3031) -* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2: howto manager. (line 3033) -* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager. (line 3045) -* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager. (line 3047) -* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager. (line 3049) -* BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12: howto manager. (line 3051) + (line 3229) +* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0: howto manager. (line 3122) +* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC: howto manager. (line 3124) +* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1: howto manager. (line 3126) +* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC: howto manager. (line 3128) +* BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2: howto manager. (line 3130) +* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager. (line 3142) +* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager. (line 3144) +* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager. (line 3146) +* BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12: howto manager. (line 3148) * BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: howto manager. - (line 3054) -* BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12: howto manager. (line 3057) + (line 3151) +* BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12: howto manager. (line 3154) * BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: howto manager. - (line 3060) -* BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12: howto manager. (line 3063) + (line 3157) +* BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12: howto manager. (line 3160) * BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: howto manager. - (line 3066) -* BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12: howto manager. (line 3069) + (line 3163) +* BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12: howto manager. (line 3166) * BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: howto manager. - (line 3072) -* BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12: howto manager. (line 3135) -* BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC: howto manager. (line 3139) -* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager. (line 3041) -* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager. (line 3043) -* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager. (line 3037) -* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager. (line 3039) -* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager. (line 3035) -* BFD_RELOC_AARCH64_TLS_DTPMOD: howto manager. (line 3105) -* BFD_RELOC_AARCH64_TLS_DTPREL: howto manager. (line 3107) -* BFD_RELOC_AARCH64_TLS_TPREL: howto manager. (line 3109) -* BFD_RELOC_AARCH64_TSTBR14: howto manager. (line 2892) -* BFD_RELOC_AC_SECTOFF_S9: howto manager. (line 1077) -* BFD_RELOC_AC_SECTOFF_S9_1: howto manager. (line 1078) -* BFD_RELOC_AC_SECTOFF_S9_2: howto manager. (line 1079) -* BFD_RELOC_AC_SECTOFF_U8: howto manager. (line 1074) -* BFD_RELOC_AC_SECTOFF_U8_1: howto manager. (line 1075) -* BFD_RELOC_AC_SECTOFF_U8_2: howto manager. (line 1076) -* BFD_RELOC_ALPHA_BOH: howto manager. (line 289) -* BFD_RELOC_ALPHA_BRSGP: howto manager. (line 276) -* BFD_RELOC_ALPHA_BSR: howto manager. (line 283) -* BFD_RELOC_ALPHA_CODEADDR: howto manager. (line 269) -* BFD_RELOC_ALPHA_DTPMOD64: howto manager. (line 294) -* BFD_RELOC_ALPHA_DTPREL16: howto manager. (line 299) -* BFD_RELOC_ALPHA_DTPREL64: howto manager. (line 296) -* BFD_RELOC_ALPHA_DTPREL_HI16: howto manager. (line 297) -* BFD_RELOC_ALPHA_DTPREL_LO16: howto manager. (line 298) -* BFD_RELOC_ALPHA_ELF_LITERAL: howto manager. (line 237) -* BFD_RELOC_ALPHA_GOTDTPREL16: howto manager. (line 295) -* BFD_RELOC_ALPHA_GOTTPREL16: howto manager. (line 300) -* BFD_RELOC_ALPHA_GPDISP: howto manager. (line 232) -* BFD_RELOC_ALPHA_GPDISP_HI16: howto manager. (line 220) -* BFD_RELOC_ALPHA_GPDISP_LO16: howto manager. (line 227) -* BFD_RELOC_ALPHA_GPREL_HI16: howto manager. (line 272) -* BFD_RELOC_ALPHA_GPREL_LO16: howto manager. (line 273) -* BFD_RELOC_ALPHA_HINT: howto manager. (line 262) -* BFD_RELOC_ALPHA_LDA: howto manager. (line 286) -* BFD_RELOC_ALPHA_LINKAGE: howto manager. (line 266) -* BFD_RELOC_ALPHA_LITERAL: howto manager. (line 236) -* BFD_RELOC_ALPHA_LITUSE: howto manager. (line 238) -* BFD_RELOC_ALPHA_NOP: howto manager. (line 280) -* BFD_RELOC_ALPHA_TLSGD: howto manager. (line 292) -* BFD_RELOC_ALPHA_TLSLDM: howto manager. (line 293) -* BFD_RELOC_ALPHA_TPREL16: howto manager. (line 304) -* BFD_RELOC_ALPHA_TPREL64: howto manager. (line 301) -* BFD_RELOC_ALPHA_TPREL_HI16: howto manager. (line 302) -* BFD_RELOC_ALPHA_TPREL_LO16: howto manager. (line 303) -* BFD_RELOC_ARC_16: howto manager. (line 1046) -* BFD_RELOC_ARC_24: howto manager. (line 1047) -* BFD_RELOC_ARC_32: howto manager. (line 1048) -* BFD_RELOC_ARC_32_ME: howto manager. (line 1068) -* BFD_RELOC_ARC_32_ME_S: howto manager. (line 1069) -* BFD_RELOC_ARC_32_PCREL: howto manager. (line 1086) -* BFD_RELOC_ARC_8: howto manager. (line 1045) -* BFD_RELOC_ARC_COPY: howto manager. (line 1091) -* BFD_RELOC_ARC_GLOB_DAT: howto manager. (line 1092) -* BFD_RELOC_ARC_GOT32: howto manager. (line 1088) -* BFD_RELOC_ARC_GOTOFF: howto manager. (line 1095) -* BFD_RELOC_ARC_GOTPC: howto manager. (line 1096) -* BFD_RELOC_ARC_GOTPC32: howto manager. (line 1089) -* BFD_RELOC_ARC_JLI_SECTOFF: howto manager. (line 1112) -* BFD_RELOC_ARC_JMP_SLOT: howto manager. (line 1093) -* BFD_RELOC_ARC_N16: howto manager. (line 1050) -* BFD_RELOC_ARC_N24: howto manager. (line 1051) -* BFD_RELOC_ARC_N32: howto manager. (line 1052) -* BFD_RELOC_ARC_N32_ME: howto manager. (line 1070) -* BFD_RELOC_ARC_N8: howto manager. (line 1049) -* BFD_RELOC_ARC_NONE: howto manager. (line 1044) -* BFD_RELOC_ARC_NPS_CMEM16: howto manager. (line 1111) -* BFD_RELOC_ARC_PC32: howto manager. (line 1087) -* BFD_RELOC_ARC_PLT32: howto manager. (line 1090) -* BFD_RELOC_ARC_RELATIVE: howto manager. (line 1094) -* BFD_RELOC_ARC_S13_PCREL: howto manager. (line 1066) -* BFD_RELOC_ARC_S21H_PCREL: howto manager. (line 1055) -* BFD_RELOC_ARC_S21H_PCREL_PLT: howto manager. (line 1110) -* BFD_RELOC_ARC_S21W_PCREL: howto manager. (line 1056) -* BFD_RELOC_ARC_S21W_PCREL_PLT: howto manager. (line 1097) -* BFD_RELOC_ARC_S25H_PCREL: howto manager. (line 1057) -* BFD_RELOC_ARC_S25H_PCREL_PLT: howto manager. (line 1098) -* BFD_RELOC_ARC_S25W_PCREL: howto manager. (line 1058) -* BFD_RELOC_ARC_S25W_PCREL_PLT: howto manager. (line 1109) -* BFD_RELOC_ARC_SDA: howto manager. (line 1053) -* BFD_RELOC_ARC_SDA16_LD: howto manager. (line 1063) -* BFD_RELOC_ARC_SDA16_LD1: howto manager. (line 1064) -* BFD_RELOC_ARC_SDA16_LD2: howto manager. (line 1065) -* BFD_RELOC_ARC_SDA16_ST2: howto manager. (line 1085) -* BFD_RELOC_ARC_SDA32: howto manager. (line 1059) -* BFD_RELOC_ARC_SDA32_ME: howto manager. (line 1072) -* BFD_RELOC_ARC_SDA_12: howto manager. (line 1084) -* BFD_RELOC_ARC_SDA_LDST: howto manager. (line 1060) -* BFD_RELOC_ARC_SDA_LDST1: howto manager. (line 1061) -* BFD_RELOC_ARC_SDA_LDST2: howto manager. (line 1062) -* BFD_RELOC_ARC_SECTOFF: howto manager. (line 1054) -* BFD_RELOC_ARC_SECTOFF_1: howto manager. (line 1082) -* BFD_RELOC_ARC_SECTOFF_2: howto manager. (line 1083) -* BFD_RELOC_ARC_SECTOFF_ME: howto manager. (line 1071) -* BFD_RELOC_ARC_SECTOFF_ME_1: howto manager. (line 1080) -* BFD_RELOC_ARC_SECTOFF_ME_2: howto manager. (line 1081) -* BFD_RELOC_ARC_TLS_DTPMOD: howto manager. (line 1099) -* BFD_RELOC_ARC_TLS_DTPOFF: howto manager. (line 1105) -* BFD_RELOC_ARC_TLS_DTPOFF_S9: howto manager. (line 1106) -* BFD_RELOC_ARC_TLS_GD_CALL: howto manager. (line 1103) -* BFD_RELOC_ARC_TLS_GD_GOT: howto manager. (line 1101) -* BFD_RELOC_ARC_TLS_GD_LD: howto manager. (line 1102) -* BFD_RELOC_ARC_TLS_IE_GOT: howto manager. (line 1104) -* BFD_RELOC_ARC_TLS_LE_32: howto manager. (line 1108) -* BFD_RELOC_ARC_TLS_LE_S9: howto manager. (line 1107) -* BFD_RELOC_ARC_TLS_TPOFF: howto manager. (line 1100) -* BFD_RELOC_ARC_W: howto manager. (line 1067) -* BFD_RELOC_ARC_W_ME: howto manager. (line 1073) -* BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager. (line 917) -* BFD_RELOC_ARM_ADR_IMM: howto manager. (line 932) -* BFD_RELOC_ARM_ALU_PC_G0: howto manager. (line 879) -* BFD_RELOC_ARM_ALU_PC_G0_NC: howto manager. (line 878) -* BFD_RELOC_ARM_ALU_PC_G1: howto manager. (line 881) -* BFD_RELOC_ARM_ALU_PC_G1_NC: howto manager. (line 880) -* BFD_RELOC_ARM_ALU_PC_G2: howto manager. (line 882) -* BFD_RELOC_ARM_ALU_SB_G0: howto manager. (line 893) -* BFD_RELOC_ARM_ALU_SB_G0_NC: howto manager. (line 892) -* BFD_RELOC_ARM_ALU_SB_G1: howto manager. (line 895) -* BFD_RELOC_ARM_ALU_SB_G1_NC: howto manager. (line 894) -* BFD_RELOC_ARM_ALU_SB_G2: howto manager. (line 896) -* BFD_RELOC_ARM_CP_OFF_IMM: howto manager. (line 927) -* BFD_RELOC_ARM_CP_OFF_IMM_S2: howto manager. (line 928) -* BFD_RELOC_ARM_FUNCDESC: howto manager. (line 848) -* BFD_RELOC_ARM_FUNCDESC_VALUE: howto manager. (line 849) -* BFD_RELOC_ARM_GLOB_DAT: howto manager. (line 855) -* BFD_RELOC_ARM_GOT32: howto manager. (line 856) -* BFD_RELOC_ARM_GOTFUNCDESC: howto manager. (line 846) -* BFD_RELOC_ARM_GOTOFF: howto manager. (line 859) -* BFD_RELOC_ARM_GOTOFFFUNCDESC: howto manager. (line 847) -* BFD_RELOC_ARM_GOTPC: howto manager. (line 860) -* BFD_RELOC_ARM_GOT_PREL: howto manager. (line 861) -* BFD_RELOC_ARM_HVC: howto manager. (line 924) -* BFD_RELOC_ARM_HWLITERAL: howto manager. (line 939) -* BFD_RELOC_ARM_IMMEDIATE: howto manager. (line 916) -* BFD_RELOC_ARM_IN_POOL: howto manager. (line 935) -* BFD_RELOC_ARM_IRELATIVE: howto manager. (line 909) -* BFD_RELOC_ARM_JUMP_SLOT: howto manager. (line 854) -* BFD_RELOC_ARM_LDC_PC_G0: howto manager. (line 889) -* BFD_RELOC_ARM_LDC_PC_G1: howto manager. (line 890) -* BFD_RELOC_ARM_LDC_PC_G2: howto manager. (line 891) -* BFD_RELOC_ARM_LDC_SB_G0: howto manager. (line 903) -* BFD_RELOC_ARM_LDC_SB_G1: howto manager. (line 904) -* BFD_RELOC_ARM_LDC_SB_G2: howto manager. (line 905) -* BFD_RELOC_ARM_LDRS_PC_G0: howto manager. (line 886) -* BFD_RELOC_ARM_LDRS_PC_G1: howto manager. (line 887) -* BFD_RELOC_ARM_LDRS_PC_G2: howto manager. (line 888) -* BFD_RELOC_ARM_LDRS_SB_G0: howto manager. (line 900) -* BFD_RELOC_ARM_LDRS_SB_G1: howto manager. (line 901) -* BFD_RELOC_ARM_LDRS_SB_G2: howto manager. (line 902) -* BFD_RELOC_ARM_LDR_IMM: howto manager. (line 933) -* BFD_RELOC_ARM_LDR_PC_G0: howto manager. (line 883) -* BFD_RELOC_ARM_LDR_PC_G1: howto manager. (line 884) -* BFD_RELOC_ARM_LDR_PC_G2: howto manager. (line 885) -* BFD_RELOC_ARM_LDR_SB_G0: howto manager. (line 897) -* BFD_RELOC_ARM_LDR_SB_G1: howto manager. (line 898) -* BFD_RELOC_ARM_LDR_SB_G2: howto manager. (line 899) -* BFD_RELOC_ARM_LITERAL: howto manager. (line 934) -* BFD_RELOC_ARM_MOVT: howto manager. (line 838) -* BFD_RELOC_ARM_MOVT_PCREL: howto manager. (line 840) -* BFD_RELOC_ARM_MOVW: howto manager. (line 837) -* BFD_RELOC_ARM_MOVW_PCREL: howto manager. (line 839) -* BFD_RELOC_ARM_MULTI: howto manager. (line 926) -* BFD_RELOC_ARM_OFFSET_IMM: howto manager. (line 818) -* BFD_RELOC_ARM_OFFSET_IMM8: howto manager. (line 936) -* BFD_RELOC_ARM_PCREL_BLX: howto manager. (line 782) -* BFD_RELOC_ARM_PCREL_BRANCH: howto manager. (line 779) -* BFD_RELOC_ARM_PCREL_CALL: howto manager. (line 790) -* BFD_RELOC_ARM_PCREL_JUMP: howto manager. (line 793) -* BFD_RELOC_ARM_PLT32: howto manager. (line 857) -* BFD_RELOC_ARM_PREL31: howto manager. (line 835) -* BFD_RELOC_ARM_RELATIVE: howto manager. (line 858) -* BFD_RELOC_ARM_ROSEGREL32: howto manager. (line 827) -* BFD_RELOC_ARM_SBREL32: howto manager. (line 829) -* BFD_RELOC_ARM_SHIFT_IMM: howto manager. (line 922) -* BFD_RELOC_ARM_SMC: howto manager. (line 923) -* BFD_RELOC_ARM_SWI: howto manager. (line 925) -* BFD_RELOC_ARM_T32_ADD_IMM: howto manager. (line 919) -* BFD_RELOC_ARM_T32_ADD_PC12: howto manager. (line 921) -* BFD_RELOC_ARM_T32_CP_OFF_IMM: howto manager. (line 929) -* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2: howto manager. (line 930) -* BFD_RELOC_ARM_T32_IMM12: howto manager. (line 920) -* BFD_RELOC_ARM_T32_IMMEDIATE: howto manager. (line 918) -* BFD_RELOC_ARM_T32_OFFSET_IMM: howto manager. (line 938) -* BFD_RELOC_ARM_T32_OFFSET_U8: howto manager. (line 937) -* BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM: howto manager. (line 931) -* BFD_RELOC_ARM_TARGET1: howto manager. (line 824) -* BFD_RELOC_ARM_TARGET2: howto manager. (line 831) -* BFD_RELOC_ARM_THM_TLS_CALL: howto manager. (line 873) -* BFD_RELOC_ARM_THM_TLS_DESCSEQ: howto manager. (line 875) -* BFD_RELOC_ARM_THUMB_ADD: howto manager. (line 940) -* BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC: howto manager. (line 911) -* BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC: howto manager. (line 912) -* BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC: howto manager. (line 913) -* BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC: howto manager. (line 914) -* BFD_RELOC_ARM_THUMB_BF13: howto manager. (line 801) -* BFD_RELOC_ARM_THUMB_BF17: howto manager. (line 799) -* BFD_RELOC_ARM_THUMB_BF19: howto manager. (line 803) -* BFD_RELOC_ARM_THUMB_IMM: howto manager. (line 941) -* BFD_RELOC_ARM_THUMB_LOOP12: howto manager. (line 805) -* BFD_RELOC_ARM_THUMB_MOVT: howto manager. (line 842) -* BFD_RELOC_ARM_THUMB_MOVT_PCREL: howto manager. (line 844) -* BFD_RELOC_ARM_THUMB_MOVW: howto manager. (line 841) -* BFD_RELOC_ARM_THUMB_MOVW_PCREL: howto manager. (line 843) -* BFD_RELOC_ARM_THUMB_OFFSET: howto manager. (line 821) -* BFD_RELOC_ARM_THUMB_SHIFT: howto manager. (line 942) -* BFD_RELOC_ARM_TLS_CALL: howto manager. (line 872) -* BFD_RELOC_ARM_TLS_DESC: howto manager. (line 876) -* BFD_RELOC_ARM_TLS_DESCSEQ: howto manager. (line 874) -* BFD_RELOC_ARM_TLS_DTPMOD32: howto manager. (line 867) -* BFD_RELOC_ARM_TLS_DTPOFF32: howto manager. (line 866) -* BFD_RELOC_ARM_TLS_GD32: howto manager. (line 863) -* BFD_RELOC_ARM_TLS_GD32_FDPIC: howto manager. (line 850) -* BFD_RELOC_ARM_TLS_GOTDESC: howto manager. (line 871) -* BFD_RELOC_ARM_TLS_IE32: howto manager. (line 869) -* BFD_RELOC_ARM_TLS_IE32_FDPIC: howto manager. (line 852) -* BFD_RELOC_ARM_TLS_LDM32: howto manager. (line 865) -* BFD_RELOC_ARM_TLS_LDM32_FDPIC: howto manager. (line 851) -* BFD_RELOC_ARM_TLS_LDO32: howto manager. (line 864) -* BFD_RELOC_ARM_TLS_LE32: howto manager. (line 870) -* BFD_RELOC_ARM_TLS_TPOFF32: howto manager. (line 868) -* BFD_RELOC_ARM_V4BX: howto manager. (line 907) -* BFD_RELOC_AVR_13_PCREL: howto manager. (line 1749) -* BFD_RELOC_AVR_16_PM: howto manager. (line 1752) -* BFD_RELOC_AVR_6: howto manager. (line 1820) -* BFD_RELOC_AVR_6_ADIW: howto manager. (line 1823) -* BFD_RELOC_AVR_7_PCREL: howto manager. (line 1746) -* BFD_RELOC_AVR_8_HI: howto manager. (line 1829) -* BFD_RELOC_AVR_8_HLO: howto manager. (line 1832) -* BFD_RELOC_AVR_8_LO: howto manager. (line 1826) -* BFD_RELOC_AVR_CALL: howto manager. (line 1814) -* BFD_RELOC_AVR_DIFF16: howto manager. (line 1836) -* BFD_RELOC_AVR_DIFF32: howto manager. (line 1837) -* BFD_RELOC_AVR_DIFF8: howto manager. (line 1835) -* BFD_RELOC_AVR_HH8_LDI: howto manager. (line 1761) -* BFD_RELOC_AVR_HH8_LDI_NEG: howto manager. (line 1776) -* BFD_RELOC_AVR_HH8_LDI_PM: howto manager. (line 1799) -* BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager. (line 1810) -* BFD_RELOC_AVR_HI8_LDI: howto manager. (line 1758) -* BFD_RELOC_AVR_HI8_LDI_GS: howto manager. (line 1794) -* BFD_RELOC_AVR_HI8_LDI_NEG: howto manager. (line 1772) -* BFD_RELOC_AVR_HI8_LDI_PM: howto manager. (line 1791) -* BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager. (line 1806) -* BFD_RELOC_AVR_LDI: howto manager. (line 1817) -* BFD_RELOC_AVR_LDS_STS_16: howto manager. (line 1844) -* BFD_RELOC_AVR_LO8_LDI: howto manager. (line 1755) -* BFD_RELOC_AVR_LO8_LDI_GS: howto manager. (line 1786) -* BFD_RELOC_AVR_LO8_LDI_NEG: howto manager. (line 1768) -* BFD_RELOC_AVR_LO8_LDI_PM: howto manager. (line 1783) -* BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager. (line 1803) -* BFD_RELOC_AVR_MS8_LDI: howto manager. (line 1765) -* BFD_RELOC_AVR_MS8_LDI_NEG: howto manager. (line 1780) -* BFD_RELOC_AVR_PORT5: howto manager. (line 1850) -* BFD_RELOC_AVR_PORT6: howto manager. (line 1847) -* BFD_RELOC_BFIN_10_PCREL: howto manager. (line 1124) -* BFD_RELOC_BFIN_11_PCREL: howto manager. (line 1126) -* BFD_RELOC_BFIN_12_PCREL_JUMP: howto manager. (line 1128) -* BFD_RELOC_BFIN_12_PCREL_JUMP_S: howto manager. (line 1130) -* BFD_RELOC_BFIN_16_HIGH: howto manager. (line 1116) -* BFD_RELOC_BFIN_16_IMM: howto manager. (line 1114) -* BFD_RELOC_BFIN_16_LOW: howto manager. (line 1122) -* BFD_RELOC_BFIN_24_PCREL_CALL_X: howto manager. (line 1132) -* BFD_RELOC_BFIN_24_PCREL_JUMP_L: howto manager. (line 1134) -* BFD_RELOC_BFIN_4_PCREL: howto manager. (line 1118) -* BFD_RELOC_BFIN_5_PCREL: howto manager. (line 1120) -* BFD_RELOC_BFIN_FUNCDESC: howto manager. (line 1139) -* BFD_RELOC_BFIN_FUNCDESC_GOT17M4: howto manager. (line 1140) -* BFD_RELOC_BFIN_FUNCDESC_GOTHI: howto manager. (line 1141) -* BFD_RELOC_BFIN_FUNCDESC_GOTLO: howto manager. (line 1142) -* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4: howto manager. (line 1144) -* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI: howto manager. (line 1145) -* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO: howto manager. (line 1146) -* BFD_RELOC_BFIN_FUNCDESC_VALUE: howto manager. (line 1143) -* BFD_RELOC_BFIN_GOT: howto manager. (line 1151) -* BFD_RELOC_BFIN_GOT17M4: howto manager. (line 1136) -* BFD_RELOC_BFIN_GOTHI: howto manager. (line 1137) -* BFD_RELOC_BFIN_GOTLO: howto manager. (line 1138) -* BFD_RELOC_BFIN_GOTOFF17M4: howto manager. (line 1147) -* BFD_RELOC_BFIN_GOTOFFHI: howto manager. (line 1148) -* BFD_RELOC_BFIN_GOTOFFLO: howto manager. (line 1149) -* BFD_RELOC_BFIN_PLTPC: howto manager. (line 1153) -* BFD_RELOC_BPF_16: howto manager. (line 3343) -* BFD_RELOC_BPF_32: howto manager. (line 3342) -* BFD_RELOC_BPF_64: howto manager. (line 3341) -* BFD_RELOC_BPF_DISP16: howto manager. (line 3344) -* BFD_RELOC_BPF_DISP32: howto manager. (line 3345) -* BFD_RELOC_C6000_ABS_H16: howto manager. (line 1591) -* BFD_RELOC_C6000_ABS_L16: howto manager. (line 1590) -* BFD_RELOC_C6000_ABS_S16: howto manager. (line 1589) -* BFD_RELOC_C6000_ALIGN: howto manager. (line 1612) -* BFD_RELOC_C6000_COPY: howto manager. (line 1607) -* BFD_RELOC_C6000_DSBT_INDEX: howto manager. (line 1605) -* BFD_RELOC_C6000_EHTYPE: howto manager. (line 1609) -* BFD_RELOC_C6000_FPHEAD: howto manager. (line 1613) -* BFD_RELOC_C6000_JUMP_SLOT: howto manager. (line 1608) -* BFD_RELOC_C6000_NOCMP: howto manager. (line 1614) -* BFD_RELOC_C6000_PCR_H16: howto manager. (line 1610) -* BFD_RELOC_C6000_PCR_L16: howto manager. (line 1611) -* BFD_RELOC_C6000_PCR_S10: howto manager. (line 1587) -* BFD_RELOC_C6000_PCR_S12: howto manager. (line 1586) -* BFD_RELOC_C6000_PCR_S21: howto manager. (line 1585) -* BFD_RELOC_C6000_PCR_S7: howto manager. (line 1588) -* BFD_RELOC_C6000_PREL31: howto manager. (line 1606) -* BFD_RELOC_C6000_SBR_GOT_H16_W: howto manager. (line 1604) -* BFD_RELOC_C6000_SBR_GOT_L16_W: howto manager. (line 1603) -* BFD_RELOC_C6000_SBR_GOT_U15_W: howto manager. (line 1602) -* BFD_RELOC_C6000_SBR_H16_B: howto manager. (line 1599) -* BFD_RELOC_C6000_SBR_H16_H: howto manager. (line 1600) -* BFD_RELOC_C6000_SBR_H16_W: howto manager. (line 1601) -* BFD_RELOC_C6000_SBR_L16_B: howto manager. (line 1596) -* BFD_RELOC_C6000_SBR_L16_H: howto manager. (line 1597) -* BFD_RELOC_C6000_SBR_L16_W: howto manager. (line 1598) -* BFD_RELOC_C6000_SBR_S16: howto manager. (line 1595) -* BFD_RELOC_C6000_SBR_U15_B: howto manager. (line 1592) -* BFD_RELOC_C6000_SBR_U15_H: howto manager. (line 1593) -* BFD_RELOC_C6000_SBR_U15_W: howto manager. (line 1594) -* BFD_RELOC_CKCORE_ADDR32: howto manager. (line 3382) -* BFD_RELOC_CKCORE_ADDRGOT: howto manager. (line 3398) -* BFD_RELOC_CKCORE_ADDRGOT_HI16: howto manager. (line 3417) -* BFD_RELOC_CKCORE_ADDRGOT_LO16: howto manager. (line 3418) -* BFD_RELOC_CKCORE_ADDRPLT: howto manager. (line 3399) -* BFD_RELOC_CKCORE_ADDRPLT_HI16: howto manager. (line 3419) -* BFD_RELOC_CKCORE_ADDRPLT_LO16: howto manager. (line 3420) -* BFD_RELOC_CKCORE_ADDR_HI16: howto manager. (line 3405) -* BFD_RELOC_CKCORE_ADDR_LO16: howto manager. (line 3406) -* BFD_RELOC_CKCORE_CALLGRAPH: howto manager. (line 3442) -* BFD_RELOC_CKCORE_COPY: howto manager. (line 3391) -* BFD_RELOC_CKCORE_DOFFSET_IMM18: howto manager. (line 3425) -* BFD_RELOC_CKCORE_DOFFSET_IMM18BY2: howto manager. (line 3426) -* BFD_RELOC_CKCORE_DOFFSET_IMM18BY4: howto manager. (line 3427) -* BFD_RELOC_CKCORE_DOFFSET_LO16: howto manager. (line 3423) -* BFD_RELOC_CKCORE_GLOB_DAT: howto manager. (line 3392) -* BFD_RELOC_CKCORE_GNU_VTENTRY: howto manager. (line 3389) -* BFD_RELOC_CKCORE_GNU_VTINHERIT: howto manager. (line 3388) -* BFD_RELOC_CKCORE_GOT12: howto manager. (line 3411) -* BFD_RELOC_CKCORE_GOT32: howto manager. (line 3396) -* BFD_RELOC_CKCORE_GOTOFF: howto manager. (line 3394) -* BFD_RELOC_CKCORE_GOTOFF_HI16: howto manager. (line 3409) -* BFD_RELOC_CKCORE_GOTOFF_IMM18: howto manager. (line 3428) -* BFD_RELOC_CKCORE_GOTOFF_LO16: howto manager. (line 3410) -* BFD_RELOC_CKCORE_GOTPC: howto manager. (line 3395) -* BFD_RELOC_CKCORE_GOTPC_HI16: howto manager. (line 3407) -* BFD_RELOC_CKCORE_GOTPC_LO16: howto manager. (line 3408) -* BFD_RELOC_CKCORE_GOT_HI16: howto manager. (line 3412) -* BFD_RELOC_CKCORE_GOT_IMM18BY4: howto manager. (line 3429) -* BFD_RELOC_CKCORE_GOT_LO16: howto manager. (line 3413) -* BFD_RELOC_CKCORE_IRELATIVE: howto manager. (line 3443) -* BFD_RELOC_CKCORE_JUMP_SLOT: howto manager. (line 3393) -* BFD_RELOC_CKCORE_NOJSRI: howto manager. (line 3441) -* BFD_RELOC_CKCORE_NONE: howto manager. (line 3381) -* BFD_RELOC_CKCORE_PCREL32: howto manager. (line 3386) -* BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4: howto manager. (line 3445) -* BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4: howto manager. (line 3444) -* BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4: howto manager. (line 3440) -* BFD_RELOC_CKCORE_PCREL_IMM10BY2: howto manager. (line 3403) -* BFD_RELOC_CKCORE_PCREL_IMM10BY4: howto manager. (line 3404) -* BFD_RELOC_CKCORE_PCREL_IMM11BY2: howto manager. (line 3384) -* BFD_RELOC_CKCORE_PCREL_IMM16BY2: howto manager. (line 3401) -* BFD_RELOC_CKCORE_PCREL_IMM16BY4: howto manager. (line 3402) -* BFD_RELOC_CKCORE_PCREL_IMM18BY2: howto manager. (line 3424) -* BFD_RELOC_CKCORE_PCREL_IMM26BY2: howto manager. (line 3400) -* BFD_RELOC_CKCORE_PCREL_IMM4BY2: howto manager. (line 3385) -* BFD_RELOC_CKCORE_PCREL_IMM7BY4: howto manager. (line 3431) -* BFD_RELOC_CKCORE_PCREL_IMM8BY4: howto manager. (line 3383) -* BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2: howto manager. (line 3387) -* BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2: howto manager. (line 3421) -* BFD_RELOC_CKCORE_PLT12: howto manager. (line 3414) -* BFD_RELOC_CKCORE_PLT32: howto manager. (line 3397) -* BFD_RELOC_CKCORE_PLT_HI16: howto manager. (line 3415) -* BFD_RELOC_CKCORE_PLT_IMM18BY4: howto manager. (line 3430) -* BFD_RELOC_CKCORE_PLT_LO16: howto manager. (line 3416) -* BFD_RELOC_CKCORE_RELATIVE: howto manager. (line 3390) -* BFD_RELOC_CKCORE_TLS_DTPMOD32: howto manager. (line 3437) -* BFD_RELOC_CKCORE_TLS_DTPOFF32: howto manager. (line 3438) -* BFD_RELOC_CKCORE_TLS_GD32: howto manager. (line 3434) -* BFD_RELOC_CKCORE_TLS_IE32: howto manager. (line 3433) -* BFD_RELOC_CKCORE_TLS_LDM32: howto manager. (line 3435) -* BFD_RELOC_CKCORE_TLS_LDO32: howto manager. (line 3436) -* BFD_RELOC_CKCORE_TLS_LE32: howto manager. (line 3432) -* BFD_RELOC_CKCORE_TLS_TPOFF32: howto manager. (line 3439) -* BFD_RELOC_CKCORE_TOFFSET_LO16: howto manager. (line 3422) -* bfd_reloc_code_type: howto manager. (line 9) -* BFD_RELOC_CR16_ABS20: howto manager. (line 2291) -* BFD_RELOC_CR16_ABS24: howto manager. (line 2292) -* BFD_RELOC_CR16_DISP16: howto manager. (line 2302) -* BFD_RELOC_CR16_DISP20: howto manager. (line 2303) -* BFD_RELOC_CR16_DISP24: howto manager. (line 2304) -* BFD_RELOC_CR16_DISP24a: howto manager. (line 2305) -* BFD_RELOC_CR16_DISP4: howto manager. (line 2300) -* BFD_RELOC_CR16_DISP8: howto manager. (line 2301) -* BFD_RELOC_CR16_GLOB_DAT: howto manager. (line 2311) -* BFD_RELOC_CR16_GOTC_REGREL20: howto manager. (line 2310) -* BFD_RELOC_CR16_GOT_REGREL20: howto manager. (line 2309) -* BFD_RELOC_CR16_IMM16: howto manager. (line 2295) -* BFD_RELOC_CR16_IMM20: howto manager. (line 2296) -* BFD_RELOC_CR16_IMM24: howto manager. (line 2297) -* BFD_RELOC_CR16_IMM32: howto manager. (line 2298) -* BFD_RELOC_CR16_IMM32a: howto manager. (line 2299) -* BFD_RELOC_CR16_IMM4: howto manager. (line 2293) -* BFD_RELOC_CR16_IMM8: howto manager. (line 2294) -* BFD_RELOC_CR16_NUM16: howto manager. (line 2280) -* BFD_RELOC_CR16_NUM32: howto manager. (line 2281) -* BFD_RELOC_CR16_NUM32a: howto manager. (line 2282) -* BFD_RELOC_CR16_NUM8: howto manager. (line 2279) -* BFD_RELOC_CR16_REGREL0: howto manager. (line 2283) -* BFD_RELOC_CR16_REGREL14: howto manager. (line 2286) -* BFD_RELOC_CR16_REGREL14a: howto manager. (line 2287) -* BFD_RELOC_CR16_REGREL16: howto manager. (line 2288) -* BFD_RELOC_CR16_REGREL20: howto manager. (line 2289) -* BFD_RELOC_CR16_REGREL20a: howto manager. (line 2290) -* BFD_RELOC_CR16_REGREL4: howto manager. (line 2284) -* BFD_RELOC_CR16_REGREL4a: howto manager. (line 2285) -* BFD_RELOC_CR16_SWITCH16: howto manager. (line 2307) -* BFD_RELOC_CR16_SWITCH32: howto manager. (line 2308) -* BFD_RELOC_CR16_SWITCH8: howto manager. (line 2306) -* BFD_RELOC_CRIS_16_DTPREL: howto manager. (line 2371) -* BFD_RELOC_CRIS_16_GOT: howto manager. (line 2353) -* BFD_RELOC_CRIS_16_GOTPLT: howto manager. (line 2357) -* BFD_RELOC_CRIS_16_GOT_GD: howto manager. (line 2367) -* BFD_RELOC_CRIS_16_GOT_TPREL: howto manager. (line 2373) -* BFD_RELOC_CRIS_16_TPREL: howto manager. (line 2375) -* BFD_RELOC_CRIS_32_DTPREL: howto manager. (line 2370) -* BFD_RELOC_CRIS_32_GD: howto manager. (line 2368) -* BFD_RELOC_CRIS_32_GOT: howto manager. (line 2351) -* BFD_RELOC_CRIS_32_GOTPLT: howto manager. (line 2355) -* BFD_RELOC_CRIS_32_GOTREL: howto manager. (line 2359) -* BFD_RELOC_CRIS_32_GOT_GD: howto manager. (line 2366) -* BFD_RELOC_CRIS_32_GOT_TPREL: howto manager. (line 2372) -* BFD_RELOC_CRIS_32_IE: howto manager. (line 2377) -* BFD_RELOC_CRIS_32_PLT_GOTREL: howto manager. (line 2361) -* BFD_RELOC_CRIS_32_PLT_PCREL: howto manager. (line 2363) -* BFD_RELOC_CRIS_32_TPREL: howto manager. (line 2374) -* BFD_RELOC_CRIS_BDISP8: howto manager. (line 2334) -* BFD_RELOC_CRIS_COPY: howto manager. (line 2346) -* BFD_RELOC_CRIS_DTP: howto manager. (line 2369) -* BFD_RELOC_CRIS_DTPMOD: howto manager. (line 2376) -* BFD_RELOC_CRIS_GLOB_DAT: howto manager. (line 2347) -* BFD_RELOC_CRIS_JUMP_SLOT: howto manager. (line 2348) -* BFD_RELOC_CRIS_LAPCQ_OFFSET: howto manager. (line 2342) -* BFD_RELOC_CRIS_RELATIVE: howto manager. (line 2349) -* BFD_RELOC_CRIS_SIGNED_16: howto manager. (line 2340) -* BFD_RELOC_CRIS_SIGNED_6: howto manager. (line 2336) -* BFD_RELOC_CRIS_SIGNED_8: howto manager. (line 2338) -* BFD_RELOC_CRIS_UNSIGNED_16: howto manager. (line 2341) -* BFD_RELOC_CRIS_UNSIGNED_4: howto manager. (line 2343) -* BFD_RELOC_CRIS_UNSIGNED_5: howto manager. (line 2335) -* BFD_RELOC_CRIS_UNSIGNED_6: howto manager. (line 2337) -* BFD_RELOC_CRIS_UNSIGNED_8: howto manager. (line 2339) -* BFD_RELOC_CRX_ABS16: howto manager. (line 2323) -* BFD_RELOC_CRX_ABS32: howto manager. (line 2324) -* BFD_RELOC_CRX_IMM16: howto manager. (line 2328) -* BFD_RELOC_CRX_IMM32: howto manager. (line 2329) -* BFD_RELOC_CRX_NUM16: howto manager. (line 2326) -* BFD_RELOC_CRX_NUM32: howto manager. (line 2327) -* BFD_RELOC_CRX_NUM8: howto manager. (line 2325) -* BFD_RELOC_CRX_REGREL12: howto manager. (line 2319) -* BFD_RELOC_CRX_REGREL22: howto manager. (line 2320) -* BFD_RELOC_CRX_REGREL28: howto manager. (line 2321) -* BFD_RELOC_CRX_REGREL32: howto manager. (line 2322) -* BFD_RELOC_CRX_REL16: howto manager. (line 2316) -* BFD_RELOC_CRX_REL24: howto manager. (line 2317) -* BFD_RELOC_CRX_REL32: howto manager. (line 2318) -* BFD_RELOC_CRX_REL4: howto manager. (line 2313) -* BFD_RELOC_CRX_REL8: howto manager. (line 2314) -* BFD_RELOC_CRX_REL8_CMP: howto manager. (line 2315) -* BFD_RELOC_CRX_SWITCH16: howto manager. (line 2331) -* BFD_RELOC_CRX_SWITCH32: howto manager. (line 2332) -* BFD_RELOC_CRX_SWITCH8: howto manager. (line 2330) -* BFD_RELOC_CTOR: howto manager. (line 774) -* BFD_RELOC_D10V_10_PCREL_L: howto manager. (line 1198) -* BFD_RELOC_D10V_10_PCREL_R: howto manager. (line 1195) -* BFD_RELOC_D10V_18: howto manager. (line 1202) -* BFD_RELOC_D10V_18_PCREL: howto manager. (line 1204) -* BFD_RELOC_D30V_15: howto manager. (line 1215) -* BFD_RELOC_D30V_15_PCREL: howto manager. (line 1218) -* BFD_RELOC_D30V_15_PCREL_R: howto manager. (line 1221) -* BFD_RELOC_D30V_21: howto manager. (line 1225) -* BFD_RELOC_D30V_21_PCREL: howto manager. (line 1228) -* BFD_RELOC_D30V_21_PCREL_R: howto manager. (line 1231) -* BFD_RELOC_D30V_32: howto manager. (line 1235) -* BFD_RELOC_D30V_32_PCREL: howto manager. (line 1237) -* BFD_RELOC_D30V_6: howto manager. (line 1206) -* BFD_RELOC_D30V_9_PCREL: howto manager. (line 1208) -* BFD_RELOC_D30V_9_PCREL_R: howto manager. (line 1211) -* BFD_RELOC_DLX_HI16_S: howto manager. (line 1239) -* BFD_RELOC_DLX_JMP26: howto manager. (line 1243) -* BFD_RELOC_DLX_LO16: howto manager. (line 1241) -* BFD_RELOC_EPIPHANY_HIGH: howto manager. (line 3351) -* BFD_RELOC_EPIPHANY_IMM11: howto manager. (line 3357) -* BFD_RELOC_EPIPHANY_IMM8: howto manager. (line 3360) -* BFD_RELOC_EPIPHANY_LOW: howto manager. (line 3353) -* BFD_RELOC_EPIPHANY_SIMM11: howto manager. (line 3355) -* BFD_RELOC_EPIPHANY_SIMM24: howto manager. (line 3349) -* BFD_RELOC_EPIPHANY_SIMM8: howto manager. (line 3347) -* BFD_RELOC_FR30_10_IN_8: howto manager. (line 1630) -* BFD_RELOC_FR30_12_PCREL: howto manager. (line 1636) -* BFD_RELOC_FR30_20: howto manager. (line 1618) -* BFD_RELOC_FR30_48: howto manager. (line 1616) -* BFD_RELOC_FR30_6_IN_4: howto manager. (line 1621) -* BFD_RELOC_FR30_8_IN_8: howto manager. (line 1624) -* BFD_RELOC_FR30_9_IN_8: howto manager. (line 1627) -* BFD_RELOC_FR30_9_PCREL: howto manager. (line 1633) -* BFD_RELOC_FRV_FUNCDESC: howto manager. (line 452) -* BFD_RELOC_FRV_FUNCDESC_GOT12: howto manager. (line 453) -* BFD_RELOC_FRV_FUNCDESC_GOTHI: howto manager. (line 454) -* BFD_RELOC_FRV_FUNCDESC_GOTLO: howto manager. (line 455) -* BFD_RELOC_FRV_FUNCDESC_GOTOFF12: howto manager. (line 457) -* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: howto manager. (line 458) -* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: howto manager. (line 459) -* BFD_RELOC_FRV_FUNCDESC_VALUE: howto manager. (line 456) -* BFD_RELOC_FRV_GETTLSOFF: howto manager. (line 463) -* BFD_RELOC_FRV_GETTLSOFF_RELAX: howto manager. (line 476) -* BFD_RELOC_FRV_GOT12: howto manager. (line 449) -* BFD_RELOC_FRV_GOTHI: howto manager. (line 450) -* BFD_RELOC_FRV_GOTLO: howto manager. (line 451) -* BFD_RELOC_FRV_GOTOFF12: howto manager. (line 460) -* BFD_RELOC_FRV_GOTOFFHI: howto manager. (line 461) -* BFD_RELOC_FRV_GOTOFFLO: howto manager. (line 462) -* BFD_RELOC_FRV_GOTTLSDESC12: howto manager. (line 465) -* BFD_RELOC_FRV_GOTTLSDESCHI: howto manager. (line 466) -* BFD_RELOC_FRV_GOTTLSDESCLO: howto manager. (line 467) -* BFD_RELOC_FRV_GOTTLSOFF12: howto manager. (line 471) -* BFD_RELOC_FRV_GOTTLSOFFHI: howto manager. (line 472) -* BFD_RELOC_FRV_GOTTLSOFFLO: howto manager. (line 473) -* BFD_RELOC_FRV_GPREL12: howto manager. (line 444) -* BFD_RELOC_FRV_GPREL32: howto manager. (line 446) -* BFD_RELOC_FRV_GPRELHI: howto manager. (line 447) -* BFD_RELOC_FRV_GPRELLO: howto manager. (line 448) -* BFD_RELOC_FRV_GPRELU12: howto manager. (line 445) -* BFD_RELOC_FRV_HI16: howto manager. (line 443) -* BFD_RELOC_FRV_LABEL16: howto manager. (line 440) -* BFD_RELOC_FRV_LABEL24: howto manager. (line 441) -* BFD_RELOC_FRV_LO16: howto manager. (line 442) -* BFD_RELOC_FRV_TLSDESC_RELAX: howto manager. (line 475) -* BFD_RELOC_FRV_TLSDESC_VALUE: howto manager. (line 464) -* BFD_RELOC_FRV_TLSMOFF: howto manager. (line 478) -* BFD_RELOC_FRV_TLSMOFF12: howto manager. (line 468) -* BFD_RELOC_FRV_TLSMOFFHI: howto manager. (line 469) -* BFD_RELOC_FRV_TLSMOFFLO: howto manager. (line 470) -* BFD_RELOC_FRV_TLSOFF: howto manager. (line 474) -* BFD_RELOC_FRV_TLSOFF_RELAX: howto manager. (line 477) -* BFD_RELOC_FT32_10: howto manager. (line 430) -* BFD_RELOC_FT32_15: howto manager. (line 437) -* BFD_RELOC_FT32_17: howto manager. (line 432) -* BFD_RELOC_FT32_18: howto manager. (line 433) -* BFD_RELOC_FT32_20: howto manager. (line 431) -* BFD_RELOC_FT32_DIFF32: howto manager. (line 438) -* BFD_RELOC_FT32_RELAX: howto manager. (line 434) -* BFD_RELOC_FT32_SC0: howto manager. (line 435) -* BFD_RELOC_FT32_SC1: howto manager. (line 436) -* BFD_RELOC_GPREL16: howto manager. (line 113) -* BFD_RELOC_GPREL32: howto manager. (line 114) -* BFD_RELOC_H8_DIR16A8: howto manager. (line 2420) -* BFD_RELOC_H8_DIR16R8: howto manager. (line 2421) -* BFD_RELOC_H8_DIR24A8: howto manager. (line 2422) -* BFD_RELOC_H8_DIR24R8: howto manager. (line 2423) -* BFD_RELOC_H8_DIR32A16: howto manager. (line 2424) -* BFD_RELOC_H8_DISP32A16: howto manager. (line 2425) -* BFD_RELOC_HI16: howto manager. (line 313) -* BFD_RELOC_HI16_BASEREL: howto manager. (line 93) -* BFD_RELOC_HI16_GOTOFF: howto manager. (line 52) -* BFD_RELOC_HI16_PCREL: howto manager. (line 322) -* BFD_RELOC_HI16_PLTOFF: howto manager. (line 64) -* BFD_RELOC_HI16_S: howto manager. (line 315) -* BFD_RELOC_HI16_S_BASEREL: howto manager. (line 94) -* BFD_RELOC_HI16_S_GOTOFF: howto manager. (line 53) -* BFD_RELOC_HI16_S_PCREL: howto manager. (line 324) -* BFD_RELOC_HI16_S_PLTOFF: howto manager. (line 65) -* BFD_RELOC_HI22: howto manager. (line 109) -* BFD_RELOC_I370_D12: howto manager. (line 772) -* BFD_RELOC_IA64_COPY: howto manager. (line 2177) -* BFD_RELOC_IA64_DIR32LSB: howto manager. (line 2122) -* BFD_RELOC_IA64_DIR32MSB: howto manager. (line 2121) -* BFD_RELOC_IA64_DIR64LSB: howto manager. (line 2124) -* BFD_RELOC_IA64_DIR64MSB: howto manager. (line 2123) -* BFD_RELOC_IA64_DTPMOD64LSB: howto manager. (line 2187) -* BFD_RELOC_IA64_DTPMOD64MSB: howto manager. (line 2186) -* BFD_RELOC_IA64_DTPREL14: howto manager. (line 2189) -* BFD_RELOC_IA64_DTPREL22: howto manager. (line 2190) -* BFD_RELOC_IA64_DTPREL32LSB: howto manager. (line 2193) -* BFD_RELOC_IA64_DTPREL32MSB: howto manager. (line 2192) -* BFD_RELOC_IA64_DTPREL64I: howto manager. (line 2191) -* BFD_RELOC_IA64_DTPREL64LSB: howto manager. (line 2195) -* BFD_RELOC_IA64_DTPREL64MSB: howto manager. (line 2194) -* BFD_RELOC_IA64_FPTR32LSB: howto manager. (line 2139) -* BFD_RELOC_IA64_FPTR32MSB: howto manager. (line 2138) -* BFD_RELOC_IA64_FPTR64I: howto manager. (line 2137) -* BFD_RELOC_IA64_FPTR64LSB: howto manager. (line 2141) -* BFD_RELOC_IA64_FPTR64MSB: howto manager. (line 2140) -* BFD_RELOC_IA64_GPREL22: howto manager. (line 2125) -* BFD_RELOC_IA64_GPREL32LSB: howto manager. (line 2128) -* BFD_RELOC_IA64_GPREL32MSB: howto manager. (line 2127) -* BFD_RELOC_IA64_GPREL64I: howto manager. (line 2126) -* BFD_RELOC_IA64_GPREL64LSB: howto manager. (line 2130) -* BFD_RELOC_IA64_GPREL64MSB: howto manager. (line 2129) -* BFD_RELOC_IA64_IMM14: howto manager. (line 2118) -* BFD_RELOC_IA64_IMM22: howto manager. (line 2119) -* BFD_RELOC_IA64_IMM64: howto manager. (line 2120) -* BFD_RELOC_IA64_IPLTLSB: howto manager. (line 2176) -* BFD_RELOC_IA64_IPLTMSB: howto manager. (line 2175) -* BFD_RELOC_IA64_LDXMOV: howto manager. (line 2179) -* BFD_RELOC_IA64_LTOFF22: howto manager. (line 2131) -* BFD_RELOC_IA64_LTOFF22X: howto manager. (line 2178) -* BFD_RELOC_IA64_LTOFF64I: howto manager. (line 2132) -* BFD_RELOC_IA64_LTOFF_DTPMOD22: howto manager. (line 2188) -* BFD_RELOC_IA64_LTOFF_DTPREL22: howto manager. (line 2196) -* BFD_RELOC_IA64_LTOFF_FPTR22: howto manager. (line 2153) -* BFD_RELOC_IA64_LTOFF_FPTR32LSB: howto manager. (line 2156) -* BFD_RELOC_IA64_LTOFF_FPTR32MSB: howto manager. (line 2155) -* BFD_RELOC_IA64_LTOFF_FPTR64I: howto manager. (line 2154) -* BFD_RELOC_IA64_LTOFF_FPTR64LSB: howto manager. (line 2158) -* BFD_RELOC_IA64_LTOFF_FPTR64MSB: howto manager. (line 2157) -* BFD_RELOC_IA64_LTOFF_TPREL22: howto manager. (line 2185) -* BFD_RELOC_IA64_LTV32LSB: howto manager. (line 2172) -* BFD_RELOC_IA64_LTV32MSB: howto manager. (line 2171) -* BFD_RELOC_IA64_LTV64LSB: howto manager. (line 2174) -* BFD_RELOC_IA64_LTV64MSB: howto manager. (line 2173) -* BFD_RELOC_IA64_PCREL21B: howto manager. (line 2142) -* BFD_RELOC_IA64_PCREL21BI: howto manager. (line 2143) -* BFD_RELOC_IA64_PCREL21F: howto manager. (line 2145) -* BFD_RELOC_IA64_PCREL21M: howto manager. (line 2144) -* BFD_RELOC_IA64_PCREL22: howto manager. (line 2146) -* BFD_RELOC_IA64_PCREL32LSB: howto manager. (line 2150) -* BFD_RELOC_IA64_PCREL32MSB: howto manager. (line 2149) -* BFD_RELOC_IA64_PCREL60B: howto manager. (line 2147) -* BFD_RELOC_IA64_PCREL64I: howto manager. (line 2148) -* BFD_RELOC_IA64_PCREL64LSB: howto manager. (line 2152) -* BFD_RELOC_IA64_PCREL64MSB: howto manager. (line 2151) -* BFD_RELOC_IA64_PLTOFF22: howto manager. (line 2133) -* BFD_RELOC_IA64_PLTOFF64I: howto manager. (line 2134) -* BFD_RELOC_IA64_PLTOFF64LSB: howto manager. (line 2136) -* BFD_RELOC_IA64_PLTOFF64MSB: howto manager. (line 2135) -* BFD_RELOC_IA64_REL32LSB: howto manager. (line 2168) -* BFD_RELOC_IA64_REL32MSB: howto manager. (line 2167) -* BFD_RELOC_IA64_REL64LSB: howto manager. (line 2170) -* BFD_RELOC_IA64_REL64MSB: howto manager. (line 2169) -* BFD_RELOC_IA64_SECREL32LSB: howto manager. (line 2164) -* BFD_RELOC_IA64_SECREL32MSB: howto manager. (line 2163) -* BFD_RELOC_IA64_SECREL64LSB: howto manager. (line 2166) -* BFD_RELOC_IA64_SECREL64MSB: howto manager. (line 2165) -* BFD_RELOC_IA64_SEGREL32LSB: howto manager. (line 2160) -* BFD_RELOC_IA64_SEGREL32MSB: howto manager. (line 2159) -* BFD_RELOC_IA64_SEGREL64LSB: howto manager. (line 2162) -* BFD_RELOC_IA64_SEGREL64MSB: howto manager. (line 2161) -* BFD_RELOC_IA64_TPREL14: howto manager. (line 2180) -* BFD_RELOC_IA64_TPREL22: howto manager. (line 2181) -* BFD_RELOC_IA64_TPREL64I: howto manager. (line 2182) -* BFD_RELOC_IA64_TPREL64LSB: howto manager. (line 2184) -* BFD_RELOC_IA64_TPREL64MSB: howto manager. (line 2183) -* BFD_RELOC_IP2K_ADDR16CJP: howto manager. (line 2079) -* BFD_RELOC_IP2K_BANK: howto manager. (line 2077) -* BFD_RELOC_IP2K_EX8DATA: howto manager. (line 2085) -* BFD_RELOC_IP2K_FR9: howto manager. (line 2075) -* BFD_RELOC_IP2K_FR_OFFSET: howto manager. (line 2094) -* BFD_RELOC_IP2K_HI8DATA: howto manager. (line 2084) -* BFD_RELOC_IP2K_HI8INSN: howto manager. (line 2088) -* BFD_RELOC_IP2K_LO8DATA: howto manager. (line 2083) -* BFD_RELOC_IP2K_LO8INSN: howto manager. (line 2087) -* BFD_RELOC_IP2K_PAGE3: howto manager. (line 2081) -* BFD_RELOC_IP2K_PC_SKIP: howto manager. (line 2090) -* BFD_RELOC_IP2K_TEXT: howto manager. (line 2092) -* BFD_RELOC_IQ2000_OFFSET_16: howto manager. (line 2556) -* BFD_RELOC_IQ2000_OFFSET_21: howto manager. (line 2557) -* BFD_RELOC_IQ2000_UHI16: howto manager. (line 2558) -* BFD_RELOC_LARCH_32_PCREL: howto manager. (line 3527) -* BFD_RELOC_LARCH_ABS64_HI12: howto manager. (line 3498) -* BFD_RELOC_LARCH_ABS64_LO20: howto manager. (line 3497) -* BFD_RELOC_LARCH_ABS_HI20: howto manager. (line 3495) -* BFD_RELOC_LARCH_ABS_LO12: howto manager. (line 3496) -* BFD_RELOC_LARCH_ADD16: howto manager. (line 3483) -* BFD_RELOC_LARCH_ADD24: howto manager. (line 3484) -* BFD_RELOC_LARCH_ADD32: howto manager. (line 3485) -* BFD_RELOC_LARCH_ADD64: howto manager. (line 3486) -* BFD_RELOC_LARCH_ADD8: howto manager. (line 3482) -* BFD_RELOC_LARCH_B16: howto manager. (line 3492) -* BFD_RELOC_LARCH_B21: howto manager. (line 3493) -* BFD_RELOC_LARCH_B26: howto manager. (line 3494) -* BFD_RELOC_LARCH_GOT64_HI12: howto manager. (line 3510) -* BFD_RELOC_LARCH_GOT64_LO20: howto manager. (line 3509) -* BFD_RELOC_LARCH_GOT64_PC_HI12: howto manager. (line 3506) -* BFD_RELOC_LARCH_GOT64_PC_LO20: howto manager. (line 3505) -* BFD_RELOC_LARCH_GOT_HI20: howto manager. (line 3507) -* BFD_RELOC_LARCH_GOT_LO12: howto manager. (line 3508) -* BFD_RELOC_LARCH_GOT_PC_HI20: howto manager. (line 3503) -* BFD_RELOC_LARCH_GOT_PC_LO12: howto manager. (line 3504) -* BFD_RELOC_LARCH_MARK_LA: howto manager. (line 3455) -* BFD_RELOC_LARCH_MARK_PCREL: howto manager. (line 3456) -* BFD_RELOC_LARCH_PCALA64_HI12: howto manager. (line 3502) -* BFD_RELOC_LARCH_PCALA64_LO20: howto manager. (line 3501) -* BFD_RELOC_LARCH_PCALA_HI20: howto manager. (line 3499) -* BFD_RELOC_LARCH_PCALA_LO12: howto manager. (line 3500) -* BFD_RELOC_LARCH_RELAX: howto manager. (line 3528) -* BFD_RELOC_LARCH_SOP_ADD: howto manager. (line 3470) -* BFD_RELOC_LARCH_SOP_AND: howto manager. (line 3471) -* BFD_RELOC_LARCH_SOP_ASSERT: howto manager. (line 3465) -* BFD_RELOC_LARCH_SOP_IF_ELSE: howto manager. (line 3472) -* BFD_RELOC_LARCH_SOP_NOT: howto manager. (line 3466) -* BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2: howto manager. (line 3480) -* BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2: howto manager. (line 3479) -* BFD_RELOC_LARCH_SOP_POP_32_S_10_12: howto manager. (line 3475) -* BFD_RELOC_LARCH_SOP_POP_32_S_10_16: howto manager. (line 3476) -* BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2: howto manager. (line 3477) -* BFD_RELOC_LARCH_SOP_POP_32_S_10_5: howto manager. (line 3473) -* BFD_RELOC_LARCH_SOP_POP_32_S_5_20: howto manager. (line 3478) -* BFD_RELOC_LARCH_SOP_POP_32_U: howto manager. (line 3481) -* BFD_RELOC_LARCH_SOP_POP_32_U_10_12: howto manager. (line 3474) -* BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE: howto manager. (line 3458) -* BFD_RELOC_LARCH_SOP_PUSH_DUP: howto manager. (line 3459) -* BFD_RELOC_LARCH_SOP_PUSH_GPREL: howto manager. (line 3460) -* BFD_RELOC_LARCH_SOP_PUSH_PCREL: howto manager. (line 3457) -* BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL: howto manager. (line 3464) -* BFD_RELOC_LARCH_SOP_PUSH_TLS_GD: howto manager. (line 3463) -* BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT: howto manager. (line 3462) -* BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL: howto manager. (line 3461) -* BFD_RELOC_LARCH_SOP_SL: howto manager. (line 3468) -* BFD_RELOC_LARCH_SOP_SR: howto manager. (line 3469) -* BFD_RELOC_LARCH_SOP_SUB: howto manager. (line 3467) -* BFD_RELOC_LARCH_SUB16: howto manager. (line 3488) -* BFD_RELOC_LARCH_SUB24: howto manager. (line 3489) -* BFD_RELOC_LARCH_SUB32: howto manager. (line 3490) -* BFD_RELOC_LARCH_SUB64: howto manager. (line 3491) -* BFD_RELOC_LARCH_SUB8: howto manager. (line 3487) -* BFD_RELOC_LARCH_TLS_DTPMOD32: howto manager. (line 3449) -* BFD_RELOC_LARCH_TLS_DTPMOD64: howto manager. (line 3451) -* BFD_RELOC_LARCH_TLS_DTPREL32: howto manager. (line 3450) -* BFD_RELOC_LARCH_TLS_DTPREL64: howto manager. (line 3452) -* BFD_RELOC_LARCH_TLS_GD_HI20: howto manager. (line 3526) -* BFD_RELOC_LARCH_TLS_GD_PC_HI20: howto manager. (line 3525) -* BFD_RELOC_LARCH_TLS_IE64_HI12: howto manager. (line 3522) -* BFD_RELOC_LARCH_TLS_IE64_LO20: howto manager. (line 3521) -* BFD_RELOC_LARCH_TLS_IE64_PC_HI12: howto manager. (line 3518) -* BFD_RELOC_LARCH_TLS_IE64_PC_LO20: howto manager. (line 3517) -* BFD_RELOC_LARCH_TLS_IE_HI20: howto manager. (line 3519) -* BFD_RELOC_LARCH_TLS_IE_LO12: howto manager. (line 3520) -* BFD_RELOC_LARCH_TLS_IE_PC_HI20: howto manager. (line 3515) -* BFD_RELOC_LARCH_TLS_IE_PC_LO12: howto manager. (line 3516) -* BFD_RELOC_LARCH_TLS_LD_HI20: howto manager. (line 3524) -* BFD_RELOC_LARCH_TLS_LD_PC_HI20: howto manager. (line 3523) -* BFD_RELOC_LARCH_TLS_LE64_HI12: howto manager. (line 3514) -* BFD_RELOC_LARCH_TLS_LE64_LO20: howto manager. (line 3513) -* BFD_RELOC_LARCH_TLS_LE_HI20: howto manager. (line 3511) -* BFD_RELOC_LARCH_TLS_LE_LO12: howto manager. (line 3512) -* BFD_RELOC_LARCH_TLS_TPREL32: howto manager. (line 3453) -* BFD_RELOC_LARCH_TLS_TPREL64: howto manager. (line 3454) -* BFD_RELOC_LM32_16_GOT: howto manager. (line 2679) -* BFD_RELOC_LM32_BRANCH: howto manager. (line 2678) -* BFD_RELOC_LM32_CALL: howto manager. (line 2677) -* BFD_RELOC_LM32_COPY: howto manager. (line 2682) -* BFD_RELOC_LM32_GLOB_DAT: howto manager. (line 2683) -* BFD_RELOC_LM32_GOTOFF_HI16: howto manager. (line 2680) -* BFD_RELOC_LM32_GOTOFF_LO16: howto manager. (line 2681) -* BFD_RELOC_LM32_JMP_SLOT: howto manager. (line 2684) -* BFD_RELOC_LM32_RELATIVE: howto manager. (line 2685) -* BFD_RELOC_LO10: howto manager. (line 110) -* BFD_RELOC_LO16: howto manager. (line 320) -* BFD_RELOC_LO16_BASEREL: howto manager. (line 92) -* BFD_RELOC_LO16_GOTOFF: howto manager. (line 51) -* BFD_RELOC_LO16_PCREL: howto manager. (line 326) -* BFD_RELOC_LO16_PLTOFF: howto manager. (line 63) -* BFD_RELOC_M32C_HI8: howto manager. (line 1245) -* BFD_RELOC_M32C_RL_1ADDR: howto manager. (line 1247) -* BFD_RELOC_M32C_RL_2ADDR: howto manager. (line 1248) -* BFD_RELOC_M32C_RL_JUMP: howto manager. (line 1246) -* BFD_RELOC_M32R_10_PCREL: howto manager. (line 1253) -* BFD_RELOC_M32R_18_PCREL: howto manager. (line 1256) -* BFD_RELOC_M32R_24: howto manager. (line 1250) -* BFD_RELOC_M32R_26_PCREL: howto manager. (line 1258) -* BFD_RELOC_M32R_26_PLTREL: howto manager. (line 1272) -* BFD_RELOC_M32R_COPY: howto manager. (line 1273) -* BFD_RELOC_M32R_GLOB_DAT: howto manager. (line 1274) -* BFD_RELOC_M32R_GOT16_HI_SLO: howto manager. (line 1283) -* BFD_RELOC_M32R_GOT16_HI_ULO: howto manager. (line 1282) -* BFD_RELOC_M32R_GOT16_LO: howto manager. (line 1284) -* BFD_RELOC_M32R_GOT24: howto manager. (line 1271) -* BFD_RELOC_M32R_GOTOFF: howto manager. (line 1277) -* BFD_RELOC_M32R_GOTOFF_HI_SLO: howto manager. (line 1279) -* BFD_RELOC_M32R_GOTOFF_HI_ULO: howto manager. (line 1278) -* BFD_RELOC_M32R_GOTOFF_LO: howto manager. (line 1280) -* BFD_RELOC_M32R_GOTPC24: howto manager. (line 1281) -* BFD_RELOC_M32R_GOTPC_HI_SLO: howto manager. (line 1286) -* BFD_RELOC_M32R_GOTPC_HI_ULO: howto manager. (line 1285) -* BFD_RELOC_M32R_GOTPC_LO: howto manager. (line 1287) -* BFD_RELOC_M32R_HI16_SLO: howto manager. (line 1263) -* BFD_RELOC_M32R_HI16_ULO: howto manager. (line 1260) -* BFD_RELOC_M32R_JMP_SLOT: howto manager. (line 1275) -* BFD_RELOC_M32R_LO16: howto manager. (line 1266) -* BFD_RELOC_M32R_RELATIVE: howto manager. (line 1276) -* BFD_RELOC_M32R_SDA16: howto manager. (line 1268) -* BFD_RELOC_M68HC11_24: howto manager. (line 2224) -* BFD_RELOC_M68HC11_3B: howto manager. (line 2204) -* BFD_RELOC_M68HC11_HI8: howto manager. (line 2198) -* BFD_RELOC_M68HC11_LO16: howto manager. (line 2215) -* BFD_RELOC_M68HC11_LO8: howto manager. (line 2201) -* BFD_RELOC_M68HC11_PAGE: howto manager. (line 2220) -* BFD_RELOC_M68HC11_RL_GROUP: howto manager. (line 2211) -* BFD_RELOC_M68HC11_RL_JUMP: howto manager. (line 2206) -* BFD_RELOC_M68HC12_10_PCREL: howto manager. (line 2267) -* BFD_RELOC_M68HC12_16B: howto manager. (line 2263) -* BFD_RELOC_M68HC12_5B: howto manager. (line 2229) -* BFD_RELOC_M68HC12_9B: howto manager. (line 2261) -* BFD_RELOC_M68HC12_9_PCREL: howto manager. (line 2265) -* BFD_RELOC_M68HC12_HI8XG: howto manager. (line 2272) -* BFD_RELOC_M68HC12_LO8XG: howto manager. (line 2269) -* BFD_RELOC_MACH_O_ARM64_ADDEND: howto manager. (line 2715) -* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21: howto manager. (line 2717) -* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12: howto manager. (line 2719) -* BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT: howto manager. (line 2721) -* BFD_RELOC_MACH_O_LOCAL_SECTDIFF: howto manager. (line 2690) -* BFD_RELOC_MACH_O_PAIR: howto manager. (line 2692) -* BFD_RELOC_MACH_O_SECTDIFF: howto manager. (line 2687) -* BFD_RELOC_MACH_O_SUBTRACTOR32: howto manager. (line 2694) -* BFD_RELOC_MACH_O_SUBTRACTOR64: howto manager. (line 2696) -* BFD_RELOC_MACH_O_X86_64_BRANCH32: howto manager. (line 2698) -* BFD_RELOC_MACH_O_X86_64_BRANCH8: howto manager. (line 2699) -* BFD_RELOC_MACH_O_X86_64_GOT: howto manager. (line 2702) -* BFD_RELOC_MACH_O_X86_64_GOT_LOAD: howto manager. (line 2704) -* BFD_RELOC_MACH_O_X86_64_PCREL32_1: howto manager. (line 2707) -* BFD_RELOC_MACH_O_X86_64_PCREL32_2: howto manager. (line 2709) -* BFD_RELOC_MACH_O_X86_64_PCREL32_4: howto manager. (line 2711) -* BFD_RELOC_MACH_O_X86_64_TLV: howto manager. (line 2713) -* BFD_RELOC_MCORE_PCREL_32: howto manager. (line 1642) -* BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager. (line 1640) -* BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager. (line 1641) -* BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager. (line 1639) -* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager. (line 1643) -* BFD_RELOC_MCORE_RVA: howto manager. (line 1644) -* BFD_RELOC_MEP_16: howto manager. (line 1647) -* BFD_RELOC_MEP_32: howto manager. (line 1648) -* BFD_RELOC_MEP_8: howto manager. (line 1646) -* BFD_RELOC_MEP_ADDR24A4: howto manager. (line 1663) -* BFD_RELOC_MEP_GNU_VTENTRY: howto manager. (line 1665) -* BFD_RELOC_MEP_GNU_VTINHERIT: howto manager. (line 1664) -* BFD_RELOC_MEP_GPREL: howto manager. (line 1657) -* BFD_RELOC_MEP_HI16S: howto manager. (line 1656) -* BFD_RELOC_MEP_HI16U: howto manager. (line 1655) -* BFD_RELOC_MEP_LOW16: howto manager. (line 1654) -* BFD_RELOC_MEP_PCABS24A2: howto manager. (line 1653) -* BFD_RELOC_MEP_PCREL12A2: howto manager. (line 1650) -* BFD_RELOC_MEP_PCREL17A2: howto manager. (line 1651) -* BFD_RELOC_MEP_PCREL24A2: howto manager. (line 1652) -* BFD_RELOC_MEP_PCREL8A2: howto manager. (line 1649) -* BFD_RELOC_MEP_TPREL: howto manager. (line 1658) -* BFD_RELOC_MEP_TPREL7: howto manager. (line 1659) -* BFD_RELOC_MEP_TPREL7A2: howto manager. (line 1660) -* BFD_RELOC_MEP_TPREL7A4: howto manager. (line 1661) -* BFD_RELOC_MEP_UIMM24: howto manager. (line 1662) -* BFD_RELOC_METAG_COPY: howto manager. (line 1686) -* BFD_RELOC_METAG_GETSETOFF: howto manager. (line 1670) -* BFD_RELOC_METAG_GETSET_GOT: howto manager. (line 1678) -* BFD_RELOC_METAG_GETSET_GOTOFF: howto manager. (line 1677) -* BFD_RELOC_METAG_GLOB_DAT: howto manager. (line 1689) -* BFD_RELOC_METAG_GOTOFF: howto manager. (line 1684) -* BFD_RELOC_METAG_HI16_GOTOFF: howto manager. (line 1675) -* BFD_RELOC_METAG_HI16_GOTPC: howto manager. (line 1679) -* BFD_RELOC_METAG_HI16_PLT: howto manager. (line 1681) -* BFD_RELOC_METAG_HIADDR16: howto manager. (line 1667) -* BFD_RELOC_METAG_HIOG: howto manager. (line 1671) -* BFD_RELOC_METAG_JMP_SLOT: howto manager. (line 1687) -* BFD_RELOC_METAG_LO16_GOTOFF: howto manager. (line 1676) -* BFD_RELOC_METAG_LO16_GOTPC: howto manager. (line 1680) -* BFD_RELOC_METAG_LO16_PLT: howto manager. (line 1682) -* BFD_RELOC_METAG_LOADDR16: howto manager. (line 1668) -* BFD_RELOC_METAG_LOOG: howto manager. (line 1672) -* BFD_RELOC_METAG_PLT: howto manager. (line 1685) -* BFD_RELOC_METAG_REL16: howto manager. (line 1674) -* BFD_RELOC_METAG_REL8: howto manager. (line 1673) -* BFD_RELOC_METAG_RELATIVE: howto manager. (line 1688) -* BFD_RELOC_METAG_RELBRANCH: howto manager. (line 1669) -* BFD_RELOC_METAG_RELBRANCH_PLT: howto manager. (line 1683) -* BFD_RELOC_METAG_TLS_DTPMOD: howto manager. (line 1700) -* BFD_RELOC_METAG_TLS_DTPOFF: howto manager. (line 1701) -* BFD_RELOC_METAG_TLS_GD: howto manager. (line 1690) -* BFD_RELOC_METAG_TLS_IE: howto manager. (line 1695) -* BFD_RELOC_METAG_TLS_IENONPIC: howto manager. (line 1696) -* BFD_RELOC_METAG_TLS_IENONPIC_HI16: howto manager. (line 1697) -* BFD_RELOC_METAG_TLS_IENONPIC_LO16: howto manager. (line 1698) -* BFD_RELOC_METAG_TLS_LDM: howto manager. (line 1691) -* BFD_RELOC_METAG_TLS_LDO: howto manager. (line 1694) -* BFD_RELOC_METAG_TLS_LDO_HI16: howto manager. (line 1692) -* BFD_RELOC_METAG_TLS_LDO_LO16: howto manager. (line 1693) -* BFD_RELOC_METAG_TLS_LE: howto manager. (line 1702) -* BFD_RELOC_METAG_TLS_LE_HI16: howto manager. (line 1703) -* BFD_RELOC_METAG_TLS_LE_LO16: howto manager. (line 1704) -* BFD_RELOC_METAG_TLS_TPOFF: howto manager. (line 1699) -* BFD_RELOC_MICROBLAZE_32_GOTOFF: howto manager. (line 2757) -* BFD_RELOC_MICROBLAZE_32_LO: howto manager. (line 2723) -* BFD_RELOC_MICROBLAZE_32_LO_PCREL: howto manager. (line 2726) -* BFD_RELOC_MICROBLAZE_32_ROSDA: howto manager. (line 2729) -* BFD_RELOC_MICROBLAZE_32_RWSDA: howto manager. (line 2732) -* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: howto manager. (line 2735) -* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD: howto manager. (line 2773) -* BFD_RELOC_MICROBLAZE_32_TLSDTPREL: howto manager. (line 2775) -* BFD_RELOC_MICROBLAZE_64_GOT: howto manager. (line 2746) -* BFD_RELOC_MICROBLAZE_64_GOTOFF: howto manager. (line 2753) -* BFD_RELOC_MICROBLAZE_64_GOTPC: howto manager. (line 2742) -* BFD_RELOC_MICROBLAZE_64_NONE: howto manager. (line 2738) -* BFD_RELOC_MICROBLAZE_64_PLT: howto manager. (line 2749) -* BFD_RELOC_MICROBLAZE_64_TEXTPCREL: howto manager. (line 2786) -* BFD_RELOC_MICROBLAZE_64_TEXTREL: howto manager. (line 2790) -* BFD_RELOC_MICROBLAZE_64_TLS: howto manager. (line 2763) -* BFD_RELOC_MICROBLAZE_64_TLSDTPREL: howto manager. (line 2777) -* BFD_RELOC_MICROBLAZE_64_TLSGD: howto manager. (line 2765) -* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL: howto manager. (line 2780) -* BFD_RELOC_MICROBLAZE_64_TLSLD: howto manager. (line 2769) -* BFD_RELOC_MICROBLAZE_64_TLSTPREL: howto manager. (line 2783) -* BFD_RELOC_MICROBLAZE_COPY: howto manager. (line 2760) -* BFD_RELOC_MICROMIPS_10_PCREL_S1: howto manager. (line 353) -* BFD_RELOC_MICROMIPS_16_PCREL_S1: howto manager. (line 354) -* BFD_RELOC_MICROMIPS_7_PCREL_S1: howto manager. (line 352) -* BFD_RELOC_MICROMIPS_CALL16: howto manager. (line 371) -* BFD_RELOC_MICROMIPS_CALL_HI16: howto manager. (line 377) -* BFD_RELOC_MICROMIPS_CALL_LO16: howto manager. (line 379) -* BFD_RELOC_MICROMIPS_GOT16: howto manager. (line 369) -* BFD_RELOC_MICROMIPS_GOT_DISP: howto manager. (line 387) -* BFD_RELOC_MICROMIPS_GOT_HI16: howto manager. (line 373) -* BFD_RELOC_MICROMIPS_GOT_LO16: howto manager. (line 375) -* BFD_RELOC_MICROMIPS_GOT_OFST: howto manager. (line 385) -* BFD_RELOC_MICROMIPS_GOT_PAGE: howto manager. (line 383) -* BFD_RELOC_MICROMIPS_GPREL16: howto manager. (line 363) -* BFD_RELOC_MICROMIPS_HI16: howto manager. (line 364) -* BFD_RELOC_MICROMIPS_HI16_S: howto manager. (line 365) -* BFD_RELOC_MICROMIPS_HIGHER: howto manager. (line 396) -* BFD_RELOC_MICROMIPS_HIGHEST: howto manager. (line 394) -* BFD_RELOC_MICROMIPS_JALR: howto manager. (line 402) -* BFD_RELOC_MICROMIPS_JMP: howto manager. (line 307) -* BFD_RELOC_MICROMIPS_LITERAL: howto manager. (line 350) -* BFD_RELOC_MICROMIPS_LO16: howto manager. (line 366) -* BFD_RELOC_MICROMIPS_SCN_DISP: howto manager. (line 398) -* BFD_RELOC_MICROMIPS_SUB: howto manager. (line 381) -* BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16: howto manager. (line 412) -* BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16: howto manager. (line 414) -* BFD_RELOC_MICROMIPS_TLS_GD: howto manager. (line 408) -* BFD_RELOC_MICROMIPS_TLS_GOTTPREL: howto manager. (line 416) -* BFD_RELOC_MICROMIPS_TLS_LDM: howto manager. (line 410) -* BFD_RELOC_MICROMIPS_TLS_TPREL_HI16: howto manager. (line 420) -* BFD_RELOC_MICROMIPS_TLS_TPREL_LO16: howto manager. (line 422) -* BFD_RELOC_MIPS16_16_PCREL_S1: howto manager. (line 356) -* BFD_RELOC_MIPS16_CALL16: howto manager. (line 329) -* BFD_RELOC_MIPS16_GOT16: howto manager. (line 328) -* BFD_RELOC_MIPS16_GPREL: howto manager. (line 311) -* BFD_RELOC_MIPS16_HI16: howto manager. (line 332) -* BFD_RELOC_MIPS16_HI16_S: howto manager. (line 334) -* BFD_RELOC_MIPS16_JMP: howto manager. (line 309) -* BFD_RELOC_MIPS16_LO16: howto manager. (line 339) -* BFD_RELOC_MIPS16_TLS_DTPREL_HI16: howto manager. (line 343) -* BFD_RELOC_MIPS16_TLS_DTPREL_LO16: howto manager. (line 344) -* BFD_RELOC_MIPS16_TLS_GD: howto manager. (line 341) -* BFD_RELOC_MIPS16_TLS_GOTTPREL: howto manager. (line 345) -* BFD_RELOC_MIPS16_TLS_LDM: howto manager. (line 342) -* BFD_RELOC_MIPS16_TLS_TPREL_HI16: howto manager. (line 346) -* BFD_RELOC_MIPS16_TLS_TPREL_LO16: howto manager. (line 347) -* BFD_RELOC_MIPS_16: howto manager. (line 399) -* BFD_RELOC_MIPS_18_PCREL_S3: howto manager. (line 360) -* BFD_RELOC_MIPS_19_PCREL_S2: howto manager. (line 361) -* BFD_RELOC_MIPS_21_PCREL_S2: howto manager. (line 358) -* BFD_RELOC_MIPS_26_PCREL_S2: howto manager. (line 359) -* BFD_RELOC_MIPS_CALL16: howto manager. (line 370) -* BFD_RELOC_MIPS_CALL_HI16: howto manager. (line 376) -* BFD_RELOC_MIPS_CALL_LO16: howto manager. (line 378) -* BFD_RELOC_MIPS_COPY: howto manager. (line 425) -* BFD_RELOC_MIPS_DELETE: howto manager. (line 392) -* BFD_RELOC_MIPS_EH: howto manager. (line 423) -* BFD_RELOC_MIPS_GOT16: howto manager. (line 368) -* BFD_RELOC_MIPS_GOT_DISP: howto manager. (line 386) -* BFD_RELOC_MIPS_GOT_HI16: howto manager. (line 372) -* BFD_RELOC_MIPS_GOT_LO16: howto manager. (line 374) -* BFD_RELOC_MIPS_GOT_OFST: howto manager. (line 384) -* BFD_RELOC_MIPS_GOT_PAGE: howto manager. (line 382) -* BFD_RELOC_MIPS_HIGHER: howto manager. (line 395) -* BFD_RELOC_MIPS_HIGHEST: howto manager. (line 393) -* BFD_RELOC_MIPS_INSERT_A: howto manager. (line 390) -* BFD_RELOC_MIPS_INSERT_B: howto manager. (line 391) -* BFD_RELOC_MIPS_JALR: howto manager. (line 401) -* BFD_RELOC_MIPS_JMP: howto manager. (line 306) -* BFD_RELOC_MIPS_JUMP_SLOT: howto manager. (line 426) -* BFD_RELOC_MIPS_LITERAL: howto manager. (line 349) -* BFD_RELOC_MIPS_RELGOT: howto manager. (line 400) -* BFD_RELOC_MIPS_SCN_DISP: howto manager. (line 397) -* BFD_RELOC_MIPS_SHIFT5: howto manager. (line 388) -* BFD_RELOC_MIPS_SHIFT6: howto manager. (line 389) -* BFD_RELOC_MIPS_SUB: howto manager. (line 380) -* BFD_RELOC_MIPS_TLS_DTPMOD32: howto manager. (line 403) -* BFD_RELOC_MIPS_TLS_DTPMOD64: howto manager. (line 405) -* BFD_RELOC_MIPS_TLS_DTPREL32: howto manager. (line 404) -* BFD_RELOC_MIPS_TLS_DTPREL64: howto manager. (line 406) -* BFD_RELOC_MIPS_TLS_DTPREL_HI16: howto manager. (line 411) -* BFD_RELOC_MIPS_TLS_DTPREL_LO16: howto manager. (line 413) -* BFD_RELOC_MIPS_TLS_GD: howto manager. (line 407) -* BFD_RELOC_MIPS_TLS_GOTTPREL: howto manager. (line 415) -* BFD_RELOC_MIPS_TLS_LDM: howto manager. (line 409) -* BFD_RELOC_MIPS_TLS_TPREL32: howto manager. (line 417) -* BFD_RELOC_MIPS_TLS_TPREL64: howto manager. (line 418) -* BFD_RELOC_MIPS_TLS_TPREL_HI16: howto manager. (line 419) -* BFD_RELOC_MIPS_TLS_TPREL_LO16: howto manager. (line 421) -* BFD_RELOC_MMIX_ADDR19: howto manager. (line 1728) -* BFD_RELOC_MMIX_ADDR27: howto manager. (line 1731) -* BFD_RELOC_MMIX_BASE_PLUS_OFFSET: howto manager. (line 1740) -* BFD_RELOC_MMIX_CBRANCH: howto manager. (line 1711) -* BFD_RELOC_MMIX_CBRANCH_1: howto manager. (line 1713) -* BFD_RELOC_MMIX_CBRANCH_2: howto manager. (line 1714) -* BFD_RELOC_MMIX_CBRANCH_3: howto manager. (line 1715) -* BFD_RELOC_MMIX_CBRANCH_J: howto manager. (line 1712) -* BFD_RELOC_MMIX_GETA: howto manager. (line 1706) -* BFD_RELOC_MMIX_GETA_1: howto manager. (line 1707) -* BFD_RELOC_MMIX_GETA_2: howto manager. (line 1708) -* BFD_RELOC_MMIX_GETA_3: howto manager. (line 1709) -* BFD_RELOC_MMIX_JMP: howto manager. (line 1723) -* BFD_RELOC_MMIX_JMP_1: howto manager. (line 1724) -* BFD_RELOC_MMIX_JMP_2: howto manager. (line 1725) -* BFD_RELOC_MMIX_JMP_3: howto manager. (line 1726) -* BFD_RELOC_MMIX_LOCAL: howto manager. (line 1743) -* BFD_RELOC_MMIX_PUSHJ: howto manager. (line 1717) -* BFD_RELOC_MMIX_PUSHJ_1: howto manager. (line 1718) -* BFD_RELOC_MMIX_PUSHJ_2: howto manager. (line 1719) -* BFD_RELOC_MMIX_PUSHJ_3: howto manager. (line 1720) -* BFD_RELOC_MMIX_PUSHJ_STUBBABLE: howto manager. (line 1721) -* BFD_RELOC_MMIX_REG: howto manager. (line 1737) -* BFD_RELOC_MMIX_REG_OR_BYTE: howto manager. (line 1734) -* BFD_RELOC_MN10300_16_PCREL: howto manager. (line 519) -* BFD_RELOC_MN10300_32_PCREL: howto manager. (line 516) -* BFD_RELOC_MN10300_ALIGN: howto manager. (line 503) -* BFD_RELOC_MN10300_COPY: howto manager. (line 491) -* BFD_RELOC_MN10300_GLOB_DAT: howto manager. (line 493) -* BFD_RELOC_MN10300_GOT16: howto manager. (line 488) -* BFD_RELOC_MN10300_GOT24: howto manager. (line 485) -* BFD_RELOC_MN10300_GOT32: howto manager. (line 482) -* BFD_RELOC_MN10300_GOTOFF24: howto manager. (line 480) -* BFD_RELOC_MN10300_JMP_SLOT: howto manager. (line 495) -* BFD_RELOC_MN10300_RELATIVE: howto manager. (line 497) -* BFD_RELOC_MN10300_SYM_DIFF: howto manager. (line 499) -* BFD_RELOC_MN10300_TLS_DTPMOD: howto manager. (line 512) -* BFD_RELOC_MN10300_TLS_DTPOFF: howto manager. (line 513) -* BFD_RELOC_MN10300_TLS_GD: howto manager. (line 506) -* BFD_RELOC_MN10300_TLS_GOTIE: howto manager. (line 509) -* BFD_RELOC_MN10300_TLS_IE: howto manager. (line 510) -* BFD_RELOC_MN10300_TLS_LD: howto manager. (line 507) -* BFD_RELOC_MN10300_TLS_LDO: howto manager. (line 508) -* BFD_RELOC_MN10300_TLS_LE: howto manager. (line 511) -* BFD_RELOC_MN10300_TLS_TPOFF: howto manager. (line 514) -* BFD_RELOC_MOXIE_10_PCREL: howto manager. (line 428) -* BFD_RELOC_MSP430X_ABS16: howto manager. (line 2468) -* BFD_RELOC_MSP430X_ABS20_ADR_DST: howto manager. (line 2465) -* BFD_RELOC_MSP430X_ABS20_ADR_SRC: howto manager. (line 2464) -* BFD_RELOC_MSP430X_ABS20_EXT_DST: howto manager. (line 2462) -* BFD_RELOC_MSP430X_ABS20_EXT_ODST: howto manager. (line 2463) -* BFD_RELOC_MSP430X_ABS20_EXT_SRC: howto manager. (line 2461) -* BFD_RELOC_MSP430X_PCR16: howto manager. (line 2466) -* BFD_RELOC_MSP430X_PCR20_CALL: howto manager. (line 2467) -* BFD_RELOC_MSP430X_PCR20_EXT_DST: howto manager. (line 2459) -* BFD_RELOC_MSP430X_PCR20_EXT_ODST: howto manager. (line 2460) -* BFD_RELOC_MSP430X_PCR20_EXT_SRC: howto manager. (line 2458) -* BFD_RELOC_MSP430_10_PCREL: howto manager. (line 2450) -* BFD_RELOC_MSP430_16: howto manager. (line 2452) -* BFD_RELOC_MSP430_16_BYTE: howto manager. (line 2454) -* BFD_RELOC_MSP430_16_PCREL: howto manager. (line 2451) -* BFD_RELOC_MSP430_16_PCREL_BYTE: howto manager. (line 2453) -* BFD_RELOC_MSP430_2X_PCREL: howto manager. (line 2455) -* BFD_RELOC_MSP430_ABS8: howto manager. (line 2457) -* BFD_RELOC_MSP430_ABS_HI16: howto manager. (line 2469) -* BFD_RELOC_MSP430_PREL31: howto manager. (line 2470) -* BFD_RELOC_MSP430_RL_PCREL: howto manager. (line 2456) -* BFD_RELOC_MSP430_SET_ULEB128: howto manager. (line 2472) -* BFD_RELOC_MSP430_SUB_ULEB128: howto manager. (line 2473) -* BFD_RELOC_MSP430_SYM_DIFF: howto manager. (line 2471) -* BFD_RELOC_MT_GNU_VTENTRY: howto manager. (line 2446) -* BFD_RELOC_MT_GNU_VTINHERIT: howto manager. (line 2444) -* BFD_RELOC_MT_HI16: howto manager. (line 2440) -* BFD_RELOC_MT_LO16: howto manager. (line 2442) -* BFD_RELOC_MT_PC16: howto manager. (line 2438) -* BFD_RELOC_MT_PCINSN8: howto manager. (line 2448) -* BFD_RELOC_NDS32_10IFCU_PCREL: howto manager. (line 1439) -* BFD_RELOC_NDS32_10_UPCREL: howto manager. (line 1410) -* BFD_RELOC_NDS32_15_FIXED: howto manager. (line 1371) -* BFD_RELOC_NDS32_15_PCREL: howto manager. (line 1297) -* BFD_RELOC_NDS32_17IFC_PCREL: howto manager. (line 1438) -* BFD_RELOC_NDS32_17_FIXED: howto manager. (line 1372) -* BFD_RELOC_NDS32_17_PCREL: howto manager. (line 1299) -* BFD_RELOC_NDS32_20: howto manager. (line 1289) -* BFD_RELOC_NDS32_25_ABS: howto manager. (line 1434) -* BFD_RELOC_NDS32_25_FIXED: howto manager. (line 1373) -* BFD_RELOC_NDS32_25_PCREL: howto manager. (line 1301) -* BFD_RELOC_NDS32_25_PLTREL: howto manager. (line 1347) -* BFD_RELOC_NDS32_5: howto manager. (line 1408) -* BFD_RELOC_NDS32_9_FIXED: howto manager. (line 1370) -* BFD_RELOC_NDS32_9_PCREL: howto manager. (line 1291) -* BFD_RELOC_NDS32_9_PLTREL: howto manager. (line 1346) -* BFD_RELOC_NDS32_COPY: howto manager. (line 1348) -* BFD_RELOC_NDS32_DATA: howto manager. (line 1436) -* BFD_RELOC_NDS32_DIFF16: howto manager. (line 1429) -* BFD_RELOC_NDS32_DIFF32: howto manager. (line 1430) -* BFD_RELOC_NDS32_DIFF8: howto manager. (line 1428) -* BFD_RELOC_NDS32_DIFF_ULEB128: howto manager. (line 1431) -* BFD_RELOC_NDS32_DWARF2_LEB: howto manager. (line 1394) -* BFD_RELOC_NDS32_DWARF2_OP1: howto manager. (line 1392) -* BFD_RELOC_NDS32_DWARF2_OP2: howto manager. (line 1393) -* BFD_RELOC_NDS32_EMPTY: howto manager. (line 1432) -* BFD_RELOC_NDS32_GLOB_DAT: howto manager. (line 1349) -* BFD_RELOC_NDS32_GOT15S2: howto manager. (line 1405) -* BFD_RELOC_NDS32_GOT17S2: howto manager. (line 1406) -* BFD_RELOC_NDS32_GOT20: howto manager. (line 1345) -* BFD_RELOC_NDS32_GOTOFF: howto manager. (line 1352) -* BFD_RELOC_NDS32_GOTOFF_HI20: howto manager. (line 1353) -* BFD_RELOC_NDS32_GOTOFF_LO12: howto manager. (line 1354) -* BFD_RELOC_NDS32_GOTOFF_LO15: howto manager. (line 1403) -* BFD_RELOC_NDS32_GOTOFF_LO19: howto manager. (line 1404) -* BFD_RELOC_NDS32_GOTOFF_SUFF: howto manager. (line 1417) -* BFD_RELOC_NDS32_GOTPC20: howto manager. (line 1355) -* BFD_RELOC_NDS32_GOTPC_HI20: howto manager. (line 1358) -* BFD_RELOC_NDS32_GOTPC_LO12: howto manager. (line 1359) -* BFD_RELOC_NDS32_GOTTPOFF: howto manager. (line 1442) -* BFD_RELOC_NDS32_GOT_HI20: howto manager. (line 1356) -* BFD_RELOC_NDS32_GOT_LO12: howto manager. (line 1357) -* BFD_RELOC_NDS32_GOT_LO15: howto manager. (line 1401) -* BFD_RELOC_NDS32_GOT_LO19: howto manager. (line 1402) -* BFD_RELOC_NDS32_GOT_SUFF: howto manager. (line 1416) -* BFD_RELOC_NDS32_GROUP: howto manager. (line 1468) -* BFD_RELOC_NDS32_HI20: howto manager. (line 1303) -* BFD_RELOC_NDS32_INSN16: howto manager. (line 1361) -* BFD_RELOC_NDS32_JMP_SLOT: howto manager. (line 1350) -* BFD_RELOC_NDS32_LABEL: howto manager. (line 1362) -* BFD_RELOC_NDS32_LO12S0: howto manager. (line 1315) -* BFD_RELOC_NDS32_LO12S0_ORI: howto manager. (line 1318) -* BFD_RELOC_NDS32_LO12S1: howto manager. (line 1312) -* BFD_RELOC_NDS32_LO12S2: howto manager. (line 1309) -* BFD_RELOC_NDS32_LO12S2_DP: howto manager. (line 1389) -* BFD_RELOC_NDS32_LO12S2_SP: howto manager. (line 1390) -* BFD_RELOC_NDS32_LO12S3: howto manager. (line 1306) -* BFD_RELOC_NDS32_LOADSTORE: howto manager. (line 1369) -* BFD_RELOC_NDS32_LONGCALL1: howto manager. (line 1363) -* BFD_RELOC_NDS32_LONGCALL2: howto manager. (line 1364) -* BFD_RELOC_NDS32_LONGCALL3: howto manager. (line 1365) -* BFD_RELOC_NDS32_LONGCALL4: howto manager. (line 1374) -* BFD_RELOC_NDS32_LONGCALL5: howto manager. (line 1375) -* BFD_RELOC_NDS32_LONGCALL6: howto manager. (line 1376) -* BFD_RELOC_NDS32_LONGJUMP1: howto manager. (line 1366) -* BFD_RELOC_NDS32_LONGJUMP2: howto manager. (line 1367) -* BFD_RELOC_NDS32_LONGJUMP3: howto manager. (line 1368) -* BFD_RELOC_NDS32_LONGJUMP4: howto manager. (line 1377) -* BFD_RELOC_NDS32_LONGJUMP5: howto manager. (line 1378) -* BFD_RELOC_NDS32_LONGJUMP6: howto manager. (line 1379) -* BFD_RELOC_NDS32_LONGJUMP7: howto manager. (line 1380) -* BFD_RELOC_NDS32_LSI: howto manager. (line 1470) -* BFD_RELOC_NDS32_MINUEND: howto manager. (line 1426) -* BFD_RELOC_NDS32_MULCALL_SUFF: howto manager. (line 1419) -* BFD_RELOC_NDS32_PLTBLOCK: howto manager. (line 1423) -* BFD_RELOC_NDS32_PLTREL_HI20: howto manager. (line 1382) -* BFD_RELOC_NDS32_PLTREL_LO12: howto manager. (line 1383) -* BFD_RELOC_NDS32_PLT_GOTREL_HI20: howto manager. (line 1384) -* BFD_RELOC_NDS32_PLT_GOTREL_LO12: howto manager. (line 1385) -* BFD_RELOC_NDS32_PLT_GOTREL_LO15: howto manager. (line 1399) -* BFD_RELOC_NDS32_PLT_GOTREL_LO19: howto manager. (line 1400) -* BFD_RELOC_NDS32_PLT_GOTREL_LO20: howto manager. (line 1398) -* BFD_RELOC_NDS32_PLT_GOT_SUFF: howto manager. (line 1418) -* BFD_RELOC_NDS32_PTR: howto manager. (line 1420) -* BFD_RELOC_NDS32_PTR_COUNT: howto manager. (line 1421) -* BFD_RELOC_NDS32_PTR_RESOLVED: howto manager. (line 1422) -* BFD_RELOC_NDS32_RELATIVE: howto manager. (line 1351) -* BFD_RELOC_NDS32_RELAX_ENTRY: howto manager. (line 1415) -* BFD_RELOC_NDS32_RELAX_REGION_BEGIN: howto manager. (line 1424) -* BFD_RELOC_NDS32_RELAX_REGION_END: howto manager. (line 1425) -* BFD_RELOC_NDS32_REMOVE: howto manager. (line 1467) -* BFD_RELOC_NDS32_SDA12S2_DP: howto manager. (line 1387) -* BFD_RELOC_NDS32_SDA12S2_SP: howto manager. (line 1388) -* BFD_RELOC_NDS32_SDA15S0: howto manager. (line 1330) -* BFD_RELOC_NDS32_SDA15S1: howto manager. (line 1327) -* BFD_RELOC_NDS32_SDA15S2: howto manager. (line 1324) -* BFD_RELOC_NDS32_SDA15S3: howto manager. (line 1321) -* BFD_RELOC_NDS32_SDA16S3: howto manager. (line 1333) -* BFD_RELOC_NDS32_SDA17S2: howto manager. (line 1336) -* BFD_RELOC_NDS32_SDA18S1: howto manager. (line 1339) -* BFD_RELOC_NDS32_SDA19S0: howto manager. (line 1342) -* BFD_RELOC_NDS32_SDA_FP7U2_RELA: howto manager. (line 1413) -* BFD_RELOC_NDS32_SUBTRAHEND: howto manager. (line 1427) -* BFD_RELOC_NDS32_TLS_DESC: howto manager. (line 1458) -* BFD_RELOC_NDS32_TLS_DESC_20: howto manager. (line 1461) -* BFD_RELOC_NDS32_TLS_DESC_ADD: howto manager. (line 1463) -* BFD_RELOC_NDS32_TLS_DESC_CALL: howto manager. (line 1465) -* BFD_RELOC_NDS32_TLS_DESC_FUNC: howto manager. (line 1464) -* BFD_RELOC_NDS32_TLS_DESC_HI20: howto manager. (line 1459) -* BFD_RELOC_NDS32_TLS_DESC_LO12: howto manager. (line 1460) -* BFD_RELOC_NDS32_TLS_DESC_MEM: howto manager. (line 1466) -* BFD_RELOC_NDS32_TLS_DESC_SDA17S2: howto manager. (line 1462) -* BFD_RELOC_NDS32_TLS_IEGP_HI20: howto manager. (line 1454) -* BFD_RELOC_NDS32_TLS_IEGP_LO12: howto manager. (line 1455) -* BFD_RELOC_NDS32_TLS_IEGP_LO12S2: howto manager. (line 1456) -* BFD_RELOC_NDS32_TLS_IEGP_LW: howto manager. (line 1457) -* BFD_RELOC_NDS32_TLS_IE_HI20: howto manager. (line 1451) -* BFD_RELOC_NDS32_TLS_IE_LO12: howto manager. (line 1452) -* BFD_RELOC_NDS32_TLS_IE_LO12S2: howto manager. (line 1453) -* BFD_RELOC_NDS32_TLS_LE_15S0: howto manager. (line 1446) -* BFD_RELOC_NDS32_TLS_LE_15S1: howto manager. (line 1447) -* BFD_RELOC_NDS32_TLS_LE_15S2: howto manager. (line 1448) -* BFD_RELOC_NDS32_TLS_LE_20: howto manager. (line 1445) -* BFD_RELOC_NDS32_TLS_LE_ADD: howto manager. (line 1449) -* BFD_RELOC_NDS32_TLS_LE_HI20: howto manager. (line 1443) -* BFD_RELOC_NDS32_TLS_LE_LO12: howto manager. (line 1444) -* BFD_RELOC_NDS32_TLS_LE_LS: howto manager. (line 1450) -* BFD_RELOC_NDS32_TPOFF: howto manager. (line 1441) -* BFD_RELOC_NDS32_TRAN: howto manager. (line 1437) -* BFD_RELOC_NDS32_UPDATE_TA: howto manager. (line 1396) -* BFD_RELOC_NDS32_WORD_9_PCREL: howto manager. (line 1294) -* BFD_RELOC_NIOS2_ALIGN: howto manager. (line 2489) -* BFD_RELOC_NIOS2_CACHE_OPX: howto manager. (line 2479) -* BFD_RELOC_NIOS2_CALL16: howto manager. (line 2491) -* BFD_RELOC_NIOS2_CALL26: howto manager. (line 2477) -* BFD_RELOC_NIOS2_CALL26_NOAT: howto manager. (line 2509) -* BFD_RELOC_NIOS2_CALLR: howto manager. (line 2488) -* BFD_RELOC_NIOS2_CALL_HA: howto manager. (line 2513) -* BFD_RELOC_NIOS2_CALL_LO: howto manager. (line 2512) -* BFD_RELOC_NIOS2_CJMP: howto manager. (line 2487) -* BFD_RELOC_NIOS2_COPY: howto manager. (line 2504) -* BFD_RELOC_NIOS2_GLOB_DAT: howto manager. (line 2505) -* BFD_RELOC_NIOS2_GOT16: howto manager. (line 2490) -* BFD_RELOC_NIOS2_GOTOFF: howto manager. (line 2508) -* BFD_RELOC_NIOS2_GOTOFF_HA: howto manager. (line 2493) -* BFD_RELOC_NIOS2_GOTOFF_LO: howto manager. (line 2492) -* BFD_RELOC_NIOS2_GOT_HA: howto manager. (line 2511) -* BFD_RELOC_NIOS2_GOT_LO: howto manager. (line 2510) -* BFD_RELOC_NIOS2_GPREL: howto manager. (line 2485) -* BFD_RELOC_NIOS2_HI16: howto manager. (line 2482) -* BFD_RELOC_NIOS2_HIADJ16: howto manager. (line 2484) -* BFD_RELOC_NIOS2_IMM5: howto manager. (line 2478) -* BFD_RELOC_NIOS2_IMM6: howto manager. (line 2480) -* BFD_RELOC_NIOS2_IMM8: howto manager. (line 2481) -* BFD_RELOC_NIOS2_JUMP_SLOT: howto manager. (line 2506) -* BFD_RELOC_NIOS2_LO16: howto manager. (line 2483) -* BFD_RELOC_NIOS2_PCREL_HA: howto manager. (line 2495) -* BFD_RELOC_NIOS2_PCREL_LO: howto manager. (line 2494) -* BFD_RELOC_NIOS2_R2_F1I5_2: howto manager. (line 2523) -* BFD_RELOC_NIOS2_R2_I10_1_PCREL: howto manager. (line 2515) -* BFD_RELOC_NIOS2_R2_L5I4X1: howto manager. (line 2524) -* BFD_RELOC_NIOS2_R2_S12: howto manager. (line 2514) -* BFD_RELOC_NIOS2_R2_T1I7_1_PCREL: howto manager. (line 2516) -* BFD_RELOC_NIOS2_R2_T1I7_2: howto manager. (line 2517) -* BFD_RELOC_NIOS2_R2_T1X1I6: howto manager. (line 2525) -* BFD_RELOC_NIOS2_R2_T1X1I6_2: howto manager. (line 2526) -* BFD_RELOC_NIOS2_R2_T2I4: howto manager. (line 2518) -* BFD_RELOC_NIOS2_R2_T2I4_1: howto manager. (line 2519) -* BFD_RELOC_NIOS2_R2_T2I4_2: howto manager. (line 2520) -* BFD_RELOC_NIOS2_R2_X1I7_2: howto manager. (line 2521) -* BFD_RELOC_NIOS2_R2_X2L5: howto manager. (line 2522) -* BFD_RELOC_NIOS2_RELATIVE: howto manager. (line 2507) -* BFD_RELOC_NIOS2_S16: howto manager. (line 2475) -* BFD_RELOC_NIOS2_TLS_DTPMOD: howto manager. (line 2501) -* BFD_RELOC_NIOS2_TLS_DTPREL: howto manager. (line 2502) -* BFD_RELOC_NIOS2_TLS_GD16: howto manager. (line 2496) -* BFD_RELOC_NIOS2_TLS_IE16: howto manager. (line 2499) -* BFD_RELOC_NIOS2_TLS_LDM16: howto manager. (line 2497) -* BFD_RELOC_NIOS2_TLS_LDO16: howto manager. (line 2498) -* BFD_RELOC_NIOS2_TLS_LE16: howto manager. (line 2500) -* BFD_RELOC_NIOS2_TLS_TPREL: howto manager. (line 2503) -* BFD_RELOC_NIOS2_U16: howto manager. (line 2476) -* BFD_RELOC_NIOS2_UJMP: howto manager. (line 2486) -* BFD_RELOC_NONE: howto manager. (line 119) -* BFD_RELOC_NS32K_DISP_16: howto manager. (line 587) -* BFD_RELOC_NS32K_DISP_16_PCREL: howto manager. (line 590) -* BFD_RELOC_NS32K_DISP_32: howto manager. (line 588) -* BFD_RELOC_NS32K_DISP_32_PCREL: howto manager. (line 591) -* BFD_RELOC_NS32K_DISP_8: howto manager. (line 586) -* BFD_RELOC_NS32K_DISP_8_PCREL: howto manager. (line 589) -* BFD_RELOC_NS32K_IMM_16: howto manager. (line 581) -* BFD_RELOC_NS32K_IMM_16_PCREL: howto manager. (line 584) -* BFD_RELOC_NS32K_IMM_32: howto manager. (line 582) -* BFD_RELOC_NS32K_IMM_32_PCREL: howto manager. (line 585) -* BFD_RELOC_NS32K_IMM_8: howto manager. (line 580) -* BFD_RELOC_NS32K_IMM_8_PCREL: howto manager. (line 583) -* bfd_reloc_offset_in_range: typedef arelent. (line 340) -* BFD_RELOC_OR1K_COPY: howto manager. (line 2393) -* BFD_RELOC_OR1K_GLOB_DAT: howto manager. (line 2394) -* BFD_RELOC_OR1K_GOT16: howto manager. (line 2387) -* BFD_RELOC_OR1K_GOTOFF_SLO16: howto manager. (line 2392) -* BFD_RELOC_OR1K_GOTPC_HI16: howto manager. (line 2384) -* BFD_RELOC_OR1K_GOTPC_LO16: howto manager. (line 2385) -* BFD_RELOC_OR1K_GOT_AHI16: howto manager. (line 2386) -* BFD_RELOC_OR1K_GOT_LO13: howto manager. (line 2389) -* BFD_RELOC_OR1K_GOT_PG21: howto manager. (line 2388) -* BFD_RELOC_OR1K_JMP_SLOT: howto manager. (line 2395) -* BFD_RELOC_OR1K_LO13: howto manager. (line 2382) -* BFD_RELOC_OR1K_PCREL_PG21: howto manager. (line 2381) -* BFD_RELOC_OR1K_PLT26: howto manager. (line 2390) -* BFD_RELOC_OR1K_PLTA26: howto manager. (line 2391) -* BFD_RELOC_OR1K_RELATIVE: howto manager. (line 2396) -* BFD_RELOC_OR1K_REL_26: howto manager. (line 2379) -* BFD_RELOC_OR1K_SLO13: howto manager. (line 2383) -* BFD_RELOC_OR1K_SLO16: howto manager. (line 2380) -* BFD_RELOC_OR1K_TLS_DTPMOD: howto manager. (line 2418) -* BFD_RELOC_OR1K_TLS_DTPOFF: howto manager. (line 2417) -* BFD_RELOC_OR1K_TLS_GD_HI16: howto manager. (line 2397) -* BFD_RELOC_OR1K_TLS_GD_LO13: howto manager. (line 2400) -* BFD_RELOC_OR1K_TLS_GD_LO16: howto manager. (line 2398) -* BFD_RELOC_OR1K_TLS_GD_PG21: howto manager. (line 2399) -* BFD_RELOC_OR1K_TLS_IE_AHI16: howto manager. (line 2408) -* BFD_RELOC_OR1K_TLS_IE_HI16: howto manager. (line 2407) -* BFD_RELOC_OR1K_TLS_IE_LO13: howto manager. (line 2411) -* BFD_RELOC_OR1K_TLS_IE_LO16: howto manager. (line 2409) -* BFD_RELOC_OR1K_TLS_IE_PG21: howto manager. (line 2410) -* BFD_RELOC_OR1K_TLS_LDM_HI16: howto manager. (line 2401) -* BFD_RELOC_OR1K_TLS_LDM_LO13: howto manager. (line 2404) -* BFD_RELOC_OR1K_TLS_LDM_LO16: howto manager. (line 2402) -* BFD_RELOC_OR1K_TLS_LDM_PG21: howto manager. (line 2403) -* BFD_RELOC_OR1K_TLS_LDO_HI16: howto manager. (line 2405) -* BFD_RELOC_OR1K_TLS_LDO_LO16: howto manager. (line 2406) -* BFD_RELOC_OR1K_TLS_LE_AHI16: howto manager. (line 2413) -* BFD_RELOC_OR1K_TLS_LE_HI16: howto manager. (line 2412) -* BFD_RELOC_OR1K_TLS_LE_LO16: howto manager. (line 2414) -* BFD_RELOC_OR1K_TLS_LE_SLO16: howto manager. (line 2415) -* BFD_RELOC_OR1K_TLS_TPOFF: howto manager. (line 2416) -* BFD_RELOC_PDP11_DISP_6_PCREL: howto manager. (line 594) -* BFD_RELOC_PDP11_DISP_8_PCREL: howto manager. (line 593) -* BFD_RELOC_PJ_CODE_DIR16: howto manager. (line 598) -* BFD_RELOC_PJ_CODE_DIR32: howto manager. (line 599) -* BFD_RELOC_PJ_CODE_HI16: howto manager. (line 596) -* BFD_RELOC_PJ_CODE_LO16: howto manager. (line 597) -* BFD_RELOC_PJ_CODE_REL16: howto manager. (line 600) -* BFD_RELOC_PJ_CODE_REL32: howto manager. (line 601) -* BFD_RELOC_PPC64_ADDR16_DS: howto manager. (line 667) -* BFD_RELOC_PPC64_ADDR16_HIGH: howto manager. (line 678) -* BFD_RELOC_PPC64_ADDR16_HIGHA: howto manager. (line 679) -* BFD_RELOC_PPC64_ADDR16_HIGHER34: howto manager. (line 697) -* BFD_RELOC_PPC64_ADDR16_HIGHERA34: howto manager. (line 698) -* BFD_RELOC_PPC64_ADDR16_HIGHEST34: howto manager. (line 699) -* BFD_RELOC_PPC64_ADDR16_HIGHESTA34: howto manager. (line 700) -* BFD_RELOC_PPC64_ADDR16_LO_DS: howto manager. (line 668) -* BFD_RELOC_PPC64_ADDR64_LOCAL: howto manager. (line 686) -* BFD_RELOC_PPC64_D28: howto manager. (line 705) -* BFD_RELOC_PPC64_D34: howto manager. (line 690) -* BFD_RELOC_PPC64_D34_HA30: howto manager. (line 693) -* BFD_RELOC_PPC64_D34_HI30: howto manager. (line 692) -* BFD_RELOC_PPC64_D34_LO: howto manager. (line 691) -* BFD_RELOC_PPC64_DTPREL16_DS: howto manager. (line 756) -* BFD_RELOC_PPC64_DTPREL16_HIGH: howto manager. (line 758) -* BFD_RELOC_PPC64_DTPREL16_HIGHA: howto manager. (line 759) -* BFD_RELOC_PPC64_DTPREL16_HIGHER: howto manager. (line 760) -* BFD_RELOC_PPC64_DTPREL16_HIGHERA: howto manager. (line 761) -* BFD_RELOC_PPC64_DTPREL16_HIGHEST: howto manager. (line 762) -* BFD_RELOC_PPC64_DTPREL16_HIGHESTA: howto manager. (line 763) -* BFD_RELOC_PPC64_DTPREL16_LO_DS: howto manager. (line 757) -* BFD_RELOC_PPC64_DTPREL34: howto manager. (line 765) -* BFD_RELOC_PPC64_ENTRY: howto manager. (line 687) -* BFD_RELOC_PPC64_GOT16_DS: howto manager. (line 669) -* BFD_RELOC_PPC64_GOT16_LO_DS: howto manager. (line 670) -* BFD_RELOC_PPC64_GOT_DTPREL_PCREL34: howto manager. (line 769) -* BFD_RELOC_PPC64_GOT_PCREL34: howto manager. (line 695) -* BFD_RELOC_PPC64_GOT_TLSGD_PCREL34: howto manager. (line 766) -* BFD_RELOC_PPC64_GOT_TLSLD_PCREL34: howto manager. (line 767) -* BFD_RELOC_PPC64_GOT_TPREL_PCREL34: howto manager. (line 768) -* BFD_RELOC_PPC64_HIGHER: howto manager. (line 655) -* BFD_RELOC_PPC64_HIGHER_S: howto manager. (line 656) -* BFD_RELOC_PPC64_HIGHEST: howto manager. (line 657) -* BFD_RELOC_PPC64_HIGHEST_S: howto manager. (line 658) -* BFD_RELOC_PPC64_PCREL28: howto manager. (line 706) -* BFD_RELOC_PPC64_PCREL34: howto manager. (line 694) -* BFD_RELOC_PPC64_PLT16_LO_DS: howto manager. (line 671) -* BFD_RELOC_PPC64_PLTGOT16: howto manager. (line 663) -* BFD_RELOC_PPC64_PLTGOT16_DS: howto manager. (line 676) -* BFD_RELOC_PPC64_PLTGOT16_HA: howto manager. (line 666) -* BFD_RELOC_PPC64_PLTGOT16_HI: howto manager. (line 665) -* BFD_RELOC_PPC64_PLTGOT16_LO: howto manager. (line 664) -* BFD_RELOC_PPC64_PLTGOT16_LO_DS: howto manager. (line 677) -* BFD_RELOC_PPC64_PLT_PCREL34: howto manager. (line 696) -* BFD_RELOC_PPC64_REL16_HIGH: howto manager. (line 680) -* BFD_RELOC_PPC64_REL16_HIGHA: howto manager. (line 681) -* BFD_RELOC_PPC64_REL16_HIGHER: howto manager. (line 682) -* BFD_RELOC_PPC64_REL16_HIGHER34: howto manager. (line 701) -* BFD_RELOC_PPC64_REL16_HIGHERA: howto manager. (line 683) -* BFD_RELOC_PPC64_REL16_HIGHERA34: howto manager. (line 702) -* BFD_RELOC_PPC64_REL16_HIGHEST: howto manager. (line 684) -* BFD_RELOC_PPC64_REL16_HIGHEST34: howto manager. (line 703) -* BFD_RELOC_PPC64_REL16_HIGHESTA: howto manager. (line 685) -* BFD_RELOC_PPC64_REL16_HIGHESTA34: howto manager. (line 704) -* BFD_RELOC_PPC64_REL24_NOTOC: howto manager. (line 688) -* BFD_RELOC_PPC64_REL24_P9NOTOC: howto manager. (line 689) -* BFD_RELOC_PPC64_SECTOFF_DS: howto manager. (line 672) -* BFD_RELOC_PPC64_SECTOFF_LO_DS: howto manager. (line 673) -* BFD_RELOC_PPC64_TLSGD: howto manager. (line 742) -* BFD_RELOC_PPC64_TLSIE: howto manager. (line 745) -* BFD_RELOC_PPC64_TLSLD: howto manager. (line 743) -* BFD_RELOC_PPC64_TLSLE: howto manager. (line 744) -* BFD_RELOC_PPC64_TLSM: howto manager. (line 746) -* BFD_RELOC_PPC64_TLSML: howto manager. (line 747) -* BFD_RELOC_PPC64_TLS_PCREL: howto manager. (line 770) -* BFD_RELOC_PPC64_TOC: howto manager. (line 662) -* BFD_RELOC_PPC64_TOC16_DS: howto manager. (line 674) -* BFD_RELOC_PPC64_TOC16_HA: howto manager. (line 661) -* BFD_RELOC_PPC64_TOC16_HI: howto manager. (line 660) -* BFD_RELOC_PPC64_TOC16_LO: howto manager. (line 659) -* BFD_RELOC_PPC64_TOC16_LO_DS: howto manager. (line 675) -* BFD_RELOC_PPC64_TPREL16_DS: howto manager. (line 748) -* BFD_RELOC_PPC64_TPREL16_HIGH: howto manager. (line 750) -* BFD_RELOC_PPC64_TPREL16_HIGHA: howto manager. (line 751) -* BFD_RELOC_PPC64_TPREL16_HIGHER: howto manager. (line 752) -* BFD_RELOC_PPC64_TPREL16_HIGHERA: howto manager. (line 753) -* BFD_RELOC_PPC64_TPREL16_HIGHEST: howto manager. (line 754) -* BFD_RELOC_PPC64_TPREL16_HIGHESTA: howto manager. (line 755) -* BFD_RELOC_PPC64_TPREL16_LO_DS: howto manager. (line 749) -* BFD_RELOC_PPC64_TPREL34: howto manager. (line 764) -* BFD_RELOC_PPC_16DX_HA: howto manager. (line 652) -* BFD_RELOC_PPC_B16: howto manager. (line 608) -* BFD_RELOC_PPC_B16_BRNTAKEN: howto manager. (line 610) -* BFD_RELOC_PPC_B16_BRTAKEN: howto manager. (line 609) -* BFD_RELOC_PPC_B26: howto manager. (line 603) -* BFD_RELOC_PPC_BA16: howto manager. (line 611) -* BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager. (line 613) -* BFD_RELOC_PPC_BA16_BRTAKEN: howto manager. (line 612) -* BFD_RELOC_PPC_BA26: howto manager. (line 604) -* BFD_RELOC_PPC_COPY: howto manager. (line 614) -* BFD_RELOC_PPC_DTPMOD: howto manager. (line 715) -* BFD_RELOC_PPC_DTPREL: howto manager. (line 725) -* BFD_RELOC_PPC_DTPREL16: howto manager. (line 721) -* BFD_RELOC_PPC_DTPREL16_HA: howto manager. (line 724) -* BFD_RELOC_PPC_DTPREL16_HI: howto manager. (line 723) -* BFD_RELOC_PPC_DTPREL16_LO: howto manager. (line 722) -* BFD_RELOC_PPC_EMB_BIT_FLD: howto manager. (line 633) -* BFD_RELOC_PPC_EMB_MRKREF: howto manager. (line 628) -* BFD_RELOC_PPC_EMB_NADDR16: howto manager. (line 620) -* BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager. (line 623) -* BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager. (line 622) -* BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager. (line 621) -* BFD_RELOC_PPC_EMB_NADDR32: howto manager. (line 619) -* BFD_RELOC_PPC_EMB_RELSDA: howto manager. (line 634) -* BFD_RELOC_PPC_EMB_RELSEC16: howto manager. (line 629) -* BFD_RELOC_PPC_EMB_RELST_HA: howto manager. (line 632) -* BFD_RELOC_PPC_EMB_RELST_HI: howto manager. (line 631) -* BFD_RELOC_PPC_EMB_RELST_LO: howto manager. (line 630) -* BFD_RELOC_PPC_EMB_SDA21: howto manager. (line 627) -* BFD_RELOC_PPC_EMB_SDA2I16: howto manager. (line 625) -* BFD_RELOC_PPC_EMB_SDA2REL: howto manager. (line 626) -* BFD_RELOC_PPC_EMB_SDAI16: howto manager. (line 624) -* BFD_RELOC_PPC_GLOB_DAT: howto manager. (line 615) -* BFD_RELOC_PPC_GOT_DTPREL16: howto manager. (line 738) -* BFD_RELOC_PPC_GOT_DTPREL16_HA: howto manager. (line 741) -* BFD_RELOC_PPC_GOT_DTPREL16_HI: howto manager. (line 740) -* BFD_RELOC_PPC_GOT_DTPREL16_LO: howto manager. (line 739) -* BFD_RELOC_PPC_GOT_TLSGD16: howto manager. (line 726) -* BFD_RELOC_PPC_GOT_TLSGD16_HA: howto manager. (line 729) -* BFD_RELOC_PPC_GOT_TLSGD16_HI: howto manager. (line 728) -* BFD_RELOC_PPC_GOT_TLSGD16_LO: howto manager. (line 727) -* BFD_RELOC_PPC_GOT_TLSLD16: howto manager. (line 730) -* BFD_RELOC_PPC_GOT_TLSLD16_HA: howto manager. (line 733) -* BFD_RELOC_PPC_GOT_TLSLD16_HI: howto manager. (line 732) -* BFD_RELOC_PPC_GOT_TLSLD16_LO: howto manager. (line 731) -* BFD_RELOC_PPC_GOT_TPREL16: howto manager. (line 734) -* BFD_RELOC_PPC_GOT_TPREL16_HA: howto manager. (line 737) -* BFD_RELOC_PPC_GOT_TPREL16_HI: howto manager. (line 736) -* BFD_RELOC_PPC_GOT_TPREL16_LO: howto manager. (line 735) -* BFD_RELOC_PPC_JMP_SLOT: howto manager. (line 616) -* BFD_RELOC_PPC_LOCAL24PC: howto manager. (line 618) -* BFD_RELOC_PPC_NEG: howto manager. (line 654) -* BFD_RELOC_PPC_REL16DX_HA: howto manager. (line 653) -* BFD_RELOC_PPC_RELATIVE: howto manager. (line 617) -* BFD_RELOC_PPC_TLS: howto manager. (line 708) -* BFD_RELOC_PPC_TLSGD: howto manager. (line 709) -* BFD_RELOC_PPC_TLSIE: howto manager. (line 712) -* BFD_RELOC_PPC_TLSLD: howto manager. (line 710) -* BFD_RELOC_PPC_TLSLE: howto manager. (line 711) -* BFD_RELOC_PPC_TLSM: howto manager. (line 713) -* BFD_RELOC_PPC_TLSML: howto manager. (line 714) -* BFD_RELOC_PPC_TOC16: howto manager. (line 605) -* BFD_RELOC_PPC_TOC16_HI: howto manager. (line 607) -* BFD_RELOC_PPC_TOC16_LO: howto manager. (line 606) -* BFD_RELOC_PPC_TPREL: howto manager. (line 720) -* BFD_RELOC_PPC_TPREL16: howto manager. (line 716) -* BFD_RELOC_PPC_TPREL16_HA: howto manager. (line 719) -* BFD_RELOC_PPC_TPREL16_HI: howto manager. (line 718) -* BFD_RELOC_PPC_TPREL16_LO: howto manager. (line 717) -* BFD_RELOC_PPC_VLE_HA16A: howto manager. (line 642) -* BFD_RELOC_PPC_VLE_HA16D: howto manager. (line 643) -* BFD_RELOC_PPC_VLE_HI16A: howto manager. (line 640) -* BFD_RELOC_PPC_VLE_HI16D: howto manager. (line 641) -* BFD_RELOC_PPC_VLE_LO16A: howto manager. (line 638) -* BFD_RELOC_PPC_VLE_LO16D: howto manager. (line 639) -* BFD_RELOC_PPC_VLE_REL15: howto manager. (line 636) -* BFD_RELOC_PPC_VLE_REL24: howto manager. (line 637) -* BFD_RELOC_PPC_VLE_REL8: howto manager. (line 635) -* BFD_RELOC_PPC_VLE_SDA21: howto manager. (line 644) -* BFD_RELOC_PPC_VLE_SDA21_LO: howto manager. (line 645) -* BFD_RELOC_PPC_VLE_SDAREL_HA16A: howto manager. (line 650) -* BFD_RELOC_PPC_VLE_SDAREL_HA16D: howto manager. (line 651) -* BFD_RELOC_PPC_VLE_SDAREL_HI16A: howto manager. (line 648) -* BFD_RELOC_PPC_VLE_SDAREL_HI16D: howto manager. (line 649) -* BFD_RELOC_PPC_VLE_SDAREL_LO16A: howto manager. (line 646) -* BFD_RELOC_PPC_VLE_SDAREL_LO16D: howto manager. (line 647) -* BFD_RELOC_PRU_16_PMEM: howto manager. (line 2541) -* BFD_RELOC_PRU_32_PMEM: howto manager. (line 2540) -* BFD_RELOC_PRU_GNU_DIFF16: howto manager. (line 2545) -* BFD_RELOC_PRU_GNU_DIFF16_PMEM: howto manager. (line 2547) -* BFD_RELOC_PRU_GNU_DIFF32: howto manager. (line 2546) -* BFD_RELOC_PRU_GNU_DIFF32_PMEM: howto manager. (line 2548) -* BFD_RELOC_PRU_GNU_DIFF8: howto manager. (line 2544) -* BFD_RELOC_PRU_LDI32: howto manager. (line 2532) -* BFD_RELOC_PRU_S10_PCREL: howto manager. (line 2536) -* BFD_RELOC_PRU_U16: howto manager. (line 2528) -* BFD_RELOC_PRU_U16_PMEMIMM: howto manager. (line 2530) -* BFD_RELOC_PRU_U8_PCREL: howto manager. (line 2538) -* BFD_RELOC_RELC: howto manager. (line 2432) -* BFD_RELOC_RISCV_32_PCREL: howto manager. (line 1900) -* BFD_RELOC_RISCV_ADD16: howto manager. (line 1868) -* BFD_RELOC_RISCV_ADD32: howto manager. (line 1869) -* BFD_RELOC_RISCV_ADD64: howto manager. (line 1870) -* BFD_RELOC_RISCV_ADD8: howto manager. (line 1867) -* BFD_RELOC_RISCV_ALIGN: howto manager. (line 1885) -* BFD_RELOC_RISCV_CALL: howto manager. (line 1865) -* BFD_RELOC_RISCV_CALL_PLT: howto manager. (line 1866) -* BFD_RELOC_RISCV_CFA: howto manager. (line 1894) -* BFD_RELOC_RISCV_GOT_HI20: howto manager. (line 1875) -* BFD_RELOC_RISCV_GPREL12_I: howto manager. (line 1859) -* BFD_RELOC_RISCV_GPREL12_S: howto manager. (line 1860) -* BFD_RELOC_RISCV_GPREL_I: howto manager. (line 1889) -* BFD_RELOC_RISCV_GPREL_S: howto manager. (line 1890) -* BFD_RELOC_RISCV_HI20: howto manager. (line 1853) -* BFD_RELOC_RISCV_JMP: howto manager. (line 1878) -* BFD_RELOC_RISCV_LO12_I: howto manager. (line 1857) -* BFD_RELOC_RISCV_LO12_S: howto manager. (line 1858) -* BFD_RELOC_RISCV_PCREL_HI20: howto manager. (line 1854) -* BFD_RELOC_RISCV_PCREL_LO12_I: howto manager. (line 1855) -* BFD_RELOC_RISCV_PCREL_LO12_S: howto manager. (line 1856) -* BFD_RELOC_RISCV_RELAX: howto manager. (line 1893) -* BFD_RELOC_RISCV_RVC_BRANCH: howto manager. (line 1886) -* BFD_RELOC_RISCV_RVC_JUMP: howto manager. (line 1887) -* BFD_RELOC_RISCV_RVC_LUI: howto manager. (line 1888) -* BFD_RELOC_RISCV_SET16: howto manager. (line 1898) -* BFD_RELOC_RISCV_SET32: howto manager. (line 1899) -* BFD_RELOC_RISCV_SET6: howto manager. (line 1896) -* BFD_RELOC_RISCV_SET8: howto manager. (line 1897) -* BFD_RELOC_RISCV_SUB16: howto manager. (line 1872) -* BFD_RELOC_RISCV_SUB32: howto manager. (line 1873) -* BFD_RELOC_RISCV_SUB6: howto manager. (line 1895) -* BFD_RELOC_RISCV_SUB64: howto manager. (line 1874) -* BFD_RELOC_RISCV_SUB8: howto manager. (line 1871) -* BFD_RELOC_RISCV_TLS_DTPMOD32: howto manager. (line 1879) -* BFD_RELOC_RISCV_TLS_DTPMOD64: howto manager. (line 1881) -* BFD_RELOC_RISCV_TLS_DTPREL32: howto manager. (line 1880) -* BFD_RELOC_RISCV_TLS_DTPREL64: howto manager. (line 1882) -* BFD_RELOC_RISCV_TLS_GD_HI20: howto manager. (line 1877) -* BFD_RELOC_RISCV_TLS_GOT_HI20: howto manager. (line 1876) -* BFD_RELOC_RISCV_TLS_TPREL32: howto manager. (line 1883) -* BFD_RELOC_RISCV_TLS_TPREL64: howto manager. (line 1884) -* BFD_RELOC_RISCV_TPREL_ADD: howto manager. (line 1864) -* BFD_RELOC_RISCV_TPREL_HI20: howto manager. (line 1861) -* BFD_RELOC_RISCV_TPREL_I: howto manager. (line 1891) -* BFD_RELOC_RISCV_TPREL_LO12_I: howto manager. (line 1862) -* BFD_RELOC_RISCV_TPREL_LO12_S: howto manager. (line 1863) -* BFD_RELOC_RISCV_TPREL_S: howto manager. (line 1892) -* BFD_RELOC_RL78_16U: howto manager. (line 1910) -* BFD_RELOC_RL78_16_OP: howto manager. (line 1906) -* BFD_RELOC_RL78_24U: howto manager. (line 1911) -* BFD_RELOC_RL78_24_OP: howto manager. (line 1907) -* BFD_RELOC_RL78_32_OP: howto manager. (line 1908) -* BFD_RELOC_RL78_8U: howto manager. (line 1909) -* BFD_RELOC_RL78_ABS16: howto manager. (line 1923) -* BFD_RELOC_RL78_ABS16U: howto manager. (line 1927) -* BFD_RELOC_RL78_ABS16UL: howto manager. (line 1929) -* BFD_RELOC_RL78_ABS16UW: howto manager. (line 1928) -* BFD_RELOC_RL78_ABS16_REV: howto manager. (line 1924) -* BFD_RELOC_RL78_ABS32: howto manager. (line 1925) -* BFD_RELOC_RL78_ABS32_REV: howto manager. (line 1926) -* BFD_RELOC_RL78_ABS8: howto manager. (line 1922) -* BFD_RELOC_RL78_CODE: howto manager. (line 1934) -* BFD_RELOC_RL78_DIFF: howto manager. (line 1913) -* BFD_RELOC_RL78_DIR3U_PCREL: howto manager. (line 1912) -* BFD_RELOC_RL78_GPRELB: howto manager. (line 1914) -* BFD_RELOC_RL78_GPRELL: howto manager. (line 1916) -* BFD_RELOC_RL78_GPRELW: howto manager. (line 1915) -* BFD_RELOC_RL78_HI16: howto manager. (line 1931) -* BFD_RELOC_RL78_HI8: howto manager. (line 1932) -* BFD_RELOC_RL78_LO16: howto manager. (line 1933) -* BFD_RELOC_RL78_NEG16: howto manager. (line 1903) -* BFD_RELOC_RL78_NEG24: howto manager. (line 1904) -* BFD_RELOC_RL78_NEG32: howto manager. (line 1905) -* BFD_RELOC_RL78_NEG8: howto manager. (line 1902) -* BFD_RELOC_RL78_OP_AND: howto manager. (line 1920) -* BFD_RELOC_RL78_OP_NEG: howto manager. (line 1919) -* BFD_RELOC_RL78_OP_SHRA: howto manager. (line 1921) -* BFD_RELOC_RL78_OP_SUBTRACT: howto manager. (line 1918) -* BFD_RELOC_RL78_RELAX: howto manager. (line 1930) -* BFD_RELOC_RL78_SADDR: howto manager. (line 1935) -* BFD_RELOC_RL78_SYM: howto manager. (line 1917) -* BFD_RELOC_RVA: howto manager. (line 96) -* BFD_RELOC_RX_16U: howto manager. (line 1945) -* BFD_RELOC_RX_16_OP: howto manager. (line 1941) -* BFD_RELOC_RX_24U: howto manager. (line 1946) -* BFD_RELOC_RX_24_OP: howto manager. (line 1942) -* BFD_RELOC_RX_32_OP: howto manager. (line 1943) -* BFD_RELOC_RX_8U: howto manager. (line 1944) -* BFD_RELOC_RX_ABS16: howto manager. (line 1956) -* BFD_RELOC_RX_ABS16U: howto manager. (line 1960) -* BFD_RELOC_RX_ABS16UL: howto manager. (line 1962) -* BFD_RELOC_RX_ABS16UW: howto manager. (line 1961) -* BFD_RELOC_RX_ABS16_REV: howto manager. (line 1957) -* BFD_RELOC_RX_ABS32: howto manager. (line 1958) -* BFD_RELOC_RX_ABS32_REV: howto manager. (line 1959) -* BFD_RELOC_RX_ABS8: howto manager. (line 1955) -* BFD_RELOC_RX_DIFF: howto manager. (line 1948) -* BFD_RELOC_RX_DIR3U_PCREL: howto manager. (line 1947) -* BFD_RELOC_RX_GPRELB: howto manager. (line 1949) -* BFD_RELOC_RX_GPRELL: howto manager. (line 1951) -* BFD_RELOC_RX_GPRELW: howto manager. (line 1950) -* BFD_RELOC_RX_NEG16: howto manager. (line 1938) -* BFD_RELOC_RX_NEG24: howto manager. (line 1939) -* BFD_RELOC_RX_NEG32: howto manager. (line 1940) -* BFD_RELOC_RX_NEG8: howto manager. (line 1937) -* BFD_RELOC_RX_OP_NEG: howto manager. (line 1954) -* BFD_RELOC_RX_OP_SUBTRACT: howto manager. (line 1953) -* BFD_RELOC_RX_RELAX: howto manager. (line 1963) -* BFD_RELOC_RX_SYM: howto manager. (line 1952) -* BFD_RELOC_S12Z_15_PCREL: howto manager. (line 2275) -* BFD_RELOC_S12Z_OPR: howto manager. (line 3447) -* BFD_RELOC_SCORE16_BRANCH: howto manager. (line 2066) -* BFD_RELOC_SCORE16_JMP: howto manager. (line 2064) -* BFD_RELOC_SCORE_BCMP: howto manager. (line 2068) -* BFD_RELOC_SCORE_BRANCH: howto manager. (line 2058) -* BFD_RELOC_SCORE_CALL15: howto manager. (line 2072) -* BFD_RELOC_SCORE_DUMMY2: howto manager. (line 2055) -* BFD_RELOC_SCORE_DUMMY_HI16: howto manager. (line 2073) -* BFD_RELOC_SCORE_GOT15: howto manager. (line 2070) -* BFD_RELOC_SCORE_GOT_LO16: howto manager. (line 2071) -* BFD_RELOC_SCORE_GPREL15: howto manager. (line 2053) -* BFD_RELOC_SCORE_IMM30: howto manager. (line 2060) -* BFD_RELOC_SCORE_IMM32: howto manager. (line 2062) -* BFD_RELOC_SCORE_JMP: howto manager. (line 2056) -* BFD_RELOC_SH_ALIGN: howto manager. (line 967) -* BFD_RELOC_SH_CODE: howto manager. (line 968) -* BFD_RELOC_SH_COPY: howto manager. (line 973) -* BFD_RELOC_SH_COPY64: howto manager. (line 998) -* BFD_RELOC_SH_COUNT: howto manager. (line 966) -* BFD_RELOC_SH_DATA: howto manager. (line 969) -* BFD_RELOC_SH_DISP12: howto manager. (line 949) -* BFD_RELOC_SH_DISP12BY2: howto manager. (line 950) -* BFD_RELOC_SH_DISP12BY4: howto manager. (line 951) -* BFD_RELOC_SH_DISP12BY8: howto manager. (line 952) -* BFD_RELOC_SH_DISP20: howto manager. (line 953) -* BFD_RELOC_SH_DISP20BY8: howto manager. (line 954) -* BFD_RELOC_SH_FUNCDESC: howto manager. (line 1041) -* BFD_RELOC_SH_GLOB_DAT: howto manager. (line 974) -* BFD_RELOC_SH_GLOB_DAT64: howto manager. (line 999) -* BFD_RELOC_SH_GOT10BY4: howto manager. (line 1002) -* BFD_RELOC_SH_GOT10BY8: howto manager. (line 1003) -* BFD_RELOC_SH_GOT20: howto manager. (line 1035) -* BFD_RELOC_SH_GOTFUNCDESC: howto manager. (line 1037) -* BFD_RELOC_SH_GOTFUNCDESC20: howto manager. (line 1038) -* BFD_RELOC_SH_GOTOFF20: howto manager. (line 1036) -* BFD_RELOC_SH_GOTOFFFUNCDESC: howto manager. (line 1039) -* BFD_RELOC_SH_GOTOFFFUNCDESC20: howto manager. (line 1040) -* BFD_RELOC_SH_GOTOFF_HI16: howto manager. (line 993) -* BFD_RELOC_SH_GOTOFF_LOW16: howto manager. (line 990) -* BFD_RELOC_SH_GOTOFF_MEDHI16: howto manager. (line 992) -* BFD_RELOC_SH_GOTOFF_MEDLOW16: howto manager. (line 991) -* BFD_RELOC_SH_GOTPC: howto manager. (line 977) -* BFD_RELOC_SH_GOTPC_HI16: howto manager. (line 997) -* BFD_RELOC_SH_GOTPC_LOW16: howto manager. (line 994) -* BFD_RELOC_SH_GOTPC_MEDHI16: howto manager. (line 996) -* BFD_RELOC_SH_GOTPC_MEDLOW16: howto manager. (line 995) -* BFD_RELOC_SH_GOTPLT10BY4: howto manager. (line 1004) -* BFD_RELOC_SH_GOTPLT10BY8: howto manager. (line 1005) -* BFD_RELOC_SH_GOTPLT32: howto manager. (line 1006) -* BFD_RELOC_SH_GOTPLT_HI16: howto manager. (line 985) -* BFD_RELOC_SH_GOTPLT_LOW16: howto manager. (line 982) -* BFD_RELOC_SH_GOTPLT_MEDHI16: howto manager. (line 984) -* BFD_RELOC_SH_GOTPLT_MEDLOW16: howto manager. (line 983) -* BFD_RELOC_SH_GOT_HI16: howto manager. (line 981) -* BFD_RELOC_SH_GOT_LOW16: howto manager. (line 978) -* BFD_RELOC_SH_GOT_MEDHI16: howto manager. (line 980) -* BFD_RELOC_SH_GOT_MEDLOW16: howto manager. (line 979) -* BFD_RELOC_SH_IMM3: howto manager. (line 947) -* BFD_RELOC_SH_IMM3U: howto manager. (line 948) -* BFD_RELOC_SH_IMM4: howto manager. (line 955) -* BFD_RELOC_SH_IMM4BY2: howto manager. (line 956) -* BFD_RELOC_SH_IMM4BY4: howto manager. (line 957) -* BFD_RELOC_SH_IMM8: howto manager. (line 958) -* BFD_RELOC_SH_IMM8BY2: howto manager. (line 959) -* BFD_RELOC_SH_IMM8BY4: howto manager. (line 960) -* BFD_RELOC_SH_IMMS10: howto manager. (line 1012) -* BFD_RELOC_SH_IMMS10BY2: howto manager. (line 1013) -* BFD_RELOC_SH_IMMS10BY4: howto manager. (line 1014) -* BFD_RELOC_SH_IMMS10BY8: howto manager. (line 1015) -* BFD_RELOC_SH_IMMS16: howto manager. (line 1016) -* BFD_RELOC_SH_IMMS6: howto manager. (line 1009) -* BFD_RELOC_SH_IMMS6BY32: howto manager. (line 1010) -* BFD_RELOC_SH_IMMU16: howto manager. (line 1017) -* BFD_RELOC_SH_IMMU5: howto manager. (line 1008) -* BFD_RELOC_SH_IMMU6: howto manager. (line 1011) -* BFD_RELOC_SH_IMM_HI16: howto manager. (line 1024) -* BFD_RELOC_SH_IMM_HI16_PCREL: howto manager. (line 1025) -* BFD_RELOC_SH_IMM_LOW16: howto manager. (line 1018) -* BFD_RELOC_SH_IMM_LOW16_PCREL: howto manager. (line 1019) -* BFD_RELOC_SH_IMM_MEDHI16: howto manager. (line 1022) -* BFD_RELOC_SH_IMM_MEDHI16_PCREL: howto manager. (line 1023) -* BFD_RELOC_SH_IMM_MEDLOW16: howto manager. (line 1020) -* BFD_RELOC_SH_IMM_MEDLOW16_PCREL: howto manager. (line 1021) -* BFD_RELOC_SH_JMP_SLOT: howto manager. (line 975) -* BFD_RELOC_SH_JMP_SLOT64: howto manager. (line 1000) -* BFD_RELOC_SH_LABEL: howto manager. (line 970) -* BFD_RELOC_SH_LOOP_END: howto manager. (line 972) -* BFD_RELOC_SH_LOOP_START: howto manager. (line 971) -* BFD_RELOC_SH_PCDISP12BY2: howto manager. (line 946) -* BFD_RELOC_SH_PCDISP8BY2: howto manager. (line 945) -* BFD_RELOC_SH_PCRELIMM8BY2: howto manager. (line 961) -* BFD_RELOC_SH_PCRELIMM8BY4: howto manager. (line 962) -* BFD_RELOC_SH_PLT_HI16: howto manager. (line 989) -* BFD_RELOC_SH_PLT_LOW16: howto manager. (line 986) -* BFD_RELOC_SH_PLT_MEDHI16: howto manager. (line 988) -* BFD_RELOC_SH_PLT_MEDLOW16: howto manager. (line 987) -* BFD_RELOC_SH_PT_16: howto manager. (line 1026) -* BFD_RELOC_SH_RELATIVE: howto manager. (line 976) -* BFD_RELOC_SH_RELATIVE64: howto manager. (line 1001) -* BFD_RELOC_SH_SHMEDIA_CODE: howto manager. (line 1007) -* BFD_RELOC_SH_SWITCH16: howto manager. (line 963) -* BFD_RELOC_SH_SWITCH32: howto manager. (line 964) -* BFD_RELOC_SH_TLS_DTPMOD32: howto manager. (line 1032) -* BFD_RELOC_SH_TLS_DTPOFF32: howto manager. (line 1033) -* BFD_RELOC_SH_TLS_GD_32: howto manager. (line 1027) -* BFD_RELOC_SH_TLS_IE_32: howto manager. (line 1030) -* BFD_RELOC_SH_TLS_LDO_32: howto manager. (line 1029) -* BFD_RELOC_SH_TLS_LD_32: howto manager. (line 1028) -* BFD_RELOC_SH_TLS_LE_32: howto manager. (line 1031) -* BFD_RELOC_SH_TLS_TPOFF32: howto manager. (line 1034) -* BFD_RELOC_SH_USES: howto manager. (line 965) -* BFD_RELOC_SIZE32: howto manager. (line 68) -* BFD_RELOC_SIZE64: howto manager. (line 69) -* BFD_RELOC_SPARC13: howto manager. (line 122) -* BFD_RELOC_SPARC22: howto manager. (line 121) -* BFD_RELOC_SPARC_10: howto manager. (line 149) -* BFD_RELOC_SPARC_11: howto manager. (line 150) -* BFD_RELOC_SPARC_5: howto manager. (line 162) -* BFD_RELOC_SPARC_6: howto manager. (line 161) -* BFD_RELOC_SPARC_64: howto manager. (line 148) -* BFD_RELOC_SPARC_7: howto manager. (line 160) -* BFD_RELOC_SPARC_BASE13: howto manager. (line 145) -* BFD_RELOC_SPARC_BASE22: howto manager. (line 146) -* BFD_RELOC_SPARC_COPY: howto manager. (line 129) -* BFD_RELOC_SPARC_DISP64: howto manager. (line 163) -* BFD_RELOC_SPARC_GLOB_DAT: howto manager. (line 130) -* BFD_RELOC_SPARC_GOT10: howto manager. (line 123) -* BFD_RELOC_SPARC_GOT13: howto manager. (line 124) -* BFD_RELOC_SPARC_GOT22: howto manager. (line 125) -* BFD_RELOC_SPARC_GOTDATA_HIX22: howto manager. (line 136) -* BFD_RELOC_SPARC_GOTDATA_LOX10: howto manager. (line 137) -* BFD_RELOC_SPARC_GOTDATA_OP: howto manager. (line 140) -* BFD_RELOC_SPARC_GOTDATA_OP_HIX22: howto manager. (line 138) -* BFD_RELOC_SPARC_GOTDATA_OP_LOX10: howto manager. (line 139) -* BFD_RELOC_SPARC_H34: howto manager. (line 172) -* BFD_RELOC_SPARC_H44: howto manager. (line 168) -* BFD_RELOC_SPARC_HH22: howto manager. (line 152) -* BFD_RELOC_SPARC_HIX22: howto manager. (line 166) -* BFD_RELOC_SPARC_HM10: howto manager. (line 153) -* BFD_RELOC_SPARC_IRELATIVE: howto manager. (line 142) -* BFD_RELOC_SPARC_JMP_IREL: howto manager. (line 141) -* BFD_RELOC_SPARC_JMP_SLOT: howto manager. (line 131) -* BFD_RELOC_SPARC_L44: howto manager. (line 170) -* BFD_RELOC_SPARC_LM22: howto manager. (line 154) -* BFD_RELOC_SPARC_LOX10: howto manager. (line 167) -* BFD_RELOC_SPARC_M44: howto manager. (line 169) -* BFD_RELOC_SPARC_OLO10: howto manager. (line 151) -* BFD_RELOC_SPARC_PC10: howto manager. (line 126) -* BFD_RELOC_SPARC_PC22: howto manager. (line 127) -* BFD_RELOC_SPARC_PC_HH22: howto manager. (line 155) -* BFD_RELOC_SPARC_PC_HM10: howto manager. (line 156) -* BFD_RELOC_SPARC_PC_LM22: howto manager. (line 157) -* BFD_RELOC_SPARC_PLT32: howto manager. (line 164) -* BFD_RELOC_SPARC_PLT64: howto manager. (line 165) -* BFD_RELOC_SPARC_REGISTER: howto manager. (line 171) -* BFD_RELOC_SPARC_RELATIVE: howto manager. (line 132) -* BFD_RELOC_SPARC_REV32: howto manager. (line 177) -* BFD_RELOC_SPARC_SIZE32: howto manager. (line 173) -* BFD_RELOC_SPARC_SIZE64: howto manager. (line 174) -* BFD_RELOC_SPARC_TLS_DTPMOD32: howto manager. (line 197) -* BFD_RELOC_SPARC_TLS_DTPMOD64: howto manager. (line 198) -* BFD_RELOC_SPARC_TLS_DTPOFF32: howto manager. (line 199) -* BFD_RELOC_SPARC_TLS_DTPOFF64: howto manager. (line 200) -* BFD_RELOC_SPARC_TLS_GD_ADD: howto manager. (line 181) -* BFD_RELOC_SPARC_TLS_GD_CALL: howto manager. (line 182) -* BFD_RELOC_SPARC_TLS_GD_HI22: howto manager. (line 179) -* BFD_RELOC_SPARC_TLS_GD_LO10: howto manager. (line 180) -* BFD_RELOC_SPARC_TLS_IE_ADD: howto manager. (line 194) -* BFD_RELOC_SPARC_TLS_IE_HI22: howto manager. (line 190) -* BFD_RELOC_SPARC_TLS_IE_LD: howto manager. (line 192) -* BFD_RELOC_SPARC_TLS_IE_LDX: howto manager. (line 193) -* BFD_RELOC_SPARC_TLS_IE_LO10: howto manager. (line 191) -* BFD_RELOC_SPARC_TLS_LDM_ADD: howto manager. (line 185) -* BFD_RELOC_SPARC_TLS_LDM_CALL: howto manager. (line 186) -* BFD_RELOC_SPARC_TLS_LDM_HI22: howto manager. (line 183) -* BFD_RELOC_SPARC_TLS_LDM_LO10: howto manager. (line 184) -* BFD_RELOC_SPARC_TLS_LDO_ADD: howto manager. (line 189) -* BFD_RELOC_SPARC_TLS_LDO_HIX22: howto manager. (line 187) -* BFD_RELOC_SPARC_TLS_LDO_LOX10: howto manager. (line 188) -* BFD_RELOC_SPARC_TLS_LE_HIX22: howto manager. (line 195) -* BFD_RELOC_SPARC_TLS_LE_LOX10: howto manager. (line 196) -* BFD_RELOC_SPARC_TLS_TPOFF32: howto manager. (line 201) -* BFD_RELOC_SPARC_TLS_TPOFF64: howto manager. (line 202) -* BFD_RELOC_SPARC_UA16: howto manager. (line 133) -* BFD_RELOC_SPARC_UA32: howto manager. (line 134) -* BFD_RELOC_SPARC_UA64: howto manager. (line 135) -* BFD_RELOC_SPARC_WDISP10: howto manager. (line 175) -* BFD_RELOC_SPARC_WDISP16: howto manager. (line 158) -* BFD_RELOC_SPARC_WDISP19: howto manager. (line 159) -* BFD_RELOC_SPARC_WDISP22: howto manager. (line 120) -* BFD_RELOC_SPARC_WPLT30: howto manager. (line 128) -* BFD_RELOC_SPU_ADD_PIC: howto manager. (line 218) -* BFD_RELOC_SPU_HI16: howto manager. (line 215) -* BFD_RELOC_SPU_IMM10: howto manager. (line 206) -* BFD_RELOC_SPU_IMM10W: howto manager. (line 207) -* BFD_RELOC_SPU_IMM16: howto manager. (line 208) -* BFD_RELOC_SPU_IMM16W: howto manager. (line 209) -* BFD_RELOC_SPU_IMM18: howto manager. (line 210) -* BFD_RELOC_SPU_IMM7: howto manager. (line 204) -* BFD_RELOC_SPU_IMM8: howto manager. (line 205) -* BFD_RELOC_SPU_LO16: howto manager. (line 214) -* BFD_RELOC_SPU_PCREL16: howto manager. (line 213) -* BFD_RELOC_SPU_PCREL9a: howto manager. (line 211) -* BFD_RELOC_SPU_PCREL9b: howto manager. (line 212) -* BFD_RELOC_SPU_PPU32: howto manager. (line 216) -* BFD_RELOC_SPU_PPU64: howto manager. (line 217) -* BFD_RELOC_THUMB_PCREL_BFCSEL: howto manager. (line 797) -* BFD_RELOC_THUMB_PCREL_BLX: howto manager. (line 786) -* BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager. (line 809) -* BFD_RELOC_THUMB_PCREL_BRANCH20: howto manager. (line 810) -* BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager. (line 811) -* BFD_RELOC_THUMB_PCREL_BRANCH25: howto manager. (line 812) -* BFD_RELOC_THUMB_PCREL_BRANCH5: howto manager. (line 795) -* BFD_RELOC_THUMB_PCREL_BRANCH7: howto manager. (line 807) -* BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager. (line 808) -* BFD_RELOC_TIC30_LDP: howto manager. (line 1564) -* BFD_RELOC_TIC54X_16_OF_23: howto manager. (line 1578) -* BFD_RELOC_TIC54X_23: howto manager. (line 1576) -* BFD_RELOC_TIC54X_MS7_OF_23: howto manager. (line 1582) -* BFD_RELOC_TIC54X_PARTLS7: howto manager. (line 1568) -* BFD_RELOC_TIC54X_PARTMS9: howto manager. (line 1572) -* BFD_RELOC_TILEGX_BROFF_X1: howto manager. (line 3242) -* BFD_RELOC_TILEGX_COPY: howto manager. (line 3238) -* BFD_RELOC_TILEGX_DEST_IMM8_X1: howto manager. (line 3249) -* BFD_RELOC_TILEGX_GLOB_DAT: howto manager. (line 3239) -* BFD_RELOC_TILEGX_HW0: howto manager. (line 3231) -* BFD_RELOC_TILEGX_HW0_LAST: howto manager. (line 3235) -* BFD_RELOC_TILEGX_HW1: howto manager. (line 3232) -* BFD_RELOC_TILEGX_HW1_LAST: howto manager. (line 3236) -* BFD_RELOC_TILEGX_HW2: howto manager. (line 3233) -* BFD_RELOC_TILEGX_HW2_LAST: howto manager. (line 3237) -* BFD_RELOC_TILEGX_HW3: howto manager. (line 3234) -* BFD_RELOC_TILEGX_IMM16_X0_HW0: howto manager. (line 3258) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT: howto manager. (line 3286) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST: howto manager. (line 3266) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager. (line 3294) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager. (line 3280) + (line 3169) +* BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12: howto manager. (line 3232) +* BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC: howto manager. (line 3236) +* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager. (line 3138) +* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager. (line 3140) +* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager. (line 3134) +* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager. (line 3136) +* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager. (line 3132) +* BFD_RELOC_AARCH64_TLS_DTPMOD: howto manager. (line 3202) +* BFD_RELOC_AARCH64_TLS_DTPREL: howto manager. (line 3204) +* BFD_RELOC_AARCH64_TLS_TPREL: howto manager. (line 3206) +* BFD_RELOC_AARCH64_TSTBR14: howto manager. (line 2989) +* BFD_RELOC_AC_SECTOFF_S9: howto manager. (line 1076) +* BFD_RELOC_AC_SECTOFF_S9_1: howto manager. (line 1077) +* BFD_RELOC_AC_SECTOFF_S9_2: howto manager. (line 1078) +* BFD_RELOC_AC_SECTOFF_U8: howto manager. (line 1073) +* BFD_RELOC_AC_SECTOFF_U8_1: howto manager. (line 1074) +* BFD_RELOC_AC_SECTOFF_U8_2: howto manager. (line 1075) +* BFD_RELOC_ALPHA_BOH: howto manager. (line 288) +* BFD_RELOC_ALPHA_BRSGP: howto manager. (line 275) +* BFD_RELOC_ALPHA_BSR: howto manager. (line 282) +* BFD_RELOC_ALPHA_CODEADDR: howto manager. (line 268) +* BFD_RELOC_ALPHA_DTPMOD64: howto manager. (line 293) +* BFD_RELOC_ALPHA_DTPREL16: howto manager. (line 298) +* BFD_RELOC_ALPHA_DTPREL64: howto manager. (line 295) +* BFD_RELOC_ALPHA_DTPREL_HI16: howto manager. (line 296) +* BFD_RELOC_ALPHA_DTPREL_LO16: howto manager. (line 297) +* BFD_RELOC_ALPHA_ELF_LITERAL: howto manager. (line 236) +* BFD_RELOC_ALPHA_GOTDTPREL16: howto manager. (line 294) +* BFD_RELOC_ALPHA_GOTTPREL16: howto manager. (line 299) +* BFD_RELOC_ALPHA_GPDISP: howto manager. (line 231) +* BFD_RELOC_ALPHA_GPDISP_HI16: howto manager. (line 219) +* BFD_RELOC_ALPHA_GPDISP_LO16: howto manager. (line 226) +* BFD_RELOC_ALPHA_GPREL_HI16: howto manager. (line 271) +* BFD_RELOC_ALPHA_GPREL_LO16: howto manager. (line 272) +* BFD_RELOC_ALPHA_HINT: howto manager. (line 261) +* BFD_RELOC_ALPHA_LDA: howto manager. (line 285) +* BFD_RELOC_ALPHA_LINKAGE: howto manager. (line 265) +* BFD_RELOC_ALPHA_LITERAL: howto manager. (line 235) +* BFD_RELOC_ALPHA_LITUSE: howto manager. (line 237) +* BFD_RELOC_ALPHA_NOP: howto manager. (line 279) +* BFD_RELOC_ALPHA_TLSGD: howto manager. (line 291) +* BFD_RELOC_ALPHA_TLSLDM: howto manager. (line 292) +* BFD_RELOC_ALPHA_TPREL16: howto manager. (line 303) +* BFD_RELOC_ALPHA_TPREL64: howto manager. (line 300) +* BFD_RELOC_ALPHA_TPREL_HI16: howto manager. (line 301) +* BFD_RELOC_ALPHA_TPREL_LO16: howto manager. (line 302) +* BFD_RELOC_ARC_16: howto manager. (line 1045) +* BFD_RELOC_ARC_24: howto manager. (line 1046) +* BFD_RELOC_ARC_32: howto manager. (line 1047) +* BFD_RELOC_ARC_32_ME: howto manager. (line 1067) +* BFD_RELOC_ARC_32_ME_S: howto manager. (line 1068) +* BFD_RELOC_ARC_32_PCREL: howto manager. (line 1085) +* BFD_RELOC_ARC_8: howto manager. (line 1044) +* BFD_RELOC_ARC_COPY: howto manager. (line 1090) +* BFD_RELOC_ARC_GLOB_DAT: howto manager. (line 1091) +* BFD_RELOC_ARC_GOT32: howto manager. (line 1087) +* BFD_RELOC_ARC_GOTOFF: howto manager. (line 1094) +* BFD_RELOC_ARC_GOTPC: howto manager. (line 1095) +* BFD_RELOC_ARC_GOTPC32: howto manager. (line 1088) +* BFD_RELOC_ARC_JLI_SECTOFF: howto manager. (line 1111) +* BFD_RELOC_ARC_JMP_SLOT: howto manager. (line 1092) +* BFD_RELOC_ARC_N16: howto manager. (line 1049) +* BFD_RELOC_ARC_N24: howto manager. (line 1050) +* BFD_RELOC_ARC_N32: howto manager. (line 1051) +* BFD_RELOC_ARC_N32_ME: howto manager. (line 1069) +* BFD_RELOC_ARC_N8: howto manager. (line 1048) +* BFD_RELOC_ARC_NONE: howto manager. (line 1043) +* BFD_RELOC_ARC_NPS_CMEM16: howto manager. (line 1110) +* BFD_RELOC_ARC_PC32: howto manager. (line 1086) +* BFD_RELOC_ARC_PLT32: howto manager. (line 1089) +* BFD_RELOC_ARC_RELATIVE: howto manager. (line 1093) +* BFD_RELOC_ARC_S13_PCREL: howto manager. (line 1065) +* BFD_RELOC_ARC_S21H_PCREL: howto manager. (line 1054) +* BFD_RELOC_ARC_S21H_PCREL_PLT: howto manager. (line 1109) +* BFD_RELOC_ARC_S21W_PCREL: howto manager. (line 1055) +* BFD_RELOC_ARC_S21W_PCREL_PLT: howto manager. (line 1096) +* BFD_RELOC_ARC_S25H_PCREL: howto manager. (line 1056) +* BFD_RELOC_ARC_S25H_PCREL_PLT: howto manager. (line 1097) +* BFD_RELOC_ARC_S25W_PCREL: howto manager. (line 1057) +* BFD_RELOC_ARC_S25W_PCREL_PLT: howto manager. (line 1108) +* BFD_RELOC_ARC_SDA: howto manager. (line 1052) +* BFD_RELOC_ARC_SDA16_LD: howto manager. (line 1062) +* BFD_RELOC_ARC_SDA16_LD1: howto manager. (line 1063) +* BFD_RELOC_ARC_SDA16_LD2: howto manager. (line 1064) +* BFD_RELOC_ARC_SDA16_ST2: howto manager. (line 1084) +* BFD_RELOC_ARC_SDA32: howto manager. (line 1058) +* BFD_RELOC_ARC_SDA32_ME: howto manager. (line 1071) +* BFD_RELOC_ARC_SDA_12: howto manager. (line 1083) +* BFD_RELOC_ARC_SDA_LDST: howto manager. (line 1059) +* BFD_RELOC_ARC_SDA_LDST1: howto manager. (line 1060) +* BFD_RELOC_ARC_SDA_LDST2: howto manager. (line 1061) +* BFD_RELOC_ARC_SECTOFF: howto manager. (line 1053) +* BFD_RELOC_ARC_SECTOFF_1: howto manager. (line 1081) +* BFD_RELOC_ARC_SECTOFF_2: howto manager. (line 1082) +* BFD_RELOC_ARC_SECTOFF_ME: howto manager. (line 1070) +* BFD_RELOC_ARC_SECTOFF_ME_1: howto manager. (line 1079) +* BFD_RELOC_ARC_SECTOFF_ME_2: howto manager. (line 1080) +* BFD_RELOC_ARC_TLS_DTPMOD: howto manager. (line 1098) +* BFD_RELOC_ARC_TLS_DTPOFF: howto manager. (line 1104) +* BFD_RELOC_ARC_TLS_DTPOFF_S9: howto manager. (line 1105) +* BFD_RELOC_ARC_TLS_GD_CALL: howto manager. (line 1102) +* BFD_RELOC_ARC_TLS_GD_GOT: howto manager. (line 1100) +* BFD_RELOC_ARC_TLS_GD_LD: howto manager. (line 1101) +* BFD_RELOC_ARC_TLS_IE_GOT: howto manager. (line 1103) +* BFD_RELOC_ARC_TLS_LE_32: howto manager. (line 1107) +* BFD_RELOC_ARC_TLS_LE_S9: howto manager. (line 1106) +* BFD_RELOC_ARC_TLS_TPOFF: howto manager. (line 1099) +* BFD_RELOC_ARC_W: howto manager. (line 1066) +* BFD_RELOC_ARC_W_ME: howto manager. (line 1072) +* BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager. (line 916) +* BFD_RELOC_ARM_ADR_IMM: howto manager. (line 931) +* BFD_RELOC_ARM_ALU_PC_G0: howto manager. (line 878) +* BFD_RELOC_ARM_ALU_PC_G0_NC: howto manager. (line 877) +* BFD_RELOC_ARM_ALU_PC_G1: howto manager. (line 880) +* BFD_RELOC_ARM_ALU_PC_G1_NC: howto manager. (line 879) +* BFD_RELOC_ARM_ALU_PC_G2: howto manager. (line 881) +* BFD_RELOC_ARM_ALU_SB_G0: howto manager. (line 892) +* BFD_RELOC_ARM_ALU_SB_G0_NC: howto manager. (line 891) +* BFD_RELOC_ARM_ALU_SB_G1: howto manager. (line 894) +* BFD_RELOC_ARM_ALU_SB_G1_NC: howto manager. (line 893) +* BFD_RELOC_ARM_ALU_SB_G2: howto manager. (line 895) +* BFD_RELOC_ARM_CP_OFF_IMM: howto manager. (line 926) +* BFD_RELOC_ARM_CP_OFF_IMM_S2: howto manager. (line 927) +* BFD_RELOC_ARM_FUNCDESC: howto manager. (line 847) +* BFD_RELOC_ARM_FUNCDESC_VALUE: howto manager. (line 848) +* BFD_RELOC_ARM_GLOB_DAT: howto manager. (line 854) +* BFD_RELOC_ARM_GOT32: howto manager. (line 855) +* BFD_RELOC_ARM_GOTFUNCDESC: howto manager. (line 845) +* BFD_RELOC_ARM_GOTOFF: howto manager. (line 858) +* BFD_RELOC_ARM_GOTOFFFUNCDESC: howto manager. (line 846) +* BFD_RELOC_ARM_GOTPC: howto manager. (line 859) +* BFD_RELOC_ARM_GOT_PREL: howto manager. (line 860) +* BFD_RELOC_ARM_HVC: howto manager. (line 923) +* BFD_RELOC_ARM_HWLITERAL: howto manager. (line 938) +* BFD_RELOC_ARM_IMMEDIATE: howto manager. (line 915) +* BFD_RELOC_ARM_IN_POOL: howto manager. (line 934) +* BFD_RELOC_ARM_IRELATIVE: howto manager. (line 908) +* BFD_RELOC_ARM_JUMP_SLOT: howto manager. (line 853) +* BFD_RELOC_ARM_LDC_PC_G0: howto manager. (line 888) +* BFD_RELOC_ARM_LDC_PC_G1: howto manager. (line 889) +* BFD_RELOC_ARM_LDC_PC_G2: howto manager. (line 890) +* BFD_RELOC_ARM_LDC_SB_G0: howto manager. (line 902) +* BFD_RELOC_ARM_LDC_SB_G1: howto manager. (line 903) +* BFD_RELOC_ARM_LDC_SB_G2: howto manager. (line 904) +* BFD_RELOC_ARM_LDRS_PC_G0: howto manager. (line 885) +* BFD_RELOC_ARM_LDRS_PC_G1: howto manager. (line 886) +* BFD_RELOC_ARM_LDRS_PC_G2: howto manager. (line 887) +* BFD_RELOC_ARM_LDRS_SB_G0: howto manager. (line 899) +* BFD_RELOC_ARM_LDRS_SB_G1: howto manager. (line 900) +* BFD_RELOC_ARM_LDRS_SB_G2: howto manager. (line 901) +* BFD_RELOC_ARM_LDR_IMM: howto manager. (line 932) +* BFD_RELOC_ARM_LDR_PC_G0: howto manager. (line 882) +* BFD_RELOC_ARM_LDR_PC_G1: howto manager. (line 883) +* BFD_RELOC_ARM_LDR_PC_G2: howto manager. (line 884) +* BFD_RELOC_ARM_LDR_SB_G0: howto manager. (line 896) +* BFD_RELOC_ARM_LDR_SB_G1: howto manager. (line 897) +* BFD_RELOC_ARM_LDR_SB_G2: howto manager. (line 898) +* BFD_RELOC_ARM_LITERAL: howto manager. (line 933) +* BFD_RELOC_ARM_MOVT: howto manager. (line 837) +* BFD_RELOC_ARM_MOVT_PCREL: howto manager. (line 839) +* BFD_RELOC_ARM_MOVW: howto manager. (line 836) +* BFD_RELOC_ARM_MOVW_PCREL: howto manager. (line 838) +* BFD_RELOC_ARM_MULTI: howto manager. (line 925) +* BFD_RELOC_ARM_OFFSET_IMM: howto manager. (line 817) +* BFD_RELOC_ARM_OFFSET_IMM8: howto manager. (line 935) +* BFD_RELOC_ARM_PCREL_BLX: howto manager. (line 781) +* BFD_RELOC_ARM_PCREL_BRANCH: howto manager. (line 778) +* BFD_RELOC_ARM_PCREL_CALL: howto manager. (line 789) +* BFD_RELOC_ARM_PCREL_JUMP: howto manager. (line 792) +* BFD_RELOC_ARM_PLT32: howto manager. (line 856) +* BFD_RELOC_ARM_PREL31: howto manager. (line 834) +* BFD_RELOC_ARM_RELATIVE: howto manager. (line 857) +* BFD_RELOC_ARM_ROSEGREL32: howto manager. (line 826) +* BFD_RELOC_ARM_SBREL32: howto manager. (line 828) +* BFD_RELOC_ARM_SHIFT_IMM: howto manager. (line 921) +* BFD_RELOC_ARM_SMC: howto manager. (line 922) +* BFD_RELOC_ARM_SWI: howto manager. (line 924) +* BFD_RELOC_ARM_T32_ADD_IMM: howto manager. (line 918) +* BFD_RELOC_ARM_T32_ADD_PC12: howto manager. (line 920) +* BFD_RELOC_ARM_T32_CP_OFF_IMM: howto manager. (line 928) +* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2: howto manager. (line 929) +* BFD_RELOC_ARM_T32_IMM12: howto manager. (line 919) +* BFD_RELOC_ARM_T32_IMMEDIATE: howto manager. (line 917) +* BFD_RELOC_ARM_T32_OFFSET_IMM: howto manager. (line 937) +* BFD_RELOC_ARM_T32_OFFSET_U8: howto manager. (line 936) +* BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM: howto manager. (line 930) +* BFD_RELOC_ARM_TARGET1: howto manager. (line 823) +* BFD_RELOC_ARM_TARGET2: howto manager. (line 830) +* BFD_RELOC_ARM_THM_TLS_CALL: howto manager. (line 872) +* BFD_RELOC_ARM_THM_TLS_DESCSEQ: howto manager. (line 874) +* BFD_RELOC_ARM_THUMB_ADD: howto manager. (line 939) +* BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC: howto manager. (line 910) +* BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC: howto manager. (line 911) +* BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC: howto manager. (line 912) +* BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC: howto manager. (line 913) +* BFD_RELOC_ARM_THUMB_BF13: howto manager. (line 800) +* BFD_RELOC_ARM_THUMB_BF17: howto manager. (line 798) +* BFD_RELOC_ARM_THUMB_BF19: howto manager. (line 802) +* BFD_RELOC_ARM_THUMB_IMM: howto manager. (line 940) +* BFD_RELOC_ARM_THUMB_LOOP12: howto manager. (line 804) +* BFD_RELOC_ARM_THUMB_MOVT: howto manager. (line 841) +* BFD_RELOC_ARM_THUMB_MOVT_PCREL: howto manager. (line 843) +* BFD_RELOC_ARM_THUMB_MOVW: howto manager. (line 840) +* BFD_RELOC_ARM_THUMB_MOVW_PCREL: howto manager. (line 842) +* BFD_RELOC_ARM_THUMB_OFFSET: howto manager. (line 820) +* BFD_RELOC_ARM_THUMB_SHIFT: howto manager. (line 941) +* BFD_RELOC_ARM_TLS_CALL: howto manager. (line 871) +* BFD_RELOC_ARM_TLS_DESC: howto manager. (line 875) +* BFD_RELOC_ARM_TLS_DESCSEQ: howto manager. (line 873) +* BFD_RELOC_ARM_TLS_DTPMOD32: howto manager. (line 866) +* BFD_RELOC_ARM_TLS_DTPOFF32: howto manager. (line 865) +* BFD_RELOC_ARM_TLS_GD32: howto manager. (line 862) +* BFD_RELOC_ARM_TLS_GD32_FDPIC: howto manager. (line 849) +* BFD_RELOC_ARM_TLS_GOTDESC: howto manager. (line 870) +* BFD_RELOC_ARM_TLS_IE32: howto manager. (line 868) +* BFD_RELOC_ARM_TLS_IE32_FDPIC: howto manager. (line 851) +* BFD_RELOC_ARM_TLS_LDM32: howto manager. (line 864) +* BFD_RELOC_ARM_TLS_LDM32_FDPIC: howto manager. (line 850) +* BFD_RELOC_ARM_TLS_LDO32: howto manager. (line 863) +* BFD_RELOC_ARM_TLS_LE32: howto manager. (line 869) +* BFD_RELOC_ARM_TLS_TPOFF32: howto manager. (line 867) +* BFD_RELOC_ARM_V4BX: howto manager. (line 906) +* BFD_RELOC_AVR_13_PCREL: howto manager. (line 1748) +* BFD_RELOC_AVR_16_PM: howto manager. (line 1751) +* BFD_RELOC_AVR_6: howto manager. (line 1819) +* BFD_RELOC_AVR_6_ADIW: howto manager. (line 1822) +* BFD_RELOC_AVR_7_PCREL: howto manager. (line 1745) +* BFD_RELOC_AVR_8_HI: howto manager. (line 1828) +* BFD_RELOC_AVR_8_HLO: howto manager. (line 1831) +* BFD_RELOC_AVR_8_LO: howto manager. (line 1825) +* BFD_RELOC_AVR_CALL: howto manager. (line 1813) +* BFD_RELOC_AVR_DIFF16: howto manager. (line 1835) +* BFD_RELOC_AVR_DIFF32: howto manager. (line 1836) +* BFD_RELOC_AVR_DIFF8: howto manager. (line 1834) +* BFD_RELOC_AVR_HH8_LDI: howto manager. (line 1760) +* BFD_RELOC_AVR_HH8_LDI_NEG: howto manager. (line 1775) +* BFD_RELOC_AVR_HH8_LDI_PM: howto manager. (line 1798) +* BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager. (line 1809) +* BFD_RELOC_AVR_HI8_LDI: howto manager. (line 1757) +* BFD_RELOC_AVR_HI8_LDI_GS: howto manager. (line 1793) +* BFD_RELOC_AVR_HI8_LDI_NEG: howto manager. (line 1771) +* BFD_RELOC_AVR_HI8_LDI_PM: howto manager. (line 1790) +* BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager. (line 1805) +* BFD_RELOC_AVR_LDI: howto manager. (line 1816) +* BFD_RELOC_AVR_LDS_STS_16: howto manager. (line 1843) +* BFD_RELOC_AVR_LO8_LDI: howto manager. (line 1754) +* BFD_RELOC_AVR_LO8_LDI_GS: howto manager. (line 1785) +* BFD_RELOC_AVR_LO8_LDI_NEG: howto manager. (line 1767) +* BFD_RELOC_AVR_LO8_LDI_PM: howto manager. (line 1782) +* BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager. (line 1802) +* BFD_RELOC_AVR_MS8_LDI: howto manager. (line 1764) +* BFD_RELOC_AVR_MS8_LDI_NEG: howto manager. (line 1779) +* BFD_RELOC_AVR_PORT5: howto manager. (line 1849) +* BFD_RELOC_AVR_PORT6: howto manager. (line 1846) +* BFD_RELOC_BFIN_10_PCREL: howto manager. (line 1123) +* BFD_RELOC_BFIN_11_PCREL: howto manager. (line 1125) +* BFD_RELOC_BFIN_12_PCREL_JUMP: howto manager. (line 1127) +* BFD_RELOC_BFIN_12_PCREL_JUMP_S: howto manager. (line 1129) +* BFD_RELOC_BFIN_16_HIGH: howto manager. (line 1115) +* BFD_RELOC_BFIN_16_IMM: howto manager. (line 1113) +* BFD_RELOC_BFIN_16_LOW: howto manager. (line 1121) +* BFD_RELOC_BFIN_24_PCREL_CALL_X: howto manager. (line 1131) +* BFD_RELOC_BFIN_24_PCREL_JUMP_L: howto manager. (line 1133) +* BFD_RELOC_BFIN_4_PCREL: howto manager. (line 1117) +* BFD_RELOC_BFIN_5_PCREL: howto manager. (line 1119) +* BFD_RELOC_BFIN_FUNCDESC: howto manager. (line 1138) +* BFD_RELOC_BFIN_FUNCDESC_GOT17M4: howto manager. (line 1139) +* BFD_RELOC_BFIN_FUNCDESC_GOTHI: howto manager. (line 1140) +* BFD_RELOC_BFIN_FUNCDESC_GOTLO: howto manager. (line 1141) +* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4: howto manager. (line 1143) +* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI: howto manager. (line 1144) +* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO: howto manager. (line 1145) +* BFD_RELOC_BFIN_FUNCDESC_VALUE: howto manager. (line 1142) +* BFD_RELOC_BFIN_GOT: howto manager. (line 1150) +* BFD_RELOC_BFIN_GOT17M4: howto manager. (line 1135) +* BFD_RELOC_BFIN_GOTHI: howto manager. (line 1136) +* BFD_RELOC_BFIN_GOTLO: howto manager. (line 1137) +* BFD_RELOC_BFIN_GOTOFF17M4: howto manager. (line 1146) +* BFD_RELOC_BFIN_GOTOFFHI: howto manager. (line 1147) +* BFD_RELOC_BFIN_GOTOFFLO: howto manager. (line 1148) +* BFD_RELOC_BFIN_PLTPC: howto manager. (line 1152) +* BFD_RELOC_BPF_64: howto manager. (line 3438) +* BFD_RELOC_BPF_DISP16: howto manager. (line 3441) +* BFD_RELOC_BPF_DISP32: howto manager. (line 3439) +* BFD_RELOC_BPF_DISPCALL32: howto manager. (line 3440) +* BFD_RELOC_C6000_ABS_H16: howto manager. (line 1590) +* BFD_RELOC_C6000_ABS_L16: howto manager. (line 1589) +* BFD_RELOC_C6000_ABS_S16: howto manager. (line 1588) +* BFD_RELOC_C6000_ALIGN: howto manager. (line 1611) +* BFD_RELOC_C6000_COPY: howto manager. (line 1606) +* BFD_RELOC_C6000_DSBT_INDEX: howto manager. (line 1604) +* BFD_RELOC_C6000_EHTYPE: howto manager. (line 1608) +* BFD_RELOC_C6000_FPHEAD: howto manager. (line 1612) +* BFD_RELOC_C6000_JUMP_SLOT: howto manager. (line 1607) +* BFD_RELOC_C6000_NOCMP: howto manager. (line 1613) +* BFD_RELOC_C6000_PCR_H16: howto manager. (line 1609) +* BFD_RELOC_C6000_PCR_L16: howto manager. (line 1610) +* BFD_RELOC_C6000_PCR_S10: howto manager. (line 1586) +* BFD_RELOC_C6000_PCR_S12: howto manager. (line 1585) +* BFD_RELOC_C6000_PCR_S21: howto manager. (line 1584) +* BFD_RELOC_C6000_PCR_S7: howto manager. (line 1587) +* BFD_RELOC_C6000_PREL31: howto manager. (line 1605) +* BFD_RELOC_C6000_SBR_GOT_H16_W: howto manager. (line 1603) +* BFD_RELOC_C6000_SBR_GOT_L16_W: howto manager. (line 1602) +* BFD_RELOC_C6000_SBR_GOT_U15_W: howto manager. (line 1601) +* BFD_RELOC_C6000_SBR_H16_B: howto manager. (line 1598) +* BFD_RELOC_C6000_SBR_H16_H: howto manager. (line 1599) +* BFD_RELOC_C6000_SBR_H16_W: howto manager. (line 1600) +* BFD_RELOC_C6000_SBR_L16_B: howto manager. (line 1595) +* BFD_RELOC_C6000_SBR_L16_H: howto manager. (line 1596) +* BFD_RELOC_C6000_SBR_L16_W: howto manager. (line 1597) +* BFD_RELOC_C6000_SBR_S16: howto manager. (line 1594) +* BFD_RELOC_C6000_SBR_U15_B: howto manager. (line 1591) +* BFD_RELOC_C6000_SBR_U15_H: howto manager. (line 1592) +* BFD_RELOC_C6000_SBR_U15_W: howto manager. (line 1593) +* BFD_RELOC_CKCORE_ADDR32: howto manager. (line 3478) +* BFD_RELOC_CKCORE_ADDRGOT: howto manager. (line 3494) +* BFD_RELOC_CKCORE_ADDRGOT_HI16: howto manager. (line 3513) +* BFD_RELOC_CKCORE_ADDRGOT_LO16: howto manager. (line 3514) +* BFD_RELOC_CKCORE_ADDRPLT: howto manager. (line 3495) +* BFD_RELOC_CKCORE_ADDRPLT_HI16: howto manager. (line 3515) +* BFD_RELOC_CKCORE_ADDRPLT_LO16: howto manager. (line 3516) +* BFD_RELOC_CKCORE_ADDR_HI16: howto manager. (line 3501) +* BFD_RELOC_CKCORE_ADDR_LO16: howto manager. (line 3502) +* BFD_RELOC_CKCORE_CALLGRAPH: howto manager. (line 3538) +* BFD_RELOC_CKCORE_COPY: howto manager. (line 3487) +* BFD_RELOC_CKCORE_DOFFSET_IMM18: howto manager. (line 3521) +* BFD_RELOC_CKCORE_DOFFSET_IMM18BY2: howto manager. (line 3522) +* BFD_RELOC_CKCORE_DOFFSET_IMM18BY4: howto manager. (line 3523) +* BFD_RELOC_CKCORE_DOFFSET_LO16: howto manager. (line 3519) +* BFD_RELOC_CKCORE_GLOB_DAT: howto manager. (line 3488) +* BFD_RELOC_CKCORE_GNU_VTENTRY: howto manager. (line 3485) +* BFD_RELOC_CKCORE_GNU_VTINHERIT: howto manager. (line 3484) +* BFD_RELOC_CKCORE_GOT12: howto manager. (line 3507) +* BFD_RELOC_CKCORE_GOT32: howto manager. (line 3492) +* BFD_RELOC_CKCORE_GOTOFF: howto manager. (line 3490) +* BFD_RELOC_CKCORE_GOTOFF_HI16: howto manager. (line 3505) +* BFD_RELOC_CKCORE_GOTOFF_IMM18: howto manager. (line 3524) +* BFD_RELOC_CKCORE_GOTOFF_LO16: howto manager. (line 3506) +* BFD_RELOC_CKCORE_GOTPC: howto manager. (line 3491) +* BFD_RELOC_CKCORE_GOTPC_HI16: howto manager. (line 3503) +* BFD_RELOC_CKCORE_GOTPC_LO16: howto manager. (line 3504) +* BFD_RELOC_CKCORE_GOT_HI16: howto manager. (line 3508) +* BFD_RELOC_CKCORE_GOT_IMM18BY4: howto manager. (line 3525) +* BFD_RELOC_CKCORE_GOT_LO16: howto manager. (line 3509) +* BFD_RELOC_CKCORE_IRELATIVE: howto manager. (line 3539) +* BFD_RELOC_CKCORE_JUMP_SLOT: howto manager. (line 3489) +* BFD_RELOC_CKCORE_NOJSRI: howto manager. (line 3537) +* BFD_RELOC_CKCORE_NONE: howto manager. (line 3477) +* BFD_RELOC_CKCORE_PCREL32: howto manager. (line 3482) +* BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4: howto manager. (line 3541) +* BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4: howto manager. (line 3540) +* BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4: howto manager. (line 3536) +* BFD_RELOC_CKCORE_PCREL_IMM10BY2: howto manager. (line 3499) +* BFD_RELOC_CKCORE_PCREL_IMM10BY4: howto manager. (line 3500) +* BFD_RELOC_CKCORE_PCREL_IMM11BY2: howto manager. (line 3480) +* BFD_RELOC_CKCORE_PCREL_IMM16BY2: howto manager. (line 3497) +* BFD_RELOC_CKCORE_PCREL_IMM16BY4: howto manager. (line 3498) +* BFD_RELOC_CKCORE_PCREL_IMM18BY2: howto manager. (line 3520) +* BFD_RELOC_CKCORE_PCREL_IMM26BY2: howto manager. (line 3496) +* BFD_RELOC_CKCORE_PCREL_IMM4BY2: howto manager. (line 3481) +* BFD_RELOC_CKCORE_PCREL_IMM7BY4: howto manager. (line 3527) +* BFD_RELOC_CKCORE_PCREL_IMM8BY4: howto manager. (line 3479) +* BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2: howto manager. (line 3483) +* BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2: howto manager. (line 3517) +* BFD_RELOC_CKCORE_PLT12: howto manager. (line 3510) +* BFD_RELOC_CKCORE_PLT32: howto manager. (line 3493) +* BFD_RELOC_CKCORE_PLT_HI16: howto manager. (line 3511) +* BFD_RELOC_CKCORE_PLT_IMM18BY4: howto manager. (line 3526) +* BFD_RELOC_CKCORE_PLT_LO16: howto manager. (line 3512) +* BFD_RELOC_CKCORE_RELATIVE: howto manager. (line 3486) +* BFD_RELOC_CKCORE_TLS_DTPMOD32: howto manager. (line 3533) +* BFD_RELOC_CKCORE_TLS_DTPOFF32: howto manager. (line 3534) +* BFD_RELOC_CKCORE_TLS_GD32: howto manager. (line 3530) +* BFD_RELOC_CKCORE_TLS_IE32: howto manager. (line 3529) +* BFD_RELOC_CKCORE_TLS_LDM32: howto manager. (line 3531) +* BFD_RELOC_CKCORE_TLS_LDO32: howto manager. (line 3532) +* BFD_RELOC_CKCORE_TLS_LE32: howto manager. (line 3528) +* BFD_RELOC_CKCORE_TLS_TPOFF32: howto manager. (line 3535) +* BFD_RELOC_CKCORE_TOFFSET_LO16: howto manager. (line 3518) +* bfd_reloc_code_real_type: howto manager. (line 9) +* BFD_RELOC_CR16_ABS20: howto manager. (line 2292) +* BFD_RELOC_CR16_ABS24: howto manager. (line 2293) +* BFD_RELOC_CR16_DISP16: howto manager. (line 2303) +* BFD_RELOC_CR16_DISP20: howto manager. (line 2304) +* BFD_RELOC_CR16_DISP24: howto manager. (line 2305) +* BFD_RELOC_CR16_DISP24a: howto manager. (line 2306) +* BFD_RELOC_CR16_DISP4: howto manager. (line 2301) +* BFD_RELOC_CR16_DISP8: howto manager. (line 2302) +* BFD_RELOC_CR16_GLOB_DAT: howto manager. (line 2312) +* BFD_RELOC_CR16_GOTC_REGREL20: howto manager. (line 2311) +* BFD_RELOC_CR16_GOT_REGREL20: howto manager. (line 2310) +* BFD_RELOC_CR16_IMM16: howto manager. (line 2296) +* BFD_RELOC_CR16_IMM20: howto manager. (line 2297) +* BFD_RELOC_CR16_IMM24: howto manager. (line 2298) +* BFD_RELOC_CR16_IMM32: howto manager. (line 2299) +* BFD_RELOC_CR16_IMM32a: howto manager. (line 2300) +* BFD_RELOC_CR16_IMM4: howto manager. (line 2294) +* BFD_RELOC_CR16_IMM8: howto manager. (line 2295) +* BFD_RELOC_CR16_NUM16: howto manager. (line 2281) +* BFD_RELOC_CR16_NUM32: howto manager. (line 2282) +* BFD_RELOC_CR16_NUM32a: howto manager. (line 2283) +* BFD_RELOC_CR16_NUM8: howto manager. (line 2280) +* BFD_RELOC_CR16_REGREL0: howto manager. (line 2284) +* BFD_RELOC_CR16_REGREL14: howto manager. (line 2287) +* BFD_RELOC_CR16_REGREL14a: howto manager. (line 2288) +* BFD_RELOC_CR16_REGREL16: howto manager. (line 2289) +* BFD_RELOC_CR16_REGREL20: howto manager. (line 2290) +* BFD_RELOC_CR16_REGREL20a: howto manager. (line 2291) +* BFD_RELOC_CR16_REGREL4: howto manager. (line 2285) +* BFD_RELOC_CR16_REGREL4a: howto manager. (line 2286) +* BFD_RELOC_CR16_SWITCH16: howto manager. (line 2308) +* BFD_RELOC_CR16_SWITCH32: howto manager. (line 2309) +* BFD_RELOC_CR16_SWITCH8: howto manager. (line 2307) +* BFD_RELOC_CRIS_16_DTPREL: howto manager. (line 2372) +* BFD_RELOC_CRIS_16_GOT: howto manager. (line 2354) +* BFD_RELOC_CRIS_16_GOTPLT: howto manager. (line 2358) +* BFD_RELOC_CRIS_16_GOT_GD: howto manager. (line 2368) +* BFD_RELOC_CRIS_16_GOT_TPREL: howto manager. (line 2374) +* BFD_RELOC_CRIS_16_TPREL: howto manager. (line 2376) +* BFD_RELOC_CRIS_32_DTPREL: howto manager. (line 2371) +* BFD_RELOC_CRIS_32_GD: howto manager. (line 2369) +* BFD_RELOC_CRIS_32_GOT: howto manager. (line 2352) +* BFD_RELOC_CRIS_32_GOTPLT: howto manager. (line 2356) +* BFD_RELOC_CRIS_32_GOTREL: howto manager. (line 2360) +* BFD_RELOC_CRIS_32_GOT_GD: howto manager. (line 2367) +* BFD_RELOC_CRIS_32_GOT_TPREL: howto manager. (line 2373) +* BFD_RELOC_CRIS_32_IE: howto manager. (line 2378) +* BFD_RELOC_CRIS_32_PLT_GOTREL: howto manager. (line 2362) +* BFD_RELOC_CRIS_32_PLT_PCREL: howto manager. (line 2364) +* BFD_RELOC_CRIS_32_TPREL: howto manager. (line 2375) +* BFD_RELOC_CRIS_BDISP8: howto manager. (line 2335) +* BFD_RELOC_CRIS_COPY: howto manager. (line 2347) +* BFD_RELOC_CRIS_DTP: howto manager. (line 2370) +* BFD_RELOC_CRIS_DTPMOD: howto manager. (line 2377) +* BFD_RELOC_CRIS_GLOB_DAT: howto manager. (line 2348) +* BFD_RELOC_CRIS_JUMP_SLOT: howto manager. (line 2349) +* BFD_RELOC_CRIS_LAPCQ_OFFSET: howto manager. (line 2343) +* BFD_RELOC_CRIS_RELATIVE: howto manager. (line 2350) +* BFD_RELOC_CRIS_SIGNED_16: howto manager. (line 2341) +* BFD_RELOC_CRIS_SIGNED_6: howto manager. (line 2337) +* BFD_RELOC_CRIS_SIGNED_8: howto manager. (line 2339) +* BFD_RELOC_CRIS_UNSIGNED_16: howto manager. (line 2342) +* BFD_RELOC_CRIS_UNSIGNED_4: howto manager. (line 2344) +* BFD_RELOC_CRIS_UNSIGNED_5: howto manager. (line 2336) +* BFD_RELOC_CRIS_UNSIGNED_6: howto manager. (line 2338) +* BFD_RELOC_CRIS_UNSIGNED_8: howto manager. (line 2340) +* BFD_RELOC_CRX_ABS16: howto manager. (line 2324) +* BFD_RELOC_CRX_ABS32: howto manager. (line 2325) +* BFD_RELOC_CRX_IMM16: howto manager. (line 2329) +* BFD_RELOC_CRX_IMM32: howto manager. (line 2330) +* BFD_RELOC_CRX_NUM16: howto manager. (line 2327) +* BFD_RELOC_CRX_NUM32: howto manager. (line 2328) +* BFD_RELOC_CRX_NUM8: howto manager. (line 2326) +* BFD_RELOC_CRX_REGREL12: howto manager. (line 2320) +* BFD_RELOC_CRX_REGREL22: howto manager. (line 2321) +* BFD_RELOC_CRX_REGREL28: howto manager. (line 2322) +* BFD_RELOC_CRX_REGREL32: howto manager. (line 2323) +* BFD_RELOC_CRX_REL16: howto manager. (line 2317) +* BFD_RELOC_CRX_REL24: howto manager. (line 2318) +* BFD_RELOC_CRX_REL32: howto manager. (line 2319) +* BFD_RELOC_CRX_REL4: howto manager. (line 2314) +* BFD_RELOC_CRX_REL8: howto manager. (line 2315) +* BFD_RELOC_CRX_REL8_CMP: howto manager. (line 2316) +* BFD_RELOC_CRX_SWITCH16: howto manager. (line 2332) +* BFD_RELOC_CRX_SWITCH32: howto manager. (line 2333) +* BFD_RELOC_CRX_SWITCH8: howto manager. (line 2331) +* BFD_RELOC_CTOR: howto manager. (line 773) +* BFD_RELOC_D10V_10_PCREL_L: howto manager. (line 1197) +* BFD_RELOC_D10V_10_PCREL_R: howto manager. (line 1194) +* BFD_RELOC_D10V_18: howto manager. (line 1201) +* BFD_RELOC_D10V_18_PCREL: howto manager. (line 1203) +* BFD_RELOC_D30V_15: howto manager. (line 1214) +* BFD_RELOC_D30V_15_PCREL: howto manager. (line 1217) +* BFD_RELOC_D30V_15_PCREL_R: howto manager. (line 1220) +* BFD_RELOC_D30V_21: howto manager. (line 1224) +* BFD_RELOC_D30V_21_PCREL: howto manager. (line 1227) +* BFD_RELOC_D30V_21_PCREL_R: howto manager. (line 1230) +* BFD_RELOC_D30V_32: howto manager. (line 1234) +* BFD_RELOC_D30V_32_PCREL: howto manager. (line 1236) +* BFD_RELOC_D30V_6: howto manager. (line 1205) +* BFD_RELOC_D30V_9_PCREL: howto manager. (line 1207) +* BFD_RELOC_D30V_9_PCREL_R: howto manager. (line 1210) +* BFD_RELOC_DLX_HI16_S: howto manager. (line 1238) +* BFD_RELOC_DLX_JMP26: howto manager. (line 1242) +* BFD_RELOC_DLX_LO16: howto manager. (line 1240) +* BFD_RELOC_EPIPHANY_HIGH: howto manager. (line 3447) +* BFD_RELOC_EPIPHANY_IMM11: howto manager. (line 3453) +* BFD_RELOC_EPIPHANY_IMM8: howto manager. (line 3456) +* BFD_RELOC_EPIPHANY_LOW: howto manager. (line 3449) +* BFD_RELOC_EPIPHANY_SIMM11: howto manager. (line 3451) +* BFD_RELOC_EPIPHANY_SIMM24: howto manager. (line 3445) +* BFD_RELOC_EPIPHANY_SIMM8: howto manager. (line 3443) +* BFD_RELOC_FR30_10_IN_8: howto manager. (line 1629) +* BFD_RELOC_FR30_12_PCREL: howto manager. (line 1635) +* BFD_RELOC_FR30_20: howto manager. (line 1617) +* BFD_RELOC_FR30_48: howto manager. (line 1615) +* BFD_RELOC_FR30_6_IN_4: howto manager. (line 1620) +* BFD_RELOC_FR30_8_IN_8: howto manager. (line 1623) +* BFD_RELOC_FR30_9_IN_8: howto manager. (line 1626) +* BFD_RELOC_FR30_9_PCREL: howto manager. (line 1632) +* BFD_RELOC_FRV_FUNCDESC: howto manager. (line 451) +* BFD_RELOC_FRV_FUNCDESC_GOT12: howto manager. (line 452) +* BFD_RELOC_FRV_FUNCDESC_GOTHI: howto manager. (line 453) +* BFD_RELOC_FRV_FUNCDESC_GOTLO: howto manager. (line 454) +* BFD_RELOC_FRV_FUNCDESC_GOTOFF12: howto manager. (line 456) +* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: howto manager. (line 457) +* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: howto manager. (line 458) +* BFD_RELOC_FRV_FUNCDESC_VALUE: howto manager. (line 455) +* BFD_RELOC_FRV_GETTLSOFF: howto manager. (line 462) +* BFD_RELOC_FRV_GETTLSOFF_RELAX: howto manager. (line 475) +* BFD_RELOC_FRV_GOT12: howto manager. (line 448) +* BFD_RELOC_FRV_GOTHI: howto manager. (line 449) +* BFD_RELOC_FRV_GOTLO: howto manager. (line 450) +* BFD_RELOC_FRV_GOTOFF12: howto manager. (line 459) +* BFD_RELOC_FRV_GOTOFFHI: howto manager. (line 460) +* BFD_RELOC_FRV_GOTOFFLO: howto manager. (line 461) +* BFD_RELOC_FRV_GOTTLSDESC12: howto manager. (line 464) +* BFD_RELOC_FRV_GOTTLSDESCHI: howto manager. (line 465) +* BFD_RELOC_FRV_GOTTLSDESCLO: howto manager. (line 466) +* BFD_RELOC_FRV_GOTTLSOFF12: howto manager. (line 470) +* BFD_RELOC_FRV_GOTTLSOFFHI: howto manager. (line 471) +* BFD_RELOC_FRV_GOTTLSOFFLO: howto manager. (line 472) +* BFD_RELOC_FRV_GPREL12: howto manager. (line 443) +* BFD_RELOC_FRV_GPREL32: howto manager. (line 445) +* BFD_RELOC_FRV_GPRELHI: howto manager. (line 446) +* BFD_RELOC_FRV_GPRELLO: howto manager. (line 447) +* BFD_RELOC_FRV_GPRELU12: howto manager. (line 444) +* BFD_RELOC_FRV_HI16: howto manager. (line 442) +* BFD_RELOC_FRV_LABEL16: howto manager. (line 439) +* BFD_RELOC_FRV_LABEL24: howto manager. (line 440) +* BFD_RELOC_FRV_LO16: howto manager. (line 441) +* BFD_RELOC_FRV_TLSDESC_RELAX: howto manager. (line 474) +* BFD_RELOC_FRV_TLSDESC_VALUE: howto manager. (line 463) +* BFD_RELOC_FRV_TLSMOFF: howto manager. (line 477) +* BFD_RELOC_FRV_TLSMOFF12: howto manager. (line 467) +* BFD_RELOC_FRV_TLSMOFFHI: howto manager. (line 468) +* BFD_RELOC_FRV_TLSMOFFLO: howto manager. (line 469) +* BFD_RELOC_FRV_TLSOFF: howto manager. (line 473) +* BFD_RELOC_FRV_TLSOFF_RELAX: howto manager. (line 476) +* BFD_RELOC_FT32_10: howto manager. (line 429) +* BFD_RELOC_FT32_15: howto manager. (line 436) +* BFD_RELOC_FT32_17: howto manager. (line 431) +* BFD_RELOC_FT32_18: howto manager. (line 432) +* BFD_RELOC_FT32_20: howto manager. (line 430) +* BFD_RELOC_FT32_DIFF32: howto manager. (line 437) +* BFD_RELOC_FT32_RELAX: howto manager. (line 433) +* BFD_RELOC_FT32_SC0: howto manager. (line 434) +* BFD_RELOC_FT32_SC1: howto manager. (line 435) +* BFD_RELOC_GPREL16: howto manager. (line 112) +* BFD_RELOC_GPREL32: howto manager. (line 113) +* BFD_RELOC_H8_DIR16A8: howto manager. (line 2421) +* BFD_RELOC_H8_DIR16R8: howto manager. (line 2422) +* BFD_RELOC_H8_DIR24A8: howto manager. (line 2423) +* BFD_RELOC_H8_DIR24R8: howto manager. (line 2424) +* BFD_RELOC_H8_DIR32A16: howto manager. (line 2425) +* BFD_RELOC_H8_DISP32A16: howto manager. (line 2426) +* BFD_RELOC_HI16: howto manager. (line 312) +* BFD_RELOC_HI16_BASEREL: howto manager. (line 92) +* BFD_RELOC_HI16_GOTOFF: howto manager. (line 51) +* BFD_RELOC_HI16_PCREL: howto manager. (line 321) +* BFD_RELOC_HI16_PLTOFF: howto manager. (line 63) +* BFD_RELOC_HI16_S: howto manager. (line 314) +* BFD_RELOC_HI16_S_BASEREL: howto manager. (line 93) +* BFD_RELOC_HI16_S_GOTOFF: howto manager. (line 52) +* BFD_RELOC_HI16_S_PCREL: howto manager. (line 323) +* BFD_RELOC_HI16_S_PLTOFF: howto manager. (line 64) +* BFD_RELOC_HI22: howto manager. (line 108) +* BFD_RELOC_I370_D12: howto manager. (line 771) +* BFD_RELOC_IA64_COPY: howto manager. (line 2178) +* BFD_RELOC_IA64_DIR32LSB: howto manager. (line 2123) +* BFD_RELOC_IA64_DIR32MSB: howto manager. (line 2122) +* BFD_RELOC_IA64_DIR64LSB: howto manager. (line 2125) +* BFD_RELOC_IA64_DIR64MSB: howto manager. (line 2124) +* BFD_RELOC_IA64_DTPMOD64LSB: howto manager. (line 2188) +* BFD_RELOC_IA64_DTPMOD64MSB: howto manager. (line 2187) +* BFD_RELOC_IA64_DTPREL14: howto manager. (line 2190) +* BFD_RELOC_IA64_DTPREL22: howto manager. (line 2191) +* BFD_RELOC_IA64_DTPREL32LSB: howto manager. (line 2194) +* BFD_RELOC_IA64_DTPREL32MSB: howto manager. (line 2193) +* BFD_RELOC_IA64_DTPREL64I: howto manager. (line 2192) +* BFD_RELOC_IA64_DTPREL64LSB: howto manager. (line 2196) +* BFD_RELOC_IA64_DTPREL64MSB: howto manager. (line 2195) +* BFD_RELOC_IA64_FPTR32LSB: howto manager. (line 2140) +* BFD_RELOC_IA64_FPTR32MSB: howto manager. (line 2139) +* BFD_RELOC_IA64_FPTR64I: howto manager. (line 2138) +* BFD_RELOC_IA64_FPTR64LSB: howto manager. (line 2142) +* BFD_RELOC_IA64_FPTR64MSB: howto manager. (line 2141) +* BFD_RELOC_IA64_GPREL22: howto manager. (line 2126) +* BFD_RELOC_IA64_GPREL32LSB: howto manager. (line 2129) +* BFD_RELOC_IA64_GPREL32MSB: howto manager. (line 2128) +* BFD_RELOC_IA64_GPREL64I: howto manager. (line 2127) +* BFD_RELOC_IA64_GPREL64LSB: howto manager. (line 2131) +* BFD_RELOC_IA64_GPREL64MSB: howto manager. (line 2130) +* BFD_RELOC_IA64_IMM14: howto manager. (line 2119) +* BFD_RELOC_IA64_IMM22: howto manager. (line 2120) +* BFD_RELOC_IA64_IMM64: howto manager. (line 2121) +* BFD_RELOC_IA64_IPLTLSB: howto manager. (line 2177) +* BFD_RELOC_IA64_IPLTMSB: howto manager. (line 2176) +* BFD_RELOC_IA64_LDXMOV: howto manager. (line 2180) +* BFD_RELOC_IA64_LTOFF22: howto manager. (line 2132) +* BFD_RELOC_IA64_LTOFF22X: howto manager. (line 2179) +* BFD_RELOC_IA64_LTOFF64I: howto manager. (line 2133) +* BFD_RELOC_IA64_LTOFF_DTPMOD22: howto manager. (line 2189) +* BFD_RELOC_IA64_LTOFF_DTPREL22: howto manager. (line 2197) +* BFD_RELOC_IA64_LTOFF_FPTR22: howto manager. (line 2154) +* BFD_RELOC_IA64_LTOFF_FPTR32LSB: howto manager. (line 2157) +* BFD_RELOC_IA64_LTOFF_FPTR32MSB: howto manager. (line 2156) +* BFD_RELOC_IA64_LTOFF_FPTR64I: howto manager. (line 2155) +* BFD_RELOC_IA64_LTOFF_FPTR64LSB: howto manager. (line 2159) +* BFD_RELOC_IA64_LTOFF_FPTR64MSB: howto manager. (line 2158) +* BFD_RELOC_IA64_LTOFF_TPREL22: howto manager. (line 2186) +* BFD_RELOC_IA64_LTV32LSB: howto manager. (line 2173) +* BFD_RELOC_IA64_LTV32MSB: howto manager. (line 2172) +* BFD_RELOC_IA64_LTV64LSB: howto manager. (line 2175) +* BFD_RELOC_IA64_LTV64MSB: howto manager. (line 2174) +* BFD_RELOC_IA64_PCREL21B: howto manager. (line 2143) +* BFD_RELOC_IA64_PCREL21BI: howto manager. (line 2144) +* BFD_RELOC_IA64_PCREL21F: howto manager. (line 2146) +* BFD_RELOC_IA64_PCREL21M: howto manager. (line 2145) +* BFD_RELOC_IA64_PCREL22: howto manager. (line 2147) +* BFD_RELOC_IA64_PCREL32LSB: howto manager. (line 2151) +* BFD_RELOC_IA64_PCREL32MSB: howto manager. (line 2150) +* BFD_RELOC_IA64_PCREL60B: howto manager. (line 2148) +* BFD_RELOC_IA64_PCREL64I: howto manager. (line 2149) +* BFD_RELOC_IA64_PCREL64LSB: howto manager. (line 2153) +* BFD_RELOC_IA64_PCREL64MSB: howto manager. (line 2152) +* BFD_RELOC_IA64_PLTOFF22: howto manager. (line 2134) +* BFD_RELOC_IA64_PLTOFF64I: howto manager. (line 2135) +* BFD_RELOC_IA64_PLTOFF64LSB: howto manager. (line 2137) +* BFD_RELOC_IA64_PLTOFF64MSB: howto manager. (line 2136) +* BFD_RELOC_IA64_REL32LSB: howto manager. (line 2169) +* BFD_RELOC_IA64_REL32MSB: howto manager. (line 2168) +* BFD_RELOC_IA64_REL64LSB: howto manager. (line 2171) +* BFD_RELOC_IA64_REL64MSB: howto manager. (line 2170) +* BFD_RELOC_IA64_SECREL32LSB: howto manager. (line 2165) +* BFD_RELOC_IA64_SECREL32MSB: howto manager. (line 2164) +* BFD_RELOC_IA64_SECREL64LSB: howto manager. (line 2167) +* BFD_RELOC_IA64_SECREL64MSB: howto manager. (line 2166) +* BFD_RELOC_IA64_SEGREL32LSB: howto manager. (line 2161) +* BFD_RELOC_IA64_SEGREL32MSB: howto manager. (line 2160) +* BFD_RELOC_IA64_SEGREL64LSB: howto manager. (line 2163) +* BFD_RELOC_IA64_SEGREL64MSB: howto manager. (line 2162) +* BFD_RELOC_IA64_TPREL14: howto manager. (line 2181) +* BFD_RELOC_IA64_TPREL22: howto manager. (line 2182) +* BFD_RELOC_IA64_TPREL64I: howto manager. (line 2183) +* BFD_RELOC_IA64_TPREL64LSB: howto manager. (line 2185) +* BFD_RELOC_IA64_TPREL64MSB: howto manager. (line 2184) +* BFD_RELOC_IP2K_ADDR16CJP: howto manager. (line 2080) +* BFD_RELOC_IP2K_BANK: howto manager. (line 2078) +* BFD_RELOC_IP2K_EX8DATA: howto manager. (line 2086) +* BFD_RELOC_IP2K_FR9: howto manager. (line 2076) +* BFD_RELOC_IP2K_FR_OFFSET: howto manager. (line 2095) +* BFD_RELOC_IP2K_HI8DATA: howto manager. (line 2085) +* BFD_RELOC_IP2K_HI8INSN: howto manager. (line 2089) +* BFD_RELOC_IP2K_LO8DATA: howto manager. (line 2084) +* BFD_RELOC_IP2K_LO8INSN: howto manager. (line 2088) +* BFD_RELOC_IP2K_PAGE3: howto manager. (line 2082) +* BFD_RELOC_IP2K_PC_SKIP: howto manager. (line 2091) +* BFD_RELOC_IP2K_TEXT: howto manager. (line 2093) +* BFD_RELOC_IQ2000_OFFSET_16: howto manager. (line 2557) +* BFD_RELOC_IQ2000_OFFSET_21: howto manager. (line 2558) +* BFD_RELOC_IQ2000_UHI16: howto manager. (line 2559) +* BFD_RELOC_KVX_16: howto manager. (line 2802) +* BFD_RELOC_KVX_32: howto manager. (line 2803) +* BFD_RELOC_KVX_32_GOT: howto manager. (line 2830) +* BFD_RELOC_KVX_32_GOTOFF: howto manager. (line 2828) +* BFD_RELOC_KVX_32_PCREL: howto manager. (line 2808) +* BFD_RELOC_KVX_64: howto manager. (line 2804) +* BFD_RELOC_KVX_64_DTPMOD: howto manager. (line 2855) +* BFD_RELOC_KVX_64_DTPOFF: howto manager. (line 2856) +* BFD_RELOC_KVX_64_GOT: howto manager. (line 2836) +* BFD_RELOC_KVX_64_GOTOFF: howto manager. (line 2829) +* BFD_RELOC_KVX_64_PCREL: howto manager. (line 2817) +* BFD_RELOC_KVX_64_TPOFF: howto manager. (line 2872) +* BFD_RELOC_KVX_8: howto manager. (line 2883) +* BFD_RELOC_KVX_COPY: howto manager. (line 2838) +* BFD_RELOC_KVX_GLOB_DAT: howto manager. (line 2837) +* BFD_RELOC_KVX_JMP_SLOT: howto manager. (line 2839) +* BFD_RELOC_KVX_NONE: howto manager. (line 2800) +* BFD_RELOC_KVX_PCREL17: howto manager. (line 2806) +* BFD_RELOC_KVX_PCREL27: howto manager. (line 2807) +* BFD_RELOC_KVX_RELATIVE: howto manager. (line 2840) +* BFD_RELOC_KVX_RELOC_END: howto manager. (line 2885) +* BFD_RELOC_KVX_RELOC_START: howto manager. (line 2795) +* BFD_RELOC_KVX_S16: howto manager. (line 2818) +* BFD_RELOC_KVX_S16_PCREL: howto manager. (line 2805) +* BFD_RELOC_KVX_S32_LO5: howto manager. (line 2819) +* BFD_RELOC_KVX_S32_UP27: howto manager. (line 2820) +* BFD_RELOC_KVX_S37_GOTADDR_LO10: howto manager. (line 2847) +* BFD_RELOC_KVX_S37_GOTADDR_UP27: howto manager. (line 2848) +* BFD_RELOC_KVX_S37_GOTOFF_LO10: howto manager. (line 2823) +* BFD_RELOC_KVX_S37_GOTOFF_UP27: howto manager. (line 2824) +* BFD_RELOC_KVX_S37_GOT_LO10: howto manager. (line 2831) +* BFD_RELOC_KVX_S37_GOT_UP27: howto manager. (line 2832) +* BFD_RELOC_KVX_S37_LO10: howto manager. (line 2821) +* BFD_RELOC_KVX_S37_PCREL_LO10: howto manager. (line 2809) +* BFD_RELOC_KVX_S37_PCREL_UP27: howto manager. (line 2810) +* BFD_RELOC_KVX_S37_TLS_DTPOFF_LO10: howto manager. (line 2857) +* BFD_RELOC_KVX_S37_TLS_DTPOFF_UP27: howto manager. (line 2858) +* BFD_RELOC_KVX_S37_TLS_GD_LO10: howto manager. (line 2862) +* BFD_RELOC_KVX_S37_TLS_GD_UP27: howto manager. (line 2863) +* BFD_RELOC_KVX_S37_TLS_IE_LO10: howto manager. (line 2873) +* BFD_RELOC_KVX_S37_TLS_IE_UP27: howto manager. (line 2874) +* BFD_RELOC_KVX_S37_TLS_LD_LO10: howto manager. (line 2867) +* BFD_RELOC_KVX_S37_TLS_LD_UP27: howto manager. (line 2868) +* BFD_RELOC_KVX_S37_TLS_LE_LO10: howto manager. (line 2878) +* BFD_RELOC_KVX_S37_TLS_LE_UP27: howto manager. (line 2879) +* BFD_RELOC_KVX_S37_UP27: howto manager. (line 2822) +* BFD_RELOC_KVX_S43_EX6: howto manager. (line 2843) +* BFD_RELOC_KVX_S43_GOTADDR_EX6: howto manager. (line 2851) +* BFD_RELOC_KVX_S43_GOTADDR_LO10: howto manager. (line 2849) +* BFD_RELOC_KVX_S43_GOTADDR_UP27: howto manager. (line 2850) +* BFD_RELOC_KVX_S43_GOTOFF_EX6: howto manager. (line 2827) +* BFD_RELOC_KVX_S43_GOTOFF_LO10: howto manager. (line 2825) +* BFD_RELOC_KVX_S43_GOTOFF_UP27: howto manager. (line 2826) +* BFD_RELOC_KVX_S43_GOT_EX6: howto manager. (line 2835) +* BFD_RELOC_KVX_S43_GOT_LO10: howto manager. (line 2833) +* BFD_RELOC_KVX_S43_GOT_UP27: howto manager. (line 2834) +* BFD_RELOC_KVX_S43_LO10: howto manager. (line 2841) +* BFD_RELOC_KVX_S43_PCREL_EX6: howto manager. (line 2813) +* BFD_RELOC_KVX_S43_PCREL_LO10: howto manager. (line 2811) +* BFD_RELOC_KVX_S43_PCREL_UP27: howto manager. (line 2812) +* BFD_RELOC_KVX_S43_TLS_DTPOFF_EX6: howto manager. (line 2861) +* BFD_RELOC_KVX_S43_TLS_DTPOFF_LO10: howto manager. (line 2859) +* BFD_RELOC_KVX_S43_TLS_DTPOFF_UP27: howto manager. (line 2860) +* BFD_RELOC_KVX_S43_TLS_GD_EX6: howto manager. (line 2866) +* BFD_RELOC_KVX_S43_TLS_GD_LO10: howto manager. (line 2864) +* BFD_RELOC_KVX_S43_TLS_GD_UP27: howto manager. (line 2865) +* BFD_RELOC_KVX_S43_TLS_IE_EX6: howto manager. (line 2877) +* BFD_RELOC_KVX_S43_TLS_IE_LO10: howto manager. (line 2875) +* BFD_RELOC_KVX_S43_TLS_IE_UP27: howto manager. (line 2876) +* BFD_RELOC_KVX_S43_TLS_LD_EX6: howto manager. (line 2871) +* BFD_RELOC_KVX_S43_TLS_LD_LO10: howto manager. (line 2869) +* BFD_RELOC_KVX_S43_TLS_LD_UP27: howto manager. (line 2870) +* BFD_RELOC_KVX_S43_TLS_LE_EX6: howto manager. (line 2882) +* BFD_RELOC_KVX_S43_TLS_LE_LO10: howto manager. (line 2880) +* BFD_RELOC_KVX_S43_TLS_LE_UP27: howto manager. (line 2881) +* BFD_RELOC_KVX_S43_UP27: howto manager. (line 2842) +* BFD_RELOC_KVX_S64_EX27: howto manager. (line 2846) +* BFD_RELOC_KVX_S64_GOTADDR_EX27: howto manager. (line 2854) +* BFD_RELOC_KVX_S64_GOTADDR_LO10: howto manager. (line 2852) +* BFD_RELOC_KVX_S64_GOTADDR_UP27: howto manager. (line 2853) +* BFD_RELOC_KVX_S64_LO10: howto manager. (line 2844) +* BFD_RELOC_KVX_S64_PCREL_EX27: howto manager. (line 2816) +* BFD_RELOC_KVX_S64_PCREL_LO10: howto manager. (line 2814) +* BFD_RELOC_KVX_S64_PCREL_UP27: howto manager. (line 2815) +* BFD_RELOC_KVX_S64_UP27: howto manager. (line 2845) +* BFD_RELOC_LARCH_32_PCREL: howto manager. (line 3623) +* BFD_RELOC_LARCH_64_PCREL: howto manager. (line 3633) +* BFD_RELOC_LARCH_ABS64_HI12: howto manager. (line 3594) +* BFD_RELOC_LARCH_ABS64_LO20: howto manager. (line 3593) +* BFD_RELOC_LARCH_ABS_HI20: howto manager. (line 3591) +* BFD_RELOC_LARCH_ABS_LO12: howto manager. (line 3592) +* BFD_RELOC_LARCH_ADD16: howto manager. (line 3579) +* BFD_RELOC_LARCH_ADD24: howto manager. (line 3580) +* BFD_RELOC_LARCH_ADD32: howto manager. (line 3581) +* BFD_RELOC_LARCH_ADD6: howto manager. (line 3629) +* BFD_RELOC_LARCH_ADD64: howto manager. (line 3582) +* BFD_RELOC_LARCH_ADD8: howto manager. (line 3578) +* BFD_RELOC_LARCH_ADD_ULEB128: howto manager. (line 3631) +* BFD_RELOC_LARCH_ALIGN: howto manager. (line 3626) +* BFD_RELOC_LARCH_B16: howto manager. (line 3588) +* BFD_RELOC_LARCH_B21: howto manager. (line 3589) +* BFD_RELOC_LARCH_B26: howto manager. (line 3590) +* BFD_RELOC_LARCH_CFA: howto manager. (line 3628) +* BFD_RELOC_LARCH_DELETE: howto manager. (line 3625) +* BFD_RELOC_LARCH_GOT64_HI12: howto manager. (line 3606) +* BFD_RELOC_LARCH_GOT64_LO20: howto manager. (line 3605) +* BFD_RELOC_LARCH_GOT64_PC_HI12: howto manager. (line 3602) +* BFD_RELOC_LARCH_GOT64_PC_LO20: howto manager. (line 3601) +* BFD_RELOC_LARCH_GOT_HI20: howto manager. (line 3603) +* BFD_RELOC_LARCH_GOT_LO12: howto manager. (line 3604) +* BFD_RELOC_LARCH_GOT_PC_HI20: howto manager. (line 3599) +* BFD_RELOC_LARCH_GOT_PC_LO12: howto manager. (line 3600) +* BFD_RELOC_LARCH_MARK_LA: howto manager. (line 3551) +* BFD_RELOC_LARCH_MARK_PCREL: howto manager. (line 3552) +* BFD_RELOC_LARCH_PCALA64_HI12: howto manager. (line 3598) +* BFD_RELOC_LARCH_PCALA64_LO20: howto manager. (line 3597) +* BFD_RELOC_LARCH_PCALA_HI20: howto manager. (line 3595) +* BFD_RELOC_LARCH_PCALA_LO12: howto manager. (line 3596) +* BFD_RELOC_LARCH_PCREL20_S2: howto manager. (line 3627) +* BFD_RELOC_LARCH_RELAX: howto manager. (line 3624) +* BFD_RELOC_LARCH_SOP_ADD: howto manager. (line 3566) +* BFD_RELOC_LARCH_SOP_AND: howto manager. (line 3567) +* BFD_RELOC_LARCH_SOP_ASSERT: howto manager. (line 3561) +* BFD_RELOC_LARCH_SOP_IF_ELSE: howto manager. (line 3568) +* BFD_RELOC_LARCH_SOP_NOT: howto manager. (line 3562) +* BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2: howto manager. (line 3576) +* BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2: howto manager. (line 3575) +* BFD_RELOC_LARCH_SOP_POP_32_S_10_12: howto manager. (line 3571) +* BFD_RELOC_LARCH_SOP_POP_32_S_10_16: howto manager. (line 3572) +* BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2: howto manager. (line 3573) +* BFD_RELOC_LARCH_SOP_POP_32_S_10_5: howto manager. (line 3569) +* BFD_RELOC_LARCH_SOP_POP_32_S_5_20: howto manager. (line 3574) +* BFD_RELOC_LARCH_SOP_POP_32_U: howto manager. (line 3577) +* BFD_RELOC_LARCH_SOP_POP_32_U_10_12: howto manager. (line 3570) +* BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE: howto manager. (line 3554) +* BFD_RELOC_LARCH_SOP_PUSH_DUP: howto manager. (line 3555) +* BFD_RELOC_LARCH_SOP_PUSH_GPREL: howto manager. (line 3556) +* BFD_RELOC_LARCH_SOP_PUSH_PCREL: howto manager. (line 3553) +* BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL: howto manager. (line 3560) +* BFD_RELOC_LARCH_SOP_PUSH_TLS_GD: howto manager. (line 3559) +* BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT: howto manager. (line 3558) +* BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL: howto manager. (line 3557) +* BFD_RELOC_LARCH_SOP_SL: howto manager. (line 3564) +* BFD_RELOC_LARCH_SOP_SR: howto manager. (line 3565) +* BFD_RELOC_LARCH_SOP_SUB: howto manager. (line 3563) +* BFD_RELOC_LARCH_SUB16: howto manager. (line 3584) +* BFD_RELOC_LARCH_SUB24: howto manager. (line 3585) +* BFD_RELOC_LARCH_SUB32: howto manager. (line 3586) +* BFD_RELOC_LARCH_SUB6: howto manager. (line 3630) +* BFD_RELOC_LARCH_SUB64: howto manager. (line 3587) +* BFD_RELOC_LARCH_SUB8: howto manager. (line 3583) +* BFD_RELOC_LARCH_SUB_ULEB128: howto manager. (line 3632) +* BFD_RELOC_LARCH_TLS_DTPMOD32: howto manager. (line 3545) +* BFD_RELOC_LARCH_TLS_DTPMOD64: howto manager. (line 3547) +* BFD_RELOC_LARCH_TLS_DTPREL32: howto manager. (line 3546) +* BFD_RELOC_LARCH_TLS_DTPREL64: howto manager. (line 3548) +* BFD_RELOC_LARCH_TLS_GD_HI20: howto manager. (line 3622) +* BFD_RELOC_LARCH_TLS_GD_PC_HI20: howto manager. (line 3621) +* BFD_RELOC_LARCH_TLS_IE64_HI12: howto manager. (line 3618) +* BFD_RELOC_LARCH_TLS_IE64_LO20: howto manager. (line 3617) +* BFD_RELOC_LARCH_TLS_IE64_PC_HI12: howto manager. (line 3614) +* BFD_RELOC_LARCH_TLS_IE64_PC_LO20: howto manager. (line 3613) +* BFD_RELOC_LARCH_TLS_IE_HI20: howto manager. (line 3615) +* BFD_RELOC_LARCH_TLS_IE_LO12: howto manager. (line 3616) +* BFD_RELOC_LARCH_TLS_IE_PC_HI20: howto manager. (line 3611) +* BFD_RELOC_LARCH_TLS_IE_PC_LO12: howto manager. (line 3612) +* BFD_RELOC_LARCH_TLS_LD_HI20: howto manager. (line 3620) +* BFD_RELOC_LARCH_TLS_LD_PC_HI20: howto manager. (line 3619) +* BFD_RELOC_LARCH_TLS_LE64_HI12: howto manager. (line 3610) +* BFD_RELOC_LARCH_TLS_LE64_LO20: howto manager. (line 3609) +* BFD_RELOC_LARCH_TLS_LE_HI20: howto manager. (line 3607) +* BFD_RELOC_LARCH_TLS_LE_LO12: howto manager. (line 3608) +* BFD_RELOC_LARCH_TLS_TPREL32: howto manager. (line 3549) +* BFD_RELOC_LARCH_TLS_TPREL64: howto manager. (line 3550) +* BFD_RELOC_LM32_16_GOT: howto manager. (line 2680) +* BFD_RELOC_LM32_BRANCH: howto manager. (line 2679) +* BFD_RELOC_LM32_CALL: howto manager. (line 2678) +* BFD_RELOC_LM32_COPY: howto manager. (line 2683) +* BFD_RELOC_LM32_GLOB_DAT: howto manager. (line 2684) +* BFD_RELOC_LM32_GOTOFF_HI16: howto manager. (line 2681) +* BFD_RELOC_LM32_GOTOFF_LO16: howto manager. (line 2682) +* BFD_RELOC_LM32_JMP_SLOT: howto manager. (line 2685) +* BFD_RELOC_LM32_RELATIVE: howto manager. (line 2686) +* BFD_RELOC_LO10: howto manager. (line 109) +* BFD_RELOC_LO16: howto manager. (line 319) +* BFD_RELOC_LO16_BASEREL: howto manager. (line 91) +* BFD_RELOC_LO16_GOTOFF: howto manager. (line 50) +* BFD_RELOC_LO16_PCREL: howto manager. (line 325) +* BFD_RELOC_LO16_PLTOFF: howto manager. (line 62) +* BFD_RELOC_M32C_HI8: howto manager. (line 1244) +* BFD_RELOC_M32C_RL_1ADDR: howto manager. (line 1246) +* BFD_RELOC_M32C_RL_2ADDR: howto manager. (line 1247) +* BFD_RELOC_M32C_RL_JUMP: howto manager. (line 1245) +* BFD_RELOC_M32R_10_PCREL: howto manager. (line 1252) +* BFD_RELOC_M32R_18_PCREL: howto manager. (line 1255) +* BFD_RELOC_M32R_24: howto manager. (line 1249) +* BFD_RELOC_M32R_26_PCREL: howto manager. (line 1257) +* BFD_RELOC_M32R_26_PLTREL: howto manager. (line 1271) +* BFD_RELOC_M32R_COPY: howto manager. (line 1272) +* BFD_RELOC_M32R_GLOB_DAT: howto manager. (line 1273) +* BFD_RELOC_M32R_GOT16_HI_SLO: howto manager. (line 1282) +* BFD_RELOC_M32R_GOT16_HI_ULO: howto manager. (line 1281) +* BFD_RELOC_M32R_GOT16_LO: howto manager. (line 1283) +* BFD_RELOC_M32R_GOT24: howto manager. (line 1270) +* BFD_RELOC_M32R_GOTOFF: howto manager. (line 1276) +* BFD_RELOC_M32R_GOTOFF_HI_SLO: howto manager. (line 1278) +* BFD_RELOC_M32R_GOTOFF_HI_ULO: howto manager. (line 1277) +* BFD_RELOC_M32R_GOTOFF_LO: howto manager. (line 1279) +* BFD_RELOC_M32R_GOTPC24: howto manager. (line 1280) +* BFD_RELOC_M32R_GOTPC_HI_SLO: howto manager. (line 1285) +* BFD_RELOC_M32R_GOTPC_HI_ULO: howto manager. (line 1284) +* BFD_RELOC_M32R_GOTPC_LO: howto manager. (line 1286) +* BFD_RELOC_M32R_HI16_SLO: howto manager. (line 1262) +* BFD_RELOC_M32R_HI16_ULO: howto manager. (line 1259) +* BFD_RELOC_M32R_JMP_SLOT: howto manager. (line 1274) +* BFD_RELOC_M32R_LO16: howto manager. (line 1265) +* BFD_RELOC_M32R_RELATIVE: howto manager. (line 1275) +* BFD_RELOC_M32R_SDA16: howto manager. (line 1267) +* BFD_RELOC_M68HC11_24: howto manager. (line 2225) +* BFD_RELOC_M68HC11_3B: howto manager. (line 2205) +* BFD_RELOC_M68HC11_HI8: howto manager. (line 2199) +* BFD_RELOC_M68HC11_LO16: howto manager. (line 2216) +* BFD_RELOC_M68HC11_LO8: howto manager. (line 2202) +* BFD_RELOC_M68HC11_PAGE: howto manager. (line 2221) +* BFD_RELOC_M68HC11_RL_GROUP: howto manager. (line 2212) +* BFD_RELOC_M68HC11_RL_JUMP: howto manager. (line 2207) +* BFD_RELOC_M68HC12_10_PCREL: howto manager. (line 2268) +* BFD_RELOC_M68HC12_16B: howto manager. (line 2264) +* BFD_RELOC_M68HC12_5B: howto manager. (line 2230) +* BFD_RELOC_M68HC12_9B: howto manager. (line 2262) +* BFD_RELOC_M68HC12_9_PCREL: howto manager. (line 2266) +* BFD_RELOC_M68HC12_HI8XG: howto manager. (line 2273) +* BFD_RELOC_M68HC12_LO8XG: howto manager. (line 2270) +* BFD_RELOC_MACH_O_ARM64_ADDEND: howto manager. (line 2716) +* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21: howto manager. (line 2718) +* BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12: howto manager. (line 2720) +* BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT: howto manager. (line 2722) +* BFD_RELOC_MACH_O_LOCAL_SECTDIFF: howto manager. (line 2691) +* BFD_RELOC_MACH_O_PAIR: howto manager. (line 2693) +* BFD_RELOC_MACH_O_SECTDIFF: howto manager. (line 2688) +* BFD_RELOC_MACH_O_SUBTRACTOR32: howto manager. (line 2695) +* BFD_RELOC_MACH_O_SUBTRACTOR64: howto manager. (line 2697) +* BFD_RELOC_MACH_O_X86_64_BRANCH32: howto manager. (line 2699) +* BFD_RELOC_MACH_O_X86_64_BRANCH8: howto manager. (line 2700) +* BFD_RELOC_MACH_O_X86_64_GOT: howto manager. (line 2703) +* BFD_RELOC_MACH_O_X86_64_GOT_LOAD: howto manager. (line 2705) +* BFD_RELOC_MACH_O_X86_64_PCREL32_1: howto manager. (line 2708) +* BFD_RELOC_MACH_O_X86_64_PCREL32_2: howto manager. (line 2710) +* BFD_RELOC_MACH_O_X86_64_PCREL32_4: howto manager. (line 2712) +* BFD_RELOC_MACH_O_X86_64_TLV: howto manager. (line 2714) +* BFD_RELOC_MCORE_PCREL_32: howto manager. (line 1641) +* BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager. (line 1639) +* BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager. (line 1640) +* BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager. (line 1638) +* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager. (line 1642) +* BFD_RELOC_MCORE_RVA: howto manager. (line 1643) +* BFD_RELOC_MEP_16: howto manager. (line 1646) +* BFD_RELOC_MEP_32: howto manager. (line 1647) +* BFD_RELOC_MEP_8: howto manager. (line 1645) +* BFD_RELOC_MEP_ADDR24A4: howto manager. (line 1662) +* BFD_RELOC_MEP_GNU_VTENTRY: howto manager. (line 1664) +* BFD_RELOC_MEP_GNU_VTINHERIT: howto manager. (line 1663) +* BFD_RELOC_MEP_GPREL: howto manager. (line 1656) +* BFD_RELOC_MEP_HI16S: howto manager. (line 1655) +* BFD_RELOC_MEP_HI16U: howto manager. (line 1654) +* BFD_RELOC_MEP_LOW16: howto manager. (line 1653) +* BFD_RELOC_MEP_PCABS24A2: howto manager. (line 1652) +* BFD_RELOC_MEP_PCREL12A2: howto manager. (line 1649) +* BFD_RELOC_MEP_PCREL17A2: howto manager. (line 1650) +* BFD_RELOC_MEP_PCREL24A2: howto manager. (line 1651) +* BFD_RELOC_MEP_PCREL8A2: howto manager. (line 1648) +* BFD_RELOC_MEP_TPREL: howto manager. (line 1657) +* BFD_RELOC_MEP_TPREL7: howto manager. (line 1658) +* BFD_RELOC_MEP_TPREL7A2: howto manager. (line 1659) +* BFD_RELOC_MEP_TPREL7A4: howto manager. (line 1660) +* BFD_RELOC_MEP_UIMM24: howto manager. (line 1661) +* BFD_RELOC_METAG_COPY: howto manager. (line 1685) +* BFD_RELOC_METAG_GETSETOFF: howto manager. (line 1669) +* BFD_RELOC_METAG_GETSET_GOT: howto manager. (line 1677) +* BFD_RELOC_METAG_GETSET_GOTOFF: howto manager. (line 1676) +* BFD_RELOC_METAG_GLOB_DAT: howto manager. (line 1688) +* BFD_RELOC_METAG_GOTOFF: howto manager. (line 1683) +* BFD_RELOC_METAG_HI16_GOTOFF: howto manager. (line 1674) +* BFD_RELOC_METAG_HI16_GOTPC: howto manager. (line 1678) +* BFD_RELOC_METAG_HI16_PLT: howto manager. (line 1680) +* BFD_RELOC_METAG_HIADDR16: howto manager. (line 1666) +* BFD_RELOC_METAG_HIOG: howto manager. (line 1670) +* BFD_RELOC_METAG_JMP_SLOT: howto manager. (line 1686) +* BFD_RELOC_METAG_LO16_GOTOFF: howto manager. (line 1675) +* BFD_RELOC_METAG_LO16_GOTPC: howto manager. (line 1679) +* BFD_RELOC_METAG_LO16_PLT: howto manager. (line 1681) +* BFD_RELOC_METAG_LOADDR16: howto manager. (line 1667) +* BFD_RELOC_METAG_LOOG: howto manager. (line 1671) +* BFD_RELOC_METAG_PLT: howto manager. (line 1684) +* BFD_RELOC_METAG_REL16: howto manager. (line 1673) +* BFD_RELOC_METAG_REL8: howto manager. (line 1672) +* BFD_RELOC_METAG_RELATIVE: howto manager. (line 1687) +* BFD_RELOC_METAG_RELBRANCH: howto manager. (line 1668) +* BFD_RELOC_METAG_RELBRANCH_PLT: howto manager. (line 1682) +* BFD_RELOC_METAG_TLS_DTPMOD: howto manager. (line 1699) +* BFD_RELOC_METAG_TLS_DTPOFF: howto manager. (line 1700) +* BFD_RELOC_METAG_TLS_GD: howto manager. (line 1689) +* BFD_RELOC_METAG_TLS_IE: howto manager. (line 1694) +* BFD_RELOC_METAG_TLS_IENONPIC: howto manager. (line 1695) +* BFD_RELOC_METAG_TLS_IENONPIC_HI16: howto manager. (line 1696) +* BFD_RELOC_METAG_TLS_IENONPIC_LO16: howto manager. (line 1697) +* BFD_RELOC_METAG_TLS_LDM: howto manager. (line 1690) +* BFD_RELOC_METAG_TLS_LDO: howto manager. (line 1693) +* BFD_RELOC_METAG_TLS_LDO_HI16: howto manager. (line 1691) +* BFD_RELOC_METAG_TLS_LDO_LO16: howto manager. (line 1692) +* BFD_RELOC_METAG_TLS_LE: howto manager. (line 1701) +* BFD_RELOC_METAG_TLS_LE_HI16: howto manager. (line 1702) +* BFD_RELOC_METAG_TLS_LE_LO16: howto manager. (line 1703) +* BFD_RELOC_METAG_TLS_TPOFF: howto manager. (line 1698) +* BFD_RELOC_MICROBLAZE_32_GOTOFF: howto manager. (line 2758) +* BFD_RELOC_MICROBLAZE_32_LO: howto manager. (line 2724) +* BFD_RELOC_MICROBLAZE_32_LO_PCREL: howto manager. (line 2727) +* BFD_RELOC_MICROBLAZE_32_ROSDA: howto manager. (line 2730) +* BFD_RELOC_MICROBLAZE_32_RWSDA: howto manager. (line 2733) +* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: howto manager. (line 2736) +* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD: howto manager. (line 2774) +* BFD_RELOC_MICROBLAZE_32_TLSDTPREL: howto manager. (line 2776) +* BFD_RELOC_MICROBLAZE_64_GOT: howto manager. (line 2747) +* BFD_RELOC_MICROBLAZE_64_GOTOFF: howto manager. (line 2754) +* BFD_RELOC_MICROBLAZE_64_GOTPC: howto manager. (line 2743) +* BFD_RELOC_MICROBLAZE_64_NONE: howto manager. (line 2739) +* BFD_RELOC_MICROBLAZE_64_PLT: howto manager. (line 2750) +* BFD_RELOC_MICROBLAZE_64_TEXTPCREL: howto manager. (line 2787) +* BFD_RELOC_MICROBLAZE_64_TEXTREL: howto manager. (line 2791) +* BFD_RELOC_MICROBLAZE_64_TLS: howto manager. (line 2764) +* BFD_RELOC_MICROBLAZE_64_TLSDTPREL: howto manager. (line 2778) +* BFD_RELOC_MICROBLAZE_64_TLSGD: howto manager. (line 2766) +* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL: howto manager. (line 2781) +* BFD_RELOC_MICROBLAZE_64_TLSLD: howto manager. (line 2770) +* BFD_RELOC_MICROBLAZE_64_TLSTPREL: howto manager. (line 2784) +* BFD_RELOC_MICROBLAZE_COPY: howto manager. (line 2761) +* BFD_RELOC_MICROMIPS_10_PCREL_S1: howto manager. (line 352) +* BFD_RELOC_MICROMIPS_16_PCREL_S1: howto manager. (line 353) +* BFD_RELOC_MICROMIPS_7_PCREL_S1: howto manager. (line 351) +* BFD_RELOC_MICROMIPS_CALL16: howto manager. (line 370) +* BFD_RELOC_MICROMIPS_CALL_HI16: howto manager. (line 376) +* BFD_RELOC_MICROMIPS_CALL_LO16: howto manager. (line 378) +* BFD_RELOC_MICROMIPS_GOT16: howto manager. (line 368) +* BFD_RELOC_MICROMIPS_GOT_DISP: howto manager. (line 386) +* BFD_RELOC_MICROMIPS_GOT_HI16: howto manager. (line 372) +* BFD_RELOC_MICROMIPS_GOT_LO16: howto manager. (line 374) +* BFD_RELOC_MICROMIPS_GOT_OFST: howto manager. (line 384) +* BFD_RELOC_MICROMIPS_GOT_PAGE: howto manager. (line 382) +* BFD_RELOC_MICROMIPS_GPREL16: howto manager. (line 362) +* BFD_RELOC_MICROMIPS_HI16: howto manager. (line 363) +* BFD_RELOC_MICROMIPS_HI16_S: howto manager. (line 364) +* BFD_RELOC_MICROMIPS_HIGHER: howto manager. (line 395) +* BFD_RELOC_MICROMIPS_HIGHEST: howto manager. (line 393) +* BFD_RELOC_MICROMIPS_JALR: howto manager. (line 401) +* BFD_RELOC_MICROMIPS_JMP: howto manager. (line 306) +* BFD_RELOC_MICROMIPS_LITERAL: howto manager. (line 349) +* BFD_RELOC_MICROMIPS_LO16: howto manager. (line 365) +* BFD_RELOC_MICROMIPS_SCN_DISP: howto manager. (line 397) +* BFD_RELOC_MICROMIPS_SUB: howto manager. (line 380) +* BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16: howto manager. (line 411) +* BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16: howto manager. (line 413) +* BFD_RELOC_MICROMIPS_TLS_GD: howto manager. (line 407) +* BFD_RELOC_MICROMIPS_TLS_GOTTPREL: howto manager. (line 415) +* BFD_RELOC_MICROMIPS_TLS_LDM: howto manager. (line 409) +* BFD_RELOC_MICROMIPS_TLS_TPREL_HI16: howto manager. (line 419) +* BFD_RELOC_MICROMIPS_TLS_TPREL_LO16: howto manager. (line 421) +* BFD_RELOC_MIPS16_16_PCREL_S1: howto manager. (line 355) +* BFD_RELOC_MIPS16_CALL16: howto manager. (line 328) +* BFD_RELOC_MIPS16_GOT16: howto manager. (line 327) +* BFD_RELOC_MIPS16_GPREL: howto manager. (line 310) +* BFD_RELOC_MIPS16_HI16: howto manager. (line 331) +* BFD_RELOC_MIPS16_HI16_S: howto manager. (line 333) +* BFD_RELOC_MIPS16_JMP: howto manager. (line 308) +* BFD_RELOC_MIPS16_LO16: howto manager. (line 338) +* BFD_RELOC_MIPS16_TLS_DTPREL_HI16: howto manager. (line 342) +* BFD_RELOC_MIPS16_TLS_DTPREL_LO16: howto manager. (line 343) +* BFD_RELOC_MIPS16_TLS_GD: howto manager. (line 340) +* BFD_RELOC_MIPS16_TLS_GOTTPREL: howto manager. (line 344) +* BFD_RELOC_MIPS16_TLS_LDM: howto manager. (line 341) +* BFD_RELOC_MIPS16_TLS_TPREL_HI16: howto manager. (line 345) +* BFD_RELOC_MIPS16_TLS_TPREL_LO16: howto manager. (line 346) +* BFD_RELOC_MIPS_16: howto manager. (line 398) +* BFD_RELOC_MIPS_18_PCREL_S3: howto manager. (line 359) +* BFD_RELOC_MIPS_19_PCREL_S2: howto manager. (line 360) +* BFD_RELOC_MIPS_21_PCREL_S2: howto manager. (line 357) +* BFD_RELOC_MIPS_26_PCREL_S2: howto manager. (line 358) +* BFD_RELOC_MIPS_CALL16: howto manager. (line 369) +* BFD_RELOC_MIPS_CALL_HI16: howto manager. (line 375) +* BFD_RELOC_MIPS_CALL_LO16: howto manager. (line 377) +* BFD_RELOC_MIPS_COPY: howto manager. (line 424) +* BFD_RELOC_MIPS_DELETE: howto manager. (line 391) +* BFD_RELOC_MIPS_EH: howto manager. (line 422) +* BFD_RELOC_MIPS_GOT16: howto manager. (line 367) +* BFD_RELOC_MIPS_GOT_DISP: howto manager. (line 385) +* BFD_RELOC_MIPS_GOT_HI16: howto manager. (line 371) +* BFD_RELOC_MIPS_GOT_LO16: howto manager. (line 373) +* BFD_RELOC_MIPS_GOT_OFST: howto manager. (line 383) +* BFD_RELOC_MIPS_GOT_PAGE: howto manager. (line 381) +* BFD_RELOC_MIPS_HIGHER: howto manager. (line 394) +* BFD_RELOC_MIPS_HIGHEST: howto manager. (line 392) +* BFD_RELOC_MIPS_INSERT_A: howto manager. (line 389) +* BFD_RELOC_MIPS_INSERT_B: howto manager. (line 390) +* BFD_RELOC_MIPS_JALR: howto manager. (line 400) +* BFD_RELOC_MIPS_JMP: howto manager. (line 305) +* BFD_RELOC_MIPS_JUMP_SLOT: howto manager. (line 425) +* BFD_RELOC_MIPS_LITERAL: howto manager. (line 348) +* BFD_RELOC_MIPS_RELGOT: howto manager. (line 399) +* BFD_RELOC_MIPS_SCN_DISP: howto manager. (line 396) +* BFD_RELOC_MIPS_SHIFT5: howto manager. (line 387) +* BFD_RELOC_MIPS_SHIFT6: howto manager. (line 388) +* BFD_RELOC_MIPS_SUB: howto manager. (line 379) +* BFD_RELOC_MIPS_TLS_DTPMOD32: howto manager. (line 402) +* BFD_RELOC_MIPS_TLS_DTPMOD64: howto manager. (line 404) +* BFD_RELOC_MIPS_TLS_DTPREL32: howto manager. (line 403) +* BFD_RELOC_MIPS_TLS_DTPREL64: howto manager. (line 405) +* BFD_RELOC_MIPS_TLS_DTPREL_HI16: howto manager. (line 410) +* BFD_RELOC_MIPS_TLS_DTPREL_LO16: howto manager. (line 412) +* BFD_RELOC_MIPS_TLS_GD: howto manager. (line 406) +* BFD_RELOC_MIPS_TLS_GOTTPREL: howto manager. (line 414) +* BFD_RELOC_MIPS_TLS_LDM: howto manager. (line 408) +* BFD_RELOC_MIPS_TLS_TPREL32: howto manager. (line 416) +* BFD_RELOC_MIPS_TLS_TPREL64: howto manager. (line 417) +* BFD_RELOC_MIPS_TLS_TPREL_HI16: howto manager. (line 418) +* BFD_RELOC_MIPS_TLS_TPREL_LO16: howto manager. (line 420) +* BFD_RELOC_MMIX_ADDR19: howto manager. (line 1727) +* BFD_RELOC_MMIX_ADDR27: howto manager. (line 1730) +* BFD_RELOC_MMIX_BASE_PLUS_OFFSET: howto manager. (line 1739) +* BFD_RELOC_MMIX_CBRANCH: howto manager. (line 1710) +* BFD_RELOC_MMIX_CBRANCH_1: howto manager. (line 1712) +* BFD_RELOC_MMIX_CBRANCH_2: howto manager. (line 1713) +* BFD_RELOC_MMIX_CBRANCH_3: howto manager. (line 1714) +* BFD_RELOC_MMIX_CBRANCH_J: howto manager. (line 1711) +* BFD_RELOC_MMIX_GETA: howto manager. (line 1705) +* BFD_RELOC_MMIX_GETA_1: howto manager. (line 1706) +* BFD_RELOC_MMIX_GETA_2: howto manager. (line 1707) +* BFD_RELOC_MMIX_GETA_3: howto manager. (line 1708) +* BFD_RELOC_MMIX_JMP: howto manager. (line 1722) +* BFD_RELOC_MMIX_JMP_1: howto manager. (line 1723) +* BFD_RELOC_MMIX_JMP_2: howto manager. (line 1724) +* BFD_RELOC_MMIX_JMP_3: howto manager. (line 1725) +* BFD_RELOC_MMIX_LOCAL: howto manager. (line 1742) +* BFD_RELOC_MMIX_PUSHJ: howto manager. (line 1716) +* BFD_RELOC_MMIX_PUSHJ_1: howto manager. (line 1717) +* BFD_RELOC_MMIX_PUSHJ_2: howto manager. (line 1718) +* BFD_RELOC_MMIX_PUSHJ_3: howto manager. (line 1719) +* BFD_RELOC_MMIX_PUSHJ_STUBBABLE: howto manager. (line 1720) +* BFD_RELOC_MMIX_REG: howto manager. (line 1736) +* BFD_RELOC_MMIX_REG_OR_BYTE: howto manager. (line 1733) +* BFD_RELOC_MN10300_16_PCREL: howto manager. (line 518) +* BFD_RELOC_MN10300_32_PCREL: howto manager. (line 515) +* BFD_RELOC_MN10300_ALIGN: howto manager. (line 502) +* BFD_RELOC_MN10300_COPY: howto manager. (line 490) +* BFD_RELOC_MN10300_GLOB_DAT: howto manager. (line 492) +* BFD_RELOC_MN10300_GOT16: howto manager. (line 487) +* BFD_RELOC_MN10300_GOT24: howto manager. (line 484) +* BFD_RELOC_MN10300_GOT32: howto manager. (line 481) +* BFD_RELOC_MN10300_GOTOFF24: howto manager. (line 479) +* BFD_RELOC_MN10300_JMP_SLOT: howto manager. (line 494) +* BFD_RELOC_MN10300_RELATIVE: howto manager. (line 496) +* BFD_RELOC_MN10300_SYM_DIFF: howto manager. (line 498) +* BFD_RELOC_MN10300_TLS_DTPMOD: howto manager. (line 511) +* BFD_RELOC_MN10300_TLS_DTPOFF: howto manager. (line 512) +* BFD_RELOC_MN10300_TLS_GD: howto manager. (line 505) +* BFD_RELOC_MN10300_TLS_GOTIE: howto manager. (line 508) +* BFD_RELOC_MN10300_TLS_IE: howto manager. (line 509) +* BFD_RELOC_MN10300_TLS_LD: howto manager. (line 506) +* BFD_RELOC_MN10300_TLS_LDO: howto manager. (line 507) +* BFD_RELOC_MN10300_TLS_LE: howto manager. (line 510) +* BFD_RELOC_MN10300_TLS_TPOFF: howto manager. (line 513) +* BFD_RELOC_MOXIE_10_PCREL: howto manager. (line 427) +* BFD_RELOC_MSP430X_ABS16: howto manager. (line 2469) +* BFD_RELOC_MSP430X_ABS20_ADR_DST: howto manager. (line 2466) +* BFD_RELOC_MSP430X_ABS20_ADR_SRC: howto manager. (line 2465) +* BFD_RELOC_MSP430X_ABS20_EXT_DST: howto manager. (line 2463) +* BFD_RELOC_MSP430X_ABS20_EXT_ODST: howto manager. (line 2464) +* BFD_RELOC_MSP430X_ABS20_EXT_SRC: howto manager. (line 2462) +* BFD_RELOC_MSP430X_PCR16: howto manager. (line 2467) +* BFD_RELOC_MSP430X_PCR20_CALL: howto manager. (line 2468) +* BFD_RELOC_MSP430X_PCR20_EXT_DST: howto manager. (line 2460) +* BFD_RELOC_MSP430X_PCR20_EXT_ODST: howto manager. (line 2461) +* BFD_RELOC_MSP430X_PCR20_EXT_SRC: howto manager. (line 2459) +* BFD_RELOC_MSP430_10_PCREL: howto manager. (line 2451) +* BFD_RELOC_MSP430_16: howto manager. (line 2453) +* BFD_RELOC_MSP430_16_BYTE: howto manager. (line 2455) +* BFD_RELOC_MSP430_16_PCREL: howto manager. (line 2452) +* BFD_RELOC_MSP430_16_PCREL_BYTE: howto manager. (line 2454) +* BFD_RELOC_MSP430_2X_PCREL: howto manager. (line 2456) +* BFD_RELOC_MSP430_ABS8: howto manager. (line 2458) +* BFD_RELOC_MSP430_ABS_HI16: howto manager. (line 2470) +* BFD_RELOC_MSP430_PREL31: howto manager. (line 2471) +* BFD_RELOC_MSP430_RL_PCREL: howto manager. (line 2457) +* BFD_RELOC_MSP430_SET_ULEB128: howto manager. (line 2473) +* BFD_RELOC_MSP430_SUB_ULEB128: howto manager. (line 2474) +* BFD_RELOC_MSP430_SYM_DIFF: howto manager. (line 2472) +* BFD_RELOC_MT_GNU_VTENTRY: howto manager. (line 2447) +* BFD_RELOC_MT_GNU_VTINHERIT: howto manager. (line 2445) +* BFD_RELOC_MT_HI16: howto manager. (line 2441) +* BFD_RELOC_MT_LO16: howto manager. (line 2443) +* BFD_RELOC_MT_PC16: howto manager. (line 2439) +* BFD_RELOC_MT_PCINSN8: howto manager. (line 2449) +* BFD_RELOC_NDS32_10IFCU_PCREL: howto manager. (line 1438) +* BFD_RELOC_NDS32_10_UPCREL: howto manager. (line 1409) +* BFD_RELOC_NDS32_15_FIXED: howto manager. (line 1370) +* BFD_RELOC_NDS32_15_PCREL: howto manager. (line 1296) +* BFD_RELOC_NDS32_17IFC_PCREL: howto manager. (line 1437) +* BFD_RELOC_NDS32_17_FIXED: howto manager. (line 1371) +* BFD_RELOC_NDS32_17_PCREL: howto manager. (line 1298) +* BFD_RELOC_NDS32_20: howto manager. (line 1288) +* BFD_RELOC_NDS32_25_ABS: howto manager. (line 1433) +* BFD_RELOC_NDS32_25_FIXED: howto manager. (line 1372) +* BFD_RELOC_NDS32_25_PCREL: howto manager. (line 1300) +* BFD_RELOC_NDS32_25_PLTREL: howto manager. (line 1346) +* BFD_RELOC_NDS32_5: howto manager. (line 1407) +* BFD_RELOC_NDS32_9_FIXED: howto manager. (line 1369) +* BFD_RELOC_NDS32_9_PCREL: howto manager. (line 1290) +* BFD_RELOC_NDS32_9_PLTREL: howto manager. (line 1345) +* BFD_RELOC_NDS32_COPY: howto manager. (line 1347) +* BFD_RELOC_NDS32_DATA: howto manager. (line 1435) +* BFD_RELOC_NDS32_DIFF16: howto manager. (line 1428) +* BFD_RELOC_NDS32_DIFF32: howto manager. (line 1429) +* BFD_RELOC_NDS32_DIFF8: howto manager. (line 1427) +* BFD_RELOC_NDS32_DIFF_ULEB128: howto manager. (line 1430) +* BFD_RELOC_NDS32_DWARF2_LEB: howto manager. (line 1393) +* BFD_RELOC_NDS32_DWARF2_OP1: howto manager. (line 1391) +* BFD_RELOC_NDS32_DWARF2_OP2: howto manager. (line 1392) +* BFD_RELOC_NDS32_EMPTY: howto manager. (line 1431) +* BFD_RELOC_NDS32_GLOB_DAT: howto manager. (line 1348) +* BFD_RELOC_NDS32_GOT15S2: howto manager. (line 1404) +* BFD_RELOC_NDS32_GOT17S2: howto manager. (line 1405) +* BFD_RELOC_NDS32_GOT20: howto manager. (line 1344) +* BFD_RELOC_NDS32_GOTOFF: howto manager. (line 1351) +* BFD_RELOC_NDS32_GOTOFF_HI20: howto manager. (line 1352) +* BFD_RELOC_NDS32_GOTOFF_LO12: howto manager. (line 1353) +* BFD_RELOC_NDS32_GOTOFF_LO15: howto manager. (line 1402) +* BFD_RELOC_NDS32_GOTOFF_LO19: howto manager. (line 1403) +* BFD_RELOC_NDS32_GOTOFF_SUFF: howto manager. (line 1416) +* BFD_RELOC_NDS32_GOTPC20: howto manager. (line 1354) +* BFD_RELOC_NDS32_GOTPC_HI20: howto manager. (line 1357) +* BFD_RELOC_NDS32_GOTPC_LO12: howto manager. (line 1358) +* BFD_RELOC_NDS32_GOTTPOFF: howto manager. (line 1441) +* BFD_RELOC_NDS32_GOT_HI20: howto manager. (line 1355) +* BFD_RELOC_NDS32_GOT_LO12: howto manager. (line 1356) +* BFD_RELOC_NDS32_GOT_LO15: howto manager. (line 1400) +* BFD_RELOC_NDS32_GOT_LO19: howto manager. (line 1401) +* BFD_RELOC_NDS32_GOT_SUFF: howto manager. (line 1415) +* BFD_RELOC_NDS32_GROUP: howto manager. (line 1467) +* BFD_RELOC_NDS32_HI20: howto manager. (line 1302) +* BFD_RELOC_NDS32_INSN16: howto manager. (line 1360) +* BFD_RELOC_NDS32_JMP_SLOT: howto manager. (line 1349) +* BFD_RELOC_NDS32_LABEL: howto manager. (line 1361) +* BFD_RELOC_NDS32_LO12S0: howto manager. (line 1314) +* BFD_RELOC_NDS32_LO12S0_ORI: howto manager. (line 1317) +* BFD_RELOC_NDS32_LO12S1: howto manager. (line 1311) +* BFD_RELOC_NDS32_LO12S2: howto manager. (line 1308) +* BFD_RELOC_NDS32_LO12S2_DP: howto manager. (line 1388) +* BFD_RELOC_NDS32_LO12S2_SP: howto manager. (line 1389) +* BFD_RELOC_NDS32_LO12S3: howto manager. (line 1305) +* BFD_RELOC_NDS32_LOADSTORE: howto manager. (line 1368) +* BFD_RELOC_NDS32_LONGCALL1: howto manager. (line 1362) +* BFD_RELOC_NDS32_LONGCALL2: howto manager. (line 1363) +* BFD_RELOC_NDS32_LONGCALL3: howto manager. (line 1364) +* BFD_RELOC_NDS32_LONGCALL4: howto manager. (line 1373) +* BFD_RELOC_NDS32_LONGCALL5: howto manager. (line 1374) +* BFD_RELOC_NDS32_LONGCALL6: howto manager. (line 1375) +* BFD_RELOC_NDS32_LONGJUMP1: howto manager. (line 1365) +* BFD_RELOC_NDS32_LONGJUMP2: howto manager. (line 1366) +* BFD_RELOC_NDS32_LONGJUMP3: howto manager. (line 1367) +* BFD_RELOC_NDS32_LONGJUMP4: howto manager. (line 1376) +* BFD_RELOC_NDS32_LONGJUMP5: howto manager. (line 1377) +* BFD_RELOC_NDS32_LONGJUMP6: howto manager. (line 1378) +* BFD_RELOC_NDS32_LONGJUMP7: howto manager. (line 1379) +* BFD_RELOC_NDS32_LSI: howto manager. (line 1469) +* BFD_RELOC_NDS32_MINUEND: howto manager. (line 1425) +* BFD_RELOC_NDS32_MULCALL_SUFF: howto manager. (line 1418) +* BFD_RELOC_NDS32_PLTBLOCK: howto manager. (line 1422) +* BFD_RELOC_NDS32_PLTREL_HI20: howto manager. (line 1381) +* BFD_RELOC_NDS32_PLTREL_LO12: howto manager. (line 1382) +* BFD_RELOC_NDS32_PLT_GOTREL_HI20: howto manager. (line 1383) +* BFD_RELOC_NDS32_PLT_GOTREL_LO12: howto manager. (line 1384) +* BFD_RELOC_NDS32_PLT_GOTREL_LO15: howto manager. (line 1398) +* BFD_RELOC_NDS32_PLT_GOTREL_LO19: howto manager. (line 1399) +* BFD_RELOC_NDS32_PLT_GOTREL_LO20: howto manager. (line 1397) +* BFD_RELOC_NDS32_PLT_GOT_SUFF: howto manager. (line 1417) +* BFD_RELOC_NDS32_PTR: howto manager. (line 1419) +* BFD_RELOC_NDS32_PTR_COUNT: howto manager. (line 1420) +* BFD_RELOC_NDS32_PTR_RESOLVED: howto manager. (line 1421) +* BFD_RELOC_NDS32_RELATIVE: howto manager. (line 1350) +* BFD_RELOC_NDS32_RELAX_ENTRY: howto manager. (line 1414) +* BFD_RELOC_NDS32_RELAX_REGION_BEGIN: howto manager. (line 1423) +* BFD_RELOC_NDS32_RELAX_REGION_END: howto manager. (line 1424) +* BFD_RELOC_NDS32_REMOVE: howto manager. (line 1466) +* BFD_RELOC_NDS32_SDA12S2_DP: howto manager. (line 1386) +* BFD_RELOC_NDS32_SDA12S2_SP: howto manager. (line 1387) +* BFD_RELOC_NDS32_SDA15S0: howto manager. (line 1329) +* BFD_RELOC_NDS32_SDA15S1: howto manager. (line 1326) +* BFD_RELOC_NDS32_SDA15S2: howto manager. (line 1323) +* BFD_RELOC_NDS32_SDA15S3: howto manager. (line 1320) +* BFD_RELOC_NDS32_SDA16S3: howto manager. (line 1332) +* BFD_RELOC_NDS32_SDA17S2: howto manager. (line 1335) +* BFD_RELOC_NDS32_SDA18S1: howto manager. (line 1338) +* BFD_RELOC_NDS32_SDA19S0: howto manager. (line 1341) +* BFD_RELOC_NDS32_SDA_FP7U2_RELA: howto manager. (line 1412) +* BFD_RELOC_NDS32_SUBTRAHEND: howto manager. (line 1426) +* BFD_RELOC_NDS32_TLS_DESC: howto manager. (line 1457) +* BFD_RELOC_NDS32_TLS_DESC_20: howto manager. (line 1460) +* BFD_RELOC_NDS32_TLS_DESC_ADD: howto manager. (line 1462) +* BFD_RELOC_NDS32_TLS_DESC_CALL: howto manager. (line 1464) +* BFD_RELOC_NDS32_TLS_DESC_FUNC: howto manager. (line 1463) +* BFD_RELOC_NDS32_TLS_DESC_HI20: howto manager. (line 1458) +* BFD_RELOC_NDS32_TLS_DESC_LO12: howto manager. (line 1459) +* BFD_RELOC_NDS32_TLS_DESC_MEM: howto manager. (line 1465) +* BFD_RELOC_NDS32_TLS_DESC_SDA17S2: howto manager. (line 1461) +* BFD_RELOC_NDS32_TLS_IEGP_HI20: howto manager. (line 1453) +* BFD_RELOC_NDS32_TLS_IEGP_LO12: howto manager. (line 1454) +* BFD_RELOC_NDS32_TLS_IEGP_LO12S2: howto manager. (line 1455) +* BFD_RELOC_NDS32_TLS_IEGP_LW: howto manager. (line 1456) +* BFD_RELOC_NDS32_TLS_IE_HI20: howto manager. (line 1450) +* BFD_RELOC_NDS32_TLS_IE_LO12: howto manager. (line 1451) +* BFD_RELOC_NDS32_TLS_IE_LO12S2: howto manager. (line 1452) +* BFD_RELOC_NDS32_TLS_LE_15S0: howto manager. (line 1445) +* BFD_RELOC_NDS32_TLS_LE_15S1: howto manager. (line 1446) +* BFD_RELOC_NDS32_TLS_LE_15S2: howto manager. (line 1447) +* BFD_RELOC_NDS32_TLS_LE_20: howto manager. (line 1444) +* BFD_RELOC_NDS32_TLS_LE_ADD: howto manager. (line 1448) +* BFD_RELOC_NDS32_TLS_LE_HI20: howto manager. (line 1442) +* BFD_RELOC_NDS32_TLS_LE_LO12: howto manager. (line 1443) +* BFD_RELOC_NDS32_TLS_LE_LS: howto manager. (line 1449) +* BFD_RELOC_NDS32_TPOFF: howto manager. (line 1440) +* BFD_RELOC_NDS32_TRAN: howto manager. (line 1436) +* BFD_RELOC_NDS32_UPDATE_TA: howto manager. (line 1395) +* BFD_RELOC_NDS32_WORD_9_PCREL: howto manager. (line 1293) +* BFD_RELOC_NIOS2_ALIGN: howto manager. (line 2490) +* BFD_RELOC_NIOS2_CACHE_OPX: howto manager. (line 2480) +* BFD_RELOC_NIOS2_CALL16: howto manager. (line 2492) +* BFD_RELOC_NIOS2_CALL26: howto manager. (line 2478) +* BFD_RELOC_NIOS2_CALL26_NOAT: howto manager. (line 2510) +* BFD_RELOC_NIOS2_CALLR: howto manager. (line 2489) +* BFD_RELOC_NIOS2_CALL_HA: howto manager. (line 2514) +* BFD_RELOC_NIOS2_CALL_LO: howto manager. (line 2513) +* BFD_RELOC_NIOS2_CJMP: howto manager. (line 2488) +* BFD_RELOC_NIOS2_COPY: howto manager. (line 2505) +* BFD_RELOC_NIOS2_GLOB_DAT: howto manager. (line 2506) +* BFD_RELOC_NIOS2_GOT16: howto manager. (line 2491) +* BFD_RELOC_NIOS2_GOTOFF: howto manager. (line 2509) +* BFD_RELOC_NIOS2_GOTOFF_HA: howto manager. (line 2494) +* BFD_RELOC_NIOS2_GOTOFF_LO: howto manager. (line 2493) +* BFD_RELOC_NIOS2_GOT_HA: howto manager. (line 2512) +* BFD_RELOC_NIOS2_GOT_LO: howto manager. (line 2511) +* BFD_RELOC_NIOS2_GPREL: howto manager. (line 2486) +* BFD_RELOC_NIOS2_HI16: howto manager. (line 2483) +* BFD_RELOC_NIOS2_HIADJ16: howto manager. (line 2485) +* BFD_RELOC_NIOS2_IMM5: howto manager. (line 2479) +* BFD_RELOC_NIOS2_IMM6: howto manager. (line 2481) +* BFD_RELOC_NIOS2_IMM8: howto manager. (line 2482) +* BFD_RELOC_NIOS2_JUMP_SLOT: howto manager. (line 2507) +* BFD_RELOC_NIOS2_LO16: howto manager. (line 2484) +* BFD_RELOC_NIOS2_PCREL_HA: howto manager. (line 2496) +* BFD_RELOC_NIOS2_PCREL_LO: howto manager. (line 2495) +* BFD_RELOC_NIOS2_R2_F1I5_2: howto manager. (line 2524) +* BFD_RELOC_NIOS2_R2_I10_1_PCREL: howto manager. (line 2516) +* BFD_RELOC_NIOS2_R2_L5I4X1: howto manager. (line 2525) +* BFD_RELOC_NIOS2_R2_S12: howto manager. (line 2515) +* BFD_RELOC_NIOS2_R2_T1I7_1_PCREL: howto manager. (line 2517) +* BFD_RELOC_NIOS2_R2_T1I7_2: howto manager. (line 2518) +* BFD_RELOC_NIOS2_R2_T1X1I6: howto manager. (line 2526) +* BFD_RELOC_NIOS2_R2_T1X1I6_2: howto manager. (line 2527) +* BFD_RELOC_NIOS2_R2_T2I4: howto manager. (line 2519) +* BFD_RELOC_NIOS2_R2_T2I4_1: howto manager. (line 2520) +* BFD_RELOC_NIOS2_R2_T2I4_2: howto manager. (line 2521) +* BFD_RELOC_NIOS2_R2_X1I7_2: howto manager. (line 2522) +* BFD_RELOC_NIOS2_R2_X2L5: howto manager. (line 2523) +* BFD_RELOC_NIOS2_RELATIVE: howto manager. (line 2508) +* BFD_RELOC_NIOS2_S16: howto manager. (line 2476) +* BFD_RELOC_NIOS2_TLS_DTPMOD: howto manager. (line 2502) +* BFD_RELOC_NIOS2_TLS_DTPREL: howto manager. (line 2503) +* BFD_RELOC_NIOS2_TLS_GD16: howto manager. (line 2497) +* BFD_RELOC_NIOS2_TLS_IE16: howto manager. (line 2500) +* BFD_RELOC_NIOS2_TLS_LDM16: howto manager. (line 2498) +* BFD_RELOC_NIOS2_TLS_LDO16: howto manager. (line 2499) +* BFD_RELOC_NIOS2_TLS_LE16: howto manager. (line 2501) +* BFD_RELOC_NIOS2_TLS_TPREL: howto manager. (line 2504) +* BFD_RELOC_NIOS2_U16: howto manager. (line 2477) +* BFD_RELOC_NIOS2_UJMP: howto manager. (line 2487) +* BFD_RELOC_NONE: howto manager. (line 118) +* BFD_RELOC_NS32K_DISP_16: howto manager. (line 586) +* BFD_RELOC_NS32K_DISP_16_PCREL: howto manager. (line 589) +* BFD_RELOC_NS32K_DISP_32: howto manager. (line 587) +* BFD_RELOC_NS32K_DISP_32_PCREL: howto manager. (line 590) +* BFD_RELOC_NS32K_DISP_8: howto manager. (line 585) +* BFD_RELOC_NS32K_DISP_8_PCREL: howto manager. (line 588) +* BFD_RELOC_NS32K_IMM_16: howto manager. (line 580) +* BFD_RELOC_NS32K_IMM_16_PCREL: howto manager. (line 583) +* BFD_RELOC_NS32K_IMM_32: howto manager. (line 581) +* BFD_RELOC_NS32K_IMM_32_PCREL: howto manager. (line 584) +* BFD_RELOC_NS32K_IMM_8: howto manager. (line 579) +* BFD_RELOC_NS32K_IMM_8_PCREL: howto manager. (line 582) +* bfd_reloc_offset_in_range: typedef arelent. (line 303) +* bfd_reloc_offset_in_range <1>: typedef arelent. (line 307) +* BFD_RELOC_OR1K_COPY: howto manager. (line 2394) +* BFD_RELOC_OR1K_GLOB_DAT: howto manager. (line 2395) +* BFD_RELOC_OR1K_GOT16: howto manager. (line 2388) +* BFD_RELOC_OR1K_GOTOFF_SLO16: howto manager. (line 2393) +* BFD_RELOC_OR1K_GOTPC_HI16: howto manager. (line 2385) +* BFD_RELOC_OR1K_GOTPC_LO16: howto manager. (line 2386) +* BFD_RELOC_OR1K_GOT_AHI16: howto manager. (line 2387) +* BFD_RELOC_OR1K_GOT_LO13: howto manager. (line 2390) +* BFD_RELOC_OR1K_GOT_PG21: howto manager. (line 2389) +* BFD_RELOC_OR1K_JMP_SLOT: howto manager. (line 2396) +* BFD_RELOC_OR1K_LO13: howto manager. (line 2383) +* BFD_RELOC_OR1K_PCREL_PG21: howto manager. (line 2382) +* BFD_RELOC_OR1K_PLT26: howto manager. (line 2391) +* BFD_RELOC_OR1K_PLTA26: howto manager. (line 2392) +* BFD_RELOC_OR1K_RELATIVE: howto manager. (line 2397) +* BFD_RELOC_OR1K_REL_26: howto manager. (line 2380) +* BFD_RELOC_OR1K_SLO13: howto manager. (line 2384) +* BFD_RELOC_OR1K_SLO16: howto manager. (line 2381) +* BFD_RELOC_OR1K_TLS_DTPMOD: howto manager. (line 2419) +* BFD_RELOC_OR1K_TLS_DTPOFF: howto manager. (line 2418) +* BFD_RELOC_OR1K_TLS_GD_HI16: howto manager. (line 2398) +* BFD_RELOC_OR1K_TLS_GD_LO13: howto manager. (line 2401) +* BFD_RELOC_OR1K_TLS_GD_LO16: howto manager. (line 2399) +* BFD_RELOC_OR1K_TLS_GD_PG21: howto manager. (line 2400) +* BFD_RELOC_OR1K_TLS_IE_AHI16: howto manager. (line 2409) +* BFD_RELOC_OR1K_TLS_IE_HI16: howto manager. (line 2408) +* BFD_RELOC_OR1K_TLS_IE_LO13: howto manager. (line 2412) +* BFD_RELOC_OR1K_TLS_IE_LO16: howto manager. (line 2410) +* BFD_RELOC_OR1K_TLS_IE_PG21: howto manager. (line 2411) +* BFD_RELOC_OR1K_TLS_LDM_HI16: howto manager. (line 2402) +* BFD_RELOC_OR1K_TLS_LDM_LO13: howto manager. (line 2405) +* BFD_RELOC_OR1K_TLS_LDM_LO16: howto manager. (line 2403) +* BFD_RELOC_OR1K_TLS_LDM_PG21: howto manager. (line 2404) +* BFD_RELOC_OR1K_TLS_LDO_HI16: howto manager. (line 2406) +* BFD_RELOC_OR1K_TLS_LDO_LO16: howto manager. (line 2407) +* BFD_RELOC_OR1K_TLS_LE_AHI16: howto manager. (line 2414) +* BFD_RELOC_OR1K_TLS_LE_HI16: howto manager. (line 2413) +* BFD_RELOC_OR1K_TLS_LE_LO16: howto manager. (line 2415) +* BFD_RELOC_OR1K_TLS_LE_SLO16: howto manager. (line 2416) +* BFD_RELOC_OR1K_TLS_TPOFF: howto manager. (line 2417) +* BFD_RELOC_PDP11_DISP_6_PCREL: howto manager. (line 593) +* BFD_RELOC_PDP11_DISP_8_PCREL: howto manager. (line 592) +* BFD_RELOC_PJ_CODE_DIR16: howto manager. (line 597) +* BFD_RELOC_PJ_CODE_DIR32: howto manager. (line 598) +* BFD_RELOC_PJ_CODE_HI16: howto manager. (line 595) +* BFD_RELOC_PJ_CODE_LO16: howto manager. (line 596) +* BFD_RELOC_PJ_CODE_REL16: howto manager. (line 599) +* BFD_RELOC_PJ_CODE_REL32: howto manager. (line 600) +* BFD_RELOC_PPC64_ADDR16_DS: howto manager. (line 666) +* BFD_RELOC_PPC64_ADDR16_HIGH: howto manager. (line 677) +* BFD_RELOC_PPC64_ADDR16_HIGHA: howto manager. (line 678) +* BFD_RELOC_PPC64_ADDR16_HIGHER34: howto manager. (line 696) +* BFD_RELOC_PPC64_ADDR16_HIGHERA34: howto manager. (line 697) +* BFD_RELOC_PPC64_ADDR16_HIGHEST34: howto manager. (line 698) +* BFD_RELOC_PPC64_ADDR16_HIGHESTA34: howto manager. (line 699) +* BFD_RELOC_PPC64_ADDR16_LO_DS: howto manager. (line 667) +* BFD_RELOC_PPC64_ADDR64_LOCAL: howto manager. (line 685) +* BFD_RELOC_PPC64_D28: howto manager. (line 704) +* BFD_RELOC_PPC64_D34: howto manager. (line 689) +* BFD_RELOC_PPC64_D34_HA30: howto manager. (line 692) +* BFD_RELOC_PPC64_D34_HI30: howto manager. (line 691) +* BFD_RELOC_PPC64_D34_LO: howto manager. (line 690) +* BFD_RELOC_PPC64_DTPREL16_DS: howto manager. (line 755) +* BFD_RELOC_PPC64_DTPREL16_HIGH: howto manager. (line 757) +* BFD_RELOC_PPC64_DTPREL16_HIGHA: howto manager. (line 758) +* BFD_RELOC_PPC64_DTPREL16_HIGHER: howto manager. (line 759) +* BFD_RELOC_PPC64_DTPREL16_HIGHERA: howto manager. (line 760) +* BFD_RELOC_PPC64_DTPREL16_HIGHEST: howto manager. (line 761) +* BFD_RELOC_PPC64_DTPREL16_HIGHESTA: howto manager. (line 762) +* BFD_RELOC_PPC64_DTPREL16_LO_DS: howto manager. (line 756) +* BFD_RELOC_PPC64_DTPREL34: howto manager. (line 764) +* BFD_RELOC_PPC64_ENTRY: howto manager. (line 686) +* BFD_RELOC_PPC64_GOT16_DS: howto manager. (line 668) +* BFD_RELOC_PPC64_GOT16_LO_DS: howto manager. (line 669) +* BFD_RELOC_PPC64_GOT_DTPREL_PCREL34: howto manager. (line 768) +* BFD_RELOC_PPC64_GOT_PCREL34: howto manager. (line 694) +* BFD_RELOC_PPC64_GOT_TLSGD_PCREL34: howto manager. (line 765) +* BFD_RELOC_PPC64_GOT_TLSLD_PCREL34: howto manager. (line 766) +* BFD_RELOC_PPC64_GOT_TPREL_PCREL34: howto manager. (line 767) +* BFD_RELOC_PPC64_HIGHER: howto manager. (line 654) +* BFD_RELOC_PPC64_HIGHER_S: howto manager. (line 655) +* BFD_RELOC_PPC64_HIGHEST: howto manager. (line 656) +* BFD_RELOC_PPC64_HIGHEST_S: howto manager. (line 657) +* BFD_RELOC_PPC64_PCREL28: howto manager. (line 705) +* BFD_RELOC_PPC64_PCREL34: howto manager. (line 693) +* BFD_RELOC_PPC64_PLT16_LO_DS: howto manager. (line 670) +* BFD_RELOC_PPC64_PLTGOT16: howto manager. (line 662) +* BFD_RELOC_PPC64_PLTGOT16_DS: howto manager. (line 675) +* BFD_RELOC_PPC64_PLTGOT16_HA: howto manager. (line 665) +* BFD_RELOC_PPC64_PLTGOT16_HI: howto manager. (line 664) +* BFD_RELOC_PPC64_PLTGOT16_LO: howto manager. (line 663) +* BFD_RELOC_PPC64_PLTGOT16_LO_DS: howto manager. (line 676) +* BFD_RELOC_PPC64_PLT_PCREL34: howto manager. (line 695) +* BFD_RELOC_PPC64_REL16_HIGH: howto manager. (line 679) +* BFD_RELOC_PPC64_REL16_HIGHA: howto manager. (line 680) +* BFD_RELOC_PPC64_REL16_HIGHER: howto manager. (line 681) +* BFD_RELOC_PPC64_REL16_HIGHER34: howto manager. (line 700) +* BFD_RELOC_PPC64_REL16_HIGHERA: howto manager. (line 682) +* BFD_RELOC_PPC64_REL16_HIGHERA34: howto manager. (line 701) +* BFD_RELOC_PPC64_REL16_HIGHEST: howto manager. (line 683) +* BFD_RELOC_PPC64_REL16_HIGHEST34: howto manager. (line 702) +* BFD_RELOC_PPC64_REL16_HIGHESTA: howto manager. (line 684) +* BFD_RELOC_PPC64_REL16_HIGHESTA34: howto manager. (line 703) +* BFD_RELOC_PPC64_REL24_NOTOC: howto manager. (line 687) +* BFD_RELOC_PPC64_REL24_P9NOTOC: howto manager. (line 688) +* BFD_RELOC_PPC64_SECTOFF_DS: howto manager. (line 671) +* BFD_RELOC_PPC64_SECTOFF_LO_DS: howto manager. (line 672) +* BFD_RELOC_PPC64_TLSGD: howto manager. (line 741) +* BFD_RELOC_PPC64_TLSIE: howto manager. (line 744) +* BFD_RELOC_PPC64_TLSLD: howto manager. (line 742) +* BFD_RELOC_PPC64_TLSLE: howto manager. (line 743) +* BFD_RELOC_PPC64_TLSM: howto manager. (line 745) +* BFD_RELOC_PPC64_TLSML: howto manager. (line 746) +* BFD_RELOC_PPC64_TLS_PCREL: howto manager. (line 769) +* BFD_RELOC_PPC64_TOC: howto manager. (line 661) +* BFD_RELOC_PPC64_TOC16_DS: howto manager. (line 673) +* BFD_RELOC_PPC64_TOC16_HA: howto manager. (line 660) +* BFD_RELOC_PPC64_TOC16_HI: howto manager. (line 659) +* BFD_RELOC_PPC64_TOC16_LO: howto manager. (line 658) +* BFD_RELOC_PPC64_TOC16_LO_DS: howto manager. (line 674) +* BFD_RELOC_PPC64_TPREL16_DS: howto manager. (line 747) +* BFD_RELOC_PPC64_TPREL16_HIGH: howto manager. (line 749) +* BFD_RELOC_PPC64_TPREL16_HIGHA: howto manager. (line 750) +* BFD_RELOC_PPC64_TPREL16_HIGHER: howto manager. (line 751) +* BFD_RELOC_PPC64_TPREL16_HIGHERA: howto manager. (line 752) +* BFD_RELOC_PPC64_TPREL16_HIGHEST: howto manager. (line 753) +* BFD_RELOC_PPC64_TPREL16_HIGHESTA: howto manager. (line 754) +* BFD_RELOC_PPC64_TPREL16_LO_DS: howto manager. (line 748) +* BFD_RELOC_PPC64_TPREL34: howto manager. (line 763) +* BFD_RELOC_PPC_16DX_HA: howto manager. (line 651) +* BFD_RELOC_PPC_B16: howto manager. (line 607) +* BFD_RELOC_PPC_B16_BRNTAKEN: howto manager. (line 609) +* BFD_RELOC_PPC_B16_BRTAKEN: howto manager. (line 608) +* BFD_RELOC_PPC_B26: howto manager. (line 602) +* BFD_RELOC_PPC_BA16: howto manager. (line 610) +* BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager. (line 612) +* BFD_RELOC_PPC_BA16_BRTAKEN: howto manager. (line 611) +* BFD_RELOC_PPC_BA26: howto manager. (line 603) +* BFD_RELOC_PPC_COPY: howto manager. (line 613) +* BFD_RELOC_PPC_DTPMOD: howto manager. (line 714) +* BFD_RELOC_PPC_DTPREL: howto manager. (line 724) +* BFD_RELOC_PPC_DTPREL16: howto manager. (line 720) +* BFD_RELOC_PPC_DTPREL16_HA: howto manager. (line 723) +* BFD_RELOC_PPC_DTPREL16_HI: howto manager. (line 722) +* BFD_RELOC_PPC_DTPREL16_LO: howto manager. (line 721) +* BFD_RELOC_PPC_EMB_BIT_FLD: howto manager. (line 632) +* BFD_RELOC_PPC_EMB_MRKREF: howto manager. (line 627) +* BFD_RELOC_PPC_EMB_NADDR16: howto manager. (line 619) +* BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager. (line 622) +* BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager. (line 621) +* BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager. (line 620) +* BFD_RELOC_PPC_EMB_NADDR32: howto manager. (line 618) +* BFD_RELOC_PPC_EMB_RELSDA: howto manager. (line 633) +* BFD_RELOC_PPC_EMB_RELSEC16: howto manager. (line 628) +* BFD_RELOC_PPC_EMB_RELST_HA: howto manager. (line 631) +* BFD_RELOC_PPC_EMB_RELST_HI: howto manager. (line 630) +* BFD_RELOC_PPC_EMB_RELST_LO: howto manager. (line 629) +* BFD_RELOC_PPC_EMB_SDA21: howto manager. (line 626) +* BFD_RELOC_PPC_EMB_SDA2I16: howto manager. (line 624) +* BFD_RELOC_PPC_EMB_SDA2REL: howto manager. (line 625) +* BFD_RELOC_PPC_EMB_SDAI16: howto manager. (line 623) +* BFD_RELOC_PPC_GLOB_DAT: howto manager. (line 614) +* BFD_RELOC_PPC_GOT_DTPREL16: howto manager. (line 737) +* BFD_RELOC_PPC_GOT_DTPREL16_HA: howto manager. (line 740) +* BFD_RELOC_PPC_GOT_DTPREL16_HI: howto manager. (line 739) +* BFD_RELOC_PPC_GOT_DTPREL16_LO: howto manager. (line 738) +* BFD_RELOC_PPC_GOT_TLSGD16: howto manager. (line 725) +* BFD_RELOC_PPC_GOT_TLSGD16_HA: howto manager. (line 728) +* BFD_RELOC_PPC_GOT_TLSGD16_HI: howto manager. (line 727) +* BFD_RELOC_PPC_GOT_TLSGD16_LO: howto manager. (line 726) +* BFD_RELOC_PPC_GOT_TLSLD16: howto manager. (line 729) +* BFD_RELOC_PPC_GOT_TLSLD16_HA: howto manager. (line 732) +* BFD_RELOC_PPC_GOT_TLSLD16_HI: howto manager. (line 731) +* BFD_RELOC_PPC_GOT_TLSLD16_LO: howto manager. (line 730) +* BFD_RELOC_PPC_GOT_TPREL16: howto manager. (line 733) +* BFD_RELOC_PPC_GOT_TPREL16_HA: howto manager. (line 736) +* BFD_RELOC_PPC_GOT_TPREL16_HI: howto manager. (line 735) +* BFD_RELOC_PPC_GOT_TPREL16_LO: howto manager. (line 734) +* BFD_RELOC_PPC_JMP_SLOT: howto manager. (line 615) +* BFD_RELOC_PPC_LOCAL24PC: howto manager. (line 617) +* BFD_RELOC_PPC_NEG: howto manager. (line 653) +* BFD_RELOC_PPC_REL16DX_HA: howto manager. (line 652) +* BFD_RELOC_PPC_RELATIVE: howto manager. (line 616) +* BFD_RELOC_PPC_TLS: howto manager. (line 707) +* BFD_RELOC_PPC_TLSGD: howto manager. (line 708) +* BFD_RELOC_PPC_TLSIE: howto manager. (line 711) +* BFD_RELOC_PPC_TLSLD: howto manager. (line 709) +* BFD_RELOC_PPC_TLSLE: howto manager. (line 710) +* BFD_RELOC_PPC_TLSM: howto manager. (line 712) +* BFD_RELOC_PPC_TLSML: howto manager. (line 713) +* BFD_RELOC_PPC_TOC16: howto manager. (line 604) +* BFD_RELOC_PPC_TOC16_HI: howto manager. (line 606) +* BFD_RELOC_PPC_TOC16_LO: howto manager. (line 605) +* BFD_RELOC_PPC_TPREL: howto manager. (line 719) +* BFD_RELOC_PPC_TPREL16: howto manager. (line 715) +* BFD_RELOC_PPC_TPREL16_HA: howto manager. (line 718) +* BFD_RELOC_PPC_TPREL16_HI: howto manager. (line 717) +* BFD_RELOC_PPC_TPREL16_LO: howto manager. (line 716) +* BFD_RELOC_PPC_VLE_HA16A: howto manager. (line 641) +* BFD_RELOC_PPC_VLE_HA16D: howto manager. (line 642) +* BFD_RELOC_PPC_VLE_HI16A: howto manager. (line 639) +* BFD_RELOC_PPC_VLE_HI16D: howto manager. (line 640) +* BFD_RELOC_PPC_VLE_LO16A: howto manager. (line 637) +* BFD_RELOC_PPC_VLE_LO16D: howto manager. (line 638) +* BFD_RELOC_PPC_VLE_REL15: howto manager. (line 635) +* BFD_RELOC_PPC_VLE_REL24: howto manager. (line 636) +* BFD_RELOC_PPC_VLE_REL8: howto manager. (line 634) +* BFD_RELOC_PPC_VLE_SDA21: howto manager. (line 643) +* BFD_RELOC_PPC_VLE_SDA21_LO: howto manager. (line 644) +* BFD_RELOC_PPC_VLE_SDAREL_HA16A: howto manager. (line 649) +* BFD_RELOC_PPC_VLE_SDAREL_HA16D: howto manager. (line 650) +* BFD_RELOC_PPC_VLE_SDAREL_HI16A: howto manager. (line 647) +* BFD_RELOC_PPC_VLE_SDAREL_HI16D: howto manager. (line 648) +* BFD_RELOC_PPC_VLE_SDAREL_LO16A: howto manager. (line 645) +* BFD_RELOC_PPC_VLE_SDAREL_LO16D: howto manager. (line 646) +* BFD_RELOC_PRU_16_PMEM: howto manager. (line 2542) +* BFD_RELOC_PRU_32_PMEM: howto manager. (line 2541) +* BFD_RELOC_PRU_GNU_DIFF16: howto manager. (line 2546) +* BFD_RELOC_PRU_GNU_DIFF16_PMEM: howto manager. (line 2548) +* BFD_RELOC_PRU_GNU_DIFF32: howto manager. (line 2547) +* BFD_RELOC_PRU_GNU_DIFF32_PMEM: howto manager. (line 2549) +* BFD_RELOC_PRU_GNU_DIFF8: howto manager. (line 2545) +* BFD_RELOC_PRU_LDI32: howto manager. (line 2533) +* BFD_RELOC_PRU_S10_PCREL: howto manager. (line 2537) +* BFD_RELOC_PRU_U16: howto manager. (line 2529) +* BFD_RELOC_PRU_U16_PMEMIMM: howto manager. (line 2531) +* BFD_RELOC_PRU_U8_PCREL: howto manager. (line 2539) +* BFD_RELOC_RELC: howto manager. (line 2433) +* BFD_RELOC_RISCV_32_PCREL: howto manager. (line 1899) +* BFD_RELOC_RISCV_ADD16: howto manager. (line 1867) +* BFD_RELOC_RISCV_ADD32: howto manager. (line 1868) +* BFD_RELOC_RISCV_ADD64: howto manager. (line 1869) +* BFD_RELOC_RISCV_ADD8: howto manager. (line 1866) +* BFD_RELOC_RISCV_ALIGN: howto manager. (line 1884) +* BFD_RELOC_RISCV_CALL: howto manager. (line 1864) +* BFD_RELOC_RISCV_CALL_PLT: howto manager. (line 1865) +* BFD_RELOC_RISCV_CFA: howto manager. (line 1893) +* BFD_RELOC_RISCV_GOT_HI20: howto manager. (line 1874) +* BFD_RELOC_RISCV_GPREL12_I: howto manager. (line 1858) +* BFD_RELOC_RISCV_GPREL12_S: howto manager. (line 1859) +* BFD_RELOC_RISCV_GPREL_I: howto manager. (line 1888) +* BFD_RELOC_RISCV_GPREL_S: howto manager. (line 1889) +* BFD_RELOC_RISCV_HI20: howto manager. (line 1852) +* BFD_RELOC_RISCV_JMP: howto manager. (line 1877) +* BFD_RELOC_RISCV_LO12_I: howto manager. (line 1856) +* BFD_RELOC_RISCV_LO12_S: howto manager. (line 1857) +* BFD_RELOC_RISCV_PCREL_HI20: howto manager. (line 1853) +* BFD_RELOC_RISCV_PCREL_LO12_I: howto manager. (line 1854) +* BFD_RELOC_RISCV_PCREL_LO12_S: howto manager. (line 1855) +* BFD_RELOC_RISCV_RELAX: howto manager. (line 1892) +* BFD_RELOC_RISCV_RVC_BRANCH: howto manager. (line 1885) +* BFD_RELOC_RISCV_RVC_JUMP: howto manager. (line 1886) +* BFD_RELOC_RISCV_RVC_LUI: howto manager. (line 1887) +* BFD_RELOC_RISCV_SET16: howto manager. (line 1897) +* BFD_RELOC_RISCV_SET32: howto manager. (line 1898) +* BFD_RELOC_RISCV_SET6: howto manager. (line 1895) +* BFD_RELOC_RISCV_SET8: howto manager. (line 1896) +* BFD_RELOC_RISCV_SET_ULEB128: howto manager. (line 1900) +* BFD_RELOC_RISCV_SUB16: howto manager. (line 1871) +* BFD_RELOC_RISCV_SUB32: howto manager. (line 1872) +* BFD_RELOC_RISCV_SUB6: howto manager. (line 1894) +* BFD_RELOC_RISCV_SUB64: howto manager. (line 1873) +* BFD_RELOC_RISCV_SUB8: howto manager. (line 1870) +* BFD_RELOC_RISCV_SUB_ULEB128: howto manager. (line 1901) +* BFD_RELOC_RISCV_TLS_DTPMOD32: howto manager. (line 1878) +* BFD_RELOC_RISCV_TLS_DTPMOD64: howto manager. (line 1880) +* BFD_RELOC_RISCV_TLS_DTPREL32: howto manager. (line 1879) +* BFD_RELOC_RISCV_TLS_DTPREL64: howto manager. (line 1881) +* BFD_RELOC_RISCV_TLS_GD_HI20: howto manager. (line 1876) +* BFD_RELOC_RISCV_TLS_GOT_HI20: howto manager. (line 1875) +* BFD_RELOC_RISCV_TLS_TPREL32: howto manager. (line 1882) +* BFD_RELOC_RISCV_TLS_TPREL64: howto manager. (line 1883) +* BFD_RELOC_RISCV_TPREL_ADD: howto manager. (line 1863) +* BFD_RELOC_RISCV_TPREL_HI20: howto manager. (line 1860) +* BFD_RELOC_RISCV_TPREL_I: howto manager. (line 1890) +* BFD_RELOC_RISCV_TPREL_LO12_I: howto manager. (line 1861) +* BFD_RELOC_RISCV_TPREL_LO12_S: howto manager. (line 1862) +* BFD_RELOC_RISCV_TPREL_S: howto manager. (line 1891) +* BFD_RELOC_RL78_16U: howto manager. (line 1911) +* BFD_RELOC_RL78_16_OP: howto manager. (line 1907) +* BFD_RELOC_RL78_24U: howto manager. (line 1912) +* BFD_RELOC_RL78_24_OP: howto manager. (line 1908) +* BFD_RELOC_RL78_32_OP: howto manager. (line 1909) +* BFD_RELOC_RL78_8U: howto manager. (line 1910) +* BFD_RELOC_RL78_ABS16: howto manager. (line 1924) +* BFD_RELOC_RL78_ABS16U: howto manager. (line 1928) +* BFD_RELOC_RL78_ABS16UL: howto manager. (line 1930) +* BFD_RELOC_RL78_ABS16UW: howto manager. (line 1929) +* BFD_RELOC_RL78_ABS16_REV: howto manager. (line 1925) +* BFD_RELOC_RL78_ABS32: howto manager. (line 1926) +* BFD_RELOC_RL78_ABS32_REV: howto manager. (line 1927) +* BFD_RELOC_RL78_ABS8: howto manager. (line 1923) +* BFD_RELOC_RL78_CODE: howto manager. (line 1935) +* BFD_RELOC_RL78_DIFF: howto manager. (line 1914) +* BFD_RELOC_RL78_DIR3U_PCREL: howto manager. (line 1913) +* BFD_RELOC_RL78_GPRELB: howto manager. (line 1915) +* BFD_RELOC_RL78_GPRELL: howto manager. (line 1917) +* BFD_RELOC_RL78_GPRELW: howto manager. (line 1916) +* BFD_RELOC_RL78_HI16: howto manager. (line 1932) +* BFD_RELOC_RL78_HI8: howto manager. (line 1933) +* BFD_RELOC_RL78_LO16: howto manager. (line 1934) +* BFD_RELOC_RL78_NEG16: howto manager. (line 1904) +* BFD_RELOC_RL78_NEG24: howto manager. (line 1905) +* BFD_RELOC_RL78_NEG32: howto manager. (line 1906) +* BFD_RELOC_RL78_NEG8: howto manager. (line 1903) +* BFD_RELOC_RL78_OP_AND: howto manager. (line 1921) +* BFD_RELOC_RL78_OP_NEG: howto manager. (line 1920) +* BFD_RELOC_RL78_OP_SHRA: howto manager. (line 1922) +* BFD_RELOC_RL78_OP_SUBTRACT: howto manager. (line 1919) +* BFD_RELOC_RL78_RELAX: howto manager. (line 1931) +* BFD_RELOC_RL78_SADDR: howto manager. (line 1936) +* BFD_RELOC_RL78_SYM: howto manager. (line 1918) +* BFD_RELOC_RVA: howto manager. (line 95) +* BFD_RELOC_RX_16U: howto manager. (line 1946) +* BFD_RELOC_RX_16_OP: howto manager. (line 1942) +* BFD_RELOC_RX_24U: howto manager. (line 1947) +* BFD_RELOC_RX_24_OP: howto manager. (line 1943) +* BFD_RELOC_RX_32_OP: howto manager. (line 1944) +* BFD_RELOC_RX_8U: howto manager. (line 1945) +* BFD_RELOC_RX_ABS16: howto manager. (line 1957) +* BFD_RELOC_RX_ABS16U: howto manager. (line 1961) +* BFD_RELOC_RX_ABS16UL: howto manager. (line 1963) +* BFD_RELOC_RX_ABS16UW: howto manager. (line 1962) +* BFD_RELOC_RX_ABS16_REV: howto manager. (line 1958) +* BFD_RELOC_RX_ABS32: howto manager. (line 1959) +* BFD_RELOC_RX_ABS32_REV: howto manager. (line 1960) +* BFD_RELOC_RX_ABS8: howto manager. (line 1956) +* BFD_RELOC_RX_DIFF: howto manager. (line 1949) +* BFD_RELOC_RX_DIR3U_PCREL: howto manager. (line 1948) +* BFD_RELOC_RX_GPRELB: howto manager. (line 1950) +* BFD_RELOC_RX_GPRELL: howto manager. (line 1952) +* BFD_RELOC_RX_GPRELW: howto manager. (line 1951) +* BFD_RELOC_RX_NEG16: howto manager. (line 1939) +* BFD_RELOC_RX_NEG24: howto manager. (line 1940) +* BFD_RELOC_RX_NEG32: howto manager. (line 1941) +* BFD_RELOC_RX_NEG8: howto manager. (line 1938) +* BFD_RELOC_RX_OP_NEG: howto manager. (line 1955) +* BFD_RELOC_RX_OP_SUBTRACT: howto manager. (line 1954) +* BFD_RELOC_RX_RELAX: howto manager. (line 1964) +* BFD_RELOC_RX_SYM: howto manager. (line 1953) +* BFD_RELOC_S12Z_15_PCREL: howto manager. (line 2276) +* BFD_RELOC_S12Z_OPR: howto manager. (line 3543) +* BFD_RELOC_SCORE16_BRANCH: howto manager. (line 2067) +* BFD_RELOC_SCORE16_JMP: howto manager. (line 2065) +* BFD_RELOC_SCORE_BCMP: howto manager. (line 2069) +* BFD_RELOC_SCORE_BRANCH: howto manager. (line 2059) +* BFD_RELOC_SCORE_CALL15: howto manager. (line 2073) +* BFD_RELOC_SCORE_DUMMY2: howto manager. (line 2056) +* BFD_RELOC_SCORE_DUMMY_HI16: howto manager. (line 2074) +* BFD_RELOC_SCORE_GOT15: howto manager. (line 2071) +* BFD_RELOC_SCORE_GOT_LO16: howto manager. (line 2072) +* BFD_RELOC_SCORE_GPREL15: howto manager. (line 2054) +* BFD_RELOC_SCORE_IMM30: howto manager. (line 2061) +* BFD_RELOC_SCORE_IMM32: howto manager. (line 2063) +* BFD_RELOC_SCORE_JMP: howto manager. (line 2057) +* BFD_RELOC_SH_ALIGN: howto manager. (line 966) +* BFD_RELOC_SH_CODE: howto manager. (line 967) +* BFD_RELOC_SH_COPY: howto manager. (line 972) +* BFD_RELOC_SH_COPY64: howto manager. (line 997) +* BFD_RELOC_SH_COUNT: howto manager. (line 965) +* BFD_RELOC_SH_DATA: howto manager. (line 968) +* BFD_RELOC_SH_DISP12: howto manager. (line 948) +* BFD_RELOC_SH_DISP12BY2: howto manager. (line 949) +* BFD_RELOC_SH_DISP12BY4: howto manager. (line 950) +* BFD_RELOC_SH_DISP12BY8: howto manager. (line 951) +* BFD_RELOC_SH_DISP20: howto manager. (line 952) +* BFD_RELOC_SH_DISP20BY8: howto manager. (line 953) +* BFD_RELOC_SH_FUNCDESC: howto manager. (line 1040) +* BFD_RELOC_SH_GLOB_DAT: howto manager. (line 973) +* BFD_RELOC_SH_GLOB_DAT64: howto manager. (line 998) +* BFD_RELOC_SH_GOT10BY4: howto manager. (line 1001) +* BFD_RELOC_SH_GOT10BY8: howto manager. (line 1002) +* BFD_RELOC_SH_GOT20: howto manager. (line 1034) +* BFD_RELOC_SH_GOTFUNCDESC: howto manager. (line 1036) +* BFD_RELOC_SH_GOTFUNCDESC20: howto manager. (line 1037) +* BFD_RELOC_SH_GOTOFF20: howto manager. (line 1035) +* BFD_RELOC_SH_GOTOFFFUNCDESC: howto manager. (line 1038) +* BFD_RELOC_SH_GOTOFFFUNCDESC20: howto manager. (line 1039) +* BFD_RELOC_SH_GOTOFF_HI16: howto manager. (line 992) +* BFD_RELOC_SH_GOTOFF_LOW16: howto manager. (line 989) +* BFD_RELOC_SH_GOTOFF_MEDHI16: howto manager. (line 991) +* BFD_RELOC_SH_GOTOFF_MEDLOW16: howto manager. (line 990) +* BFD_RELOC_SH_GOTPC: howto manager. (line 976) +* BFD_RELOC_SH_GOTPC_HI16: howto manager. (line 996) +* BFD_RELOC_SH_GOTPC_LOW16: howto manager. (line 993) +* BFD_RELOC_SH_GOTPC_MEDHI16: howto manager. (line 995) +* BFD_RELOC_SH_GOTPC_MEDLOW16: howto manager. (line 994) +* BFD_RELOC_SH_GOTPLT10BY4: howto manager. (line 1003) +* BFD_RELOC_SH_GOTPLT10BY8: howto manager. (line 1004) +* BFD_RELOC_SH_GOTPLT32: howto manager. (line 1005) +* BFD_RELOC_SH_GOTPLT_HI16: howto manager. (line 984) +* BFD_RELOC_SH_GOTPLT_LOW16: howto manager. (line 981) +* BFD_RELOC_SH_GOTPLT_MEDHI16: howto manager. (line 983) +* BFD_RELOC_SH_GOTPLT_MEDLOW16: howto manager. (line 982) +* BFD_RELOC_SH_GOT_HI16: howto manager. (line 980) +* BFD_RELOC_SH_GOT_LOW16: howto manager. (line 977) +* BFD_RELOC_SH_GOT_MEDHI16: howto manager. (line 979) +* BFD_RELOC_SH_GOT_MEDLOW16: howto manager. (line 978) +* BFD_RELOC_SH_IMM3: howto manager. (line 946) +* BFD_RELOC_SH_IMM3U: howto manager. (line 947) +* BFD_RELOC_SH_IMM4: howto manager. (line 954) +* BFD_RELOC_SH_IMM4BY2: howto manager. (line 955) +* BFD_RELOC_SH_IMM4BY4: howto manager. (line 956) +* BFD_RELOC_SH_IMM8: howto manager. (line 957) +* BFD_RELOC_SH_IMM8BY2: howto manager. (line 958) +* BFD_RELOC_SH_IMM8BY4: howto manager. (line 959) +* BFD_RELOC_SH_IMMS10: howto manager. (line 1011) +* BFD_RELOC_SH_IMMS10BY2: howto manager. (line 1012) +* BFD_RELOC_SH_IMMS10BY4: howto manager. (line 1013) +* BFD_RELOC_SH_IMMS10BY8: howto manager. (line 1014) +* BFD_RELOC_SH_IMMS16: howto manager. (line 1015) +* BFD_RELOC_SH_IMMS6: howto manager. (line 1008) +* BFD_RELOC_SH_IMMS6BY32: howto manager. (line 1009) +* BFD_RELOC_SH_IMMU16: howto manager. (line 1016) +* BFD_RELOC_SH_IMMU5: howto manager. (line 1007) +* BFD_RELOC_SH_IMMU6: howto manager. (line 1010) +* BFD_RELOC_SH_IMM_HI16: howto manager. (line 1023) +* BFD_RELOC_SH_IMM_HI16_PCREL: howto manager. (line 1024) +* BFD_RELOC_SH_IMM_LOW16: howto manager. (line 1017) +* BFD_RELOC_SH_IMM_LOW16_PCREL: howto manager. (line 1018) +* BFD_RELOC_SH_IMM_MEDHI16: howto manager. (line 1021) +* BFD_RELOC_SH_IMM_MEDHI16_PCREL: howto manager. (line 1022) +* BFD_RELOC_SH_IMM_MEDLOW16: howto manager. (line 1019) +* BFD_RELOC_SH_IMM_MEDLOW16_PCREL: howto manager. (line 1020) +* BFD_RELOC_SH_JMP_SLOT: howto manager. (line 974) +* BFD_RELOC_SH_JMP_SLOT64: howto manager. (line 999) +* BFD_RELOC_SH_LABEL: howto manager. (line 969) +* BFD_RELOC_SH_LOOP_END: howto manager. (line 971) +* BFD_RELOC_SH_LOOP_START: howto manager. (line 970) +* BFD_RELOC_SH_PCDISP12BY2: howto manager. (line 945) +* BFD_RELOC_SH_PCDISP8BY2: howto manager. (line 944) +* BFD_RELOC_SH_PCRELIMM8BY2: howto manager. (line 960) +* BFD_RELOC_SH_PCRELIMM8BY4: howto manager. (line 961) +* BFD_RELOC_SH_PLT_HI16: howto manager. (line 988) +* BFD_RELOC_SH_PLT_LOW16: howto manager. (line 985) +* BFD_RELOC_SH_PLT_MEDHI16: howto manager. (line 987) +* BFD_RELOC_SH_PLT_MEDLOW16: howto manager. (line 986) +* BFD_RELOC_SH_PT_16: howto manager. (line 1025) +* BFD_RELOC_SH_RELATIVE: howto manager. (line 975) +* BFD_RELOC_SH_RELATIVE64: howto manager. (line 1000) +* BFD_RELOC_SH_SHMEDIA_CODE: howto manager. (line 1006) +* BFD_RELOC_SH_SWITCH16: howto manager. (line 962) +* BFD_RELOC_SH_SWITCH32: howto manager. (line 963) +* BFD_RELOC_SH_TLS_DTPMOD32: howto manager. (line 1031) +* BFD_RELOC_SH_TLS_DTPOFF32: howto manager. (line 1032) +* BFD_RELOC_SH_TLS_GD_32: howto manager. (line 1026) +* BFD_RELOC_SH_TLS_IE_32: howto manager. (line 1029) +* BFD_RELOC_SH_TLS_LDO_32: howto manager. (line 1028) +* BFD_RELOC_SH_TLS_LD_32: howto manager. (line 1027) +* BFD_RELOC_SH_TLS_LE_32: howto manager. (line 1030) +* BFD_RELOC_SH_TLS_TPOFF32: howto manager. (line 1033) +* BFD_RELOC_SH_USES: howto manager. (line 964) +* BFD_RELOC_SIZE32: howto manager. (line 67) +* BFD_RELOC_SIZE64: howto manager. (line 68) +* BFD_RELOC_SPARC13: howto manager. (line 121) +* BFD_RELOC_SPARC22: howto manager. (line 120) +* BFD_RELOC_SPARC_10: howto manager. (line 148) +* BFD_RELOC_SPARC_11: howto manager. (line 149) +* BFD_RELOC_SPARC_5: howto manager. (line 161) +* BFD_RELOC_SPARC_6: howto manager. (line 160) +* BFD_RELOC_SPARC_64: howto manager. (line 147) +* BFD_RELOC_SPARC_7: howto manager. (line 159) +* BFD_RELOC_SPARC_BASE13: howto manager. (line 144) +* BFD_RELOC_SPARC_BASE22: howto manager. (line 145) +* BFD_RELOC_SPARC_COPY: howto manager. (line 128) +* BFD_RELOC_SPARC_DISP64: howto manager. (line 162) +* BFD_RELOC_SPARC_GLOB_DAT: howto manager. (line 129) +* BFD_RELOC_SPARC_GOT10: howto manager. (line 122) +* BFD_RELOC_SPARC_GOT13: howto manager. (line 123) +* BFD_RELOC_SPARC_GOT22: howto manager. (line 124) +* BFD_RELOC_SPARC_GOTDATA_HIX22: howto manager. (line 135) +* BFD_RELOC_SPARC_GOTDATA_LOX10: howto manager. (line 136) +* BFD_RELOC_SPARC_GOTDATA_OP: howto manager. (line 139) +* BFD_RELOC_SPARC_GOTDATA_OP_HIX22: howto manager. (line 137) +* BFD_RELOC_SPARC_GOTDATA_OP_LOX10: howto manager. (line 138) +* BFD_RELOC_SPARC_H34: howto manager. (line 171) +* BFD_RELOC_SPARC_H44: howto manager. (line 167) +* BFD_RELOC_SPARC_HH22: howto manager. (line 151) +* BFD_RELOC_SPARC_HIX22: howto manager. (line 165) +* BFD_RELOC_SPARC_HM10: howto manager. (line 152) +* BFD_RELOC_SPARC_IRELATIVE: howto manager. (line 141) +* BFD_RELOC_SPARC_JMP_IREL: howto manager. (line 140) +* BFD_RELOC_SPARC_JMP_SLOT: howto manager. (line 130) +* BFD_RELOC_SPARC_L44: howto manager. (line 169) +* BFD_RELOC_SPARC_LM22: howto manager. (line 153) +* BFD_RELOC_SPARC_LOX10: howto manager. (line 166) +* BFD_RELOC_SPARC_M44: howto manager. (line 168) +* BFD_RELOC_SPARC_OLO10: howto manager. (line 150) +* BFD_RELOC_SPARC_PC10: howto manager. (line 125) +* BFD_RELOC_SPARC_PC22: howto manager. (line 126) +* BFD_RELOC_SPARC_PC_HH22: howto manager. (line 154) +* BFD_RELOC_SPARC_PC_HM10: howto manager. (line 155) +* BFD_RELOC_SPARC_PC_LM22: howto manager. (line 156) +* BFD_RELOC_SPARC_PLT32: howto manager. (line 163) +* BFD_RELOC_SPARC_PLT64: howto manager. (line 164) +* BFD_RELOC_SPARC_REGISTER: howto manager. (line 170) +* BFD_RELOC_SPARC_RELATIVE: howto manager. (line 131) +* BFD_RELOC_SPARC_REV32: howto manager. (line 176) +* BFD_RELOC_SPARC_SIZE32: howto manager. (line 172) +* BFD_RELOC_SPARC_SIZE64: howto manager. (line 173) +* BFD_RELOC_SPARC_TLS_DTPMOD32: howto manager. (line 196) +* BFD_RELOC_SPARC_TLS_DTPMOD64: howto manager. (line 197) +* BFD_RELOC_SPARC_TLS_DTPOFF32: howto manager. (line 198) +* BFD_RELOC_SPARC_TLS_DTPOFF64: howto manager. (line 199) +* BFD_RELOC_SPARC_TLS_GD_ADD: howto manager. (line 180) +* BFD_RELOC_SPARC_TLS_GD_CALL: howto manager. (line 181) +* BFD_RELOC_SPARC_TLS_GD_HI22: howto manager. (line 178) +* BFD_RELOC_SPARC_TLS_GD_LO10: howto manager. (line 179) +* BFD_RELOC_SPARC_TLS_IE_ADD: howto manager. (line 193) +* BFD_RELOC_SPARC_TLS_IE_HI22: howto manager. (line 189) +* BFD_RELOC_SPARC_TLS_IE_LD: howto manager. (line 191) +* BFD_RELOC_SPARC_TLS_IE_LDX: howto manager. (line 192) +* BFD_RELOC_SPARC_TLS_IE_LO10: howto manager. (line 190) +* BFD_RELOC_SPARC_TLS_LDM_ADD: howto manager. (line 184) +* BFD_RELOC_SPARC_TLS_LDM_CALL: howto manager. (line 185) +* BFD_RELOC_SPARC_TLS_LDM_HI22: howto manager. (line 182) +* BFD_RELOC_SPARC_TLS_LDM_LO10: howto manager. (line 183) +* BFD_RELOC_SPARC_TLS_LDO_ADD: howto manager. (line 188) +* BFD_RELOC_SPARC_TLS_LDO_HIX22: howto manager. (line 186) +* BFD_RELOC_SPARC_TLS_LDO_LOX10: howto manager. (line 187) +* BFD_RELOC_SPARC_TLS_LE_HIX22: howto manager. (line 194) +* BFD_RELOC_SPARC_TLS_LE_LOX10: howto manager. (line 195) +* BFD_RELOC_SPARC_TLS_TPOFF32: howto manager. (line 200) +* BFD_RELOC_SPARC_TLS_TPOFF64: howto manager. (line 201) +* BFD_RELOC_SPARC_UA16: howto manager. (line 132) +* BFD_RELOC_SPARC_UA32: howto manager. (line 133) +* BFD_RELOC_SPARC_UA64: howto manager. (line 134) +* BFD_RELOC_SPARC_WDISP10: howto manager. (line 174) +* BFD_RELOC_SPARC_WDISP16: howto manager. (line 157) +* BFD_RELOC_SPARC_WDISP19: howto manager. (line 158) +* BFD_RELOC_SPARC_WDISP22: howto manager. (line 119) +* BFD_RELOC_SPARC_WPLT30: howto manager. (line 127) +* BFD_RELOC_SPU_ADD_PIC: howto manager. (line 217) +* BFD_RELOC_SPU_HI16: howto manager. (line 214) +* BFD_RELOC_SPU_IMM10: howto manager. (line 205) +* BFD_RELOC_SPU_IMM10W: howto manager. (line 206) +* BFD_RELOC_SPU_IMM16: howto manager. (line 207) +* BFD_RELOC_SPU_IMM16W: howto manager. (line 208) +* BFD_RELOC_SPU_IMM18: howto manager. (line 209) +* BFD_RELOC_SPU_IMM7: howto manager. (line 203) +* BFD_RELOC_SPU_IMM8: howto manager. (line 204) +* BFD_RELOC_SPU_LO16: howto manager. (line 213) +* BFD_RELOC_SPU_PCREL16: howto manager. (line 212) +* BFD_RELOC_SPU_PCREL9a: howto manager. (line 210) +* BFD_RELOC_SPU_PCREL9b: howto manager. (line 211) +* BFD_RELOC_SPU_PPU32: howto manager. (line 215) +* BFD_RELOC_SPU_PPU64: howto manager. (line 216) +* BFD_RELOC_THUMB_PCREL_BFCSEL: howto manager. (line 796) +* BFD_RELOC_THUMB_PCREL_BLX: howto manager. (line 785) +* BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager. (line 808) +* BFD_RELOC_THUMB_PCREL_BRANCH20: howto manager. (line 809) +* BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager. (line 810) +* BFD_RELOC_THUMB_PCREL_BRANCH25: howto manager. (line 811) +* BFD_RELOC_THUMB_PCREL_BRANCH5: howto manager. (line 794) +* BFD_RELOC_THUMB_PCREL_BRANCH7: howto manager. (line 806) +* BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager. (line 807) +* BFD_RELOC_TIC30_LDP: howto manager. (line 1563) +* BFD_RELOC_TIC54X_16_OF_23: howto manager. (line 1577) +* BFD_RELOC_TIC54X_23: howto manager. (line 1575) +* BFD_RELOC_TIC54X_MS7_OF_23: howto manager. (line 1581) +* BFD_RELOC_TIC54X_PARTLS7: howto manager. (line 1567) +* BFD_RELOC_TIC54X_PARTMS9: howto manager. (line 1571) +* BFD_RELOC_TILEGX_BROFF_X1: howto manager. (line 3339) +* BFD_RELOC_TILEGX_COPY: howto manager. (line 3335) +* BFD_RELOC_TILEGX_DEST_IMM8_X1: howto manager. (line 3346) +* BFD_RELOC_TILEGX_GLOB_DAT: howto manager. (line 3336) +* BFD_RELOC_TILEGX_HW0: howto manager. (line 3328) +* BFD_RELOC_TILEGX_HW0_LAST: howto manager. (line 3332) +* BFD_RELOC_TILEGX_HW1: howto manager. (line 3329) +* BFD_RELOC_TILEGX_HW1_LAST: howto manager. (line 3333) +* BFD_RELOC_TILEGX_HW2: howto manager. (line 3330) +* BFD_RELOC_TILEGX_HW2_LAST: howto manager. (line 3334) +* BFD_RELOC_TILEGX_HW3: howto manager. (line 3331) +* BFD_RELOC_TILEGX_IMM16_X0_HW0: howto manager. (line 3355) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT: howto manager. (line 3383) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST: howto manager. (line 3363) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager. (line 3391) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager. (line 3377) * BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL: howto manager. - (line 3314) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager. (line 3308) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager. (line 3320) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager. (line 3304) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL: howto manager. (line 3272) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager. (line 3288) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD: howto manager. (line 3300) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE: howto manager. (line 3312) -* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE: howto manager. (line 3302) -* BFD_RELOC_TILEGX_IMM16_X0_HW1: howto manager. (line 3260) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST: howto manager. (line 3268) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager. (line 3296) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager. (line 3282) + (line 3411) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager. (line 3405) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager. (line 3417) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager. (line 3401) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL: howto manager. (line 3369) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager. (line 3385) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD: howto manager. (line 3397) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE: howto manager. (line 3409) +* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE: howto manager. (line 3399) +* BFD_RELOC_TILEGX_IMM16_X0_HW1: howto manager. (line 3357) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST: howto manager. (line 3365) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager. (line 3393) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager. (line 3379) * BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL: howto manager. - (line 3316) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager. (line 3310) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager. (line 3322) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager. (line 3306) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL: howto manager. (line 3274) -* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager. (line 3290) -* BFD_RELOC_TILEGX_IMM16_X0_HW2: howto manager. (line 3262) -* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST: howto manager. (line 3270) -* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager. (line 3284) + (line 3413) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager. (line 3407) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager. (line 3419) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager. (line 3403) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL: howto manager. (line 3371) +* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager. (line 3387) +* BFD_RELOC_TILEGX_IMM16_X0_HW2: howto manager. (line 3359) +* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST: howto manager. (line 3367) +* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager. (line 3381) * BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL: howto manager. - (line 3318) -* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL: howto manager. (line 3276) -* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager. (line 3292) -* BFD_RELOC_TILEGX_IMM16_X0_HW3: howto manager. (line 3264) -* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL: howto manager. (line 3278) -* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager. (line 3298) -* BFD_RELOC_TILEGX_IMM16_X1_HW0: howto manager. (line 3259) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT: howto manager. (line 3287) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST: howto manager. (line 3267) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager. (line 3295) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager. (line 3281) + (line 3415) +* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL: howto manager. (line 3373) +* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager. (line 3389) +* BFD_RELOC_TILEGX_IMM16_X0_HW3: howto manager. (line 3361) +* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL: howto manager. (line 3375) +* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager. (line 3395) +* BFD_RELOC_TILEGX_IMM16_X1_HW0: howto manager. (line 3356) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT: howto manager. (line 3384) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST: howto manager. (line 3364) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager. (line 3392) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager. (line 3378) * BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL: howto manager. - (line 3315) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager. (line 3309) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager. (line 3321) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager. (line 3305) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL: howto manager. (line 3273) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager. (line 3289) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD: howto manager. (line 3301) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE: howto manager. (line 3313) -* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE: howto manager. (line 3303) -* BFD_RELOC_TILEGX_IMM16_X1_HW1: howto manager. (line 3261) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST: howto manager. (line 3269) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager. (line 3297) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager. (line 3283) + (line 3412) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager. (line 3406) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager. (line 3418) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager. (line 3402) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL: howto manager. (line 3370) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager. (line 3386) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD: howto manager. (line 3398) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE: howto manager. (line 3410) +* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE: howto manager. (line 3400) +* BFD_RELOC_TILEGX_IMM16_X1_HW1: howto manager. (line 3358) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST: howto manager. (line 3366) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager. (line 3394) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager. (line 3380) * BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL: howto manager. - (line 3317) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager. (line 3311) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager. (line 3323) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager. (line 3307) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL: howto manager. (line 3275) -* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager. (line 3291) -* BFD_RELOC_TILEGX_IMM16_X1_HW2: howto manager. (line 3263) -* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST: howto manager. (line 3271) -* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager. (line 3285) + (line 3414) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager. (line 3408) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager. (line 3420) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager. (line 3404) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL: howto manager. (line 3372) +* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager. (line 3388) +* BFD_RELOC_TILEGX_IMM16_X1_HW2: howto manager. (line 3360) +* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST: howto manager. (line 3368) +* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager. (line 3382) * BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL: howto manager. - (line 3319) -* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL: howto manager. (line 3277) -* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager. (line 3293) -* BFD_RELOC_TILEGX_IMM16_X1_HW3: howto manager. (line 3265) -* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL: howto manager. (line 3279) -* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager. (line 3299) -* BFD_RELOC_TILEGX_IMM8_X0: howto manager. (line 3245) -* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD: howto manager. (line 3336) -* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD: howto manager. (line 3331) -* BFD_RELOC_TILEGX_IMM8_X1: howto manager. (line 3247) -* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD: howto manager. (line 3337) -* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD: howto manager. (line 3332) -* BFD_RELOC_TILEGX_IMM8_Y0: howto manager. (line 3246) -* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD: howto manager. (line 3338) -* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD: howto manager. (line 3333) -* BFD_RELOC_TILEGX_IMM8_Y1: howto manager. (line 3248) -* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD: howto manager. (line 3339) -* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD: howto manager. (line 3334) -* BFD_RELOC_TILEGX_JMP_SLOT: howto manager. (line 3240) -* BFD_RELOC_TILEGX_JUMPOFF_X1: howto manager. (line 3243) -* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT: howto manager. (line 3244) -* BFD_RELOC_TILEGX_MF_IMM14_X1: howto manager. (line 3251) -* BFD_RELOC_TILEGX_MMEND_X0: howto manager. (line 3253) -* BFD_RELOC_TILEGX_MMSTART_X0: howto manager. (line 3252) -* BFD_RELOC_TILEGX_MT_IMM14_X1: howto manager. (line 3250) -* BFD_RELOC_TILEGX_RELATIVE: howto manager. (line 3241) -* BFD_RELOC_TILEGX_SHAMT_X0: howto manager. (line 3254) -* BFD_RELOC_TILEGX_SHAMT_X1: howto manager. (line 3255) -* BFD_RELOC_TILEGX_SHAMT_Y0: howto manager. (line 3256) -* BFD_RELOC_TILEGX_SHAMT_Y1: howto manager. (line 3257) -* BFD_RELOC_TILEGX_TLS_DTPMOD32: howto manager. (line 3327) -* BFD_RELOC_TILEGX_TLS_DTPMOD64: howto manager. (line 3324) -* BFD_RELOC_TILEGX_TLS_DTPOFF32: howto manager. (line 3328) -* BFD_RELOC_TILEGX_TLS_DTPOFF64: howto manager. (line 3325) -* BFD_RELOC_TILEGX_TLS_GD_CALL: howto manager. (line 3330) -* BFD_RELOC_TILEGX_TLS_IE_LOAD: howto manager. (line 3335) -* BFD_RELOC_TILEGX_TLS_TPOFF32: howto manager. (line 3329) -* BFD_RELOC_TILEGX_TLS_TPOFF64: howto manager. (line 3326) -* BFD_RELOC_TILEPRO_BROFF_X1: howto manager. (line 3155) -* BFD_RELOC_TILEPRO_COPY: howto manager. (line 3151) -* BFD_RELOC_TILEPRO_DEST_IMM8_X1: howto manager. (line 3162) -* BFD_RELOC_TILEPRO_GLOB_DAT: howto manager. (line 3152) -* BFD_RELOC_TILEPRO_IMM16_X0: howto manager. (line 3165) -* BFD_RELOC_TILEPRO_IMM16_X0_GOT: howto manager. (line 3181) -* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA: howto manager. (line 3187) -* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI: howto manager. (line 3185) -* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO: howto manager. (line 3183) -* BFD_RELOC_TILEPRO_IMM16_X0_HA: howto manager. (line 3171) -* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL: howto manager. (line 3179) -* BFD_RELOC_TILEPRO_IMM16_X0_HI: howto manager. (line 3169) -* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL: howto manager. (line 3177) -* BFD_RELOC_TILEPRO_IMM16_X0_LO: howto manager. (line 3167) -* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL: howto manager. (line 3175) -* BFD_RELOC_TILEPRO_IMM16_X0_PCREL: howto manager. (line 3173) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD: howto manager. (line 3203) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA: howto manager. (line 3209) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI: howto manager. (line 3207) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO: howto manager. (line 3205) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE: howto manager. (line 3211) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA: howto manager. (line 3217) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI: howto manager. (line 3215) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO: howto manager. (line 3213) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE: howto manager. (line 3222) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA: howto manager. (line 3228) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI: howto manager. (line 3226) -* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO: howto manager. (line 3224) -* BFD_RELOC_TILEPRO_IMM16_X1: howto manager. (line 3166) -* BFD_RELOC_TILEPRO_IMM16_X1_GOT: howto manager. (line 3182) -* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA: howto manager. (line 3188) -* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI: howto manager. (line 3186) -* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO: howto manager. (line 3184) -* BFD_RELOC_TILEPRO_IMM16_X1_HA: howto manager. (line 3172) -* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL: howto manager. (line 3180) -* BFD_RELOC_TILEPRO_IMM16_X1_HI: howto manager. (line 3170) -* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL: howto manager. (line 3178) -* BFD_RELOC_TILEPRO_IMM16_X1_LO: howto manager. (line 3168) -* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL: howto manager. (line 3176) -* BFD_RELOC_TILEPRO_IMM16_X1_PCREL: howto manager. (line 3174) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD: howto manager. (line 3204) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA: howto manager. (line 3210) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI: howto manager. (line 3208) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO: howto manager. (line 3206) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE: howto manager. (line 3212) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA: howto manager. (line 3218) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI: howto manager. (line 3216) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO: howto manager. (line 3214) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE: howto manager. (line 3223) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA: howto manager. (line 3229) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI: howto manager. (line 3227) -* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO: howto manager. (line 3225) -* BFD_RELOC_TILEPRO_IMM8_X0: howto manager. (line 3158) -* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD: howto manager. (line 3198) -* BFD_RELOC_TILEPRO_IMM8_X1: howto manager. (line 3160) -* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD: howto manager. (line 3199) -* BFD_RELOC_TILEPRO_IMM8_Y0: howto manager. (line 3159) -* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD: howto manager. (line 3200) -* BFD_RELOC_TILEPRO_IMM8_Y1: howto manager. (line 3161) -* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD: howto manager. (line 3201) -* BFD_RELOC_TILEPRO_JMP_SLOT: howto manager. (line 3153) -* BFD_RELOC_TILEPRO_JOFFLONG_X1: howto manager. (line 3156) -* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT: howto manager. (line 3157) -* BFD_RELOC_TILEPRO_MF_IMM15_X1: howto manager. (line 3164) -* BFD_RELOC_TILEPRO_MMEND_X0: howto manager. (line 3190) -* BFD_RELOC_TILEPRO_MMEND_X1: howto manager. (line 3192) -* BFD_RELOC_TILEPRO_MMSTART_X0: howto manager. (line 3189) -* BFD_RELOC_TILEPRO_MMSTART_X1: howto manager. (line 3191) -* BFD_RELOC_TILEPRO_MT_IMM15_X1: howto manager. (line 3163) -* BFD_RELOC_TILEPRO_RELATIVE: howto manager. (line 3154) -* BFD_RELOC_TILEPRO_SHAMT_X0: howto manager. (line 3193) -* BFD_RELOC_TILEPRO_SHAMT_X1: howto manager. (line 3194) -* BFD_RELOC_TILEPRO_SHAMT_Y0: howto manager. (line 3195) -* BFD_RELOC_TILEPRO_SHAMT_Y1: howto manager. (line 3196) -* BFD_RELOC_TILEPRO_TLS_DTPMOD32: howto manager. (line 3219) -* BFD_RELOC_TILEPRO_TLS_DTPOFF32: howto manager. (line 3220) -* BFD_RELOC_TILEPRO_TLS_GD_CALL: howto manager. (line 3197) -* BFD_RELOC_TILEPRO_TLS_IE_LOAD: howto manager. (line 3202) -* BFD_RELOC_TILEPRO_TLS_TPOFF32: howto manager. (line 3221) -* bfd_reloc_type_lookup: howto manager. (line 3532) -* BFD_RELOC_V850_16_GOT: howto manager. (line 1540) -* BFD_RELOC_V850_16_GOTOFF: howto manager. (line 1556) -* BFD_RELOC_V850_16_PCREL: howto manager. (line 1520) -* BFD_RELOC_V850_16_S1: howto manager. (line 1532) -* BFD_RELOC_V850_16_SPLIT_OFFSET: howto manager. (line 1530) -* BFD_RELOC_V850_17_PCREL: howto manager. (line 1522) -* BFD_RELOC_V850_22_PCREL: howto manager. (line 1474) -* BFD_RELOC_V850_22_PLT_PCREL: howto manager. (line 1544) -* BFD_RELOC_V850_23: howto manager. (line 1524) -* BFD_RELOC_V850_32_ABS: howto manager. (line 1528) -* BFD_RELOC_V850_32_GOT: howto manager. (line 1542) -* BFD_RELOC_V850_32_GOTOFF: howto manager. (line 1558) -* BFD_RELOC_V850_32_GOTPCREL: howto manager. (line 1538) -* BFD_RELOC_V850_32_PCREL: howto manager. (line 1526) -* BFD_RELOC_V850_32_PLT_PCREL: howto manager. (line 1546) -* BFD_RELOC_V850_9_PCREL: howto manager. (line 1472) -* BFD_RELOC_V850_ALIGN: howto manager. (line 1515) -* BFD_RELOC_V850_CALLT_15_16_OFFSET: howto manager. (line 1536) -* BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager. (line 1509) -* BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager. (line 1507) -* BFD_RELOC_V850_CODE: howto manager. (line 1560) -* BFD_RELOC_V850_COPY: howto manager. (line 1548) -* BFD_RELOC_V850_DATA: howto manager. (line 1562) -* BFD_RELOC_V850_GLOB_DAT: howto manager. (line 1550) -* BFD_RELOC_V850_JMP_SLOT: howto manager. (line 1552) -* BFD_RELOC_V850_LO16_S1: howto manager. (line 1534) -* BFD_RELOC_V850_LO16_SPLIT_OFFSET: howto manager. (line 1517) -* BFD_RELOC_V850_LONGCALL: howto manager. (line 1511) -* BFD_RELOC_V850_LONGJUMP: howto manager. (line 1513) -* BFD_RELOC_V850_RELATIVE: howto manager. (line 1554) -* BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager. (line 1478) -* BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager. (line 1476) -* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager. (line 1501) -* BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager. (line 1494) -* BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager. (line 1499) -* BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager. (line 1496) -* BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager. (line 1486) -* BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager. (line 1492) -* BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager. (line 1489) -* BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager. (line 1483) -* BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager. (line 1481) -* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager. (line 1504) -* BFD_RELOC_VAX_GLOB_DAT: howto manager. (line 2434) -* BFD_RELOC_VAX_JMP_SLOT: howto manager. (line 2435) -* BFD_RELOC_VAX_RELATIVE: howto manager. (line 2436) -* BFD_RELOC_VISIUM_HI16: howto manager. (line 3362) -* BFD_RELOC_VISIUM_HI16_PCREL: howto manager. (line 3366) -* BFD_RELOC_VISIUM_IM16: howto manager. (line 3364) -* BFD_RELOC_VISIUM_IM16_PCREL: howto manager. (line 3368) -* BFD_RELOC_VISIUM_LO16: howto manager. (line 3363) -* BFD_RELOC_VISIUM_LO16_PCREL: howto manager. (line 3367) -* BFD_RELOC_VISIUM_REL16: howto manager. (line 3365) -* BFD_RELOC_VPE4KMATH_DATA: howto manager. (line 2096) -* BFD_RELOC_VPE4KMATH_INSN: howto manager. (line 2097) -* BFD_RELOC_VTABLE_ENTRY: howto manager. (line 2100) -* BFD_RELOC_VTABLE_INHERIT: howto manager. (line 2099) -* BFD_RELOC_WASM32_ABS32_CODE: howto manager. (line 3375) -* BFD_RELOC_WASM32_CODE_POINTER: howto manager. (line 3377) -* BFD_RELOC_WASM32_COPY: howto manager. (line 3376) -* BFD_RELOC_WASM32_INDEX: howto manager. (line 3378) -* BFD_RELOC_WASM32_LEB128: howto manager. (line 3370) -* BFD_RELOC_WASM32_LEB128_GOT: howto manager. (line 3371) -* BFD_RELOC_WASM32_LEB128_GOT_CODE: howto manager. (line 3372) -* BFD_RELOC_WASM32_LEB128_PLT: howto manager. (line 3373) -* BFD_RELOC_WASM32_PLT_INDEX: howto manager. (line 3374) -* BFD_RELOC_WASM32_PLT_SIG: howto manager. (line 3379) -* BFD_RELOC_X86_64_32S: howto manager. (line 555) -* BFD_RELOC_X86_64_COPY: howto manager. (line 550) -* BFD_RELOC_X86_64_DTPMOD64: howto manager. (line 556) -* BFD_RELOC_X86_64_DTPOFF32: howto manager. (line 561) -* BFD_RELOC_X86_64_DTPOFF64: howto manager. (line 557) -* BFD_RELOC_X86_64_GLOB_DAT: howto manager. (line 551) -* BFD_RELOC_X86_64_GOT32: howto manager. (line 548) -* BFD_RELOC_X86_64_GOT64: howto manager. (line 566) -* BFD_RELOC_X86_64_GOTOFF64: howto manager. (line 564) -* BFD_RELOC_X86_64_GOTPC32: howto manager. (line 565) -* BFD_RELOC_X86_64_GOTPC32_TLSDESC: howto manager. (line 571) -* BFD_RELOC_X86_64_GOTPC64: howto manager. (line 568) -* BFD_RELOC_X86_64_GOTPCREL: howto manager. (line 554) -* BFD_RELOC_X86_64_GOTPCREL64: howto manager. (line 567) -* BFD_RELOC_X86_64_GOTPCRELX: howto manager. (line 577) -* BFD_RELOC_X86_64_GOTPLT64: howto manager. (line 569) -* BFD_RELOC_X86_64_GOTTPOFF: howto manager. (line 562) -* BFD_RELOC_X86_64_IRELATIVE: howto manager. (line 574) -* BFD_RELOC_X86_64_JUMP_SLOT: howto manager. (line 552) -* BFD_RELOC_X86_64_PC32_BND: howto manager. (line 575) -* BFD_RELOC_X86_64_PLT32: howto manager. (line 549) -* BFD_RELOC_X86_64_PLT32_BND: howto manager. (line 576) -* BFD_RELOC_X86_64_PLTOFF64: howto manager. (line 570) -* BFD_RELOC_X86_64_RELATIVE: howto manager. (line 553) -* BFD_RELOC_X86_64_REX_GOTPCRELX: howto manager. (line 578) -* BFD_RELOC_X86_64_TLSDESC: howto manager. (line 573) -* BFD_RELOC_X86_64_TLSDESC_CALL: howto manager. (line 572) -* BFD_RELOC_X86_64_TLSGD: howto manager. (line 559) -* BFD_RELOC_X86_64_TLSLD: howto manager. (line 560) -* BFD_RELOC_X86_64_TPOFF32: howto manager. (line 563) -* BFD_RELOC_X86_64_TPOFF64: howto manager. (line 558) -* BFD_RELOC_XGATE_24: howto manager. (line 2243) -* BFD_RELOC_XGATE_GPAGE: howto manager. (line 2241) -* BFD_RELOC_XGATE_IMM3: howto manager. (line 2255) -* BFD_RELOC_XGATE_IMM4: howto manager. (line 2257) -* BFD_RELOC_XGATE_IMM5: howto manager. (line 2259) -* BFD_RELOC_XGATE_IMM8_HI: howto manager. (line 2252) -* BFD_RELOC_XGATE_IMM8_LO: howto manager. (line 2249) -* BFD_RELOC_XGATE_LO16: howto manager. (line 2238) -* BFD_RELOC_XGATE_PCREL_10: howto manager. (line 2247) -* BFD_RELOC_XGATE_PCREL_9: howto manager. (line 2245) -* BFD_RELOC_XGATE_RL_GROUP: howto manager. (line 2234) -* BFD_RELOC_XGATE_RL_JUMP: howto manager. (line 2231) -* BFD_RELOC_XSTORMY16_12: howto manager. (line 2428) -* BFD_RELOC_XSTORMY16_24: howto manager. (line 2429) -* BFD_RELOC_XSTORMY16_FPTR16: howto manager. (line 2430) -* BFD_RELOC_XSTORMY16_REL_12: howto manager. (line 2427) -* BFD_RELOC_XTENSA_ASM_EXPAND: howto manager. (line 2624) -* BFD_RELOC_XTENSA_ASM_SIMPLIFY: howto manager. (line 2628) -* BFD_RELOC_XTENSA_DIFF16: howto manager. (line 2573) -* BFD_RELOC_XTENSA_DIFF32: howto manager. (line 2574) -* BFD_RELOC_XTENSA_DIFF8: howto manager. (line 2572) -* BFD_RELOC_XTENSA_GLOB_DAT: howto manager. (line 2564) -* BFD_RELOC_XTENSA_JMP_SLOT: howto manager. (line 2565) -* BFD_RELOC_XTENSA_NDIFF16: howto manager. (line 2644) -* BFD_RELOC_XTENSA_NDIFF32: howto manager. (line 2645) -* BFD_RELOC_XTENSA_NDIFF8: howto manager. (line 2643) -* BFD_RELOC_XTENSA_OP0: howto manager. (line 2619) -* BFD_RELOC_XTENSA_OP1: howto manager. (line 2620) -* BFD_RELOC_XTENSA_OP2: howto manager. (line 2621) -* BFD_RELOC_XTENSA_PDIFF16: howto manager. (line 2641) -* BFD_RELOC_XTENSA_PDIFF32: howto manager. (line 2642) -* BFD_RELOC_XTENSA_PDIFF8: howto manager. (line 2640) -* BFD_RELOC_XTENSA_PLT: howto manager. (line 2568) -* BFD_RELOC_XTENSA_RELATIVE: howto manager. (line 2566) -* BFD_RELOC_XTENSA_RTLD: howto manager. (line 2560) -* BFD_RELOC_XTENSA_SLOT0_ALT: howto manager. (line 2602) -* BFD_RELOC_XTENSA_SLOT0_OP: howto manager. (line 2583) -* BFD_RELOC_XTENSA_SLOT10_ALT: howto manager. (line 2612) -* BFD_RELOC_XTENSA_SLOT10_OP: howto manager. (line 2593) -* BFD_RELOC_XTENSA_SLOT11_ALT: howto manager. (line 2613) -* BFD_RELOC_XTENSA_SLOT11_OP: howto manager. (line 2594) -* BFD_RELOC_XTENSA_SLOT12_ALT: howto manager. (line 2614) -* BFD_RELOC_XTENSA_SLOT12_OP: howto manager. (line 2595) -* BFD_RELOC_XTENSA_SLOT13_ALT: howto manager. (line 2615) -* BFD_RELOC_XTENSA_SLOT13_OP: howto manager. (line 2596) -* BFD_RELOC_XTENSA_SLOT14_ALT: howto manager. (line 2616) -* BFD_RELOC_XTENSA_SLOT14_OP: howto manager. (line 2597) -* BFD_RELOC_XTENSA_SLOT1_ALT: howto manager. (line 2603) -* BFD_RELOC_XTENSA_SLOT1_OP: howto manager. (line 2584) -* BFD_RELOC_XTENSA_SLOT2_ALT: howto manager. (line 2604) -* BFD_RELOC_XTENSA_SLOT2_OP: howto manager. (line 2585) -* BFD_RELOC_XTENSA_SLOT3_ALT: howto manager. (line 2605) -* BFD_RELOC_XTENSA_SLOT3_OP: howto manager. (line 2586) -* BFD_RELOC_XTENSA_SLOT4_ALT: howto manager. (line 2606) -* BFD_RELOC_XTENSA_SLOT4_OP: howto manager. (line 2587) -* BFD_RELOC_XTENSA_SLOT5_ALT: howto manager. (line 2607) -* BFD_RELOC_XTENSA_SLOT5_OP: howto manager. (line 2588) -* BFD_RELOC_XTENSA_SLOT6_ALT: howto manager. (line 2608) -* BFD_RELOC_XTENSA_SLOT6_OP: howto manager. (line 2589) -* BFD_RELOC_XTENSA_SLOT7_ALT: howto manager. (line 2609) -* BFD_RELOC_XTENSA_SLOT7_OP: howto manager. (line 2590) -* BFD_RELOC_XTENSA_SLOT8_ALT: howto manager. (line 2610) -* BFD_RELOC_XTENSA_SLOT8_OP: howto manager. (line 2591) -* BFD_RELOC_XTENSA_SLOT9_ALT: howto manager. (line 2611) -* BFD_RELOC_XTENSA_SLOT9_OP: howto manager. (line 2592) -* BFD_RELOC_XTENSA_TLSDESC_ARG: howto manager. (line 2633) -* BFD_RELOC_XTENSA_TLSDESC_FN: howto manager. (line 2632) -* BFD_RELOC_XTENSA_TLS_ARG: howto manager. (line 2637) -* BFD_RELOC_XTENSA_TLS_CALL: howto manager. (line 2638) -* BFD_RELOC_XTENSA_TLS_DTPOFF: howto manager. (line 2634) -* BFD_RELOC_XTENSA_TLS_FUNC: howto manager. (line 2636) -* BFD_RELOC_XTENSA_TLS_TPOFF: howto manager. (line 2635) -* BFD_RELOC_Z80_16_BE: howto manager. (line 2669) -* BFD_RELOC_Z80_BYTE0: howto manager. (line 2657) -* BFD_RELOC_Z80_BYTE1: howto manager. (line 2659) -* BFD_RELOC_Z80_BYTE2: howto manager. (line 2661) -* BFD_RELOC_Z80_BYTE3: howto manager. (line 2663) -* BFD_RELOC_Z80_DISP8: howto manager. (line 2655) -* BFD_RELOC_Z80_WORD0: howto manager. (line 2665) -* BFD_RELOC_Z80_WORD1: howto manager. (line 2667) -* BFD_RELOC_Z8K_CALLR: howto manager. (line 2673) -* BFD_RELOC_Z8K_DISP7: howto manager. (line 2671) -* BFD_RELOC_Z8K_IMM4L: howto manager. (line 2675) -* bfd_rename_section: section prototypes. (line 167) -* bfd_scan_arch: Architectures. (line 590) -* bfd_scan_vma: Miscellaneous. (line 135) -* bfd_sections_find_if: section prototypes. (line 197) + (line 3416) +* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL: howto manager. (line 3374) +* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager. (line 3390) +* BFD_RELOC_TILEGX_IMM16_X1_HW3: howto manager. (line 3362) +* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL: howto manager. (line 3376) +* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager. (line 3396) +* BFD_RELOC_TILEGX_IMM8_X0: howto manager. (line 3342) +* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD: howto manager. (line 3433) +* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD: howto manager. (line 3428) +* BFD_RELOC_TILEGX_IMM8_X1: howto manager. (line 3344) +* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD: howto manager. (line 3434) +* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD: howto manager. (line 3429) +* BFD_RELOC_TILEGX_IMM8_Y0: howto manager. (line 3343) +* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD: howto manager. (line 3435) +* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD: howto manager. (line 3430) +* BFD_RELOC_TILEGX_IMM8_Y1: howto manager. (line 3345) +* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD: howto manager. (line 3436) +* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD: howto manager. (line 3431) +* BFD_RELOC_TILEGX_JMP_SLOT: howto manager. (line 3337) +* BFD_RELOC_TILEGX_JUMPOFF_X1: howto manager. (line 3340) +* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT: howto manager. (line 3341) +* BFD_RELOC_TILEGX_MF_IMM14_X1: howto manager. (line 3348) +* BFD_RELOC_TILEGX_MMEND_X0: howto manager. (line 3350) +* BFD_RELOC_TILEGX_MMSTART_X0: howto manager. (line 3349) +* BFD_RELOC_TILEGX_MT_IMM14_X1: howto manager. (line 3347) +* BFD_RELOC_TILEGX_RELATIVE: howto manager. (line 3338) +* BFD_RELOC_TILEGX_SHAMT_X0: howto manager. (line 3351) +* BFD_RELOC_TILEGX_SHAMT_X1: howto manager. (line 3352) +* BFD_RELOC_TILEGX_SHAMT_Y0: howto manager. (line 3353) +* BFD_RELOC_TILEGX_SHAMT_Y1: howto manager. (line 3354) +* BFD_RELOC_TILEGX_TLS_DTPMOD32: howto manager. (line 3424) +* BFD_RELOC_TILEGX_TLS_DTPMOD64: howto manager. (line 3421) +* BFD_RELOC_TILEGX_TLS_DTPOFF32: howto manager. (line 3425) +* BFD_RELOC_TILEGX_TLS_DTPOFF64: howto manager. (line 3422) +* BFD_RELOC_TILEGX_TLS_GD_CALL: howto manager. (line 3427) +* BFD_RELOC_TILEGX_TLS_IE_LOAD: howto manager. (line 3432) +* BFD_RELOC_TILEGX_TLS_TPOFF32: howto manager. (line 3426) +* BFD_RELOC_TILEGX_TLS_TPOFF64: howto manager. (line 3423) +* BFD_RELOC_TILEPRO_BROFF_X1: howto manager. (line 3252) +* BFD_RELOC_TILEPRO_COPY: howto manager. (line 3248) +* BFD_RELOC_TILEPRO_DEST_IMM8_X1: howto manager. (line 3259) +* BFD_RELOC_TILEPRO_GLOB_DAT: howto manager. (line 3249) +* BFD_RELOC_TILEPRO_IMM16_X0: howto manager. (line 3262) +* BFD_RELOC_TILEPRO_IMM16_X0_GOT: howto manager. (line 3278) +* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA: howto manager. (line 3284) +* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI: howto manager. (line 3282) +* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO: howto manager. (line 3280) +* BFD_RELOC_TILEPRO_IMM16_X0_HA: howto manager. (line 3268) +* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL: howto manager. (line 3276) +* BFD_RELOC_TILEPRO_IMM16_X0_HI: howto manager. (line 3266) +* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL: howto manager. (line 3274) +* BFD_RELOC_TILEPRO_IMM16_X0_LO: howto manager. (line 3264) +* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL: howto manager. (line 3272) +* BFD_RELOC_TILEPRO_IMM16_X0_PCREL: howto manager. (line 3270) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD: howto manager. (line 3300) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA: howto manager. (line 3306) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI: howto manager. (line 3304) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO: howto manager. (line 3302) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE: howto manager. (line 3308) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA: howto manager. (line 3314) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI: howto manager. (line 3312) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO: howto manager. (line 3310) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE: howto manager. (line 3319) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA: howto manager. (line 3325) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI: howto manager. (line 3323) +* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO: howto manager. (line 3321) +* BFD_RELOC_TILEPRO_IMM16_X1: howto manager. (line 3263) +* BFD_RELOC_TILEPRO_IMM16_X1_GOT: howto manager. (line 3279) +* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA: howto manager. (line 3285) +* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI: howto manager. (line 3283) +* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO: howto manager. (line 3281) +* BFD_RELOC_TILEPRO_IMM16_X1_HA: howto manager. (line 3269) +* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL: howto manager. (line 3277) +* BFD_RELOC_TILEPRO_IMM16_X1_HI: howto manager. (line 3267) +* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL: howto manager. (line 3275) +* BFD_RELOC_TILEPRO_IMM16_X1_LO: howto manager. (line 3265) +* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL: howto manager. (line 3273) +* BFD_RELOC_TILEPRO_IMM16_X1_PCREL: howto manager. (line 3271) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD: howto manager. (line 3301) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA: howto manager. (line 3307) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI: howto manager. (line 3305) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO: howto manager. (line 3303) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE: howto manager. (line 3309) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA: howto manager. (line 3315) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI: howto manager. (line 3313) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO: howto manager. (line 3311) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE: howto manager. (line 3320) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA: howto manager. (line 3326) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI: howto manager. (line 3324) +* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO: howto manager. (line 3322) +* BFD_RELOC_TILEPRO_IMM8_X0: howto manager. (line 3255) +* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD: howto manager. (line 3295) +* BFD_RELOC_TILEPRO_IMM8_X1: howto manager. (line 3257) +* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD: howto manager. (line 3296) +* BFD_RELOC_TILEPRO_IMM8_Y0: howto manager. (line 3256) +* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD: howto manager. (line 3297) +* BFD_RELOC_TILEPRO_IMM8_Y1: howto manager. (line 3258) +* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD: howto manager. (line 3298) +* BFD_RELOC_TILEPRO_JMP_SLOT: howto manager. (line 3250) +* BFD_RELOC_TILEPRO_JOFFLONG_X1: howto manager. (line 3253) +* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT: howto manager. (line 3254) +* BFD_RELOC_TILEPRO_MF_IMM15_X1: howto manager. (line 3261) +* BFD_RELOC_TILEPRO_MMEND_X0: howto manager. (line 3287) +* BFD_RELOC_TILEPRO_MMEND_X1: howto manager. (line 3289) +* BFD_RELOC_TILEPRO_MMSTART_X0: howto manager. (line 3286) +* BFD_RELOC_TILEPRO_MMSTART_X1: howto manager. (line 3288) +* BFD_RELOC_TILEPRO_MT_IMM15_X1: howto manager. (line 3260) +* BFD_RELOC_TILEPRO_RELATIVE: howto manager. (line 3251) +* BFD_RELOC_TILEPRO_SHAMT_X0: howto manager. (line 3290) +* BFD_RELOC_TILEPRO_SHAMT_X1: howto manager. (line 3291) +* BFD_RELOC_TILEPRO_SHAMT_Y0: howto manager. (line 3292) +* BFD_RELOC_TILEPRO_SHAMT_Y1: howto manager. (line 3293) +* BFD_RELOC_TILEPRO_TLS_DTPMOD32: howto manager. (line 3316) +* BFD_RELOC_TILEPRO_TLS_DTPOFF32: howto manager. (line 3317) +* BFD_RELOC_TILEPRO_TLS_GD_CALL: howto manager. (line 3294) +* BFD_RELOC_TILEPRO_TLS_IE_LOAD: howto manager. (line 3299) +* BFD_RELOC_TILEPRO_TLS_TPOFF32: howto manager. (line 3318) +* bfd_reloc_type_lookup: howto manager. (line 3637) +* BFD_RELOC_V850_16_GOT: howto manager. (line 1539) +* BFD_RELOC_V850_16_GOTOFF: howto manager. (line 1555) +* BFD_RELOC_V850_16_PCREL: howto manager. (line 1519) +* BFD_RELOC_V850_16_S1: howto manager. (line 1531) +* BFD_RELOC_V850_16_SPLIT_OFFSET: howto manager. (line 1529) +* BFD_RELOC_V850_17_PCREL: howto manager. (line 1521) +* BFD_RELOC_V850_22_PCREL: howto manager. (line 1473) +* BFD_RELOC_V850_22_PLT_PCREL: howto manager. (line 1543) +* BFD_RELOC_V850_23: howto manager. (line 1523) +* BFD_RELOC_V850_32_ABS: howto manager. (line 1527) +* BFD_RELOC_V850_32_GOT: howto manager. (line 1541) +* BFD_RELOC_V850_32_GOTOFF: howto manager. (line 1557) +* BFD_RELOC_V850_32_GOTPCREL: howto manager. (line 1537) +* BFD_RELOC_V850_32_PCREL: howto manager. (line 1525) +* BFD_RELOC_V850_32_PLT_PCREL: howto manager. (line 1545) +* BFD_RELOC_V850_9_PCREL: howto manager. (line 1471) +* BFD_RELOC_V850_ALIGN: howto manager. (line 1514) +* BFD_RELOC_V850_CALLT_15_16_OFFSET: howto manager. (line 1535) +* BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager. (line 1508) +* BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager. (line 1506) +* BFD_RELOC_V850_CODE: howto manager. (line 1559) +* BFD_RELOC_V850_COPY: howto manager. (line 1547) +* BFD_RELOC_V850_DATA: howto manager. (line 1561) +* BFD_RELOC_V850_GLOB_DAT: howto manager. (line 1549) +* BFD_RELOC_V850_JMP_SLOT: howto manager. (line 1551) +* BFD_RELOC_V850_LO16_S1: howto manager. (line 1533) +* BFD_RELOC_V850_LO16_SPLIT_OFFSET: howto manager. (line 1516) +* BFD_RELOC_V850_LONGCALL: howto manager. (line 1510) +* BFD_RELOC_V850_LONGJUMP: howto manager. (line 1512) +* BFD_RELOC_V850_RELATIVE: howto manager. (line 1553) +* BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager. (line 1477) +* BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager. (line 1475) +* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager. (line 1500) +* BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager. (line 1493) +* BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager. (line 1498) +* BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager. (line 1495) +* BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager. (line 1485) +* BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager. (line 1491) +* BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager. (line 1488) +* BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager. (line 1482) +* BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager. (line 1480) +* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager. (line 1503) +* BFD_RELOC_VAX_GLOB_DAT: howto manager. (line 2435) +* BFD_RELOC_VAX_JMP_SLOT: howto manager. (line 2436) +* BFD_RELOC_VAX_RELATIVE: howto manager. (line 2437) +* BFD_RELOC_VISIUM_HI16: howto manager. (line 3458) +* BFD_RELOC_VISIUM_HI16_PCREL: howto manager. (line 3462) +* BFD_RELOC_VISIUM_IM16: howto manager. (line 3460) +* BFD_RELOC_VISIUM_IM16_PCREL: howto manager. (line 3464) +* BFD_RELOC_VISIUM_LO16: howto manager. (line 3459) +* BFD_RELOC_VISIUM_LO16_PCREL: howto manager. (line 3463) +* BFD_RELOC_VISIUM_REL16: howto manager. (line 3461) +* BFD_RELOC_VPE4KMATH_DATA: howto manager. (line 2097) +* BFD_RELOC_VPE4KMATH_INSN: howto manager. (line 2098) +* BFD_RELOC_VTABLE_ENTRY: howto manager. (line 2101) +* BFD_RELOC_VTABLE_INHERIT: howto manager. (line 2100) +* BFD_RELOC_WASM32_ABS32_CODE: howto manager. (line 3471) +* BFD_RELOC_WASM32_CODE_POINTER: howto manager. (line 3473) +* BFD_RELOC_WASM32_COPY: howto manager. (line 3472) +* BFD_RELOC_WASM32_INDEX: howto manager. (line 3474) +* BFD_RELOC_WASM32_LEB128: howto manager. (line 3466) +* BFD_RELOC_WASM32_LEB128_GOT: howto manager. (line 3467) +* BFD_RELOC_WASM32_LEB128_GOT_CODE: howto manager. (line 3468) +* BFD_RELOC_WASM32_LEB128_PLT: howto manager. (line 3469) +* BFD_RELOC_WASM32_PLT_INDEX: howto manager. (line 3470) +* BFD_RELOC_WASM32_PLT_SIG: howto manager. (line 3475) +* BFD_RELOC_X86_64_32S: howto manager. (line 554) +* BFD_RELOC_X86_64_COPY: howto manager. (line 549) +* BFD_RELOC_X86_64_DTPMOD64: howto manager. (line 555) +* BFD_RELOC_X86_64_DTPOFF32: howto manager. (line 560) +* BFD_RELOC_X86_64_DTPOFF64: howto manager. (line 556) +* BFD_RELOC_X86_64_GLOB_DAT: howto manager. (line 550) +* BFD_RELOC_X86_64_GOT32: howto manager. (line 547) +* BFD_RELOC_X86_64_GOT64: howto manager. (line 565) +* BFD_RELOC_X86_64_GOTOFF64: howto manager. (line 563) +* BFD_RELOC_X86_64_GOTPC32: howto manager. (line 564) +* BFD_RELOC_X86_64_GOTPC32_TLSDESC: howto manager. (line 570) +* BFD_RELOC_X86_64_GOTPC64: howto manager. (line 567) +* BFD_RELOC_X86_64_GOTPCREL: howto manager. (line 553) +* BFD_RELOC_X86_64_GOTPCREL64: howto manager. (line 566) +* BFD_RELOC_X86_64_GOTPCRELX: howto manager. (line 576) +* BFD_RELOC_X86_64_GOTPLT64: howto manager. (line 568) +* BFD_RELOC_X86_64_GOTTPOFF: howto manager. (line 561) +* BFD_RELOC_X86_64_IRELATIVE: howto manager. (line 573) +* BFD_RELOC_X86_64_JUMP_SLOT: howto manager. (line 551) +* BFD_RELOC_X86_64_PC32_BND: howto manager. (line 574) +* BFD_RELOC_X86_64_PLT32: howto manager. (line 548) +* BFD_RELOC_X86_64_PLT32_BND: howto manager. (line 575) +* BFD_RELOC_X86_64_PLTOFF64: howto manager. (line 569) +* BFD_RELOC_X86_64_RELATIVE: howto manager. (line 552) +* BFD_RELOC_X86_64_REX_GOTPCRELX: howto manager. (line 577) +* BFD_RELOC_X86_64_TLSDESC: howto manager. (line 572) +* BFD_RELOC_X86_64_TLSDESC_CALL: howto manager. (line 571) +* BFD_RELOC_X86_64_TLSGD: howto manager. (line 558) +* BFD_RELOC_X86_64_TLSLD: howto manager. (line 559) +* BFD_RELOC_X86_64_TPOFF32: howto manager. (line 562) +* BFD_RELOC_X86_64_TPOFF64: howto manager. (line 557) +* BFD_RELOC_XGATE_24: howto manager. (line 2244) +* BFD_RELOC_XGATE_GPAGE: howto manager. (line 2242) +* BFD_RELOC_XGATE_IMM3: howto manager. (line 2256) +* BFD_RELOC_XGATE_IMM4: howto manager. (line 2258) +* BFD_RELOC_XGATE_IMM5: howto manager. (line 2260) +* BFD_RELOC_XGATE_IMM8_HI: howto manager. (line 2253) +* BFD_RELOC_XGATE_IMM8_LO: howto manager. (line 2250) +* BFD_RELOC_XGATE_LO16: howto manager. (line 2239) +* BFD_RELOC_XGATE_PCREL_10: howto manager. (line 2248) +* BFD_RELOC_XGATE_PCREL_9: howto manager. (line 2246) +* BFD_RELOC_XGATE_RL_GROUP: howto manager. (line 2235) +* BFD_RELOC_XGATE_RL_JUMP: howto manager. (line 2232) +* BFD_RELOC_XSTORMY16_12: howto manager. (line 2429) +* BFD_RELOC_XSTORMY16_24: howto manager. (line 2430) +* BFD_RELOC_XSTORMY16_FPTR16: howto manager. (line 2431) +* BFD_RELOC_XSTORMY16_REL_12: howto manager. (line 2428) +* BFD_RELOC_XTENSA_ASM_EXPAND: howto manager. (line 2625) +* BFD_RELOC_XTENSA_ASM_SIMPLIFY: howto manager. (line 2629) +* BFD_RELOC_XTENSA_DIFF16: howto manager. (line 2574) +* BFD_RELOC_XTENSA_DIFF32: howto manager. (line 2575) +* BFD_RELOC_XTENSA_DIFF8: howto manager. (line 2573) +* BFD_RELOC_XTENSA_GLOB_DAT: howto manager. (line 2565) +* BFD_RELOC_XTENSA_JMP_SLOT: howto manager. (line 2566) +* BFD_RELOC_XTENSA_NDIFF16: howto manager. (line 2645) +* BFD_RELOC_XTENSA_NDIFF32: howto manager. (line 2646) +* BFD_RELOC_XTENSA_NDIFF8: howto manager. (line 2644) +* BFD_RELOC_XTENSA_OP0: howto manager. (line 2620) +* BFD_RELOC_XTENSA_OP1: howto manager. (line 2621) +* BFD_RELOC_XTENSA_OP2: howto manager. (line 2622) +* BFD_RELOC_XTENSA_PDIFF16: howto manager. (line 2642) +* BFD_RELOC_XTENSA_PDIFF32: howto manager. (line 2643) +* BFD_RELOC_XTENSA_PDIFF8: howto manager. (line 2641) +* BFD_RELOC_XTENSA_PLT: howto manager. (line 2569) +* BFD_RELOC_XTENSA_RELATIVE: howto manager. (line 2567) +* BFD_RELOC_XTENSA_RTLD: howto manager. (line 2561) +* BFD_RELOC_XTENSA_SLOT0_ALT: howto manager. (line 2603) +* BFD_RELOC_XTENSA_SLOT0_OP: howto manager. (line 2584) +* BFD_RELOC_XTENSA_SLOT10_ALT: howto manager. (line 2613) +* BFD_RELOC_XTENSA_SLOT10_OP: howto manager. (line 2594) +* BFD_RELOC_XTENSA_SLOT11_ALT: howto manager. (line 2614) +* BFD_RELOC_XTENSA_SLOT11_OP: howto manager. (line 2595) +* BFD_RELOC_XTENSA_SLOT12_ALT: howto manager. (line 2615) +* BFD_RELOC_XTENSA_SLOT12_OP: howto manager. (line 2596) +* BFD_RELOC_XTENSA_SLOT13_ALT: howto manager. (line 2616) +* BFD_RELOC_XTENSA_SLOT13_OP: howto manager. (line 2597) +* BFD_RELOC_XTENSA_SLOT14_ALT: howto manager. (line 2617) +* BFD_RELOC_XTENSA_SLOT14_OP: howto manager. (line 2598) +* BFD_RELOC_XTENSA_SLOT1_ALT: howto manager. (line 2604) +* BFD_RELOC_XTENSA_SLOT1_OP: howto manager. (line 2585) +* BFD_RELOC_XTENSA_SLOT2_ALT: howto manager. (line 2605) +* BFD_RELOC_XTENSA_SLOT2_OP: howto manager. (line 2586) +* BFD_RELOC_XTENSA_SLOT3_ALT: howto manager. (line 2606) +* BFD_RELOC_XTENSA_SLOT3_OP: howto manager. (line 2587) +* BFD_RELOC_XTENSA_SLOT4_ALT: howto manager. (line 2607) +* BFD_RELOC_XTENSA_SLOT4_OP: howto manager. (line 2588) +* BFD_RELOC_XTENSA_SLOT5_ALT: howto manager. (line 2608) +* BFD_RELOC_XTENSA_SLOT5_OP: howto manager. (line 2589) +* BFD_RELOC_XTENSA_SLOT6_ALT: howto manager. (line 2609) +* BFD_RELOC_XTENSA_SLOT6_OP: howto manager. (line 2590) +* BFD_RELOC_XTENSA_SLOT7_ALT: howto manager. (line 2610) +* BFD_RELOC_XTENSA_SLOT7_OP: howto manager. (line 2591) +* BFD_RELOC_XTENSA_SLOT8_ALT: howto manager. (line 2611) +* BFD_RELOC_XTENSA_SLOT8_OP: howto manager. (line 2592) +* BFD_RELOC_XTENSA_SLOT9_ALT: howto manager. (line 2612) +* BFD_RELOC_XTENSA_SLOT9_OP: howto manager. (line 2593) +* BFD_RELOC_XTENSA_TLSDESC_ARG: howto manager. (line 2634) +* BFD_RELOC_XTENSA_TLSDESC_FN: howto manager. (line 2633) +* BFD_RELOC_XTENSA_TLS_ARG: howto manager. (line 2638) +* BFD_RELOC_XTENSA_TLS_CALL: howto manager. (line 2639) +* BFD_RELOC_XTENSA_TLS_DTPOFF: howto manager. (line 2635) +* BFD_RELOC_XTENSA_TLS_FUNC: howto manager. (line 2637) +* BFD_RELOC_XTENSA_TLS_TPOFF: howto manager. (line 2636) +* BFD_RELOC_Z80_16_BE: howto manager. (line 2670) +* BFD_RELOC_Z80_BYTE0: howto manager. (line 2658) +* BFD_RELOC_Z80_BYTE1: howto manager. (line 2660) +* BFD_RELOC_Z80_BYTE2: howto manager. (line 2662) +* BFD_RELOC_Z80_BYTE3: howto manager. (line 2664) +* BFD_RELOC_Z80_DISP8: howto manager. (line 2656) +* BFD_RELOC_Z80_WORD0: howto manager. (line 2666) +* BFD_RELOC_Z80_WORD1: howto manager. (line 2668) +* BFD_RELOC_Z8K_CALLR: howto manager. (line 2674) +* BFD_RELOC_Z8K_DISP7: howto manager. (line 2672) +* BFD_RELOC_Z8K_IMM4L: howto manager. (line 2676) +* bfd_rename_section: section prototypes. (line 149) +* bfd_rename_section <1>: section prototypes. (line 153) +* bfd_scan_arch: Architectures. (line 598) +* bfd_scan_vma: Miscellaneous. (line 115) +* bfd_scan_vma <1>: Miscellaneous. (line 119) +* bfd_section: Opening and Closing. + (line 335) +* bfd_sections_find_if: section prototypes. (line 174) * bfd_section_already_linked: Writing the symbol table. - (line 55) + (line 53) +* bfd_section_already_linked <1>: Writing the symbol table. + (line 57) * bfd_section_list_clear: section prototypes. (line 7) -* bfd_set_archive_head: Archives. (line 74) -* bfd_set_arch_info: Architectures. (line 631) -* bfd_set_assert_handler: Error reporting. (line 179) -* bfd_set_default_target: bfd_target. (line 599) -* bfd_set_error: Error reporting. (line 58) +* bfd_section_list_clear <1>: section prototypes. (line 11) +* bfd_seek: Miscellaneous. (line 410) +* bfd_seek <1>: Miscellaneous. (line 414) +* bfd_set_archive_head: Archives. (line 72) +* bfd_set_archive_head <1>: Archives. (line 76) +* bfd_set_arch_info: Architectures. (line 635) +* bfd_set_arch_info <1>: Architectures. (line 639) +* bfd_set_assert_handler: Error reporting. (line 172) +* bfd_set_assert_handler <1>: Error reporting. (line 177) +* bfd_set_default_target: bfd_target. (line 554) +* bfd_set_default_target <1>: bfd_target. (line 558) +* bfd_set_error: Error reporting. (line 55) +* bfd_set_error <1>: Error reporting. (line 59) * bfd_set_error_handler: Error reporting. (line 128) -* bfd_set_error_program_name: Error reporting. (line 145) +* bfd_set_error_handler <1>: Error reporting. (line 132) +* bfd_set_error_program_name: Error reporting. (line 143) +* bfd_set_error_program_name <1>: Error reporting. (line 147) * bfd_set_filename: Opening and Closing. - (line 520) -* bfd_set_file_flags: Miscellaneous. (line 45) -* bfd_set_format: Formats. (line 67) -* bfd_set_gp_size: Miscellaneous. (line 116) -* bfd_set_gp_value: Miscellaneous. (line 126) -* bfd_set_input_error: Error reporting. (line 69) -* bfd_set_private_flags: Miscellaneous. (line 183) -* bfd_set_reloc: Miscellaneous. (line 33) -* bfd_set_section_contents: section prototypes. (line 228) -* bfd_set_section_flags: section prototypes. (line 154) -* bfd_set_section_size: section prototypes. (line 214) -* bfd_set_start_address: Miscellaneous. (line 95) + (line 378) +* bfd_set_file_flags: Miscellaneous. (line 41) +* bfd_set_file_flags <1>: Miscellaneous. (line 45) +* bfd_set_format: Formats. (line 65) +* bfd_set_format <1>: Formats. (line 69) +* bfd_set_gp_size: Miscellaneous. (line 100) +* bfd_set_gp_size <1>: Miscellaneous. (line 104) +* bfd_set_gp_value: Miscellaneous. (line 108) +* bfd_set_gp_value <1>: Miscellaneous. (line 112) +* bfd_set_input_error: Error reporting. (line 64) +* bfd_set_input_error <1>: Error reporting. (line 68) +* bfd_set_private_flags: Miscellaneous. (line 161) +* bfd_set_private_flags <1>: Miscellaneous. (line 165) +* bfd_set_reloc: Miscellaneous. (line 31) +* bfd_set_reloc <1>: Miscellaneous. (line 35) +* bfd_set_section_contents: section prototypes. (line 201) +* bfd_set_section_contents <1>: section prototypes. (line 205) +* bfd_set_section_flags: section prototypes. (line 137) +* bfd_set_section_flags <1>: section prototypes. (line 141) +* bfd_set_section_size: section prototypes. (line 188) +* bfd_set_section_size <1>: section prototypes. (line 192) +* bfd_set_start_address: Miscellaneous. (line 84) +* bfd_set_start_address <1>: Miscellaneous. (line 88) * bfd_set_symtab: symbol handling functions. - (line 63) + (line 57) +* bfd_set_symtab <1>: symbol handling functions. + (line 61) +* bfd_sprintf_vma: Miscellaneous. (line 295) +* bfd_sprintf_vma <1>: Miscellaneous. (line 299) +* bfd_stat: Miscellaneous. (line 402) +* bfd_stat <1>: Miscellaneous. (line 406) +* bfd_strtab_hash: Write Other Derived Routines. + (line 110) +* bfd_strtab_hash <1>: Write Other Derived Routines. + (line 116) * bfd_symbol_info: symbol handling functions. - (line 135) -* bfd_target_list: bfd_target. (line 651) -* bfd_zalloc: Opening and Closing. - (line 257) -* check_build_id_file: Opening and Closing. - (line 482) -* coff_symbol_type: coff. (line 233) -* core_file_matches_executable_p: Core Files. (line 38) -* find_separate_debug_file: Opening and Closing. - (line 356) -* generic_core_file_matches_executable_p: Core Files. (line 48) -* get_build_id: Opening and Closing. - (line 451) -* get_build_id_name: Opening and Closing. - (line 465) + (line 119) +* bfd_symbol_info <1>: symbol handling functions. + (line 123) +* bfd_target: bfd_target. (line 566) +* bfd_target <1>: bfd_target. (line 581) +* bfd_target <2>: bfd_target. (line 611) +* bfd_target_list: bfd_target. (line 600) +* bfd_tell: Miscellaneous. (line 390) +* bfd_tell <1>: Miscellaneous. (line 394) +* bfd_write: Miscellaneous. (line 382) +* bfd_write <1>: Miscellaneous. (line 386) +* bfd_write_bigendian_4byte_int: Internal. (line 91) +* bfd_write_bigendian_4byte_int <1>: Internal. (line 95) +* bfd_zalloc: Internal. (line 77) +* bfd_zmalloc: Internal. (line 58) +* Byte swapping routines.: Internal. (line 256) +* char: Error reporting. (line 77) +* char <1>: Error reporting. (line 155) +* char <2>: section prototypes. (line 273) +* char <3>: Formats. (line 78) +* char <4>: howto manager. (line 3658) +* char <5>: Core Files. (line 14) +* char <6>: bfd_target. (line 604) +* char <7>: bfd_target. (line 621) +* char <8>: Architectures. (line 595) +* char <9>: Architectures. (line 611) +* char <10>: Architectures. (line 712) +* char <11>: Opening and Closing. + (line 382) +* coff_symbol_type: coff. (line 234) +* core_file_matches_executable_p: Core Files. (line 31) +* core_file_matches_executable_p <1>: Core Files. (line 35) +* generic_core_file_matches_executable_p: Core Files. (line 40) +* generic_core_file_matches_executable_p <1>: Core Files. (line 44) * Hash tables: Hash Tables. (line 6) +* int: Initialization. (line 6) +* int <1>: Miscellaneous. (line 96) +* int <2>: Architectures. (line 668) +* int <3>: Architectures. (line 675) +* int <4>: Architectures. (line 722) +* int <5>: Architectures. (line 731) +* int <6>: Internal. (line 284) +* int <7>: Write Other Derived Routines. + (line 104) * internal object-file format: Canonical format. (line 11) * Linker: Linker Functions. (line 6) -* Other functions: Miscellaneous. (line 197) -* separate_alt_debug_file_exists: Opening and Closing. - (line 347) -* separate_debug_file_exists: Opening and Closing. - (line 334) -* struct bfd_iovec: Miscellaneous. (line 350) +* long: Architectures. (line 662) +* machine_type: aout. (line 134) +* Other functions: Miscellaneous. (line 173) +* per_xvec_message: bfd_target. (line 544) +* struct bfd_iovec: Miscellaneous. (line 335) * target vector (_bfd_final_link): Performing the Final Link. (line 6) * target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table. (line 6) * target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table. (line 6) -* The HOWTO Macro: typedef arelent. (line 285) +* The HOWTO Macro: typedef arelent. (line 254) * what is it?: Overview. (line 6) @@ -14736,62 +14647,62 @@ Node: BFD information loss6244 Node: Canonical format8785 Node: BFD front end13128 Node: typedef bfd13552 -Node: Error reporting32029 -Node: Miscellaneous37795 -Node: Memory Usage54989 -Node: Initialization56220 -Node: Sections56896 -Node: Section Input57379 -Node: Section Output58573 -Node: typedef asection61060 -Node: section prototypes85373 -Node: Symbols96383 -Node: Reading Symbols97986 -Node: Writing Symbols99094 -Node: Mini Symbols100838 -Node: typedef asymbol101812 -Node: symbol handling functions108019 -Node: Archives113352 -Node: Formats117482 -Node: Relocations120412 -Node: typedef arelent121139 -Node: howto manager135865 -Node: Core Files272517 -Node: Targets274541 -Node: bfd_target276516 -Node: Architectures304497 -Node: Opening and Closing336395 -Node: Internal354563 -Node: File Caching354667 -Node: Linker Functions356564 -Node: Creating a Linker Hash Table358238 -Node: Adding Symbols to the Hash Table359977 -Node: Differing file formats360877 -Node: Adding symbols from an object file362602 -Node: Adding symbols from an archive364752 -Node: Performing the Final Link367098 -Node: Information provided by the linker368339 -Node: Relocating the section contents369493 -Node: Writing the symbol table371245 -Node: Hash Tables378336 -Node: Creating and Freeing a Hash Table379534 -Node: Looking Up or Entering a String380784 -Node: Traversing a Hash Table382037 -Node: Deriving a New Hash Table Type382826 -Node: Define the Derived Structures383892 -Node: Write the Derived Creation Routine384973 -Node: Write Other Derived Routines387598 -Node: BFD back ends388913 -Node: What to Put Where389183 -Node: aout389363 -Node: coff395605 -Node: elf423745 -Node: mmo424146 -Node: File layout425016 -Node: Symbol-table430929 -Node: mmo section mapping434692 -Node: GNU Free Documentation License438346 -Node: BFD Index463410 +Node: Error reporting26943 +Node: Initialization33190 +Node: Miscellaneous33725 +Node: Memory Usage53370 +Node: Sections54595 +Node: Section Input55076 +Node: Section Output56270 +Node: typedef asection58757 +Node: section prototypes76038 +Node: Symbols87311 +Node: Reading Symbols88914 +Node: Writing Symbols90022 +Node: Mini Symbols91766 +Node: typedef asymbol92740 +Node: symbol handling functions98946 +Node: Archives104161 +Node: Formats108309 +Node: Relocations111322 +Node: typedef arelent112047 +Node: howto manager125904 +Node: Core Files266084 +Node: Targets268085 +Node: bfd_target270046 +Node: Architectures296821 +Node: Opening and Closing329143 +Node: Internal344754 +Node: File Caching356089 +Node: Linker Functions358111 +Node: Creating a Linker Hash Table359785 +Node: Adding Symbols to the Hash Table361524 +Node: Differing file formats362424 +Node: Adding symbols from an object file364149 +Node: Adding symbols from an archive366299 +Node: Performing the Final Link368645 +Node: Information provided by the linker369886 +Node: Relocating the section contents371040 +Node: Writing the symbol table372792 +Node: Hash Tables379883 +Node: Creating and Freeing a Hash Table381081 +Node: Looking Up or Entering a String382331 +Node: Traversing a Hash Table383584 +Node: Deriving a New Hash Table Type384373 +Node: Define the Derived Structures385439 +Node: Write the Derived Creation Routine386520 +Node: Write Other Derived Routines389131 +Node: BFD back ends394556 +Node: What to Put Where394826 +Node: aout395006 +Node: coff401091 +Node: elf422234 +Node: mmo422635 +Node: File layout423505 +Node: Symbol-table429418 +Node: mmo section mapping433181 +Node: GNU Free Documentation License436835 +Node: BFD Index461899  End Tag Table diff --git a/bfd/doc/bfd.texi b/bfd/doc/bfd.texi index d3cd6b136..f34871084 100644 --- a/bfd/doc/bfd.texi +++ b/bfd/doc/bfd.texi @@ -1,6 +1,6 @@ \input texinfo.tex @setfilename bfd.info -@c Copyright (C) 1988-2022 Free Software Foundation, Inc. +@c Copyright (C) 1988-2023 Free Software Foundation, Inc. @c @synindex fn cp @@ -14,7 +14,7 @@ @copying This file documents the BFD library. -Copyright @copyright{} 1991-2022 Free Software Foundation, Inc. +Copyright @copyright{} 1991-2023 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -62,7 +62,7 @@ included in the section entitled ``GNU Free Documentation License''. @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991-2022 Free Software Foundation, Inc. +Copyright @copyright{} 1991-2023 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -198,9 +198,9 @@ IEEE-695. @menu * typedef bfd:: * Error reporting:: +* Initialization:: * Miscellaneous:: * Memory Usage:: -* Initialization:: * Sections:: * Symbols:: * Archives:: @@ -219,7 +219,7 @@ IEEE-695. @include bfdt.texi @include bfdio.texi -@node Memory Usage, Initialization, Miscellaneous, BFD front end +@node Memory Usage, Sections, Miscellaneous, BFD front end @section Memory Usage BFD keeps all of its internal structures in obstacks. There is one obstack per open BFD file, into which the current state is stored. When a BFD is @@ -242,10 +242,7 @@ select the greediest open BFD, close it to reclaim the memory, perform some operation and reopen the BFD again, to get a fresh copy of the data structures. -@node Initialization, Sections, Memory Usage, BFD front end -@include init.texi - -@node Sections, Symbols, Initialization, BFD front end +@node Sections, Symbols, Memory Usage, BFD front end @include section.texi @node Symbols, Archives, Sections, BFD front end diff --git a/bfd/doc/bfdint.texi b/bfd/doc/bfdint.texi index d69fa6171..50913efe3 100644 --- a/bfd/doc/bfdint.texi +++ b/bfd/doc/bfdint.texi @@ -1,5 +1,5 @@ \input texinfo -@c Copyright (C) 1988-2022 Free Software Foundation, Inc. +@c Copyright (C) 1988-2023 Free Software Foundation, Inc. @setfilename bfdint.info @settitle BFD Internals @@ -14,7 +14,7 @@ @copying This file documents the internals of the BFD library. -Copyright @copyright{} 1988-2022 Free Software Foundation, Inc. +Copyright @copyright{} 1988-2023 Free Software Foundation, Inc. Contributed by Cygnus Support. Permission is granted to copy, distribute and/or modify this document @@ -346,10 +346,6 @@ Intel hex format. SOM (used on HP/UX). @item bfd_target_verilog_flavour Verilog memory hex dump format. -@item bfd_target_os9k_flavour -os9000. -@item bfd_target_versados_flavour -VERSAdos. @item bfd_target_msdos_flavour MS-DOS. @item bfd_target_evax_flavour @@ -497,22 +493,25 @@ functions which don't easily fit into other categories. @table @samp @item _close_and_cleanup -Free any target specific information associated with the BFD. This is -called when any BFD is closed (the @samp{bfd_write_contents} function -mentioned earlier is only called for a BFD opened for writing). Most -targets use @samp{bfd_alloc} to allocate all target specific -information, and therefore don't have to do anything in this function. -This function pointer is typically set to -@samp{_bfd_generic_close_and_cleanup}, which simply returns true. +Free any target specific information associated with the BFD that +isn't freed by @samp{_bfd_free_cached_info}. This is called when any +BFD is closed (the @samp{bfd_write_contents} function mentioned +earlier is only called for a BFD opened for writing). This function +pointer is typically set to @samp{_bfd_generic_close_and_cleanup}, +which simply returns true. @item _bfd_free_cached_info -Free any cached information associated with the BFD which can be -recreated later if necessary. This is used to reduce the memory -consumption required by programs using BFD. This is normally called via -the @samp{bfd_free_cached_info} macro. It is used by the default -archive routines when computing the archive map. Most targets do not -do anything special for this entry point, and just set it to -@samp{_bfd_generic_free_cached_info}, which simply returns true. +This function is designed for use by the generic archive routines, and +is also called by bfd_close. After creating the archive map archive +element bfds don't need symbols and other structures. Many targets +use @samp{bfd_alloc} to allocate target specific information and thus +do not need to do anything special for this entry point, and just set +it to @samp{_bfd_generic_free_cached_info} which throws away objalloc +memory for the bfd. Note that this means the bfd tdata and sections +are no longer available. Targets that malloc memory, attaching it to +the bfd tdata or to section used_by_bfd should implement a target +version of this function to free that memory before calling +@samp{_bfd_generic_free_cached_info}. @item _new_section_hook This is called from @samp{bfd_make_section_anyway} whenever a new @@ -524,7 +523,7 @@ corresponds to an actual section in an actual BFD. Get the contents of a section. This is called from @samp{bfd_get_section_contents}. Most targets set this to @samp{_bfd_generic_get_section_contents}, which does a @samp{bfd_seek} -based on the section's @samp{filepos} field and a @samp{bfd_bread}. The +based on the section's @samp{filepos} field and a @samp{bfd_read}. The corresponding field in the target vector is named @samp{_bfd_get_section_contents}. @@ -657,7 +656,7 @@ always uses extended name tables anyhow. The corresponding field in the target vector is named @samp{_bfd_truncate_arname}. @item _write_armap -Write out the archive symbol table using calls to @samp{bfd_bwrite}. +Write out the archive symbol table using calls to @samp{bfd_write}. This is normally called from the archive @samp{write_contents} routine. The corresponding field in the target vector is named @samp{write_armap} (no leading underscore). diff --git a/bfd/doc/bfdio.texi b/bfd/doc/bfdio.texi index 1b91be30e..a1a57eb88 100644 --- a/bfd/doc/bfdio.texi +++ b/bfd/doc/bfdio.texi @@ -1,6 +1,5 @@ @findex struct bfd_iovec @subsubsection @code{struct bfd_iovec} -@strong{Description}@* The @code{struct bfd_iovec} contains the internal file I/O class. Each @code{BFD} has an instance of this class and all file I/O is routed through it (it is assumed that the instance implements @@ -37,25 +36,59 @@ struct bfd_iovec void **map_addr, bfd_size_type *map_len); @}; extern const struct bfd_iovec _bfd_memory_iovec; + @end example +@findex bfd_read +@subsubsection @code{bfd_read} +@deftypefn {Function} bfd_size_type bfd_read (void *, bfd_size_type, bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; +Attempt to read SIZE bytes from ABFD's iostream to PTR. +Return the amount read. + +@end deftypefn +@findex bfd_write +@subsubsection @code{bfd_write} +@deftypefn {Function} bfd_size_type bfd_write (const void *, bfd_size_type, bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; +Attempt to write SIZE bytes to ABFD's iostream from PTR. +Return the amount written. + +@end deftypefn +@findex bfd_tell +@subsubsection @code{bfd_tell} +@deftypefn {Function} file_ptr bfd_tell (bfd *) ATTRIBUTE_WARN_UNUSED_RESULT; +Return ABFD's iostream file position. + +@end deftypefn +@findex bfd_flush +@subsubsection @code{bfd_flush} +@deftypefn {Function} int bfd_flush (bfd *); +Flush ABFD's iostream pending IO. + +@end deftypefn +@findex bfd_stat +@subsubsection @code{bfd_stat} +@deftypefn {Function} int bfd_stat (bfd *, struct stat *) ATTRIBUTE_WARN_UNUSED_RESULT; +Call fstat on ABFD's iostream. Return 0 on success, and a +negative value on failure. + +@end deftypefn +@findex bfd_seek +@subsubsection @code{bfd_seek} +@deftypefn {Function} int bfd_seek (bfd *, file_ptr, int) ATTRIBUTE_WARN_UNUSED_RESULT; +Call fseek on ABFD's iostream. Return 0 on success, and a +negative value on failure. + +@end deftypefn @findex bfd_get_mtime @subsubsection @code{bfd_get_mtime} -@strong{Synopsis} -@example -long bfd_get_mtime (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} long bfd_get_mtime (bfd *abfd); Return the file modification time (as read from the file system, or from the archive header for archive members). +@end deftypefn @findex bfd_get_size @subsubsection @code{bfd_get_size} -@strong{Synopsis} -@example -ufile_ptr bfd_get_size (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} ufile_ptr bfd_get_size (bfd *abfd); Return the file size (as read from file system) for the file associated with BFD @var{abfd}. @@ -82,27 +115,32 @@ size reasonable?". A return value of zero indicates the file size is unknown. +@end deftypefn @findex bfd_get_file_size @subsubsection @code{bfd_get_file_size} -@strong{Synopsis} -@example -ufile_ptr bfd_get_file_size (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} ufile_ptr bfd_get_file_size (bfd *abfd); Return the file size (as read from file system) for the file associated with BFD @var{abfd}. It supports both normal files and archive elements. +@end deftypefn @findex bfd_mmap @subsubsection @code{bfd_mmap} -@strong{Synopsis} -@example -void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, - int prot, int flags, file_ptr offset, - void **map_addr, bfd_size_type *map_len); -@end example -@strong{Description}@* +@deftypefn {Function} void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, void **map_addr, bfd_size_type *map_len) ATTRIBUTE_WARN_UNUSED_RESULT; Return mmap()ed region of the file, if possible and implemented. LEN and OFFSET do not need to be page aligned. The page aligned address and length are written to MAP_ADDR and MAP_LEN. +@end deftypefn +@findex bfd_get_current_time +@subsubsection @code{bfd_get_current_time} +@deftypefn {Function} time_t bfd_get_current_time (time_t now); +Returns the current time. + +If the environment variable SOURCE_DATE_EPOCH is defined +then this is parsed and its value is returned. Otherwise +if the paramter NOW is non-zero, then that is returned. +Otherwise the result of the system call "time(NULL)" is +returned. + +@end deftypefn diff --git a/bfd/doc/bfdsumm.texi b/bfd/doc/bfdsumm.texi index b373e58f2..03518de97 100644 --- a/bfd/doc/bfdsumm.texi +++ b/bfd/doc/bfdsumm.texi @@ -1,5 +1,5 @@ @c This summary of BFD is shared by the BFD and LD docs. -@c Copyright (C) 2012-2022 Free Software Foundation, Inc. +@c Copyright (C) 2012-2023 Free Software Foundation, Inc. When an object file is opened, BFD subroutines automatically determine the format of the input object file. They then build a descriptor in diff --git a/bfd/doc/bfdt.texi b/bfd/doc/bfdt.texi index a9be74e2a..d8fa1b91d 100644 --- a/bfd/doc/bfdt.texi +++ b/bfd/doc/bfdt.texi @@ -10,28 +10,6 @@ to the rest of the data. @example - -enum bfd_direction - @{ - no_direction = 0, - read_direction = 1, - write_direction = 2, - both_direction = 3 - @}; - -enum bfd_plugin_format - @{ - bfd_plugin_unknown = 0, - bfd_plugin_yes = 1, - bfd_plugin_no = 2 - @}; - -struct bfd_build_id - @{ - bfd_size_type size; - bfd_byte data[1]; - @}; - struct bfd @{ /* The filename the application opened the BFD with. */ @@ -155,17 +133,15 @@ struct bfd /* Compress sections in this BFD with SHF_COMPRESSED zstd. */ #define BFD_COMPRESS_ZSTD 0x400000 - /* Flags bits to be saved in bfd_preserve_save. */ -#define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ - | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ - | BFD_USE_ELF_STT_COMMON | BFD_COMPRESS_ZSTD) + /* Don't generate ELF section header. */ +#define BFD_NO_SECTION_HEADER 0x800000 /* Flags bits which are for BFD use only. */ #define BFD_FLAGS_FOR_BFD_USE_MASK \ (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ - | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON \ + | BFD_NO_SECTION_HEADER) /* The format which belongs to the BFD. (object, core, etc.) */ ENUM_BITFIELD (bfd_format) format : 3; @@ -173,6 +149,20 @@ struct bfd /* The direction with which the BFD was opened. */ ENUM_BITFIELD (bfd_direction) direction : 2; + /* POSIX.1-2017 (IEEE Std 1003.1) says of fopen : "When a file is + opened with update mode ('+' as the second or third character in + the mode argument), both input and output may be performed on + the associated stream. However, the application shall ensure + that output is not directly followed by input without an + intervening call to fflush() or to a file positioning function + (fseek(), fsetpos(), or rewind()), and input is not directly + followed by output without an intervening call to a file + positioning function, unless the input operation encounters + end-of-file." + This field tracks the last IO operation, so that bfd can insert + a seek when IO direction changes. */ + ENUM_BITFIELD (bfd_last_io) last_io : 2; + /* Is the file descriptor being cached? That is, can it be closed as needed, and re-opened when accessed later? */ unsigned int cacheable : 1; @@ -320,8 +310,6 @@ struct bfd struct tekhex_data_struct *tekhex_data; struct elf_obj_tdata *elf_obj_data; struct mmo_data_struct *mmo_data; - struct sun_core_struct *sun_core_data; - struct sco5_core_struct *sco5_core_data; struct trad_core_struct *trad_core_data; struct som_data_struct *som_data; struct hpux_core_struct *hpux_core_data; @@ -330,7 +318,6 @@ struct bfd struct lynx_core_struct *lynx_core_data; struct osf_core_struct *osf_core_data; struct cisco_core_struct *cisco_core_data; - struct versados_data_struct *versados_data; struct netbsd_core_struct *netbsd_core_data; struct mach_o_data_struct *mach_o_data; struct mach_o_fat_data_struct *mach_o_fat_data; @@ -354,238 +341,8 @@ struct bfd const struct bfd_build_id *build_id; @}; -static inline const char * -bfd_get_filename (const bfd *abfd) -@{ - return abfd->filename; -@} - -static inline bool -bfd_get_cacheable (const bfd *abfd) -@{ - return abfd->cacheable; -@} - -static inline enum bfd_format -bfd_get_format (const bfd *abfd) -@{ - return abfd->format; -@} - -static inline flagword -bfd_get_file_flags (const bfd *abfd) -@{ - return abfd->flags; -@} - -static inline bfd_vma -bfd_get_start_address (const bfd *abfd) -@{ - return abfd->start_address; -@} - -static inline unsigned int -bfd_get_symcount (const bfd *abfd) -@{ - return abfd->symcount; -@} - -static inline unsigned int -bfd_get_dynamic_symcount (const bfd *abfd) -@{ - return abfd->dynsymcount; -@} - -static inline struct bfd_symbol ** -bfd_get_outsymbols (const bfd *abfd) -@{ - return abfd->outsymbols; -@} - -static inline unsigned int -bfd_count_sections (const bfd *abfd) -@{ - return abfd->section_count; -@} - -static inline bool -bfd_has_map (const bfd *abfd) -@{ - return abfd->has_armap; -@} - -static inline bool -bfd_is_thin_archive (const bfd *abfd) -@{ - return abfd->is_thin_archive; -@} - -static inline void * -bfd_usrdata (const bfd *abfd) -@{ - return abfd->usrdata; -@} - -/* See note beside bfd_set_section_userdata. */ -static inline bool -bfd_set_cacheable (bfd * abfd, bool val) -@{ - abfd->cacheable = val; - return true; -@} - -static inline void -bfd_set_thin_archive (bfd *abfd, bool val) -@{ - abfd->is_thin_archive = val; -@} - -static inline void -bfd_set_usrdata (bfd *abfd, void *val) -@{ - abfd->usrdata = val; -@} - -static inline asection * -bfd_asymbol_section (const asymbol *sy) -@{ - return sy->section; -@} - -static inline bfd_vma -bfd_asymbol_value (const asymbol *sy) -@{ - return sy->section->vma + sy->value; -@} - -static inline const char * -bfd_asymbol_name (const asymbol *sy) -@{ - return sy->name; -@} - -static inline struct bfd * -bfd_asymbol_bfd (const asymbol *sy) -@{ - return sy->the_bfd; -@} - -static inline void -bfd_set_asymbol_name (asymbol *sy, const char *name) -@{ - sy->name = name; -@} - -static inline bfd_size_type -bfd_get_section_limit_octets (const bfd *abfd, const asection *sec) -@{ - if (abfd->direction != write_direction && sec->rawsize != 0) - return sec->rawsize; - return sec->size; -@} - -/* Find the address one past the end of SEC. */ -static inline bfd_size_type -bfd_get_section_limit (const bfd *abfd, const asection *sec) -@{ - return (bfd_get_section_limit_octets (abfd, sec) - / bfd_octets_per_byte (abfd, sec)); -@} - -static inline bfd_size_type -bfd_get_section_alloc_size (const bfd *abfd, const asection *sec) -@{ - if (abfd->direction != write_direction && sec->rawsize > sec->size) - return sec->rawsize; - return sec->size; -@} - -/* Functions to handle insertion and deletion of a bfd's sections. These - only handle the list pointers, ie. do not adjust section_count, - target_index etc. */ -static inline void -bfd_section_list_remove (bfd *abfd, asection *s) -@{ - asection *next = s->next; - asection *prev = s->prev; - if (prev) - prev->next = next; - else - abfd->sections = next; - if (next) - next->prev = prev; - else - abfd->section_last = prev; -@} - -static inline void -bfd_section_list_append (bfd *abfd, asection *s) -@{ - s->next = 0; - if (abfd->section_last) - @{ - s->prev = abfd->section_last; - abfd->section_last->next = s; - @} - else - @{ - s->prev = 0; - abfd->sections = s; - @} - abfd->section_last = s; -@} - -static inline void -bfd_section_list_prepend (bfd *abfd, asection *s) -@{ - s->prev = 0; - if (abfd->sections) - @{ - s->next = abfd->sections; - abfd->sections->prev = s; - @} - else - @{ - s->next = 0; - abfd->section_last = s; - @} - abfd->sections = s; -@} - -static inline void -bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s) -@{ - asection *next = a->next; - s->next = next; - s->prev = a; - a->next = s; - if (next) - next->prev = s; - else - abfd->section_last = s; -@} - -static inline void -bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s) -@{ - asection *prev = b->prev; - s->prev = prev; - s->next = b; - b->prev = s; - if (prev) - prev->next = s; - else - abfd->sections = s; -@} - -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; -@} - @end example -@node Error reporting, Miscellaneous, typedef bfd, BFD front end +@node Error reporting, Initialization, typedef bfd, BFD front end @section Error reporting Most BFD functions return nonzero on success (check their individual documentation for precise semantics). On an error, @@ -603,7 +360,6 @@ enumerated type @code{bfd_error_type}. @example - typedef enum bfd_error @{ bfd_error_no_error = 0, @@ -635,59 +391,56 @@ bfd_error_type; @end example @findex bfd_get_error @subsubsection @code{bfd_get_error} -@strong{Synopsis} -@example -bfd_error_type bfd_get_error (void); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_error_type bfd_get_error (void); Return the current BFD error condition. +@end deftypefn @findex bfd_set_error @subsubsection @code{bfd_set_error} -@strong{Synopsis} -@example -void bfd_set_error (bfd_error_type error_tag); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_error (bfd_error_type error_tag); Set the BFD error condition to be @var{error_tag}. @var{error_tag} must not be bfd_error_on_input. Use bfd_set_input_error for input errors instead. +@end deftypefn @findex bfd_set_input_error @subsubsection @code{bfd_set_input_error} -@strong{Synopsis} -@example -void bfd_set_input_error (bfd *input, bfd_error_type error_tag); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_input_error (bfd *input, bfd_error_type error_tag); Set the BFD error condition to be bfd_error_on_input. @var{input} is the input bfd where the error occurred, and @var{error_tag} the bfd_error_type error. +@end deftypefn @findex bfd_errmsg @subsubsection @code{bfd_errmsg} -@strong{Synopsis} -@example -const char *bfd_errmsg (bfd_error_type error_tag); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_errmsg (bfd_error_type error_tag); Return a string describing the error @var{error_tag}, or the system error if @var{error_tag} is @code{bfd_error_system_call}. +@end deftypefn @findex bfd_perror @subsubsection @code{bfd_perror} -@strong{Synopsis} -@example -void bfd_perror (const char *message); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_perror (const char *message); Print to the standard error stream a string describing the last BFD error that occurred, or the last system error if the last BFD error was a system call failure. If @var{message} is non-NULL and non-empty, the error string printed is preceded by @var{message}, a colon, and a space. It is followed by a newline. +@end deftypefn +@findex bfd_asprintf +@subsubsection @code{bfd_asprintf} +@deftypefn {Function} char *bfd_asprintf (const char *fmt, ...); +Primarily for error reporting, this function is like +libiberty's xasprintf except that it can return NULL on no +memory and the returned string should not be freed. Uses a +single malloc'd buffer managed by libbfd, _bfd_error_buf. +Be aware that a call to this function frees the result of any +previous call. bfd_errmsg (bfd_error_on_input) also calls +this function. + +@end deftypefn @subsection BFD error handler Some BFD functions want to print messages describing the problem. They call a BFD error handler function. This @@ -697,17 +450,12 @@ The BFD error handler acts like vprintf. @example - typedef void (*bfd_error_handler_type) (const char *, va_list); @end example @findex _bfd_error_handler @subsubsection @code{_bfd_error_handler} -@strong{Synopsis} -@example -void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; -@end example -@strong{Description}@* +@deftypefn {Function} void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; This is the default routine to handle BFD error messages. Like fprintf (stderr, ...), but also handles some extra format specifiers. @@ -719,47 +467,36 @@ archive too. Beware: Only supports a maximum of 9 format arguments. +@end deftypefn @findex bfd_set_error_handler @subsubsection @code{bfd_set_error_handler} -@strong{Synopsis} -@example -bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); Set the BFD error handler function. Returns the previous function. +@end deftypefn @findex _bfd_set_error_handler_caching @subsubsection @code{_bfd_set_error_handler_caching} -@strong{Synopsis} -@example -bfd_error_handler_type _bfd_set_error_handler_caching (bfd *); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_error_handler_type _bfd_set_error_handler_caching (bfd *); Set the BFD error handler function to one that stores messages to the per_xvec_warn array. Returns the previous function. +@end deftypefn @findex bfd_set_error_program_name @subsubsection @code{bfd_set_error_program_name} -@strong{Synopsis} -@example -void bfd_set_error_program_name (const char *); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_error_program_name (const char *); Set the program name to use when printing a BFD error. This is printed before the error message followed by a colon and space. The string must not be changed after it is passed to this function. +@end deftypefn @findex _bfd_get_error_program_name @subsubsection @code{_bfd_get_error_program_name} -@strong{Synopsis} -@example -const char *_bfd_get_error_program_name (void); -@end example -@strong{Description}@* +@deftypefn {Function} const char *_bfd_get_error_program_name (void); Get the program name used when printing a BFD error. +@end deftypefn @subsection BFD assert handler If BFD finds an internal inconsistency, the bfd assert handler is called with information on the BFD version, BFD @@ -771,7 +508,6 @@ _bfd_error_handler and continues. @example - typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, const char *bfd_file, @@ -780,15 +516,27 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, @end example @findex bfd_set_assert_handler @subsubsection @code{bfd_set_assert_handler} -@strong{Synopsis} -@example -bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); Set the BFD assert handler function. Returns the previous function. -@node Miscellaneous, Memory Usage, Error reporting, BFD front end +@end deftypefn +@node Initialization, Miscellaneous, Error reporting, BFD front end +@findex bfd_init +@subsubsection @code{bfd_init} +@deftypefn {Function} unsigned int bfd_init (void); +This routine must be called before any other BFD function to +initialize magical internal data structures. +Returns a magic number, which may be used to check +that the bfd library is configured as expected by users. +@example +/* Value returned by bfd_init. */ +#define BFD_INIT_MAGIC (sizeof (struct bfd_section)) + +@end example + +@end deftypefn +@node Miscellaneous, Memory Usage, Initialization, BFD front end @section Miscellaneous @@ -797,23 +545,15 @@ function. @findex bfd_get_reloc_upper_bound @subsubsection @code{bfd_get_reloc_upper_bound} -@strong{Synopsis} -@example -long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); -@end example -@strong{Description}@* +@deftypefn {Function} long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); Return the number of bytes required to store the relocation information associated with section @var{sect} attached to bfd @var{abfd}. If an error occurs, return -1. +@end deftypefn @findex bfd_canonicalize_reloc @subsubsection @code{bfd_canonicalize_reloc} -@strong{Synopsis} -@example -long bfd_canonicalize_reloc - (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); -@end example -@strong{Description}@* +@deftypefn {Function} long bfd_canonicalize_reloc (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); Call the back end associated with the open BFD @var{abfd} and translate the external form of the relocation information attached to @var{sec} into the internal canonical @@ -825,14 +565,10 @@ been preallocated, usually by a call to The @var{syms} table is also needed for horrible internal magic reasons. +@end deftypefn @findex bfd_set_reloc @subsubsection @code{bfd_set_reloc} -@strong{Synopsis} -@example -void bfd_set_reloc - (bfd *abfd, asection *sec, arelent **rel, unsigned int count); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); Set the relocation pointer and count within section @var{sec} to the values @var{rel} and @var{count}. The argument @var{abfd} is ignored. @@ -841,13 +577,10 @@ The argument @var{abfd} is ignored. BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) @end example +@end deftypefn @findex bfd_set_file_flags @subsubsection @code{bfd_set_file_flags} -@strong{Synopsis} -@example -bool bfd_set_file_flags (bfd *abfd, flagword flags); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_file_flags (bfd *abfd, flagword flags); Set the flag word in the BFD @var{abfd} to the value @var{flags}. Possible errors are: @@ -864,29 +597,22 @@ type of file. E.g., an attempt was made to set the @code{D_PAGED} bit on a BFD format which does not support demand paging. @end itemize +@end deftypefn @findex bfd_get_arch_size @subsubsection @code{bfd_get_arch_size} -@strong{Synopsis} -@example -int bfd_get_arch_size (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} int bfd_get_arch_size (bfd *abfd); Returns the normalized architecture address size, in bits, as determined by the object file's format. By normalized, we mean either 32 or 64. For ELF, this information is included in the header. Use bfd_arch_bits_per_address for number of bits in the architecture address. -@strong{Returns}@* Returns the arch size in bits if known, @code{-1} otherwise. +@end deftypefn @findex bfd_get_sign_extend_vma @subsubsection @code{bfd_get_sign_extend_vma} -@strong{Synopsis} -@example -int bfd_get_sign_extend_vma (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} int bfd_get_sign_extend_vma (bfd *abfd); Indicates if the target architecture "naturally" sign extends an address. Some architectures implicitly sign extend address values when they are converted to types larger than the size @@ -894,62 +620,45 @@ of an address. For instance, bfd_get_start_address() will return an address sign extended to fill a bfd_vma when this is the case. -@strong{Returns}@* Returns @code{1} if the target architecture is known to sign extend addresses, @code{0} if the target architecture is known to not sign extend addresses, and @code{-1} otherwise. +@end deftypefn @findex bfd_set_start_address @subsubsection @code{bfd_set_start_address} -@strong{Synopsis} -@example -bool bfd_set_start_address (bfd *abfd, bfd_vma vma); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_start_address (bfd *abfd, bfd_vma vma); Make @var{vma} the entry point of output BFD @var{abfd}. -@strong{Returns}@* Returns @code{TRUE} on success, @code{FALSE} otherwise. +@end deftypefn @findex bfd_get_gp_size @subsubsection @code{bfd_get_gp_size} -@strong{Synopsis} -@example -unsigned int bfd_get_gp_size (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} unsigned int bfd_get_gp_size (bfd *abfd); Return the maximum size of objects to be optimized using the GP register under MIPS ECOFF. This is typically set by the @code{-G} argument to the compiler, assembler or linker. +@end deftypefn @findex bfd_set_gp_size @subsubsection @code{bfd_set_gp_size} -@strong{Synopsis} -@example -void bfd_set_gp_size (bfd *abfd, unsigned int i); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_gp_size (bfd *abfd, unsigned int i); Set the maximum size of objects to be optimized using the GP register under ECOFF or MIPS ELF. This is typically set by the @code{-G} argument to the compiler, assembler or linker. +@end deftypefn @findex bfd_set_gp_value @subsubsection @code{bfd_set_gp_value} -@strong{Synopsis} -@example -void bfd_set_gp_value (bfd *abfd, bfd_vma v); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_set_gp_value (bfd *abfd, bfd_vma v); Allow external access to the fucntion to set the GP value. This is specifically added for gdb-compile support. +@end deftypefn @findex bfd_scan_vma @subsubsection @code{bfd_scan_vma} -@strong{Synopsis} -@example -bfd_vma bfd_scan_vma (const char *string, const char **end, int base); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_vma bfd_scan_vma (const char *string, const char **end, int base); Convert, like @code{strtoul}, a numerical expression @var{string} into a @code{bfd_vma} integer, and return that integer. (Though without as many bells and whistles as @code{strtoul}.) @@ -962,13 +671,10 @@ in octal if a leading zero is found, otherwise in decimal. If the value would overflow, the maximum @code{bfd_vma} value is returned. +@end deftypefn @findex bfd_copy_private_header_data @subsubsection @code{bfd_copy_private_header_data} -@strong{Synopsis} -@example -bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); Copy private BFD header information from the BFD @var{ibfd} to the the BFD @var{obfd}. This copies information that may require sections to exist, but does not require symbol tables. Return @@ -987,13 +693,10 @@ Not enough memory exists to create private data for @var{obfd}. (ibfd, obfd)) @end example +@end deftypefn @findex bfd_copy_private_bfd_data @subsubsection @code{bfd_copy_private_bfd_data} -@strong{Synopsis} -@example -bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); Copy private BFD information from the BFD @var{ibfd} to the the BFD @var{obfd}. Return @code{TRUE} on success, @code{FALSE} on error. Possible error returns are: @@ -1010,13 +713,10 @@ Not enough memory exists to create private data for @var{obfd}. (ibfd, obfd)) @end example +@end deftypefn @findex bfd_set_private_flags @subsubsection @code{bfd_set_private_flags} -@strong{Synopsis} -@example -bool bfd_set_private_flags (bfd *abfd, flagword flags); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_private_flags (bfd *abfd, flagword flags); Set private BFD flag information in the BFD @var{abfd}. Return @code{TRUE} on success, @code{FALSE} on error. Possible error returns are: @@ -1032,9 +732,9 @@ Not enough memory exists to create private data for @var{obfd}. BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) @end example +@end deftypefn @findex Other functions @subsubsection @code{Other functions} -@strong{Description}@* The following functions exist but have not yet been documented. @example #define bfd_sizeof_headers(abfd, info) \ @@ -1136,61 +836,60 @@ The following functions exist but have not yet been documented. #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) -extern bfd_byte *bfd_get_relocated_section_contents - (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, - bool, asymbol **); - @end example +@findex bfd_get_relocated_section_contents +@subsubsection @code{bfd_get_relocated_section_contents} +@deftypefn {Function} bfd_byte *bfd_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, bool, asymbol **); +Read and relocate the indirect link_order section, into DATA +(if non-NULL) or to a malloc'd buffer. Return the buffer, or +NULL on errors. + +@end deftypefn +@findex bfd_record_phdr +@subsubsection @code{bfd_record_phdr} +@deftypefn {Function} bool bfd_record_phdr (bfd *, unsigned long, bool, flagword, bool, bfd_vma, bool, bool, unsigned int, struct bfd_section **); +Record information about an ELF program header. + +@end deftypefn +@findex bfd_sprintf_vma +@subsubsection @code{bfd_sprintf_vma} +@deftypefn {Function} void bfd_sprintf_vma (bfd *, char *, bfd_vma); void bfd_fprintf_vma (bfd *, void *, bfd_vma); +bfd_sprintf_vma and bfd_fprintf_vma display an address in the +target's address size. + +@end deftypefn @findex bfd_alt_mach_code @subsubsection @code{bfd_alt_mach_code} -@strong{Synopsis} -@example -bool bfd_alt_mach_code (bfd *abfd, int alternative); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_alt_mach_code (bfd *abfd, int alternative); When more than one machine code number is available for the same machine type, this function can be used to switch between the preferred one (alternative == 0) and any others. Currently, only ELF supports this feature, with up to two alternate machine codes. +@end deftypefn @findex bfd_emul_get_maxpagesize @subsubsection @code{bfd_emul_get_maxpagesize} -@strong{Synopsis} -@example -bfd_vma bfd_emul_get_maxpagesize (const char *); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_vma bfd_emul_get_maxpagesize (const char *); Returns the maximum page size, in bytes, as determined by emulation. -@strong{Returns}@* -Returns the maximum page size in bytes for ELF, 0 otherwise. - +@end deftypefn @findex bfd_emul_get_commonpagesize @subsubsection @code{bfd_emul_get_commonpagesize} -@strong{Synopsis} -@example -bfd_vma bfd_emul_get_commonpagesize (const char *); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_vma bfd_emul_get_commonpagesize (const char *); Returns the common page size, in bytes, as determined by emulation. -@strong{Returns}@* -Returns the common page size in bytes for ELF, 0 otherwise. - +@end deftypefn @findex bfd_demangle @subsubsection @code{bfd_demangle} -@strong{Synopsis} -@example -char *bfd_demangle (bfd *, const char *, int); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_demangle (bfd *, const char *, int); Wrapper around cplus_demangle. Strips leading underscores and other such chars that would otherwise confuse the demangler. If passed a g++ v3 ABI mangled name, returns a buffer allocated with malloc holding the demangled name. Returns NULL otherwise and on memory alloc failure. +@end deftypefn diff --git a/bfd/doc/bfdver.texi b/bfd/doc/bfdver.texi index bbfeead34..614b93184 100644 --- a/bfd/doc/bfdver.texi +++ b/bfd/doc/bfdver.texi @@ -1,4 +1,4 @@ -@set VERSION 2.39.50 +@set VERSION 2.41.50 @set VERSION_PACKAGE (GNU Binutils) -@set UPDATED May 2023 +@set UPDATED March 2024 @set BUGURL @uref{https://sourceware.org/bugzilla/} diff --git a/bfd/doc/bfdwin.texi b/bfd/doc/bfdwin.texi index b1fd7d5be..c935f1aba 100644 --- a/bfd/doc/bfdwin.texi +++ b/bfd/doc/bfdwin.texi @@ -1,2 +1,18 @@ -@findex -@subsubsection @code{} +@findex bfd_init_window +@subsubsection @code{bfd_init_window} +@deftypefn {Function} void bfd_init_window (bfd_window *); +Initialise mmap window. + +@end deftypefn +@findex bfd_free_window +@subsubsection @code{bfd_free_window} +@deftypefn {Function} void bfd_free_window (bfd_window *); +Finalise mmap window struct. + +@end deftypefn +@findex bfd_get_file_window +@subsubsection @code{bfd_get_file_window} +@deftypefn {Function} bool bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bool {*writable*}); +mmap from a bfd's iostream. + +@end deftypefn diff --git a/bfd/doc/cache.texi b/bfd/doc/cache.texi index ec0a1f507..4805c4583 100644 --- a/bfd/doc/cache.texi +++ b/bfd/doc/cache.texi @@ -15,51 +15,39 @@ handle. @findex bfd_cache_init @subsubsection @code{bfd_cache_init} -@strong{Synopsis} -@example -bool bfd_cache_init (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_cache_init (bfd *abfd); Add a newly opened BFD to the cache. +@end deftypefn @findex bfd_cache_close @subsubsection @code{bfd_cache_close} -@strong{Synopsis} -@example -bool bfd_cache_close (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_cache_close (bfd *abfd); Remove the BFD @var{abfd} from the cache. If the attached file is open, then close it too. -@strong{Returns}@* @code{FALSE} is returned if closing the file fails, @code{TRUE} is returned if all is well. +@end deftypefn @findex bfd_cache_close_all @subsubsection @code{bfd_cache_close_all} -@strong{Synopsis} -@example -bool bfd_cache_close_all (void); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_cache_close_all (void); Remove all BFDs from the cache. If the attached file is open, -then close it too. +then close it too. Note - despite its name this function will +close a BFD even if it is not marked as being cacheable, ie +even if bfd_get_cacheable() returns false. -@strong{Returns}@* @code{FALSE} is returned if closing one of the file fails, @code{TRUE} is returned if all is well. +@end deftypefn @findex bfd_open_file @subsubsection @code{bfd_open_file} -@strong{Synopsis} -@example -FILE* bfd_open_file (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} FILE* bfd_open_file (bfd *abfd); Call the OS to open a file for @var{abfd}. Return the @code{FILE *} (possibly @code{NULL}) that results from this operation. Set up the BFD so that future accesses know the file is open. If the @code{FILE *} returned is @code{NULL}, then it won't have been put in the cache, so it won't have to be removed from it. +@end deftypefn diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c index 169517397..c0bd24c6b 100644 --- a/bfd/doc/chew.c +++ b/bfd/doc/chew.c @@ -1,5 +1,5 @@ /* chew - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Contributed by steve chamberlain @cygnus This file is part of BFD, the Binary File Descriptor library. @@ -31,6 +31,9 @@ You define new words thus: : ; + Variables are defined using: + variable NAME + */ /* Primitives provided by the program: @@ -65,18 +68,19 @@ exit - fn chew_exit swap outputdots - strip out lines without leading dots - paramstuff - convert full declaration into "PARAMS" form if not already maybecatstr - do catstr if internal_mode == internal_wanted, discard value in any case + catstrif - do catstr if top of integer stack is nonzero translatecomments - turn {* and *} into comment delimiters kill_bogus_lines - get rid of extra newlines indent - internalmode - pop from integer stack, set `internalmode' to that value print_stack_level - print current stack depth to stderr strip_trailing_newlines - go ahead, guess... [quoted string] - push string onto string stack [word starting with digit] - push atol(str) onto integer stack + internalmode - the internalmode variable (evaluates to address) + A command must be all upper-case, and alone on a line. Foo. */ @@ -86,6 +90,8 @@ #include #include #include +#include +#include #define DEF_SIZE 5000 #define STACK 50 @@ -106,7 +112,7 @@ typedef union void (*f) (void); struct dict_struct *e; char *s; - long l; + intptr_t l; } pcu; typedef struct dict_struct @@ -119,7 +125,7 @@ typedef struct dict_struct } dict_type; int internal_wanted; -int internal_mode; +intptr_t *internal_mode; int warning; @@ -129,8 +135,8 @@ string_type *tos; unsigned int idx = 0; /* Pos in input buffer */ string_type *ptr; /* and the buffer */ -long istack[STACK]; -long *isp = &istack[0]; +intptr_t istack[STACK]; +intptr_t *isp = &istack[0]; dict_type *root; @@ -376,6 +382,14 @@ push_number (void) pc++; } +/* This is a wrapper for push_number just so we can correctly free the + variable at the end. */ +static void +push_variable (void) +{ + push_number (); +} + static void push_text (void) { @@ -453,84 +467,6 @@ print_stack_level (void) pc++; } -/* turn: - foobar name(stuff); - into: - foobar - name PARAMS ((stuff)); - and a blank line. - */ - -static void -paramstuff (void) -{ - unsigned int openp; - unsigned int fname; - unsigned int idx; - unsigned int len; - string_type out; - init_string (&out); - -#define NO_PARAMS 1 - - /* Make sure that it's not already param'd or proto'd. */ - if (NO_PARAMS - || find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "(")) - { - catstr (&out, tos); - } - else - { - /* Find the open paren. */ - for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++) - ; - - fname = openp; - /* Step back to the fname. */ - fname--; - while (fname && isspace ((unsigned char) at (tos, fname))) - fname--; - while (fname - && !isspace ((unsigned char) at (tos,fname)) - && at (tos,fname) != '*') - fname--; - - fname++; - - /* Output type, omitting trailing whitespace character(s), if - any. */ - for (len = fname; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx = 0; idx < len; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, "\n"); /* Insert a newline between type and fnname */ - - /* Output function name, omitting trailing whitespace - character(s), if any. */ - for (len = openp; 0 < len; len--) - { - if (!isspace ((unsigned char) at (tos, len - 1))) - break; - } - for (idx = fname; idx < len; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, " PARAMS ("); - - for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++) - catchar (&out, at (tos, idx)); - - cattext (&out, ");\n\n"); - } - overwrite_string (tos, &out); - pc++; - -} - /* turn {* and *} into comments */ @@ -579,11 +515,31 @@ outputdots (void) if (at (tos, idx) == '.') { char c; + int spaces; idx++; - + spaces = 0; while ((c = at (tos, idx)) && c != '\n') { + if (spaces >= 0) + { + if (c == ' ') + { + spaces++; + idx++; + continue; + } + else + { + while (spaces >= 8) + { + catchar (&out, '\t'); + spaces -= 8; + } + while (spaces-- > 0) + catchar (&out, ' '); + } + } if (c == '{' && at (tos, idx + 1) == '*') { cattext (&out, "/*"); @@ -859,9 +815,6 @@ icopy_past_newline (void) pc++; } -/* indent - Take the string at the top of the stack, do some prettying. */ - static void kill_bogus_lines (void) { @@ -949,6 +902,41 @@ kill_bogus_lines (void) } +static void +collapse_whitespace (void) +{ + int last_was_ws = 0; + int idx; + + string_type out; + init_string (&out); + + for (idx = 0; at (tos, idx) != 0; ++idx) + { + char c = at (tos, idx); + if (isspace (c)) + { + if (!last_was_ws) + { + catchar (&out, ' '); + last_was_ws = 1; + } + } + else + { + catchar (&out, c); + last_was_ws = 0; + } + } + + pc++; + delete_string (tos); + *tos = out; +} + +/* indent + Take the string at the top of the stack, do some prettying. */ + static void indent (void) { @@ -962,33 +950,42 @@ indent (void) switch (at (tos, idx)) { case '\n': - cattext (&out, "\n"); + catchar (&out, '\n'); idx++; if (tab && at (tos, idx)) { - cattext (&out, " "); + int i; + for (i = 0; i < tab - 1; i += 2) + catchar (&out, '\t'); + if (i < tab) + cattext (&out, " "); } ol = 0; break; case '(': - tab++; if (ol == 0) - cattext (&out, " "); + { + int i; + for (i = 1; i < tab - 1; i += 2) + catchar (&out, '\t'); + if (i < tab) + cattext (&out, " "); + cattext (&out, " "); + } + tab++; idx++; - cattext (&out, "("); + catchar (&out, '('); ol = 1; break; case ')': tab--; - cattext (&out, ")"); + catchar (&out, ')'); idx++; ol = 1; - break; default: catchar (&out, at (tos, idx)); ol = 1; - idx++; break; } @@ -1072,21 +1069,26 @@ skip_past_newline (void) } static void -internalmode (void) +maybecatstr (void) { - internal_mode = *(isp); - isp--; - icheck_range (); + if (internal_wanted == *internal_mode) + { + catstr (tos - 1, tos); + } + delete_string (tos); + tos--; + check_range (); pc++; } static void -maybecatstr (void) +catstrif (void) { - if (internal_wanted == internal_mode) - { - catstr (tos - 1, tos); - } + int cond = isp[0]; + isp--; + icheck_range (); + if (cond) + catstr (tos - 1, tos); delete_string (tos); tos--; check_range (); @@ -1216,6 +1218,11 @@ free_words (void) free (ptr->code[i + 1].s - 1); ++i; } + else if (ptr->code[i].f == push_variable) + { + free ((void *) ptr->code[i + 1].l); + ++i; + } free (ptr->code); } next = ptr->next; @@ -1295,6 +1302,24 @@ add_intrinsic (char *name, void (*func) (void)) add_to_definition (new_d, p); } +static void +add_variable (char *name, intptr_t *loc) +{ + dict_type *new_d = newentry (name); + pcu p = { push_variable }; + add_to_definition (new_d, p); + p.l = (intptr_t) loc; + add_to_definition (new_d, p); + p.f = 0; + add_to_definition (new_d, p); +} + +static void +add_intrinsic_variable (const char *name, intptr_t *loc) +{ + add_variable (xstrdup (name), loc); +} + void compile (char *string) { @@ -1368,6 +1393,17 @@ compile (char *string) free (word); string = nextword (string, &word); } + else if (strcmp (word, "variable") == 0) + { + free (word); + string = nextword (string, &word); + if (!string) + continue; + intptr_t *loc = xmalloc (sizeof (intptr_t)); + *loc = 0; + add_variable (word, loc); + string = nextword (string, &word); + } else { fprintf (stderr, "syntax error at %s\n", string - 1); @@ -1379,7 +1415,7 @@ compile (char *string) static void bang (void) { - *(long *) ((isp[0])) = isp[-1]; + *(intptr_t *) ((isp[0])) = isp[-1]; isp -= 2; icheck_range (); pc++; @@ -1388,7 +1424,7 @@ bang (void) static void atsign (void) { - isp[0] = *(long *) (isp[0]); + isp[0] = *(intptr_t *) (isp[0]); pc++; } @@ -1425,7 +1461,7 @@ print (void) else if (*isp == 2) write_buffer (tos, stderr); else - fprintf (stderr, "print: illegal print destination `%ld'\n", *isp); + fprintf (stderr, "print: illegal print destination `%" PRIdPTR "'\n", *isp); isp--; tos--; icheck_range (); @@ -1504,14 +1540,18 @@ main (int ac, char *av[]) add_intrinsic ("exit", chew_exit); add_intrinsic ("swap", swap); add_intrinsic ("outputdots", outputdots); - add_intrinsic ("paramstuff", paramstuff); add_intrinsic ("maybecatstr", maybecatstr); + add_intrinsic ("catstrif", catstrif); add_intrinsic ("translatecomments", translatecomments); add_intrinsic ("kill_bogus_lines", kill_bogus_lines); add_intrinsic ("indent", indent); - add_intrinsic ("internalmode", internalmode); add_intrinsic ("print_stack_level", print_stack_level); add_intrinsic ("strip_trailing_newlines", strip_trailing_newlines); + add_intrinsic ("collapse_whitespace", collapse_whitespace); + + internal_mode = xmalloc (sizeof (intptr_t)); + *internal_mode = 0; + add_intrinsic_variable ("internalmode", internal_mode); /* Put a nl at the start. */ catchar (&buffer, '\n'); diff --git a/bfd/doc/coffcode.texi b/bfd/doc/coffcode.texi index a49a8deb5..4b9b3c8da 100644 --- a/bfd/doc/coffcode.texi +++ b/bfd/doc/coffcode.texi @@ -102,9 +102,10 @@ structure. The flag controls the generation of long section names in output BFDs at runtime; if it is false, as it will be by default when generating an executable image, long section names are truncated; if true, the long section names extension is employed. The hook -points to a function that allows the value of the flag to be altered -at runtime, on formats that support long section names at all; on -other formats it points to a stub that returns an error indication. +points to a function that allows the value of a copy of the flag +in coff object tdata to be altered at runtime, on formats that +support long section names at all; on other formats it points +to a stub that returns an error indication. With input BFDs, the flag is set according to whether any long section names are detected while reading the section headers. For a completely @@ -248,37 +249,38 @@ bit twiddlers, and writes out the table to the file. @findex coff_symbol_type @subsubsection @code{coff_symbol_type} -@strong{Description}@* The hidden information for an @code{asymbol} is described in a @code{combined_entry_type}: @example - typedef struct coff_ptr_struct @{ /* Remembers the offset from the first symbol in the file for - this symbol. Generated by coff_renumber_symbols. */ + this symbol. Generated by coff_renumber_symbols. */ unsigned int offset; - /* Should the value of this symbol be renumbered. Used for - XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */ - unsigned int fix_value : 1; + /* Selects between the elements of the union below. */ + unsigned int is_sym : 1; - /* Should the tag field of this symbol be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_sym.x_tagndx union. If set, + p is valid and the field will be renumbered. */ unsigned int fix_tag : 1; - /* Should the endidx field of this symbol be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_sym.x_fcnary.x_fcn.x_endndx + union. If set, p is valid and the field will be renumbered. */ unsigned int fix_end : 1; - /* Should the x_csect.x_scnlen field be renumbered. - Created by coff_pointerize_aux. */ + /* Selects between the elements of the x_csect.x_scnlen union. If set, + p is valid and the field will be renumbered. */ unsigned int fix_scnlen : 1; - /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the - index into the line number entries. Set by coff_slurp_symbol_table. */ + /* If set, u.syment.n_value contains a pointer to a symbol. The final + value will be the offset field. Used for XCOFF C_BSTAT symbols. */ + unsigned int fix_value : 1; + + /* If set, u.syment.n_value is an index into the line number entries. + Used for XCOFF C_BINCL/C_EINCL symbols. */ unsigned int fix_line : 1; /* The container for the symbol structure as read and translated @@ -289,15 +291,11 @@ typedef struct coff_ptr_struct struct internal_syment syment; @} u; - /* Selector for the union above. */ - bool is_sym; - /* An extra pointer which can used by format based on COFF (like XCOFF) to provide extra information to their backend. */ void *extrap; @} combined_entry_type; - /* Each canonical asymbol really looks like this: */ typedef struct coff_symbol_struct @@ -314,33 +312,11 @@ typedef struct coff_symbol_struct /* Have the line numbers been relocated yet ? */ bool done_lineno; @} coff_symbol_type; + @end example @findex bfd_coff_backend_data @subsubsection @code{bfd_coff_backend_data} -@example -/* COFF symbol classifications. */ - -enum coff_symbol_classification -@{ - /* Global symbol. */ - COFF_SYMBOL_GLOBAL, - /* Common symbol. */ - COFF_SYMBOL_COMMON, - /* Undefined symbol. */ - COFF_SYMBOL_UNDEFINED, - /* Local symbol. */ - COFF_SYMBOL_LOCAL, - /* PE section symbol. */ - COFF_SYMBOL_PE_SECTION -@}; - -typedef asection * (*coff_gc_mark_hook_fn) - (asection *, struct bfd_link_info *, struct internal_reloc *, - struct coff_link_hash_entry *, struct internal_syment *); - -@end example -Special entry points for gdb to swap in coff symbol table parts: @example typedef struct @{ @@ -434,9 +410,9 @@ typedef struct (bfd *, FILE *, combined_entry_type *, combined_entry_type *, combined_entry_type *, unsigned int); - void (*_bfd_coff_reloc16_extra_cases) + bool (*_bfd_coff_reloc16_extra_cases) (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, - bfd_byte *, unsigned int *, unsigned int *); + bfd_byte *, size_t *, size_t *); int (*_bfd_coff_reloc16_estimate) (bfd *, asection *, arelent *, unsigned int, @@ -479,150 +455,6 @@ typedef struct @} bfd_coff_backend_data; -#define coff_backend_info(abfd) \ - ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) - -#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \ - ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i)) - -#define bfd_coff_swap_sym_in(a,e,i) \ - ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i)) - -#define bfd_coff_swap_lineno_in(a,e,i) \ - ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i)) - -#define bfd_coff_swap_reloc_out(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o)) - -#define bfd_coff_swap_lineno_out(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o)) - -#define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \ - ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o)) - -#define bfd_coff_swap_sym_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o)) - -#define bfd_coff_swap_scnhdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o)) - -#define bfd_coff_swap_filehdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o)) - -#define bfd_coff_swap_aouthdr_out(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o)) - -#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz) -#define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz) -#define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz) -#define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz) -#define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz) -#define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz) -#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz) -#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen) -#define bfd_coff_long_filenames(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_long_filenames) -#define bfd_coff_long_section_names(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_long_section_names) -#define bfd_coff_set_long_section_names(abfd, enable) \ - ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) -#define bfd_coff_default_section_alignment_power(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) -#define bfd_coff_max_nscns(abfd) \ - (coff_backend_info (abfd)->_bfd_coff_max_nscns) - -#define bfd_coff_swap_filehdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) - -#define bfd_coff_swap_aouthdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o)) - -#define bfd_coff_swap_scnhdr_in(abfd, i,o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o)) - -#define bfd_coff_swap_reloc_in(abfd, i, o) \ - ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o)) - -#define bfd_coff_bad_format_hook(abfd, filehdr) \ - ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr)) - -#define bfd_coff_set_arch_mach_hook(abfd, filehdr)\ - ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr)) -#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\ - ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\ - (abfd, filehdr, aouthdr)) - -#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\ - ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\ - (abfd, scnhdr, name, section, flags_ptr)) - -#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\ - ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr)) - -#define bfd_coff_slurp_symbol_table(abfd)\ - ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd)) - -#define bfd_coff_symname_in_debug(abfd, sym)\ - ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) - -#define bfd_coff_force_symnames_in_strings(abfd)\ - (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) - -#define bfd_coff_debug_string_prefix_length(abfd)\ - (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) - -#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ - ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ - (abfd, file, base, symbol, aux, indaux)) - -#define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\ - reloc, data, src_ptr, dst_ptr)\ - ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\ - (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)) - -#define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\ - ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\ - (abfd, section, reloc, shrink, link_info)) - -#define bfd_coff_classify_symbol(abfd, sym)\ - ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\ - (abfd, sym)) - -#define bfd_coff_compute_section_file_positions(abfd)\ - ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\ - (abfd)) - -#define bfd_coff_start_final_link(obfd, info)\ - ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\ - (obfd, info)) -#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\ - ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\ - (obfd, info, ibfd, o, con, rel, isyms, secs)) -#define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\ - ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\ - (abfd, sec, rel, h, sym, addendp)) -#define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\ - ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\ - (obfd, info, ibfd, sec, rel, adjustedp)) -#define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\ - value, string, cp, coll, hashp)\ - ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\ - (info, abfd, name, flags, section, value, string, cp, coll, hashp)) - -#define bfd_coff_link_output_has_begun(a,p) \ - ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p)) -#define bfd_coff_final_link_postscript(a,p) \ - ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p)) - -#define bfd_coff_have_print_pdata(a) \ - (coff_backend_info (a)->_bfd_coff_print_pdata) -#define bfd_coff_print_pdata(a,p) \ - ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) - -/* Macro: Returns true if the bfd is a PE executable as opposed to a - PE object file. */ -#define bfd_pei_p(abfd) \ - (startswith ((abfd)->xvec->name, "pei-")) @end example @subsubsection Writing relocations To write relocations, the back end steps though the @@ -681,5 +513,14 @@ The reloc index is turned into a pointer to a howto structure, in a back end specific way. For instance, the 386 uses the @code{r_type} to directly produce an index into a howto table vector. + +@item +Note that @code{arelent.addend} for COFF is often not what +most people understand as a relocation addend, but rather an +adjustment to the relocation addend stored in section contents +of relocatable object files. The value found in section +contents may also be confusing, depending on both symbol value +and addend somewhat similar to the field value for a +final-linked object. See @code{CALC_ADDEND}. @end itemize diff --git a/bfd/doc/corefile.texi b/bfd/doc/corefile.texi index 7c60e9639..8606b0744 100644 --- a/bfd/doc/corefile.texi +++ b/bfd/doc/corefile.texi @@ -4,59 +4,40 @@ @subsection Core file functions -@strong{Description}@* These are functions pertaining to core files. @findex bfd_core_file_failing_command @subsubsection @code{bfd_core_file_failing_command} -@strong{Synopsis} -@example -const char *bfd_core_file_failing_command (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_core_file_failing_command (bfd *abfd); Return a read-only string explaining which program was running when it failed and produced the core file @var{abfd}. +@end deftypefn @findex bfd_core_file_failing_signal @subsubsection @code{bfd_core_file_failing_signal} -@strong{Synopsis} -@example -int bfd_core_file_failing_signal (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} int bfd_core_file_failing_signal (bfd *abfd); Returns the signal number which caused the core dump which generated the file the BFD @var{abfd} is attached to. +@end deftypefn @findex bfd_core_file_pid @subsubsection @code{bfd_core_file_pid} -@strong{Synopsis} -@example -int bfd_core_file_pid (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} int bfd_core_file_pid (bfd *abfd); Returns the PID of the process the core dump the BFD @var{abfd} is attached to was generated from. +@end deftypefn @findex core_file_matches_executable_p @subsubsection @code{core_file_matches_executable_p} -@strong{Synopsis} -@example -bool core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); Return @code{TRUE} if the core file attached to @var{core_bfd} was generated by a run of the executable file attached to @var{exec_bfd}, @code{FALSE} otherwise. +@end deftypefn @findex generic_core_file_matches_executable_p @subsubsection @code{generic_core_file_matches_executable_p} -@strong{Synopsis} -@example -bool generic_core_file_matches_executable_p - (bfd *core_bfd, bfd *exec_bfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); Return TRUE if the core file attached to @var{core_bfd} was generated by a run of the executable file attached to @var{exec_bfd}. The match is based on executable @@ -68,3 +49,4 @@ though we're not sure that core file and executable match. This is to avoid generating a false warning in situations where we really don't know whether they match or not. +@end deftypefn diff --git a/bfd/doc/doc.str b/bfd/doc/doc.str index 7a276fe59..dd0bfe432 100644 --- a/bfd/doc/doc.str +++ b/bfd/doc/doc.str @@ -1,3 +1,27 @@ +- Documentation extraction program for chew. +- Copyright (C) 1990-2023 Free Software Foundation, Inc. +- This file is part of BFD, the Binary File Descriptor library. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. + +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +- chew.c keywords defined here put output into doc/*.texi files +- from comments in the source. See also proto.str. + +- True if SYNOPSIS was seen. +variable synopsis_seen + : DOCDD skip_past_newline get_stuff_in_command kill_bogus_lines catstr @@ -11,7 +35,6 @@ skip_past_newline get_stuff_in_command kill_bogus_lines do_fancy_stuff translatecomments courierize catstr - ; : INODE @@ -30,14 +53,14 @@ : SYNOPSIS skip_past_newline - "@strong{Synopsis}\n" catstr - "@example\n" catstr + 1 synopsis_seen ! + "@deftypefn {Function} " catstr get_stuff_in_command kill_bogus_lines + collapse_whitespace indent catstr - "@end example\n" catstr - + "\n" catstr ; : func @@ -52,18 +75,6 @@ catstr catstr catstr catstr catstr ; -: FUNCTION - "@findex " - a - skip_past_newline - copy_past_newline - dup - a x x - "@subsubsection @code{" - a x x b - swap - remchar - "}\n" - a x b x c - catstr catstr catstr catstr catstr - ; - : bodytext get_stuff_in_command bulletize @@ -96,28 +107,29 @@ bodytext ; - - - : DESCRIPTION - "@strong{Description}@*\n" catstr subhead ; + subhead + "@end deftypefn\n" synopsis_seen @ catstrif + 0 synopsis_seen ! + ; -: RETURNS - "@strong{Returns}@*\n" catstr subhead ; +: FUNCTION + func ; : INTERNAL_FUNCTION func ; +: DEFINITION + func ; -: INTERNAL_DEFINITION +: INTERNAL_DEFINITION func ; +: EXTERNAL + COMMENT ; : INTERNAL - func ; - -: TYPEDEF - FUNCTION ; + COMMENT ; : SENUM skip_past_newline diff --git a/bfd/doc/format.texi b/bfd/doc/format.texi index b21228d5b..f3a3bae78 100644 --- a/bfd/doc/format.texi +++ b/bfd/doc/format.texi @@ -28,11 +28,7 @@ The BFD contains the result of an executable core dump. @findex bfd_check_format @subsubsection @code{bfd_check_format} -@strong{Synopsis} -@example -bool bfd_check_format (bfd *abfd, bfd_format format); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_check_format (bfd *abfd, bfd_format format); Verify if the file attached to the BFD @var{abfd} is compatible with the format @var{format} (i.e., one of @code{bfd_object}, @code{bfd_archive} or @code{bfd_core}). @@ -69,14 +65,10 @@ none of the backends recognised the file format. more than one backend recognised the file format. @end itemize +@end deftypefn @findex bfd_check_format_matches @subsubsection @code{bfd_check_format_matches} -@strong{Synopsis} -@example -bool bfd_check_format_matches - (bfd *abfd, bfd_format format, char ***matching); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching); Like @code{bfd_check_format}, except when it returns FALSE with @code{bfd_errno} set to @code{bfd_error_file_ambiguously_recognized}. In that case, if @var{matching} is not NULL, it will be filled in with @@ -87,26 +79,21 @@ Then the user may choose a format and try again. When done with the list that @var{matching} points to, the caller should free it. +@end deftypefn @findex bfd_set_format @subsubsection @code{bfd_set_format} -@strong{Synopsis} -@example -bool bfd_set_format (bfd *abfd, bfd_format format); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_format (bfd *abfd, bfd_format format); This function sets the file format of the BFD @var{abfd} to the format @var{format}. If the target set in the BFD does not support the format requested, the format is invalid, or the BFD is not open for writing, then an error occurs. +@end deftypefn @findex bfd_format_string @subsubsection @code{bfd_format_string} -@strong{Synopsis} -@example -const char *bfd_format_string (bfd_format format); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_format_string (bfd_format format); Return a pointer to a const string @code{invalid}, @code{object}, @code{archive}, @code{core}, or @code{unknown}, depending upon the value of @var{format}. +@end deftypefn diff --git a/bfd/doc/hash.texi b/bfd/doc/hash.texi index f3096ceec..490554960 100644 --- a/bfd/doc/hash.texi +++ b/bfd/doc/hash.texi @@ -206,7 +206,6 @@ struct bfd_hash_entry * return (struct bfd_hash_entry *) ret; @} @end example -@strong{Description}@* The creation routine for the linker hash table, which is in @code{linker.c}, looks just like this example. @var{function_name} is @code{_bfd_link_hash_newfunc}. @@ -245,3 +244,111 @@ linker hash table, uses macros for the lookup and traversal routines. These are @code{aout_link_hash_lookup} and @code{aout_link_hash_traverse} in aoutx.h. +@findex bfd_hash_table_init_n +@subsubsection @code{bfd_hash_table_init_n} +@deftypefn {Function} bool bfd_hash_table_init_n (struct bfd_hash_table *, struct bfd_hash_entry *(* {*newfunc*}) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), unsigned int {*entsize*}, unsigned int {*size*}); +Create a new hash table, given a number of entries. + +@end deftypefn +@findex bfd_hash_table_init +@subsubsection @code{bfd_hash_table_init} +@deftypefn {Function} bool bfd_hash_table_init (struct bfd_hash_table *, struct bfd_hash_entry *(* {*newfunc*}) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), unsigned int {*entsize*}); +Create a new hash table with the default number of entries. + +@end deftypefn +@findex bfd_hash_table_free +@subsubsection @code{bfd_hash_table_free} +@deftypefn {Function} void bfd_hash_table_free (struct bfd_hash_table *); +Free a hash table. + +@end deftypefn +@findex bfd_hash_lookup +@subsubsection @code{bfd_hash_lookup} +@deftypefn {Function} struct bfd_hash_entry *bfd_hash_lookup (struct bfd_hash_table *, const char *, bool {*create*}, bool {*copy*}); +Look up a string in a hash table. + +@end deftypefn +@findex bfd_hash_insert +@subsubsection @code{bfd_hash_insert} +@deftypefn {Function} struct bfd_hash_entry *bfd_hash_insert (struct bfd_hash_table *, const char *, unsigned long {*hash*}); +Insert an entry in a hash table. + +@end deftypefn +@findex bfd_hash_rename +@subsubsection @code{bfd_hash_rename} +@deftypefn {Function} void bfd_hash_rename (struct bfd_hash_table *, const char *, struct bfd_hash_entry *); +Rename an entry in a hash table. + +@end deftypefn +@findex bfd_hash_replace +@subsubsection @code{bfd_hash_replace} +@deftypefn {Function} void bfd_hash_replace (struct bfd_hash_table *, struct bfd_hash_entry * {*old*}, struct bfd_hash_entry * {*new*}); +Replace an entry in a hash table. + +@end deftypefn +@findex bfd_hash_allocate +@subsubsection @code{bfd_hash_allocate} +@deftypefn {Function} void *bfd_hash_allocate (struct bfd_hash_table *, unsigned int {*size*}); +Allocate space in a hash table. + +@end deftypefn +@findex bfd_hash_newfunc +@subsubsection @code{bfd_hash_newfunc} +@deftypefn {Function} struct bfd_hash_entry *bfd_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); +Base method for creating a new hash table entry. + +@end deftypefn +@findex bfd_hash_traverse +@subsubsection @code{bfd_hash_traverse} +@deftypefn {Function} void bfd_hash_traverse (struct bfd_hash_table *, bool (*) (struct bfd_hash_entry *, void *), void *); +Traverse a hash table. + +@end deftypefn +@findex bfd_hash_set_default_size +@subsubsection @code{bfd_hash_set_default_size} +@deftypefn {Function} unsigned int bfd_hash_set_default_size (unsigned int); +Set hash table default size. + +@end deftypefn +@findex _bfd_stringtab_init +@subsubsection @code{_bfd_stringtab_init} +@deftypefn {Function} struct bfd_strtab_hash *_bfd_stringtab_init (void); +Create a new strtab. + +@end deftypefn +@findex _bfd_xcoff_stringtab_init +@subsubsection @code{_bfd_xcoff_stringtab_init} +@deftypefn {Function} struct bfd_strtab_hash *_bfd_xcoff_stringtab_init (bool {*isxcoff64*}); +Create a new strtab in which the strings are output in the format +used in the XCOFF .debug section: a two byte length precedes each +string. + +@end deftypefn +@findex _bfd_stringtab_free +@subsubsection @code{_bfd_stringtab_free} +@deftypefn {Function} void _bfd_stringtab_free (struct bfd_strtab_hash *); +Free a strtab. + +@end deftypefn +@findex _bfd_stringtab_add +@subsubsection @code{_bfd_stringtab_add} +@deftypefn {Function} bfd_size_type _bfd_stringtab_add (struct bfd_strtab_hash *, const char *, bool {*hash*}, bool {*copy*}); +Get the index of a string in a strtab, adding it if it is not +already present. If HASH is FALSE, we don't really use the hash +table, and we don't eliminate duplicate strings. If COPY is true +then store a copy of STR if creating a new entry. + +@end deftypefn +@findex _bfd_stringtab_size +@subsubsection @code{_bfd_stringtab_size} +@deftypefn {Function} bfd_size_type _bfd_stringtab_size (struct bfd_strtab_hash *); +Get the number of bytes in a strtab. + +@end deftypefn +@findex _bfd_stringtab_emit +@subsubsection @code{_bfd_stringtab_emit} +@deftypefn {Function} bool _bfd_stringtab_emit (bfd *, struct bfd_strtab_hash *); +Write out a strtab. ABFD must already be at the right location in +the file. + +@end deftypefn diff --git a/bfd/doc/init.texi b/bfd/doc/init.texi deleted file mode 100644 index 68352db13..000000000 --- a/bfd/doc/init.texi +++ /dev/null @@ -1,24 +0,0 @@ -@section Initialization - - -@subsection Initialization functions -These are the functions that handle initializing a BFD. - -@findex bfd_init -@subsubsection @code{bfd_init} -@strong{Synopsis} -@example -unsigned int bfd_init (void); -@end example -@strong{Description}@* -This routine must be called before any other BFD function to -initialize magical internal data structures. -Returns a magic number, which may be used to check -that the bfd library is configured as expected by users. -@example - -/* Value returned by bfd_init. */ - -#define BFD_INIT_MAGIC (sizeof (struct bfd_section)) -@end example - diff --git a/bfd/doc/libbfd.texi b/bfd/doc/libbfd.texi index e69de29bb..1e195840b 100644 --- a/bfd/doc/libbfd.texi +++ b/bfd/doc/libbfd.texi @@ -0,0 +1,274 @@ +@section Implementation details + + +@subsection Internal functions + + +These routines are used within BFD. +They are not intended for export, but are documented here for +completeness. + +@findex bfd_malloc +@subsubsection @code{bfd_malloc} +@deftypefn {Function} void *bfd_malloc (bfd_size_type {*size*}); +Returns a pointer to an allocated block of memory that is at least +SIZE bytes long. If SIZE is 0 then it will be treated as if it were +1. If SIZE is too big then NULL will be returned. +Returns NULL upon error and sets bfd_error. + +@end deftypefn +@findex bfd_realloc +@subsubsection @code{bfd_realloc} +@deftypefn {Function} void *bfd_realloc (void *{*mem*}, bfd_size_type {*size*}); +Returns a pointer to an allocated block of memory that is at least +SIZE bytes long. If SIZE is 0 then it will be treated as if it were +1. If SIZE is too big then NULL will be returned. +If MEM is not NULL then it must point to an allocated block of memory. +If this block is large enough then MEM may be used as the return +value for this function, but this is not guaranteed. + +If MEM is not returned then the first N bytes in the returned block +will be identical to the first N bytes in region pointed to by MEM, +where N is the lessor of SIZE and the length of the region of memory +currently addressed by MEM. + +Returns NULL upon error and sets bfd_error. + +@end deftypefn +@findex bfd_realloc_or_free +@subsubsection @code{bfd_realloc_or_free} +@deftypefn {Function} void *bfd_realloc_or_free (void *{*mem*}, bfd_size_type {*size*}); +Returns a pointer to an allocated block of memory that is at least +SIZE bytes long. If SIZE is 0 then no memory will be allocated, +MEM will be freed, and NULL will be returned. This will not cause +bfd_error to be set. + +If SIZE is too big then NULL will be returned and bfd_error will be +set. +If MEM is not NULL then it must point to an allocated block of memory. +If this block is large enough then MEM may be used as the return +value for this function, but this is not guaranteed. + +If MEM is not returned then the first N bytes in the returned block +will be identical to the first N bytes in region pointed to by MEM, +where N is the lessor of SIZE and the length of the region of memory +currently addressed by MEM. + +@end deftypefn +@findex bfd_zmalloc +@subsubsection @code{bfd_zmalloc} +@deftypefn {Function} void *bfd_zmalloc (bfd_size_type {*size*}); +Returns a pointer to an allocated block of memory that is at least +SIZE bytes long. If SIZE is 0 then it will be treated as if it were +1. If SIZE is too big then NULL will be returned. +Returns NULL upon error and sets bfd_error. + +If NULL is not returned then the allocated block of memory will +have been cleared. + +@end deftypefn +@findex bfd_alloc +@subsubsection @code{bfd_alloc} +@deftypefn {Function} void *bfd_alloc (bfd *abfd, bfd_size_type wanted); +Allocate a block of @var{wanted} bytes of memory attached to +@code{abfd} and return a pointer to it. + +@end deftypefn +@findex bfd_zalloc +@subsubsection @code{bfd_zalloc} +@deftypefn {Function} void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); +Allocate a block of @var{wanted} bytes of zeroed memory +attached to @code{abfd} and return a pointer to it. + +@end deftypefn +@findex bfd_release +@subsubsection @code{bfd_release} +@deftypefn {Function} void bfd_release (bfd *, void *); +Free a block allocated for a BFD. +Note: Also frees all more recently allocated blocks! + +@end deftypefn +@findex bfd_write_bigendian_4byte_int +@subsubsection @code{bfd_write_bigendian_4byte_int} +@deftypefn {Function} bool bfd_write_bigendian_4byte_int (bfd *, unsigned int); +Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big +endian order regardless of what else is going on. This is useful in +archives. + +@end deftypefn +@findex bfd_put_size +@subsubsection @code{bfd_put_size} +@findex bfd_get_size +@subsubsection @code{bfd_get_size} +These macros as used for reading and writing raw data in +sections; each access (except for bytes) is vectored through +the target format of the BFD and mangled accordingly. The +mangling performs any necessary endian translations and +removes alignment restrictions. Note that types accepted and +returned by these macros are identical so they can be swapped +around in macros---for example, @file{libaout.h} defines @code{GET_WORD} +to either @code{bfd_get_32} or @code{bfd_get_64}. + +In the put routines, @var{val} must be a @code{bfd_vma}. If we are on a +system without prototypes, the caller is responsible for making +sure that is true, with a cast if necessary. We don't cast +them in the macro definitions because that would prevent @code{lint} +or @code{gcc -Wall} from detecting sins such as passing a pointer. +To detect calling these with less than a @code{bfd_vma}, use +@code{gcc -Wconversion} on a host with 64 bit @code{bfd_vma}'s. +@example + +/* Byte swapping macros for user section data. */ + +#define bfd_put_8(abfd, val, ptr) \ + ((void) (*((bfd_byte *) (ptr)) = (val) & 0xff)) +#define bfd_put_signed_8 \ + bfd_put_8 +#define bfd_get_8(abfd, ptr) \ + ((bfd_vma) *(const bfd_byte *) (ptr) & 0xff) +#define bfd_get_signed_8(abfd, ptr) \ + ((((bfd_signed_vma) *(const bfd_byte *) (ptr) & 0xff) ^ 0x80) - 0x80) + +#define bfd_put_16(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) +#define bfd_put_signed_16 \ + bfd_put_16 +#define bfd_get_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx16, (ptr)) +#define bfd_get_signed_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) + +#define bfd_put_24(abfd, val, ptr) \ + do \ + if (bfd_big_endian (abfd)) \ + bfd_putb24 ((val), (ptr)); \ + else \ + bfd_putl24 ((val), (ptr)); \ + while (0) + +bfd_vma bfd_getb24 (const void *p); +bfd_vma bfd_getl24 (const void *p); + +#define bfd_get_24(abfd, ptr) \ + (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr)) + +#define bfd_put_32(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx32, ((val),(ptr))) +#define bfd_put_signed_32 \ + bfd_put_32 +#define bfd_get_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx32, (ptr)) +#define bfd_get_signed_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_32, (ptr)) + +#define bfd_put_64(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_putx64, ((val), (ptr))) +#define bfd_put_signed_64 \ + bfd_put_64 +#define bfd_get_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx64, (ptr)) +#define bfd_get_signed_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) + +#define bfd_get(bits, abfd, ptr) \ + ((bits) == 8 ? bfd_get_8 (abfd, ptr) \ + : (bits) == 16 ? bfd_get_16 (abfd, ptr) \ + : (bits) == 32 ? bfd_get_32 (abfd, ptr) \ + : (bits) == 64 ? bfd_get_64 (abfd, ptr) \ + : (abort (), (bfd_vma) - 1)) + +#define bfd_put(bits, abfd, val, ptr) \ + ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \ + : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \ + : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \ + : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ + : (abort (), (void) 0)) + +@end example + +@findex bfd_h_put_size +@subsubsection @code{bfd_h_put_size} +These macros have the same function as their @code{bfd_get_x} +brethren, except that they are used for removing information +for the header records of object files. Believe it or not, +some object files keep their header records in big endian +order and their data in little endian order. +@example + +/* Byte swapping macros for file header data. */ + +#define bfd_h_put_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) +#define bfd_h_put_signed_8(abfd, val, ptr) \ + bfd_put_8 (abfd, val, ptr) +#define bfd_h_get_8(abfd, ptr) \ + bfd_get_8 (abfd, ptr) +#define bfd_h_get_signed_8(abfd, ptr) \ + bfd_get_signed_8 (abfd, ptr) + +#define bfd_h_put_16(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx16, (val, ptr)) +#define bfd_h_put_signed_16 \ + bfd_h_put_16 +#define bfd_h_get_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx16, (ptr)) +#define bfd_h_get_signed_16(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr)) + +#define bfd_h_put_32(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx32, (val, ptr)) +#define bfd_h_put_signed_32 \ + bfd_h_put_32 +#define bfd_h_get_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx32, (ptr)) +#define bfd_h_get_signed_32(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr)) + +#define bfd_h_put_64(abfd, val, ptr) \ + BFD_SEND (abfd, bfd_h_putx64, (val, ptr)) +#define bfd_h_put_signed_64 \ + bfd_h_put_64 +#define bfd_h_get_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx64, (ptr)) +#define bfd_h_get_signed_64(abfd, ptr) \ + BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) + +/* Aliases for the above, which should eventually go away. */ + +#define H_PUT_64 bfd_h_put_64 +#define H_PUT_32 bfd_h_put_32 +#define H_PUT_16 bfd_h_put_16 +#define H_PUT_8 bfd_h_put_8 +#define H_PUT_S64 bfd_h_put_signed_64 +#define H_PUT_S32 bfd_h_put_signed_32 +#define H_PUT_S16 bfd_h_put_signed_16 +#define H_PUT_S8 bfd_h_put_signed_8 +#define H_GET_64 bfd_h_get_64 +#define H_GET_32 bfd_h_get_32 +#define H_GET_16 bfd_h_get_16 +#define H_GET_8 bfd_h_get_8 +#define H_GET_S64 bfd_h_get_signed_64 +#define H_GET_S32 bfd_h_get_signed_32 +#define H_GET_S16 bfd_h_get_signed_16 +#define H_GET_S8 bfd_h_get_signed_8 + + +@end example + +@findex Byte swapping routines. +@subsubsection @code{Byte swapping routines.} +@deftypefn {Function} uint64_t bfd_getb64 (const void *); uint64_t bfd_getl64 (const void *); int64_t bfd_getb_signed_64 (const void *); int64_t bfd_getl_signed_64 (const void *); bfd_vma bfd_getb32 (const void *); bfd_vma bfd_getl32 (const void *); bfd_signed_vma bfd_getb_signed_32 (const void *); bfd_signed_vma bfd_getl_signed_32 (const void *); bfd_vma bfd_getb16 (const void *); bfd_vma bfd_getl16 (const void *); bfd_signed_vma bfd_getb_signed_16 (const void *); bfd_signed_vma bfd_getl_signed_16 (const void *); void bfd_putb64 (uint64_t, void *); void bfd_putl64 (uint64_t, void *); void bfd_putb32 (bfd_vma, void *); void bfd_putl32 (bfd_vma, void *); void bfd_putb24 (bfd_vma, void *); void bfd_putl24 (bfd_vma, void *); void bfd_putb16 (bfd_vma, void *); void bfd_putl16 (bfd_vma, void *); uint64_t bfd_get_bits (const void *, int, bool); void bfd_put_bits (uint64_t, void *, int, bool); +Read and write integers in a particular endian order. getb +and putb functions handle big-endian, getl and putl handle +little-endian. bfd_get_bits and bfd_put_bits specify +big-endian by passing TRUE in the last parameter, +little-endian by passing FALSE. + +@end deftypefn +@findex bfd_log2 +@subsubsection @code{bfd_log2} +@deftypefn {Function} unsigned int bfd_log2 (bfd_vma x); +Return the log base 2 of the value supplied, rounded up. E.g., an +@var{x} of 1025 returns 11. A @var{x} of 0 returns 0. + +@end deftypefn diff --git a/bfd/doc/linker.texi b/bfd/doc/linker.texi index 17ff43caa..947ede91a 100644 --- a/bfd/doc/linker.texi +++ b/bfd/doc/linker.texi @@ -346,11 +346,7 @@ file at the end of @code{NAME(aout,final_link)}. @findex bfd_link_split_section @subsubsection @code{bfd_link_split_section} -@strong{Synopsis} -@example -bool bfd_link_split_section (bfd *abfd, asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_link_split_section (bfd *abfd, asection *sec); Return nonzero if @var{sec} should be split during a reloceatable or final link. @example @@ -359,15 +355,10 @@ reloceatable or final link. @end example +@end deftypefn @findex bfd_section_already_linked @subsubsection @code{bfd_section_already_linked} -@strong{Synopsis} -@example -bool bfd_section_already_linked (bfd *abfd, - asection *sec, - struct bfd_link_info *info); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_section_already_linked (bfd *abfd, asection *sec, struct bfd_link_info *info); Check if @var{data} has been already linked during a reloceatable or final link. Return TRUE if it has. @example @@ -376,15 +367,10 @@ or final link. Return TRUE if it has. @end example +@end deftypefn @findex bfd_generic_define_common_symbol @subsubsection @code{bfd_generic_define_common_symbol} -@strong{Synopsis} -@example -bool bfd_generic_define_common_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_define_common_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h); Convert common symbol @var{h} into a defined symbol. Return TRUE on success and FALSE on failure. @example @@ -393,15 +379,10 @@ Return TRUE on success and FALSE on failure. @end example +@end deftypefn @findex _bfd_generic_link_hide_symbol @subsubsection @code{_bfd_generic_link_hide_symbol} -@strong{Synopsis} -@example -void _bfd_generic_link_hide_symbol - (bfd *output_bfd, struct bfd_link_info *info, - struct bfd_link_hash_entry *h); -@end example -@strong{Description}@* +@deftypefn {Function} void _bfd_generic_link_hide_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h); Hide symbol @var{h}. This is an internal function. It should not be called from outside the BFD library. @@ -411,15 +392,10 @@ outside the BFD library. @end example +@end deftypefn @findex bfd_generic_define_start_stop @subsubsection @code{bfd_generic_define_start_stop} -@strong{Synopsis} -@example -struct bfd_link_hash_entry *bfd_generic_define_start_stop - (struct bfd_link_info *info, - const char *symbol, asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} struct bfd_link_hash_entry *bfd_generic_define_start_stop (struct bfd_link_info *info, const char *symbol, asection *sec); Define a __start, __stop, .startof. or .sizeof. symbol. Return the symbol or NULL if no such undefined symbol exists. @example @@ -428,65 +404,44 @@ Return the symbol or NULL if no such undefined symbol exists. @end example +@end deftypefn @findex bfd_find_version_for_sym @subsubsection @code{bfd_find_version_for_sym} -@strong{Synopsis} -@example -struct bfd_elf_version_tree * bfd_find_version_for_sym - (struct bfd_elf_version_tree *verdefs, - const char *sym_name, bool *hide); -@end example -@strong{Description}@* +@deftypefn {Function} struct bfd_elf_version_tree * bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, const char *sym_name, bool *hide); Search an elf version script tree for symbol versioning info and export / don't-export status for a given symbol. Return non-NULL on success and NULL on failure; also sets the output @samp{hide} boolean parameter. +@end deftypefn @findex bfd_hide_sym_by_version @subsubsection @code{bfd_hide_sym_by_version} -@strong{Synopsis} -@example -bool bfd_hide_sym_by_version - (struct bfd_elf_version_tree *verdefs, const char *sym_name); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); Search an elf version script tree for symbol versioning info for a given symbol. Return TRUE if the symbol is hidden. +@end deftypefn @findex bfd_link_check_relocs @subsubsection @code{bfd_link_check_relocs} -@strong{Synopsis} -@example -bool bfd_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_link_check_relocs (bfd *abfd, struct bfd_link_info *info); Checks the relocs in ABFD for validity. Does not execute the relocs. Return TRUE if everything is OK, FALSE otherwise. This is the external entry point to this code. +@end deftypefn @findex _bfd_generic_link_check_relocs @subsubsection @code{_bfd_generic_link_check_relocs} -@strong{Synopsis} -@example -bool _bfd_generic_link_check_relocs - (bfd *abfd, struct bfd_link_info *info); -@end example -@strong{Description}@* +@deftypefn {Function} bool _bfd_generic_link_check_relocs (bfd *abfd, struct bfd_link_info *info); Stub function for targets that do not implement reloc checking. Return TRUE. This is an internal function. It should not be called from outside the BFD library. +@end deftypefn @findex bfd_merge_private_bfd_data @subsubsection @code{bfd_merge_private_bfd_data} -@strong{Synopsis} -@example -bool bfd_merge_private_bfd_data - (bfd *ibfd, struct bfd_link_info *info); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info); Merge private BFD information from the BFD @var{ibfd} to the the output file BFD when linking. Return @code{TRUE} on success, @code{FALSE} on error. Possible error returns are: @@ -501,17 +456,15 @@ Not enough memory exists to create private data for @var{obfd}. #define bfd_merge_private_bfd_data(ibfd, info) \ BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \ (ibfd, info)) + @end example +@end deftypefn @findex _bfd_generic_verify_endian_match @subsubsection @code{_bfd_generic_verify_endian_match} -@strong{Synopsis} -@example -bool _bfd_generic_verify_endian_match - (bfd *ibfd, struct bfd_link_info *info); -@end example -@strong{Description}@* +@deftypefn {Function} bool _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info); Can be used from / for bfd_merge_private_bfd_data to check that endianness matches between input and output file. Returns TRUE for a match, otherwise returns FALSE and emits an error. +@end deftypefn diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk index 931942f87..f7b3733ee 100644 --- a/bfd/doc/local.mk +++ b/bfd/doc/local.mk @@ -1,6 +1,6 @@ ## Process this file with automake to generate Makefile.in ## -## Copyright (C) 2012-2022 Free Software Foundation, Inc. +## Copyright (C) 2012-2023 Free Software Foundation, Inc. ## ## This file is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -32,7 +32,6 @@ DOCFILES = \ %D%/elf.texi \ %D%/format.texi \ %D%/hash.texi \ - %D%/init.texi \ %D%/libbfd.texi \ %D%/linker.texi \ %D%/mmo.texi \ @@ -64,13 +63,12 @@ SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ $(srcdir)/opncls.c $(srcdir)/reloc.c \ $(srcdir)/section.c $(srcdir)/syms.c \ - $(srcdir)/targets.c $(srcdir)/init.c + $(srcdir)/targets.c SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ $(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \ - $(srcdir)/cpu-i960.c $(srcdir)/archures.c \ - $(srcdir)/init.c + $(srcdir)/archures.c TEXIDIR = $(srcdir)/../texinfo/fsf @@ -85,7 +83,7 @@ MKDOC = %D%/chew$(EXEEXT_FOR_BUILD) $(MKDOC): %D%/chew.stamp ; @true %D%/chew.stamp: $(srcdir)/%D%/chew.c %D%/$(am__dirstamp) $(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ - $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \ + $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ -I. -I$(srcdir) -I%D% -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ $(srcdir)/%D%/chew.c && \ $(SHELL) $(srcdir)/../move-if-change \ @@ -113,10 +111,10 @@ REGEN_TEXI = \ .PRECIOUS: %D%/%.stamp %D%/%.texi: %D%/%.stamp ; @true -%D%/%.stamp: $(srcdir)/%.h $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) - $(AM_V_GEN)$(REGEN_TEXI) %D%/%.stamp: $(srcdir)/%.c $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) $(AM_V_GEN)$(REGEN_TEXI) +%D%/%.stamp: $(srcdir)/%.h $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp) + $(AM_V_GEN)$(REGEN_TEXI) # Avoid the %.stamp generating a builddir/bfd.texi that overrides the # srcdir/ as well as regenerating doc/bfd.info for each make run. diff --git a/bfd/doc/makefile.vms b/bfd/doc/makefile.vms index 8b1ecaaf6..3920da8d9 100644 --- a/bfd/doc/makefile.vms +++ b/bfd/doc/makefile.vms @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2022 Free Software Foundation, Inc. +# Copyright (C) 2012-2023 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/bfd/doc/opncls.texi b/bfd/doc/opncls.texi index 8174acf6f..78f8cb9a9 100644 --- a/bfd/doc/opncls.texi +++ b/bfd/doc/opncls.texi @@ -1,22 +1,30 @@ - -@example -/* Set to N to open the next N BFDs using an alternate id space. */ -extern unsigned int bfd_use_reserved_id; -@end example @section Opening and closing BFDs @subsection Functions for opening and closing +@findex _bfd_new_bfd +@subsubsection @code{_bfd_new_bfd} +@deftypefn {Function} bfd *_bfd_new_bfd (void); +Return a new BFD. All BFD's are allocated through this routine. + +@end deftypefn +@findex _bfd_new_bfd_contained_in +@subsubsection @code{_bfd_new_bfd_contained_in} +@deftypefn {Function} bfd *_bfd_new_bfd_contained_in (bfd *); +Allocate a new BFD as a member of archive OBFD. + +@end deftypefn +@findex _bfd_free_cached_info +@subsubsection @code{_bfd_free_cached_info} +@deftypefn {Function} bool _bfd_free_cached_info (bfd *); +Free objalloc memory. + +@end deftypefn @findex bfd_fopen @subsubsection @code{bfd_fopen} -@strong{Synopsis} -@example -bfd *bfd_fopen (const char *filename, const char *target, - const char *mode, int fd); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_fopen (const char *filename, const char *target, const char *mode, int fd); Open the file @var{filename} with the target @var{target}. Return a pointer to the created BFD. If @var{fd} is not -1, then @code{fdopen} is used to open the file; otherwise, @code{fopen} @@ -37,13 +45,10 @@ On error, @var{fd} is always closed. A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_openr @subsubsection @code{bfd_openr} -@strong{Synopsis} -@example -bfd *bfd_openr (const char *filename, const char *target); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_openr (const char *filename, const char *target); Open the file @var{filename} (using @code{fopen}) with the target @var{target}. Return a pointer to the created BFD. @@ -57,13 +62,10 @@ are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_fdopenr @subsubsection @code{bfd_fdopenr} -@strong{Synopsis} -@example -bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_fdopenr (const char *filename, const char *target, int fd); @code{bfd_fdopenr} is to @code{bfd_fopenr} much like @code{fdopen} is to @code{fopen}. It opens a BFD on a file already described by the @var{fd} supplied. @@ -86,50 +88,27 @@ On error, @var{fd} is closed. A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_fdopenw @subsubsection @code{bfd_fdopenw} -@strong{Synopsis} -@example -bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_fdopenw (const char *filename, const char *target, int fd); @code{bfd_fdopenw} is exactly like @code{bfd_fdopenr} with the exception that the resulting BFD is suitable for output. +@end deftypefn @findex bfd_openstreamr @subsubsection @code{bfd_openstreamr} -@strong{Synopsis} -@example -bfd *bfd_openstreamr (const char * filename, const char * target, - void * stream); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); Open a BFD for read access on an existing stdio stream. When the BFD is passed to @code{bfd_close}, the stream will be closed. A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_openr_iovec @subsubsection @code{bfd_openr_iovec} -@strong{Synopsis} -@example -bfd *bfd_openr_iovec (const char *filename, const char *target, - void *(*open_func) (struct bfd *nbfd, - void *open_closure), - void *open_closure, - file_ptr (*pread_func) (struct bfd *nbfd, - void *stream, - void *buf, - file_ptr nbytes, - file_ptr offset), - int (*close_func) (struct bfd *nbfd, - void *stream), - int (*stat_func) (struct bfd *abfd, - void *stream, - struct stat *sb)); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_openr_iovec (const char *filename, const char *target, void *(*open_func) (struct bfd *nbfd, void *open_closure), void *open_closure, file_ptr (*pread_func) (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset), int (*close_func) (struct bfd *nbfd, void *stream), int (*stat_func) (struct bfd *abfd, void *stream, struct stat *sb)); Create and return a BFD backed by a read-only @var{stream}. The @var{stream} is created using @var{open_func}, accessed using @var{pread_func} and destroyed using @var{close_func}. @@ -164,13 +143,10 @@ occurred. Possible errors are @code{bfd_error_no_memory}, A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_openw @subsubsection @code{bfd_openw} -@strong{Synopsis} -@example -bfd *bfd_openw (const char *filename, const char *target); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_openw (const char *filename, const char *target); Create a BFD, associated with file @var{filename}, using the file format @var{target}, and return a pointer to it. @@ -180,13 +156,30 @@ Possible errors are @code{bfd_error_system_call}, @code{bfd_error_no_memory}, A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn +@findex bfd_elf_bfd_from_remote_memory +@subsubsection @code{bfd_elf_bfd_from_remote_memory} +@deftypefn {Function} bfd *bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, bfd_size_type len)); +Create a new BFD as if by bfd_openr. Rather than opening a +file, reconstruct an ELF file by reading the segments out of +remote memory based on the ELF file header at EHDR_VMA and the +ELF program headers it points to. If non-zero, SIZE is the +known extent of the object. If not null, *LOADBASEP is filled +in with the difference between the VMAs from which the +segments were read, and the VMAs the file headers (and hence +BFD's idea of each section's VMA) put them at. + +The function TARGET_READ_MEMORY is called to copy LEN bytes +from the remote memory at target address VMA into the local +buffer at MYADDR; it should return zero on success or an +errno code on failure. TEMPL must be a BFD for an ELF +target with the word size and byte order found in the remote +memory. + +@end deftypefn @findex bfd_close @subsubsection @code{bfd_close} -@strong{Synopsis} -@example -bool bfd_close (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_close (bfd *abfd); Close a BFD. If the BFD was open for writing, then pending operations are completed and the file written out and closed. If the created file is executable, then @code{chmod} is called @@ -197,16 +190,12 @@ All memory attached to the BFD is released. The file descriptor associated with the BFD is closed (even if it was passed in to BFD by @code{bfd_fdopenr}). -@strong{Returns}@* @code{TRUE} is returned if all is ok, otherwise @code{FALSE}. +@end deftypefn @findex bfd_close_all_done @subsubsection @code{bfd_close_all_done} -@strong{Synopsis} -@example -bool bfd_close_all_done (bfd *); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_close_all_done (bfd *); Close a BFD. Differs from @code{bfd_close} since it does not complete any pending operations. This routine would be used if the application had just used BFD for swapping and didn't @@ -217,16 +206,12 @@ to mark it as such. All memory attached to the BFD is released. -@strong{Returns}@* @code{TRUE} is returned if all is ok, otherwise @code{FALSE}. +@end deftypefn @findex bfd_create @subsubsection @code{bfd_create} -@strong{Synopsis} -@example -bfd *bfd_create (const char *filename, bfd *templ); -@end example -@strong{Description}@* +@deftypefn {Function} bfd *bfd_create (const char *filename, bfd *templ); Create a new BFD in the manner of @code{bfd_openw}, but without opening a file. The new BFD takes the target from the target used by @var{templ}. The format is always set to @code{bfd_object}. @@ -234,123 +219,58 @@ used by @var{templ}. The format is always set to @code{bfd_object}. A copy of the @var{filename} argument is stored in the newly created BFD. It can be accessed via the bfd_get_filename() macro. +@end deftypefn @findex bfd_make_writable @subsubsection @code{bfd_make_writable} -@strong{Synopsis} -@example -bool bfd_make_writable (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_make_writable (bfd *abfd); Takes a BFD as created by @code{bfd_create} and converts it into one like as returned by @code{bfd_openw}. It does this by converting the BFD to BFD_IN_MEMORY. It's assumed that you will call @code{bfd_make_readable} on this bfd later. -@strong{Returns}@* @code{TRUE} is returned if all is ok, otherwise @code{FALSE}. +@end deftypefn @findex bfd_make_readable @subsubsection @code{bfd_make_readable} -@strong{Synopsis} -@example -bool bfd_make_readable (bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_make_readable (bfd *abfd); Takes a BFD as created by @code{bfd_create} and @code{bfd_make_writable} and converts it into one like as returned by @code{bfd_openr}. It does this by writing the contents out to the memory buffer, then reversing the direction. -@strong{Returns}@* @code{TRUE} is returned if all is ok, otherwise @code{FALSE}. -@findex bfd_alloc -@subsubsection @code{bfd_alloc} -@strong{Synopsis} -@example -void *bfd_alloc (bfd *abfd, bfd_size_type wanted); -@end example -@strong{Description}@* -Allocate a block of @var{wanted} bytes of memory attached to -@code{abfd} and return a pointer to it. - -@findex bfd_zalloc -@subsubsection @code{bfd_zalloc} -@strong{Synopsis} -@example -void *bfd_zalloc (bfd *abfd, bfd_size_type wanted); -@end example -@strong{Description}@* -Allocate a block of @var{wanted} bytes of zeroed memory -attached to @code{abfd} and return a pointer to it. - +@end deftypefn @findex bfd_calc_gnu_debuglink_crc32 @subsubsection @code{bfd_calc_gnu_debuglink_crc32} -@strong{Synopsis} -@example -unsigned long bfd_calc_gnu_debuglink_crc32 - (unsigned long crc, const unsigned char *buf, bfd_size_type len); -@end example -@strong{Description}@* +@deftypefn {Function} uint32_t bfd_calc_gnu_debuglink_crc32 (uint32_t crc, const bfd_byte *buf, bfd_size_type len); Computes a CRC value as used in the .gnu_debuglink section. Advances the previously computed @var{crc} value by computing and adding in the crc32 for @var{len} bytes of @var{buf}. -@strong{Returns}@* Return the updated CRC32 value. -@findex bfd_get_debug_link_info_1 -@subsubsection @code{bfd_get_debug_link_info_1} -@strong{Synopsis} -@example -char *bfd_get_debug_link_info_1 (bfd *abfd, void *crc32_out); -@end example -@strong{Description}@* -Extracts the filename and CRC32 value for any separate debug -information file associated with @var{abfd}. - -The @var{crc32_out} parameter is an untyped pointer because -this routine is used as a @code{get_func_type} function, but it -is expected to be an unsigned long pointer. - -@strong{Returns}@* -The filename of the associated debug information file, or NULL -if there is no such file. If the filename was found then the -contents of @var{crc32_out} are updated to hold the corresponding -CRC32 value for the file. - -The returned filename is allocated with @code{malloc}; freeing -it is the responsibility of the caller. - +@end deftypefn @findex bfd_get_debug_link_info @subsubsection @code{bfd_get_debug_link_info} -@strong{Synopsis} -@example -char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_get_debug_link_info (bfd *abfd, uint32_t *crc32_out); Extracts the filename and CRC32 value for any separate debug information file associated with @var{abfd}. -@strong{Returns}@* -The filename of the associated debug information file, or NULL -if there is no such file. If the filename was found then the -contents of @var{crc32_out} are updated to hold the corresponding -CRC32 value for the file. +Returns the filename of the associated debug information file, +or NULL if there is no such file. If the filename was found +then the contents of @var{crc32_out} are updated to hold the +corresponding CRC32 value for the file. The returned filename is allocated with @code{malloc}; freeing it is the responsibility of the caller. +@end deftypefn @findex bfd_get_alt_debug_link_info @subsubsection @code{bfd_get_alt_debug_link_info} -@strong{Synopsis} -@example -char *bfd_get_alt_debug_link_info (bfd * abfd, - bfd_size_type *buildid_len, - bfd_byte **buildid_out); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_get_alt_debug_link_info (bfd * abfd, bfd_size_type *buildid_len, bfd_byte **buildid_out); Fetch the filename and BuildID value for any alternate debuginfo associated with @var{abfd}. Return NULL if no such info found, otherwise return filename and update @var{buildid_len} and @@ -358,65 +278,10 @@ otherwise return filename and update @var{buildid_len} and allocated with @code{malloc}; freeing them is the responsibility of the caller. -@findex separate_debug_file_exists -@subsubsection @code{separate_debug_file_exists} -@strong{Synopsis} -@example -bool separate_debug_file_exists - (char *name, void *crc32_p); -@end example -@strong{Description}@* -Checks to see if @var{name} is a file and if its contents -match @var{crc32}, which is a pointer to an @code{unsigned -long} containing a CRC32. - -The @var{crc32_p} parameter is an untyped pointer because -this routine is used as a @code{check_func_type} function. - -@findex separate_alt_debug_file_exists -@subsubsection @code{separate_alt_debug_file_exists} -@strong{Synopsis} -@example -bool separate_alt_debug_file_exists - (char *name, void *unused); -@end example -@strong{Description}@* -Checks to see if @var{name} is a file. - -@findex find_separate_debug_file -@subsubsection @code{find_separate_debug_file} -@strong{Synopsis} -@example -char *find_separate_debug_file - (bfd *abfd, const char *dir, bool include_dirs, - get_func_type get, check_func_type check, void *data); -@end example -@strong{Description}@* -Searches for a debug information file corresponding to @var{abfd}. - -The name of the separate debug info file is returned by the -@var{get} function. This function scans various fixed locations -in the filesystem, including the file tree rooted at @var{dir}. -If the @var{include_dirs} parameter is true then the directory -components of @var{abfd}'s filename will be included in the -searched locations. - -@var{data} is passed unmodified to the @var{get} and @var{check} -functions. It is generally used to implement build-id-like -matching in the callback functions. - -@strong{Returns}@* -Returns the filename of the first file to be found which -receives a TRUE result from the @var{check} function. -Returns NULL if no valid file could be found. - +@end deftypefn @findex bfd_follow_gnu_debuglink @subsubsection @code{bfd_follow_gnu_debuglink} -@strong{Synopsis} -@example -char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); Takes a BFD and searches it for a .gnu_debuglink section. If this section is found, it examines the section for the name and checksum of a '.debug' file containing auxiliary debugging information. It @@ -427,18 +292,15 @@ found returns the full filename. If @var{dir} is NULL, the search will take place starting at the current directory. -@strong{Returns}@* -@code{NULL} on any errors or failure to locate the .debug file, -otherwise a pointer to a heap-allocated string containing the -filename. The caller is responsible for freeing this string. +Returns @code{NULL} on any errors or failure to locate the .debug +file, otherwise a pointer to a heap-allocated string +containing the filename. The caller is responsible for +freeing this string. +@end deftypefn @findex bfd_follow_gnu_debugaltlink @subsubsection @code{bfd_follow_gnu_debugaltlink} -@strong{Synopsis} -@example -char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); Takes a BFD and searches it for a .gnu_debugaltlink section. If this section is found, it examines the section for the name of a file containing auxiliary debugging information. It then searches the @@ -449,102 +311,38 @@ full filename. If @var{dir} is NULL, the search will take place starting at the current directory. -@strong{Returns}@* -@code{NULL} on any errors or failure to locate the debug file, -otherwise a pointer to a heap-allocated string containing the -filename. The caller is responsible for freeing this string. +Returns @code{NULL} on any errors or failure to locate the debug +file, otherwise a pointer to a heap-allocated string +containing the filename. The caller is responsible for +freeing this string. +@end deftypefn @findex bfd_create_gnu_debuglink_section @subsubsection @code{bfd_create_gnu_debuglink_section} -@strong{Synopsis} -@example -struct bfd_section *bfd_create_gnu_debuglink_section - (bfd *abfd, const char *filename); -@end example -@strong{Description}@* +@deftypefn {Function} struct bfd_section *bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename); Takes a @var{BFD} and adds a .gnu_debuglink section to it. The section is sized to be big enough to contain a link to the specified @var{filename}. -@strong{Returns}@* A pointer to the new section is returned if all is ok. Otherwise @code{NULL} is returned and bfd_error is set. +@end deftypefn @findex bfd_fill_in_gnu_debuglink_section @subsubsection @code{bfd_fill_in_gnu_debuglink_section} -@strong{Synopsis} -@example -bool bfd_fill_in_gnu_debuglink_section - (bfd *abfd, struct bfd_section *sect, const char *filename); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename); Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT} and fills in the contents of the section to contain a link to the -specified @var{filename}. The filename should be relative to the -current directory. +specified @var{filename}. The filename should be absolute or +relative to the current directory. -@strong{Returns}@* @code{TRUE} is returned if all is ok. Otherwise @code{FALSE} is returned and bfd_error is set. -@findex get_build_id -@subsubsection @code{get_build_id} -@strong{Synopsis} -@example -struct bfd_build_id * get_build_id (bfd *abfd); -@end example -@strong{Description}@* -Finds the build-id associated with @var{abfd}. If the build-id is -extracted from the note section then a build-id structure is built -for it, using memory allocated to @var{abfd}, and this is then -attached to the @var{abfd}. - -@strong{Returns}@* -Returns a pointer to the build-id structure if a build-id could be -found. If no build-id is found NULL is returned and error code is -set. - -@findex get_build_id_name -@subsubsection @code{get_build_id_name} -@strong{Synopsis} -@example -char * get_build_id_name (bfd *abfd, void *build_id_out_p) -@end example -@strong{Description}@* -Searches @var{abfd} for a build-id, and then constructs a pathname -from it. The path is computed as .build-id/NN/NN+NN.debug where -NNNN+NN is the build-id value as a hexadecimal string. - -@strong{Returns}@* -Returns the constructed filename or NULL upon error. -It is the caller's responsibility to free the memory used to hold the -filename. -If a filename is returned then the @var{build_id_out_p} -parameter (which points to a @code{struct bfd_build_id} -pointer) is set to a pointer to the build_id structure. - -@findex check_build_id_file -@subsubsection @code{check_build_id_file} -@strong{Synopsis} -@example -bool check_build_id_file (char *name, void *buildid_p); -@end example -@strong{Description}@* -Checks to see if @var{name} is a readable file and if its build-id -matches @var{buildid}. - -@strong{Returns}@* -Returns TRUE if the file exists, is readable, and contains a -build-id which matches the build-id pointed at by -@var{build_id_p} (which is really a @code{struct bfd_build_id **}). - +@end deftypefn @findex bfd_follow_build_id_debuglink @subsubsection @code{bfd_follow_build_id_debuglink} -@strong{Synopsis} -@example -char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); Takes @var{abfd} and searches it for a .note.gnu.build-id section. If this section is found, it extracts the value of the NT_GNU_BUILD_ID note, which should be a hexadecimal value @var{NNNN+NN} (for @@ -559,19 +357,17 @@ not implemented. If @var{dir} is NULL, the search will take place starting at the current directory. -@strong{Returns}@* -@code{NULL} on any errors or failure to locate the debug file, -otherwise a pointer to a heap-allocated string containing the -filename. The caller is responsible for freeing this string. +Returns @code{NULL} on any errors or failure to locate the debug +file, otherwise a pointer to a heap-allocated string +containing the filename. The caller is responsible for +freeing this string. +@end deftypefn @findex bfd_set_filename @subsubsection @code{bfd_set_filename} -@strong{Synopsis} -@example -const char *bfd_set_filename (bfd *abfd, const char *filename); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_set_filename (bfd *abfd, const char *filename); Set the filename of @var{abfd}, copying the FILENAME parameter to bfd_alloc'd memory owned by @var{abfd}. Returns a pointer the newly allocated name, or NULL if the allocation failed. +@end deftypefn diff --git a/bfd/doc/proto.str b/bfd/doc/proto.str index 702d9f540..90ee01106 100644 --- a/bfd/doc/proto.str +++ b/bfd/doc/proto.str @@ -1,12 +1,50 @@ +- Source extraction program for chew. +- Copyright (C) 1990-2023 Free Software Foundation, Inc. +- This file is part of BFD, the Binary File Descriptor library. + +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. + +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +- chew.c keywords defined here put output into bfd-in2.h and libbfd.h or +- libcoff.h, from comments in the source. See also doc.str. +- Output lines generally come from comment lines starting with a dot, +- or from keywords like SYNOPSIS. Output switches to bfd-in2.h at the +- end of each comment. Use INTERNAL* to output to libbfd.h. +- +- EXTERNAL: output to bfd-in2.h, nothing to docs +- INTERNAL: output to libbfd.h, nothing to docs +- CODE_FRAGMENT: output to header and docs +- FUNCTION: output to bfd-in2.h and docs +- INTERNAL_FUNCTION: output to libbfd.h and docs +- DEFINITION: alias for FUNCTION, but generally doesn't have SYNOPSIS, +- used for structs and other random code +- INTERNAL_DEFINITION: as above, but output to libbfd.h and docs +- ENUM* outputs to bfd-in2.h, libbfd.h and docs. : SYNOPSIS skip_past_newline get_stuff_in_command - paramstuff + translatecomments + strip_trailing_newlines + remchar + " ATTRIBUTE_HIDDEN" internalmode @ catstrif + ";\n\n" catstr indent maybecatstr ; +- Ignore stuff that is for the docs. Output lines starting with dots. : ignore skip_past_newline get_stuff_in_command @@ -17,17 +55,19 @@ : CODE_FRAGMENT ignore ; -: external - 0 internalmode ignore ; +- Output goes to bfd-in2.h +: EXTERNAL + 0 internalmode ! ignore ; -: internal - 1 internalmode ignore ; +- Output goes to libbfd.h/libcoff.h +: INTERNAL + 1 internalmode ! ignore ; - input stack { a b } output b if internal, a if external : ifinternal - "" swap 1 internalmode maybecatstr + "" swap 1 internalmode ! maybecatstr swap - "" swap 0 internalmode maybecatstr + "" swap 0 internalmode ! maybecatstr catstr ; @@ -107,7 +147,7 @@ catstr copy_past_newline catstr - "" swap 0 internalmode maybecatstr + "" swap 0 internalmode ! maybecatstr ; : ENUMEQX ENUMEQ catstr ; : ENUMDOC @@ -117,19 +157,17 @@ "\n{* " swap catstr " *}\n" catstr translatecomments - discard it if we're doing internal mode - "" swap 0 internalmode maybecatstr + "" swap 0 internalmode ! maybecatstr swap catstr catstr ; -: ENDDD external ; : SECTION ignore ; : SUBSECTION ignore ; : SUBSUBSECTION ignore ; -: INTERNAL_DEFINITION internal ; -: DESCRIPTION ignore ; -: FUNCTION external ; -: RETURNS ignore ; -: TYPEDEF external ; -: INTERNAL_FUNCTION internal ; -: INTERNAL internal ; : INODE ignore ; +: DESCRIPTION ignore ; +: ENDDD EXTERNAL ; +: FUNCTION EXTERNAL ; +: INTERNAL_FUNCTION INTERNAL ; +: DEFINITION EXTERNAL ; +: INTERNAL_DEFINITION INTERNAL ; diff --git a/bfd/doc/reloc.texi b/bfd/doc/reloc.texi index a83135667..f84b5755c 100644 --- a/bfd/doc/reloc.texi +++ b/bfd/doc/reloc.texi @@ -24,41 +24,7 @@ This is the structure of a relocation entry: @example - -typedef enum bfd_reloc_status -@{ - /* No errors detected. Note - the value 2 is used so that it - will not be mistaken for the boolean TRUE or FALSE values. */ - bfd_reloc_ok = 2, - - /* The relocation was performed, but there was an overflow. */ - bfd_reloc_overflow, - - /* The address to relocate was not within the section supplied. */ - bfd_reloc_outofrange, - - /* Used by special functions. */ - bfd_reloc_continue, - - /* Unsupported relocation size requested. */ - bfd_reloc_notsupported, - - /* Target specific meaning. */ - bfd_reloc_other, - - /* The symbol to relocate against was undefined. */ - bfd_reloc_undefined, - - /* The relocation was performed, but may not be ok. If this type is - returned, the error_message argument to bfd_perform_relocation - will be set. */ - bfd_reloc_dangerous - @} - bfd_reloc_status_type; - -typedef const struct reloc_howto_struct reloc_howto_type; - -typedef struct reloc_cache_entry +struct reloc_cache_entry @{ /* A pointer into the canonical table of pointers. */ struct bfd_symbol **sym_ptr_ptr; @@ -72,11 +38,9 @@ typedef struct reloc_cache_entry /* Pointer to how to perform the required relocation. */ reloc_howto_type *howto; -@} -arelent; +@}; @end example -@strong{Description}@* Here is a description of each of the fields within an @code{arelent}: @itemize @bullet @@ -231,7 +195,6 @@ performing a relocation. @example - enum complain_overflow @{ /* Do not complain on overflow. */ @@ -250,6 +213,7 @@ enum complain_overflow unsigned number. */ complain_overflow_unsigned @}; + @end example @subsubsection @code{reloc_howto_type} The @code{reloc_howto_type} is a structure which contains all the @@ -314,6 +278,11 @@ struct reloc_howto_struct empty (e.g., ELF); this flag signals the fact. */ unsigned int pcrel_offset:1; + /* Whether bfd_install_relocation should just install the addend, + or should follow the practice of some older object formats and + install a value including the symbol. */ + unsigned int install_addend:1; + /* src_mask selects the part of the instruction (or data) to be used in the relocation sum. If the target relocations don't have an addend in the reloc, eg. ELF USE_REL, src_mask will normally equal @@ -342,18 +311,18 @@ struct reloc_howto_struct @end example @findex The HOWTO Macro @subsubsection @code{The HOWTO Macro} -@strong{Description}@* The HOWTO macro fills in a reloc_howto_type (a typedef for const struct reloc_howto_struct). @example +#define HOWTO_INSTALL_ADDEND 0 #define HOWTO_RSIZE(sz) ((sz) < 0 ? -(sz) : (sz)) #define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ inplace, src_mask, dst_mask, pcrel_off) \ @{ (unsigned) type, HOWTO_RSIZE (size), bits, right, left, ovf, \ - size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name @} + size < 0, pcrel, inplace, pcrel_off, HOWTO_INSTALL_ADDEND, \ + src_mask, dst_mask, func, name @} @end example -@strong{Description}@* This is used to fill in an empty howto entry in an array. @example #define EMPTY_HOWTO(C) \ @@ -370,7 +339,6 @@ bfd_get_reloc_size (reloc_howto_type *howto) @findex arelent_chain @subsubsection @code{arelent_chain} -@strong{Description}@* How relocs are tied together in an @code{asection}: @example typedef struct relent_chain @@ -384,49 +352,24 @@ arelent_chain; @findex bfd_check_overflow @subsubsection @code{bfd_check_overflow} -@strong{Synopsis} -@example -bfd_reloc_status_type bfd_check_overflow - (enum complain_overflow how, - unsigned int bitsize, - unsigned int rightshift, - unsigned int addrsize, - bfd_vma relocation); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_reloc_status_type bfd_check_overflow (enum complain_overflow how, unsigned int bitsize, unsigned int rightshift, unsigned int addrsize, bfd_vma relocation); Perform overflow checking on @var{relocation} which has @var{bitsize} significant bits and will be shifted right by @var{rightshift} bits, on a machine with addresses containing @var{addrsize} significant bits. The result is either of @code{bfd_reloc_ok} or @code{bfd_reloc_overflow}. +@end deftypefn @findex bfd_reloc_offset_in_range @subsubsection @code{bfd_reloc_offset_in_range} -@strong{Synopsis} -@example -bool bfd_reloc_offset_in_range - (reloc_howto_type *howto, - bfd *abfd, - asection *section, - bfd_size_type offset); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, asection *section, bfd_size_type offset); Returns TRUE if the reloc described by @var{HOWTO} can be applied at @var{OFFSET} octets in @var{SECTION}. +@end deftypefn @findex bfd_perform_relocation @subsubsection @code{bfd_perform_relocation} -@strong{Synopsis} -@example -bfd_reloc_status_type bfd_perform_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, - asection *input_section, - bfd *output_bfd, - char **error_message); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, void *data, asection *input_section, bfd *output_bfd, char **error_message); If @var{output_bfd} is supplied to this function, the generated image will be relocatable; the relocations are copied to the output file after they have been changed to @@ -442,18 +385,10 @@ types with addends were invented to solve just this problem. The @var{error_message} argument is set to an error message if this return @code{bfd_reloc_dangerous}. +@end deftypefn @findex bfd_install_relocation @subsubsection @code{bfd_install_relocation} -@strong{Synopsis} -@example -bfd_reloc_status_type bfd_install_relocation - (bfd *abfd, - arelent *reloc_entry, - void *data, bfd_vma data_start, - asection *input_section, - char **error_message); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_reloc_status_type bfd_install_relocation (bfd *abfd, arelent *reloc_entry, void *data, bfd_vma data_start, asection *input_section, char **error_message); This looks remarkably like @code{bfd_perform_relocation}, except it does not expect that the section contents have been filled in. I.e., it's suitable for use when creating, rather than applying @@ -462,6 +397,7 @@ a relocation. For now, this function should be considered reserved for the assembler. +@end deftypefn @node howto manager, , typedef arelent, Relocations @subsection The howto manager @@ -469,9 +405,8 @@ When an application wants to create a relocation, but doesn't know what the target machine might call it, it can find out by using this bit of code. -@findex bfd_reloc_code_type -@subsubsection @code{bfd_reloc_code_type} -@strong{Description}@* +@findex bfd_reloc_code_real_type +@subsubsection @code{bfd_reloc_code_real_type} The insides of a reloc code. The idea is that, eventually, there will be one enumerator for every type of relocation we ever do. Pass one of these values to @code{bfd_reloc_type_lookup}, and it'll @@ -2662,6 +2597,8 @@ number for the SBIC, SBIS, SBI and CBI instructions @deffnx {} BFD_RELOC_RISCV_SET16 @deffnx {} BFD_RELOC_RISCV_SET32 @deffnx {} BFD_RELOC_RISCV_32_PCREL +@deffnx {} BFD_RELOC_RISCV_SET_ULEB128 +@deffnx {} BFD_RELOC_RISCV_SUB_ULEB128 RISC-V relocations. @end deffn @deffn {} BFD_RELOC_RL78_NEG8 @@ -3755,6 +3692,106 @@ This is a 64 bit reloc that stores the 32 bit offset value in two words (with an imm instruction). The relocation is relative offset from start of TEXT. @end deffn +@deffn {} BFD_RELOC_KVX_RELOC_START +KVX pseudo relocation code to mark the start of the KVX +relocation enumerators. N.B. the order of the enumerators is +important as several tables in the KVX bfd backend are indexed +by these enumerators; make sure they are all synced."; +@end deffn +@deffn {} BFD_RELOC_KVX_NONE +KVX null relocation code. +@end deffn +@deffn {} BFD_RELOC_KVX_16 +@deffnx {} BFD_RELOC_KVX_32 +@deffnx {} BFD_RELOC_KVX_64 +@deffnx {} BFD_RELOC_KVX_S16_PCREL +@deffnx {} BFD_RELOC_KVX_PCREL17 +@deffnx {} BFD_RELOC_KVX_PCREL27 +@deffnx {} BFD_RELOC_KVX_32_PCREL +@deffnx {} BFD_RELOC_KVX_S37_PCREL_LO10 +@deffnx {} BFD_RELOC_KVX_S37_PCREL_UP27 +@deffnx {} BFD_RELOC_KVX_S43_PCREL_LO10 +@deffnx {} BFD_RELOC_KVX_S43_PCREL_UP27 +@deffnx {} BFD_RELOC_KVX_S43_PCREL_EX6 +@deffnx {} BFD_RELOC_KVX_S64_PCREL_LO10 +@deffnx {} BFD_RELOC_KVX_S64_PCREL_UP27 +@deffnx {} BFD_RELOC_KVX_S64_PCREL_EX27 +@deffnx {} BFD_RELOC_KVX_64_PCREL +@deffnx {} BFD_RELOC_KVX_S16 +@deffnx {} BFD_RELOC_KVX_S32_LO5 +@deffnx {} BFD_RELOC_KVX_S32_UP27 +@deffnx {} BFD_RELOC_KVX_S37_LO10 +@deffnx {} BFD_RELOC_KVX_S37_UP27 +@deffnx {} BFD_RELOC_KVX_S37_GOTOFF_LO10 +@deffnx {} BFD_RELOC_KVX_S37_GOTOFF_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOTOFF_LO10 +@deffnx {} BFD_RELOC_KVX_S43_GOTOFF_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOTOFF_EX6 +@deffnx {} BFD_RELOC_KVX_32_GOTOFF +@deffnx {} BFD_RELOC_KVX_64_GOTOFF +@deffnx {} BFD_RELOC_KVX_32_GOT +@deffnx {} BFD_RELOC_KVX_S37_GOT_LO10 +@deffnx {} BFD_RELOC_KVX_S37_GOT_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOT_LO10 +@deffnx {} BFD_RELOC_KVX_S43_GOT_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOT_EX6 +@deffnx {} BFD_RELOC_KVX_64_GOT +@deffnx {} BFD_RELOC_KVX_GLOB_DAT +@deffnx {} BFD_RELOC_KVX_COPY +@deffnx {} BFD_RELOC_KVX_JMP_SLOT +@deffnx {} BFD_RELOC_KVX_RELATIVE +@deffnx {} BFD_RELOC_KVX_S43_LO10 +@deffnx {} BFD_RELOC_KVX_S43_UP27 +@deffnx {} BFD_RELOC_KVX_S43_EX6 +@deffnx {} BFD_RELOC_KVX_S64_LO10 +@deffnx {} BFD_RELOC_KVX_S64_UP27 +@deffnx {} BFD_RELOC_KVX_S64_EX27 +@deffnx {} BFD_RELOC_KVX_S37_GOTADDR_LO10 +@deffnx {} BFD_RELOC_KVX_S37_GOTADDR_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOTADDR_LO10 +@deffnx {} BFD_RELOC_KVX_S43_GOTADDR_UP27 +@deffnx {} BFD_RELOC_KVX_S43_GOTADDR_EX6 +@deffnx {} BFD_RELOC_KVX_S64_GOTADDR_LO10 +@deffnx {} BFD_RELOC_KVX_S64_GOTADDR_UP27 +@deffnx {} BFD_RELOC_KVX_S64_GOTADDR_EX27 +@deffnx {} BFD_RELOC_KVX_64_DTPMOD +@deffnx {} BFD_RELOC_KVX_64_DTPOFF +@deffnx {} BFD_RELOC_KVX_S37_TLS_DTPOFF_LO10 +@deffnx {} BFD_RELOC_KVX_S37_TLS_DTPOFF_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_DTPOFF_LO10 +@deffnx {} BFD_RELOC_KVX_S43_TLS_DTPOFF_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_DTPOFF_EX6 +@deffnx {} BFD_RELOC_KVX_S37_TLS_GD_LO10 +@deffnx {} BFD_RELOC_KVX_S37_TLS_GD_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_GD_LO10 +@deffnx {} BFD_RELOC_KVX_S43_TLS_GD_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_GD_EX6 +@deffnx {} BFD_RELOC_KVX_S37_TLS_LD_LO10 +@deffnx {} BFD_RELOC_KVX_S37_TLS_LD_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LD_LO10 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LD_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LD_EX6 +@deffnx {} BFD_RELOC_KVX_64_TPOFF +@deffnx {} BFD_RELOC_KVX_S37_TLS_IE_LO10 +@deffnx {} BFD_RELOC_KVX_S37_TLS_IE_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_IE_LO10 +@deffnx {} BFD_RELOC_KVX_S43_TLS_IE_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_IE_EX6 +@deffnx {} BFD_RELOC_KVX_S37_TLS_LE_LO10 +@deffnx {} BFD_RELOC_KVX_S37_TLS_LE_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LE_LO10 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LE_UP27 +@deffnx {} BFD_RELOC_KVX_S43_TLS_LE_EX6 +@deffnx {} BFD_RELOC_KVX_8 +KVX Relocations. +@end deffn +@deffn {} BFD_RELOC_KVX_RELOC_END +KVX pseudo relocation code to mark the end of the KVX +relocation enumerators that have direct mapping to ELF reloc codes. +There are a few more enumerators after this one; those are mainly +used by the KVX assembler for the internal fixup or to select +one of the above enumerators. +@end deffn @deffn {} BFD_RELOC_AARCH64_RELOC_START AArch64 pseudo relocation code to mark the start of the AArch64 relocation enumerators. N.B. the order of the enumerators is @@ -4404,10 +4441,9 @@ Tilera TILEPro Relocations. Tilera TILE-Gx Relocations. @end deffn @deffn {} BFD_RELOC_BPF_64 -@deffnx {} BFD_RELOC_BPF_32 -@deffnx {} BFD_RELOC_BPF_16 -@deffnx {} BFD_RELOC_BPF_DISP16 @deffnx {} BFD_RELOC_BPF_DISP32 +@deffnx {} BFD_RELOC_BPF_DISPCALL32 +@deffnx {} BFD_RELOC_BPF_DISP16 Linux eBPF relocations. @end deffn @deffn {} BFD_RELOC_EPIPHANY_SIMM8 @@ -4602,135 +4638,90 @@ S12Z relocations. @deffnx {} BFD_RELOC_LARCH_TLS_GD_HI20 @deffnx {} BFD_RELOC_LARCH_32_PCREL @deffnx {} BFD_RELOC_LARCH_RELAX +@deffnx {} BFD_RELOC_LARCH_DELETE +@deffnx {} BFD_RELOC_LARCH_ALIGN +@deffnx {} BFD_RELOC_LARCH_PCREL20_S2 +@deffnx {} BFD_RELOC_LARCH_CFA +@deffnx {} BFD_RELOC_LARCH_ADD6 +@deffnx {} BFD_RELOC_LARCH_SUB6 +@deffnx {} BFD_RELOC_LARCH_ADD_ULEB128 +@deffnx {} BFD_RELOC_LARCH_SUB_ULEB128 +@deffnx {} BFD_RELOC_LARCH_64_PCREL LARCH relocations. @end deffn @example - typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; + @end example @findex bfd_reloc_type_lookup @subsubsection @code{bfd_reloc_type_lookup} -@strong{Synopsis} -@example -reloc_howto_type *bfd_reloc_type_lookup - (bfd *abfd, bfd_reloc_code_real_type code); -reloc_howto_type *bfd_reloc_name_lookup - (bfd *abfd, const char *reloc_name); -@end example -@strong{Description}@* +@deftypefn {Function} reloc_howto_type *bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); reloc_howto_type *bfd_reloc_name_lookup (bfd *abfd, const char *reloc_name); Return a pointer to a howto structure which, when invoked, will perform the relocation @var{code} on data from the architecture noted. +@end deftypefn @findex bfd_default_reloc_type_lookup @subsubsection @code{bfd_default_reloc_type_lookup} -@strong{Synopsis} -@example -reloc_howto_type *bfd_default_reloc_type_lookup - (bfd *abfd, bfd_reloc_code_real_type code); -@end example -@strong{Description}@* +@deftypefn {Function} reloc_howto_type *bfd_default_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); Provides a default relocation lookup routine for any architecture. +@end deftypefn @findex bfd_get_reloc_code_name @subsubsection @code{bfd_get_reloc_code_name} -@strong{Synopsis} -@example -const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); Provides a printable name for the supplied relocation code. Useful mainly for printing error messages. +@end deftypefn @findex bfd_generic_relax_section @subsubsection @code{bfd_generic_relax_section} -@strong{Synopsis} -@example -bool bfd_generic_relax_section - (bfd *abfd, - asection *section, - struct bfd_link_info *, - bool *); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_relax_section (bfd *abfd, asection *section, struct bfd_link_info *, bool *); Provides default handling for relaxing for back ends which don't do relaxing. +@end deftypefn @findex bfd_generic_gc_sections @subsubsection @code{bfd_generic_gc_sections} -@strong{Synopsis} -@example -bool bfd_generic_gc_sections - (bfd *, struct bfd_link_info *); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_gc_sections (bfd *, struct bfd_link_info *); Provides default handling for relaxing for back ends which don't do section gc -- i.e., does nothing. +@end deftypefn @findex bfd_generic_lookup_section_flags @subsubsection @code{bfd_generic_lookup_section_flags} -@strong{Synopsis} -@example -bool bfd_generic_lookup_section_flags - (struct bfd_link_info *, struct flag_info *, asection *); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *); Provides default handling for section flags lookup -- i.e., does nothing. Returns FALSE if the section should be omitted, otherwise TRUE. +@end deftypefn @findex bfd_generic_merge_sections @subsubsection @code{bfd_generic_merge_sections} -@strong{Synopsis} -@example -bool bfd_generic_merge_sections - (bfd *, struct bfd_link_info *); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_merge_sections (bfd *, struct bfd_link_info *); Provides default handling for SEC_MERGE section merging for back ends which don't have SEC_MERGE support -- i.e., does nothing. +@end deftypefn @findex bfd_generic_get_relocated_section_contents @subsubsection @code{bfd_generic_get_relocated_section_contents} -@strong{Synopsis} -@example -bfd_byte *bfd_generic_get_relocated_section_contents - (bfd *abfd, - struct bfd_link_info *link_info, - struct bfd_link_order *link_order, - bfd_byte *data, - bool relocatable, - asymbol **symbols); -@end example -@strong{Description}@* +@deftypefn {Function} bfd_byte *bfd_generic_get_relocated_section_contents (bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, bool relocatable, asymbol **symbols); Provides default handling of relocation effort for back ends which can't be bothered to do it efficiently. +@end deftypefn @findex _bfd_generic_set_reloc @subsubsection @code{_bfd_generic_set_reloc} -@strong{Synopsis} -@example -void _bfd_generic_set_reloc - (bfd *abfd, - sec_ptr section, - arelent **relptr, - unsigned int count); -@end example -@strong{Description}@* +@deftypefn {Function} void _bfd_generic_set_reloc (bfd *abfd, sec_ptr section, arelent **relptr, unsigned int count); Installs a new set of internal relocations in SECTION. +@end deftypefn @findex _bfd_unrecognized_reloc @subsubsection @code{_bfd_unrecognized_reloc} -@strong{Synopsis} -@example -bool _bfd_unrecognized_reloc - (bfd * abfd, - sec_ptr section, - unsigned int r_type); -@end example -@strong{Description}@* +@deftypefn {Function} bool _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type); Reports an unrecognized reloc. Written as a function in order to reduce code duplication. Returns FALSE so that it can be called from a return statement. +@end deftypefn diff --git a/bfd/doc/section.texi b/bfd/doc/section.texi index 9b986377b..4193fd40c 100644 --- a/bfd/doc/section.texi +++ b/bfd/doc/section.texi @@ -103,7 +103,6 @@ Here is the section structure: @example - typedef struct bfd_section @{ /* The name of the section; the name isn't a copy, the pointer is @@ -305,6 +304,9 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section has the SHF_X86_64_LARGE flag. This is ELF x86-64 only. */ +#define SEC_ELF_LARGE 0x10000000 + /* Conditionally link this section; do not link if there are no references found to any symbol in the section. This is for TI TMS320C54X only. */ @@ -452,7 +454,7 @@ typedef struct bfd_section /* If the SEC_IN_MEMORY flag is set, this points to the actual contents. */ - unsigned char *contents; + bfd_byte *contents; /* Attached line number information. */ alent *lineno; @@ -508,194 +510,6 @@ typedef struct bfd_section @} asection; -static inline const char * -bfd_section_name (const asection *sec) -@{ - return sec->name; -@} - -static inline bfd_size_type -bfd_section_size (const asection *sec) -@{ - return sec->size; -@} - -static inline bfd_vma -bfd_section_vma (const asection *sec) -@{ - return sec->vma; -@} - -static inline bfd_vma -bfd_section_lma (const asection *sec) -@{ - return sec->lma; -@} - -static inline unsigned int -bfd_section_alignment (const asection *sec) -@{ - return sec->alignment_power; -@} - -static inline flagword -bfd_section_flags (const asection *sec) -@{ - return sec->flags; -@} - -static inline void * -bfd_section_userdata (const asection *sec) -@{ - return sec->userdata; -@} -static inline bool -bfd_is_com_section (const asection *sec) -@{ - return (sec->flags & SEC_IS_COMMON) != 0; -@} - -/* Note: the following are provided as inline functions rather than macros - 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 bool -bfd_set_section_userdata (asection *sec, void *val) -@{ - sec->userdata = val; - return true; -@} - -static inline bool -bfd_set_section_vma (asection *sec, bfd_vma val) -@{ - sec->vma = sec->lma = val; - sec->user_set_vma = true; - return true; -@} - -static inline bool -bfd_set_section_lma (asection *sec, bfd_vma val) -@{ - sec->lma = val; - return true; -@} - -static inline bool -bfd_set_section_alignment (asection *sec, unsigned int val) -@{ - if (val >= sizeof (bfd_vma) * 8 - 1) - return false; - sec->alignment_power = val; - return true; -@} - -/* These sections are global, and are managed by BFD. The application - and target back end are not permitted to change the values in - these sections. */ -extern asection _bfd_std_section[4]; - -#define BFD_ABS_SECTION_NAME "*ABS*" -#define BFD_UND_SECTION_NAME "*UND*" -#define BFD_COM_SECTION_NAME "*COM*" -#define BFD_IND_SECTION_NAME "*IND*" - -/* Pointer to the common section. */ -#define bfd_com_section_ptr (&_bfd_std_section[0]) -/* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&_bfd_std_section[1]) -/* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&_bfd_std_section[2]) -/* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&_bfd_std_section[3]) - -static inline bool -bfd_is_und_section (const asection *sec) -@{ - return sec == bfd_und_section_ptr; -@} - -static inline bool -bfd_is_abs_section (const asection *sec) -@{ - return sec == bfd_abs_section_ptr; -@} - -static inline bool -bfd_is_ind_section (const asection *sec) -@{ - return sec == bfd_ind_section_ptr; -@} - -static inline bool -bfd_is_const_section (const asection *sec) -@{ - return (sec >= _bfd_std_section - && sec < _bfd_std_section + (sizeof (_bfd_std_section) - / sizeof (_bfd_std_section[0]))); -@} - -/* Return TRUE if input section SEC has been discarded. */ -static inline bool -discarded_section (const asection *sec) -@{ - return (!bfd_is_abs_section (sec) - && bfd_is_abs_section (sec->output_section) - && sec->sec_info_type != SEC_INFO_TYPE_MERGE - && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS); -@} - -#define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \ - /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \ - @{ NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \ - \ - /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ - 0, 0, 1, 0, \ - \ - /* segment_mark, sec_info_type, use_rela_p, */ \ - 0, 0, 0, \ - \ - /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \ - 0, 0, 0, 0, 0, 0, \ - \ - /* vma, lma, size, rawsize, compressed_size, */ \ - 0, 0, 0, 0, 0, \ - \ - /* output_offset, output_section, relocation, orelocation, */ \ - 0, &SEC, NULL, NULL, \ - \ - /* reloc_count, alignment_power, filepos, rel_filepos, */ \ - 0, 0, 0, 0, \ - \ - /* line_filepos, userdata, contents, lineno, lineno_count, */ \ - 0, NULL, NULL, NULL, 0, \ - \ - /* entsize, kept_section, moving_line_filepos, */ \ - 0, NULL, 0, \ - \ - /* target_index, used_by_bfd, constructor_chain, owner, */ \ - 0, NULL, NULL, NULL, \ - \ - /* symbol, symbol_ptr_ptr, */ \ - (struct bfd_symbol *) SYM, &SEC.symbol, \ - \ - /* map_head, map_tail, already_assigned, type */ \ - @{ NULL @}, @{ NULL @}, NULL, 0 \ - \ - @} - -/* We use a macro to initialize the static asymbol structures because - traditional C does not permit us to initialize a union member while - gcc warns if we don't initialize it. - the_bfd, name, value, attr, section [, udata] */ -#ifdef __STDC__ -#define GLOBAL_SYM_INIT(NAME, SECTION) \ - @{ 0, NAME, 0, BSF_SECTION_SYM, SECTION, @{ 0 @}@} -#else -#define GLOBAL_SYM_INIT(NAME, SECTION) \ - @{ 0, NAME, 0, BSF_SECTION_SYM, SECTION @} -#endif - @end example @node section prototypes, , typedef asection, Sections @@ -704,58 +518,38 @@ These are the functions exported by the section handling part of BFD. @findex bfd_section_list_clear @subsubsection @code{bfd_section_list_clear} -@strong{Synopsis} -@example -void bfd_section_list_clear (bfd *); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_section_list_clear (bfd *); Clears the section list, and also resets the section count and hash table entries. +@end deftypefn @findex bfd_get_section_by_name @subsubsection @code{bfd_get_section_by_name} -@strong{Synopsis} -@example -asection *bfd_get_section_by_name (bfd *abfd, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_get_section_by_name (bfd *abfd, const char *name); Return the most recently created section attached to @var{abfd} named @var{name}. Return NULL if no such section exists. +@end deftypefn @findex bfd_get_next_section_by_name @subsubsection @code{bfd_get_next_section_by_name} -@strong{Synopsis} -@example -asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); Given @var{sec} is a section returned by @code{bfd_get_section_by_name}, return the next most recently created section attached to the same BFD with the same name, or if no such section exists in the same BFD and IBFD is non-NULL, the next section with the same name in any input BFD following IBFD. Return NULL on finding no section. +@end deftypefn @findex bfd_get_linker_section @subsubsection @code{bfd_get_linker_section} -@strong{Synopsis} -@example -asection *bfd_get_linker_section (bfd *abfd, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_get_linker_section (bfd *abfd, const char *name); Return the linker created section attached to @var{abfd} named @var{name}. Return NULL if no such section exists. +@end deftypefn @findex bfd_get_section_by_name_if @subsubsection @code{bfd_get_section_by_name_if} -@strong{Synopsis} -@example -asection *bfd_get_section_by_name_if - (bfd *abfd, - const char *name, - bool (*func) (bfd *abfd, asection *sect, void *obj), - void *obj); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_get_section_by_name_if (bfd *abfd, const char *name, bool (*func) (bfd *abfd, asection *sect, void *obj), void *obj); Call the provided function @var{func} for each section attached to the BFD @var{abfd} whose name matches @var{name}, passing @var{obj} as an argument. The function will be called @@ -768,27 +562,20 @@ as if by It returns the first section for which @var{func} returns true, otherwise @code{NULL}. +@end deftypefn @findex bfd_get_unique_section_name @subsubsection @code{bfd_get_unique_section_name} -@strong{Synopsis} -@example -char *bfd_get_unique_section_name - (bfd *abfd, const char *templat, int *count); -@end example -@strong{Description}@* +@deftypefn {Function} char *bfd_get_unique_section_name (bfd *abfd, const char *templat, int *count); Invent a section name that is unique in @var{abfd} by tacking a dot and a digit suffix onto the original @var{templat}. If @var{count} is non-NULL, then it specifies the first number tried as a suffix to generate a unique name. The value pointed to by @var{count} will be incremented in this case. +@end deftypefn @findex bfd_make_section_old_way @subsubsection @code{bfd_make_section_old_way} -@strong{Synopsis} -@example -asection *bfd_make_section_old_way (bfd *abfd, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_make_section_old_way (bfd *abfd, const char *name); Create a new empty section called @var{name} and attach it to the end of the chain of sections for the BFD @var{abfd}. An attempt to create a section with a name which @@ -809,14 +596,10 @@ If output has already started for this BFD. If memory allocation fails. @end itemize +@end deftypefn @findex bfd_make_section_anyway_with_flags @subsubsection @code{bfd_make_section_anyway_with_flags} -@strong{Synopsis} -@example -asection *bfd_make_section_anyway_with_flags - (bfd *abfd, const char *name, flagword flags); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_make_section_anyway_with_flags (bfd *abfd, const char *name, flagword flags); Create a new empty section called @var{name} and attach it to the end of the chain of sections for @var{abfd}. Create a new section even if there is already a section with that name. Also set the attributes of the @@ -831,13 +614,10 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are: @code{bfd_error_no_memory} - If memory allocation fails. @end itemize +@end deftypefn @findex bfd_make_section_anyway @subsubsection @code{bfd_make_section_anyway} -@strong{Synopsis} -@example -asection *bfd_make_section_anyway (bfd *abfd, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_make_section_anyway (bfd *abfd, const char *name); Create a new empty section called @var{name} and attach it to the end of the chain of sections for @var{abfd}. Create a new section even if there is already a section with that name. @@ -851,39 +631,29 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are: @code{bfd_error_no_memory} - If memory allocation fails. @end itemize +@end deftypefn @findex bfd_make_section_with_flags @subsubsection @code{bfd_make_section_with_flags} -@strong{Synopsis} -@example -asection *bfd_make_section_with_flags - (bfd *, const char *name, flagword flags); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_make_section_with_flags (bfd *, const char *name, flagword flags); Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling bfd_set_error ()) without changing the section chain if there is already a section named @var{name}. Also set the attributes of the new section to the value @var{flags}. If there is an error, return @code{NULL} and set @code{bfd_error}. +@end deftypefn @findex bfd_make_section @subsubsection @code{bfd_make_section} -@strong{Synopsis} -@example -asection *bfd_make_section (bfd *, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_make_section (bfd *, const char *name); Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling bfd_set_error ()) without changing the section chain if there is already a section named @var{name}. If there is an error, return @code{NULL} and set @code{bfd_error}. +@end deftypefn @findex bfd_set_section_flags @subsubsection @code{bfd_set_section_flags} -@strong{Synopsis} -@example -bool bfd_set_section_flags (asection *sec, flagword flags); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_section_flags (asection *sec, flagword flags); Set the attributes of the section @var{sec} to the value @var{flags}. Return @code{TRUE} on success, @code{FALSE} on error. Possible error returns are: @@ -897,26 +667,16 @@ requested. For example, a .bss section in @code{a.out} may not have the @code{SEC_HAS_CONTENTS} field set. @end itemize +@end deftypefn @findex bfd_rename_section @subsubsection @code{bfd_rename_section} -@strong{Synopsis} -@example -void bfd_rename_section - (asection *sec, const char *newname); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_rename_section (asection *sec, const char *newname); Rename section @var{sec} to @var{newname}. +@end deftypefn @findex bfd_map_over_sections @subsubsection @code{bfd_map_over_sections} -@strong{Synopsis} -@example -void bfd_map_over_sections - (bfd *abfd, - void (*func) (bfd *abfd, asection *sect, void *obj), - void *obj); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_map_over_sections (bfd *abfd, void (*func) (bfd *abfd, asection *sect, void *obj), void *obj); Call the provided function @var{func} for each section attached to the BFD @var{abfd}, passing @var{obj} as an argument. The function will be called as if by @@ -934,16 +694,10 @@ alternative would be to use a loop: func (abfd, p, ...) @end example +@end deftypefn @findex bfd_sections_find_if @subsubsection @code{bfd_sections_find_if} -@strong{Synopsis} -@example -asection *bfd_sections_find_if - (bfd *abfd, - bool (*operation) (bfd *abfd, asection *sect, void *obj), - void *obj); -@end example -@strong{Description}@* +@deftypefn {Function} asection *bfd_sections_find_if (bfd *abfd, bool (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); Call the provided function @var{operation} for each section attached to the BFD @var{abfd}, passing @var{obj} as an argument. The function will be called as if by @@ -954,13 +708,10 @@ argument. The function will be called as if by It returns the first section for which @var{operation} returns true. +@end deftypefn @findex bfd_set_section_size @subsubsection @code{bfd_set_section_size} -@strong{Synopsis} -@example -bool bfd_set_section_size (asection *sec, bfd_size_type val); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_section_size (asection *sec, bfd_size_type val); Set @var{sec} to the size @var{val}. If the operation is ok, then @code{TRUE} is returned, else @code{FALSE}. @@ -972,15 +723,10 @@ Possible error returns: Writing has started to the BFD, so setting the size is invalid. @end itemize +@end deftypefn @findex bfd_set_section_contents @subsubsection @code{bfd_set_section_contents} -@strong{Synopsis} -@example -bool bfd_set_section_contents - (bfd *abfd, asection *section, const void *data, - file_ptr offset, bfd_size_type count); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_section_contents (bfd *abfd, asection *section, const void *data, file_ptr offset, bfd_size_type count); Sets the contents of the section @var{section} in BFD @var{abfd} to the data starting in memory at @var{location}. The data is written to the output section starting at offset @@ -1006,15 +752,10 @@ and some more too. This routine is front end to the back end function @code{_bfd_set_section_contents}. +@end deftypefn @findex bfd_get_section_contents @subsubsection @code{bfd_get_section_contents} -@strong{Synopsis} -@example -bool bfd_get_section_contents - (bfd *abfd, asection *section, void *location, file_ptr offset, - bfd_size_type count); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_get_section_contents (bfd *abfd, asection *section, void *location, file_ptr offset, bfd_size_type count); Read data from @var{section} in BFD @var{abfd} into memory starting at @var{location}. The data is read at an offset of @var{offset} from the start of the input section, @@ -1026,25 +767,19 @@ flag set are requested or if the section does not have the with zeroes. If no errors occur, @code{TRUE} is returned, else @code{FALSE}. +@end deftypefn @findex bfd_malloc_and_get_section @subsubsection @code{bfd_malloc_and_get_section} -@strong{Synopsis} -@example -bool bfd_malloc_and_get_section - (bfd *abfd, asection *section, bfd_byte **buf); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_malloc_and_get_section (bfd *abfd, asection *section, bfd_byte **buf); Read all data from @var{section} in BFD @var{abfd} into a buffer, *@var{buf}, malloc'd by this function. +Return @code{true} on success, @code{false} on failure in which +case *@var{buf} will be NULL. +@end deftypefn @findex bfd_copy_private_section_data @subsubsection @code{bfd_copy_private_section_data} -@strong{Synopsis} -@example -bool bfd_copy_private_section_data - (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); Copy private section information from @var{isec} in the BFD @var{ibfd} to the section @var{osec} in the BFD @var{obfd}. Return @code{TRUE} on success, @code{FALSE} on error. Possible error @@ -1062,41 +797,30 @@ Not enough memory exists to create private data for @var{osec}. (ibfd, isection, obfd, osection)) @end example +@end deftypefn @findex bfd_generic_is_group_section @subsubsection @code{bfd_generic_is_group_section} -@strong{Synopsis} -@example -bool bfd_generic_is_group_section (bfd *, const asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_is_group_section (bfd *, const asection *sec); Returns TRUE if @var{sec} is a member of a group. +@end deftypefn @findex bfd_generic_group_name @subsubsection @code{bfd_generic_group_name} -@strong{Synopsis} -@example -const char *bfd_generic_group_name (bfd *, const asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_generic_group_name (bfd *, const asection *sec); Returns group name if @var{sec} is a member of a group. +@end deftypefn @findex bfd_generic_discard_group @subsubsection @code{bfd_generic_discard_group} -@strong{Synopsis} -@example -bool bfd_generic_discard_group (bfd *abfd, asection *group); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_generic_discard_group (bfd *abfd, asection *group); Remove all members of @var{group} from the output. +@end deftypefn @findex _bfd_section_size_insane @subsubsection @code{_bfd_section_size_insane} -@strong{Synopsis} -@example -bool _bfd_section_size_insane (bfd *abfd, asection *sec); -@end example -@strong{Description}@* +@deftypefn {Function} bool _bfd_section_size_insane (bfd *abfd, asection *sec); Returns true if the given section has a size that indicates it cannot be read from file. Return false if the size is OK or* this function can't say one way or the other. +@end deftypefn diff --git a/bfd/doc/syms.texi b/bfd/doc/syms.texi index 7f82edf2b..f1d50a891 100644 --- a/bfd/doc/syms.texi +++ b/bfd/doc/syms.texi @@ -139,7 +139,6 @@ An @code{asymbol} has the form: @example - typedef struct bfd_symbol @{ /* A pointer to the BFD which owns the symbol. This information @@ -294,7 +293,6 @@ asymbol; @findex bfd_get_symtab_upper_bound @subsubsection @code{bfd_get_symtab_upper_bound} -@strong{Description}@* Return the number of bytes required to store a vector of pointers to @code{asymbols} for all the symbols in the BFD @var{abfd}, including a terminal NULL pointer. If there are no symbols in @@ -307,21 +305,14 @@ the BFD, then return 0. If an error occurs, return -1. @findex bfd_is_local_label @subsubsection @code{bfd_is_local_label} -@strong{Synopsis} -@example -bool bfd_is_local_label (bfd *abfd, asymbol *sym); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_is_local_label (bfd *abfd, asymbol *sym); Return TRUE if the given symbol @var{sym} in the BFD @var{abfd} is a compiler generated local label, else return FALSE. +@end deftypefn @findex bfd_is_local_label_name @subsubsection @code{bfd_is_local_label_name} -@strong{Synopsis} -@example -bool bfd_is_local_label_name (bfd *abfd, const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_is_local_label_name (bfd *abfd, const char *name); Return TRUE if a symbol with the name @var{name} in the BFD @var{abfd} is a compiler generated local label, else return FALSE. This just checks whether the name has the form of a @@ -332,13 +323,10 @@ local label. @end example +@end deftypefn @findex bfd_is_target_special_symbol @subsubsection @code{bfd_is_target_special_symbol} -@strong{Synopsis} -@example -bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); Return TRUE iff a symbol @var{sym} in the BFD @var{abfd} is something special to the particular target represented by the BFD. Such symbols should normally not be mentioned to the user. @@ -348,9 +336,9 @@ should normally not be mentioned to the user. @end example +@end deftypefn @findex bfd_canonicalize_symtab @subsubsection @code{bfd_canonicalize_symtab} -@strong{Description}@* Read the symbols from the BFD @var{abfd}, and fills in the vector @var{location} with pointers to the symbols and a trailing NULL. @@ -364,29 +352,21 @@ including the NULL. @findex bfd_set_symtab @subsubsection @code{bfd_set_symtab} -@strong{Synopsis} -@example -bool bfd_set_symtab - (bfd *abfd, asymbol **location, unsigned int count); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); Arrange that when the output BFD @var{abfd} is closed, the table @var{location} of @var{count} pointers to symbols will be written. +@end deftypefn @findex bfd_print_symbol_vandf @subsubsection @code{bfd_print_symbol_vandf} -@strong{Synopsis} -@example -void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); -@end example -@strong{Description}@* +@deftypefn {Function} void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); Print the value and flags of the @var{symbol} supplied to the stream @var{file}. +@end deftypefn @findex bfd_make_empty_symbol @subsubsection @code{bfd_make_empty_symbol} -@strong{Description}@* Create a new @code{asymbol} structure for the BFD @var{abfd} and return a pointer to it. @@ -402,68 +382,49 @@ information, and will cause problems later on. @findex _bfd_generic_make_empty_symbol @subsubsection @code{_bfd_generic_make_empty_symbol} -@strong{Synopsis} -@example -asymbol *_bfd_generic_make_empty_symbol (bfd *); -@end example -@strong{Description}@* +@deftypefn {Function} asymbol *_bfd_generic_make_empty_symbol (bfd *); Create a new @code{asymbol} structure for the BFD @var{abfd} and return a pointer to it. Used by core file routines, binary back-end and anywhere else where no private info is needed. +@end deftypefn @findex bfd_make_debug_symbol @subsubsection @code{bfd_make_debug_symbol} -@strong{Description}@* Create a new @code{asymbol} structure for the BFD @var{abfd}, -to be used as a debugging symbol. Further details of its use have -yet to be worked out. +to be used as a debugging symbol. @example -#define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) +#define bfd_make_debug_symbol(abfd) \ + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd)) @end example @findex bfd_decode_symclass @subsubsection @code{bfd_decode_symclass} -@strong{Description}@* +@deftypefn {Function} int bfd_decode_symclass (asymbol *symbol); Return a character corresponding to the symbol class of @var{symbol}, or '?' for an unknown class. -@strong{Synopsis} -@example -int bfd_decode_symclass (asymbol *symbol); -@end example +@end deftypefn @findex bfd_is_undefined_symclass @subsubsection @code{bfd_is_undefined_symclass} -@strong{Description}@* +@deftypefn {Function} bool bfd_is_undefined_symclass (int symclass); Returns non-zero if the class symbol returned by bfd_decode_symclass represents an undefined symbol. Returns zero otherwise. -@strong{Synopsis} -@example -bool bfd_is_undefined_symclass (int symclass); -@end example +@end deftypefn @findex bfd_symbol_info @subsubsection @code{bfd_symbol_info} -@strong{Description}@* +@deftypefn {Function} void bfd_symbol_info (asymbol *symbol, symbol_info *ret); Fill in the basic info about symbol that nm needs. Additional info may be added by the back-ends after calling this function. -@strong{Synopsis} -@example -void bfd_symbol_info (asymbol *symbol, symbol_info *ret); -@end example +@end deftypefn @findex bfd_copy_private_symbol_data @subsubsection @code{bfd_copy_private_symbol_data} -@strong{Synopsis} -@example -bool bfd_copy_private_symbol_data - (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); Copy private symbol information from @var{isym} in the BFD @var{ibfd} to the symbol @var{osym} in the BFD @var{obfd}. Return @code{TRUE} on success, @code{FALSE} on error. Possible error @@ -482,3 +443,4 @@ Not enough memory exists to create private data for @var{osec}. @end example +@end deftypefn diff --git a/bfd/doc/targets.texi b/bfd/doc/targets.texi index cfbfb51a5..d7b09e4f1 100644 --- a/bfd/doc/targets.texi +++ b/bfd/doc/targets.texi @@ -1,7 +1,6 @@ @section Targets -@strong{Description}@* Each port of BFD to a different machine requires the creation of a target back end. All the back end provides to the root part of BFD is a structure containing pointers to functions @@ -60,7 +59,6 @@ type is tried to see if it recognizes the specified format. @subsection bfd_target -@strong{Description}@* This structure contains everything that BFD knows about a target. It includes things like its byte order, name, and which routines to call to do various operations. @@ -116,43 +114,9 @@ defines one of these. FIXME, these names should be rationalised with the names of the entry points which call them. Too bad we can't have one macro to define them both! -@example -enum bfd_flavour -@{ - /* N.B. Update bfd_flavour_name if you change this. */ - bfd_target_unknown_flavour, - bfd_target_aout_flavour, - bfd_target_coff_flavour, - bfd_target_ecoff_flavour, - bfd_target_xcoff_flavour, - bfd_target_elf_flavour, - bfd_target_tekhex_flavour, - bfd_target_srec_flavour, - bfd_target_verilog_flavour, - bfd_target_ihex_flavour, - bfd_target_som_flavour, - bfd_target_os9k_flavour, - bfd_target_versados_flavour, - bfd_target_msdos_flavour, - bfd_target_ovax_flavour, - bfd_target_evax_flavour, - bfd_target_mmo_flavour, - bfd_target_mach_o_flavour, - bfd_target_pef_flavour, - bfd_target_pef_xlib_flavour, - bfd_target_sym_flavour -@}; - -enum bfd_endian @{ BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN @}; - -/* Forward declaration. */ -typedef struct bfd_link_info _bfd_link_info; - -/* Forward declaration. */ -typedef struct flag_info flag_info; - -typedef void (*bfd_cleanup) (bfd *); + +@example typedef struct bfd_target @{ /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ @@ -234,7 +198,6 @@ typedef struct bfd_target The general target vector. These vectors are initialized using the BFD_JUMP_TABLE macros. @example - /* Generic entry points. */ #define BFD_JUMP_TABLE_GENERIC(NAME) \ NAME##_close_and_cleanup, \ @@ -394,7 +357,7 @@ BFD_JUMP_TABLE macros. 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); + (*_bfd_make_debug_symbol) (bfd *); #define bfd_read_minisymbols(b, d, m, s) \ BFD_SEND (b, _read_minisymbols, (b, d, m, s)) long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *); @@ -643,25 +606,10 @@ bfd_keep_unused_section_symbols (const bfd *abfd) return abfd->xvec->keep_unused_section_symbols; @} -@end example - - -@example -/* Cached _bfd_check_format messages are put in this. */ -struct per_xvec_message -@{ - struct per_xvec_message *next; - char message[]; -@}; - @end example @findex _bfd_per_xvec_warn @subsubsection @code{_bfd_per_xvec_warn} -@strong{Synopsis} -@example -struct per_xvec_message **_bfd_per_xvec_warn (const bfd_target *, size_t); -@end example -@strong{Description}@* +@deftypefn {Function} struct per_xvec_message **_bfd_per_xvec_warn (const bfd_target *, size_t); Return a location for the given target xvec to use for warnings specific to that target. If TARG is NULL, returns the array of per_xvec_message pointers, otherwise if ALLOC is @@ -671,24 +619,18 @@ a new per_xvec_message with space for a string of ALLOC bytes and returns a pointer to a pointer to it. May return a pointer to a NULL pointer on allocation failure. +@end deftypefn @findex bfd_set_default_target @subsubsection @code{bfd_set_default_target} -@strong{Synopsis} -@example -bool bfd_set_default_target (const char *name); -@end example -@strong{Description}@* +@deftypefn {Function} bool bfd_set_default_target (const char *name); Set the default target vector to use when recognizing a BFD. This takes the name of the target, which may be a BFD target name or a configuration triplet. +@end deftypefn @findex bfd_find_target @subsubsection @code{bfd_find_target} -@strong{Synopsis} -@example -const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); Return a pointer to the transfer vector for the object target named @var{target_name}. If @var{target_name} is @code{NULL}, choose the one in the environment variable @code{GNUTARGET}; if @@ -700,17 +642,10 @@ set in the BFD if @var{abfd} isn't @code{NULL}. This causes @code{bfd_check_format} to loop over all the targets to find the one that matches the file being read. +@end deftypefn @findex bfd_get_target_info @subsubsection @code{bfd_get_target_info} -@strong{Synopsis} -@example -const bfd_target *bfd_get_target_info (const char *target_name, - bfd *abfd, - bool *is_bigendian, - int *underscoring, - const char **def_target_arch); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_target *bfd_get_target_info (const char *target_name, bfd *abfd, bool *is_bigendian, int *underscoring, const char **def_target_arch); Return a pointer to the transfer vector for the object target named @var{target_name}. If @var{target_name} is @code{NULL}, choose the one in the environment variable @code{GNUTARGET}; if @@ -730,37 +665,27 @@ else the value of target vector's symbol underscoring. If @var{def_target_arch} is not @code{NULL}, then set it to the architecture string specified by the target_name. +@end deftypefn @findex bfd_target_list @subsubsection @code{bfd_target_list} -@strong{Synopsis} -@example -const char ** bfd_target_list (void); -@end example -@strong{Description}@* +@deftypefn {Function} const char ** bfd_target_list (void); Return a freshly malloced NULL-terminated vector of the names of all the valid BFD targets. Do not modify the names. +@end deftypefn @findex bfd_iterate_over_targets @subsubsection @code{bfd_iterate_over_targets} -@strong{Synopsis} -@example -const bfd_target *bfd_iterate_over_targets - (int (*func) (const bfd_target *, void *), - void *data); -@end example -@strong{Description}@* +@deftypefn {Function} const bfd_target *bfd_iterate_over_targets (int (*func) (const bfd_target *, void *), void *data); Call @var{func} for each target in the list of BFD target vectors, passing @var{data} to @var{func}. Stop iterating if @var{func} returns a non-zero result, and return that target vector. Return NULL if @var{func} always returns zero. +@end deftypefn @findex bfd_flavour_name @subsubsection @code{bfd_flavour_name} -@strong{Synopsis} -@example -const char *bfd_flavour_name (enum bfd_flavour flavour); -@end example -@strong{Description}@* +@deftypefn {Function} const char *bfd_flavour_name (enum bfd_flavour flavour); Return the string form of @var{flavour}. +@end deftypefn diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c index 21849ce83..d7c50eaa0 100644 --- a/bfd/dwarf1.c +++ b/bfd/dwarf1.c @@ -1,5 +1,5 @@ /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line). - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com). @@ -301,13 +301,13 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) bfd_size_type size; msec = bfd_get_section_by_name (stash->abfd, ".line"); - if (! msec) + if (! msec || (msec->flags & SEC_HAS_CONTENTS) == 0) return false; size = msec->rawsize ? msec->rawsize : msec->size; stash->line_section - = bfd_simple_get_relocated_section_contents - (stash->abfd, msec, NULL, stash->syms); + = bfd_simple_get_relocated_section_contents (stash->abfd, msec, NULL, + stash->syms); if (! stash->line_section) return false; @@ -510,7 +510,8 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, return false; msec = bfd_get_section_by_name (abfd, ".debug"); - if (! msec) + if (! msec + || (msec->flags & SEC_HAS_CONTENTS) == 0) /* 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. */ @@ -592,3 +593,15 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, return false; } + +void +_bfd_dwarf1_cleanup_debug_info (bfd *abfd ATTRIBUTE_UNUSED, void **pinfo) +{ + struct dwarf1_debug* stash = *pinfo; + + if (stash == NULL) + return; + + free (stash->debug_section); + free (stash->line_section); +} diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 95f45708e..b135ef091 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1,5 +1,5 @@ /* DWARF 2 support. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions (gavin@cygnus.com). @@ -82,6 +82,7 @@ struct adjusted_section { asection *section; bfd_vma adj_vma; + bfd_vma orig_vma; }; /* A trie to map quickly from address range to compilation unit. @@ -136,7 +137,7 @@ struct trie_leaf struct { struct comp_unit *unit; bfd_vma low_pc, high_pc; - } ranges[TRIE_LEAF_SIZE]; + } ranges[]; }; struct trie_interior @@ -147,7 +148,9 @@ struct trie_interior static struct trie_node *alloc_trie_leaf (bfd *abfd) { - struct trie_leaf *leaf = bfd_zalloc (abfd, sizeof (struct trie_leaf)); + struct trie_leaf *leaf; + size_t amt = sizeof (*leaf) + TRIE_LEAF_SIZE * sizeof (leaf->ranges[0]); + leaf = bfd_zalloc (abfd, amt); if (leaf == NULL) return NULL; leaf->head.num_room_in_leaf = TRIE_LEAF_SIZE; @@ -705,6 +708,14 @@ read_section (bfd *abfd, return false; } + if ((msec->flags & SEC_HAS_CONTENTS) == 0) + { + _bfd_error_handler (_("DWARF error: section %s has no contents"), + section_name); + bfd_set_error (bfd_error_no_contents); + return false; + } + if (_bfd_section_size_insane (abfd, msec)) { /* PR 26946 */ @@ -1412,7 +1423,7 @@ read_indexed_address (uint64_t idx, struct comp_unit *unit) offset += unit->dwarf_addr_offset; if (offset < unit->dwarf_addr_offset || offset > file->dwarf_addr_size - || file->dwarf_addr_size - offset < unit->offset_size) + || file->dwarf_addr_size - offset < unit->addr_size) return 0; info_ptr = file->dwarf_addr_buffer + offset; @@ -2044,18 +2055,16 @@ concat_filename (struct line_info_table *table, unsigned int file) char *subdir_name = NULL; char *name; size_t len; + unsigned int dir = table->files[file].dir; - if (table->files[file].dir - /* PR 17512: file: 0317e960. */ - && table->files[file].dir <= table->num_dirs - /* PR 17512: file: 7f3d2e4b. */ - && table->dirs != NULL) - { - if (table->use_dir_and_file_0) - subdir_name = table->dirs[table->files[file].dir]; - else - subdir_name = table->dirs[table->files[file].dir - 1]; - } + if (!table->use_dir_and_file_0) + --dir; + /* Wrapping from 0 to -1u above gives the intended result with + the test below of leaving subdir_name NULL for pre-DWARF5 dir + of 0. */ + /* PR 17512: file: 0317e960, file: 7f3d2e4b. */ + if (dir < table->num_dirs) + subdir_name = table->dirs[dir]; if (!subdir_name || !IS_ABSOLUTE_PATH (subdir_name)) dir_name = table->comp_dir; @@ -2200,9 +2209,7 @@ insert_arange_in_trie (bfd *abfd, const struct trie_leaf *leaf = (struct trie_leaf *) trie; unsigned int new_room_in_leaf = trie->num_room_in_leaf * 2; struct trie_leaf *new_leaf; - size_t amt = (sizeof (struct trie_leaf) - + ((new_room_in_leaf - TRIE_LEAF_SIZE) - * sizeof (leaf->ranges[0]))); + size_t amt = sizeof (*leaf) + new_room_in_leaf * sizeof (leaf->ranges[0]); new_leaf = bfd_zalloc (abfd, amt); new_leaf->head.num_room_in_leaf = new_room_in_leaf; new_leaf->num_stored_in_leaf = leaf->num_stored_in_leaf; @@ -3441,7 +3448,6 @@ find_abstract_instance (struct comp_unit *unit, struct abbrev_info *abbrev; uint64_t die_ref = attr_ptr->u.val; struct attribute attr; - const char *name = NULL; if (recur_count == 100) { @@ -3602,9 +3608,9 @@ find_abstract_instance (struct comp_unit *unit, case DW_AT_name: /* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name over DW_AT_name. */ - if (name == NULL && is_str_form (&attr)) + if (*pname == NULL && is_str_form (&attr)) { - name = attr.u.str; + *pname = attr.u.str; if (mangle_style (unit->lang) == 0) *is_linkage = true; } @@ -3612,7 +3618,7 @@ find_abstract_instance (struct comp_unit *unit, case DW_AT_specification: if (is_int_form (&attr) && !find_abstract_instance (unit, &attr, recur_count + 1, - &name, is_linkage, + pname, is_linkage, filename_ptr, linenumber_ptr)) return false; break; @@ -3622,7 +3628,7 @@ find_abstract_instance (struct comp_unit *unit, non-string forms into these attributes. */ if (is_str_form (&attr)) { - name = attr.u.str; + *pname = attr.u.str; *is_linkage = true; } break; @@ -3630,8 +3636,11 @@ find_abstract_instance (struct comp_unit *unit, if (!comp_unit_maybe_decode_line_info (unit)) return false; if (is_int_form (&attr)) - *filename_ptr = concat_filename (unit->line_table, - attr.u.val); + { + free (*filename_ptr); + *filename_ptr = concat_filename (unit->line_table, + attr.u.val); + } break; case DW_AT_decl_line: if (is_int_form (&attr)) @@ -3643,7 +3652,6 @@ find_abstract_instance (struct comp_unit *unit, } } } - *pname = name; return true; } @@ -4075,8 +4083,11 @@ scan_unit_for_symbols (struct comp_unit *unit) { case DW_AT_call_file: if (is_int_form (&attr)) - func->caller_file = concat_filename (unit->line_table, - attr.u.val); + { + free (func->caller_file); + func->caller_file = concat_filename (unit->line_table, + attr.u.val); + } break; case DW_AT_call_line: @@ -4139,8 +4150,11 @@ scan_unit_for_symbols (struct comp_unit *unit) case DW_AT_decl_file: if (is_int_form (&attr)) - func->file = concat_filename (unit->line_table, - attr.u.val); + { + free (func->file); + func->file = concat_filename (unit->line_table, + attr.u.val); + } break; case DW_AT_decl_line: @@ -4182,8 +4196,11 @@ scan_unit_for_symbols (struct comp_unit *unit) case DW_AT_decl_file: if (is_int_form (&attr)) - var->file = concat_filename (unit->line_table, - attr.u.val); + { + free (var->file); + var->file = concat_filename (unit->line_table, + attr.u.val); + } break; case DW_AT_decl_line: @@ -4629,21 +4646,20 @@ parse_comp_unit (struct dwarf2_debug *stash, really contains the given address. */ static bool -comp_unit_contains_address (struct comp_unit *unit, bfd_vma addr) +comp_unit_may_contain_address (struct comp_unit *unit, bfd_vma addr) { struct arange *arange; if (unit->error) return false; - arange = &unit->arange; - do - { - if (addr >= arange->low && addr < arange->high) - return true; - arange = arange->next; - } - while (arange); + if (unit->arange.high == 0 /* No ranges have been computed yet. */ + || unit->line_table == NULL) /* The line info table has not been loaded. */ + return true; + + for (arange = &unit->arange; arange != NULL; arange = arange->next) + if (addr >= arange->low && addr < arange->high) + return true; return false; } @@ -4668,6 +4684,7 @@ comp_unit_find_nearest_line (struct comp_unit *unit, *function_ptr = NULL; func_p = lookup_address_in_function_table (unit, addr, function_ptr); + if (func_p && (*function_ptr)->tag == DW_TAG_inlined_subroutine) unit->stash->inliner_chain = *function_ptr; @@ -4831,16 +4848,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections, { look = debug_sections[debug_info].uncompressed_name; msec = bfd_get_section_by_name (abfd, look); - if (msec != NULL) + /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of + course debug sections always have contents. */ + if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0) return msec; look = debug_sections[debug_info].compressed_name; msec = bfd_get_section_by_name (abfd, look); - if (msec != NULL) + if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0) return msec; for (msec = abfd->sections; msec != NULL; msec = msec->next) - if (startswith (msec->name, GNU_LINKONCE_INFO)) + if ((msec->flags & SEC_HAS_CONTENTS) != 0 + && startswith (msec->name, GNU_LINKONCE_INFO)) return msec; return NULL; @@ -4848,6 +4868,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections, for (msec = after_sec->next; msec != NULL; msec = msec->next) { + if ((msec->flags & SEC_HAS_CONTENTS) == 0) + continue; + look = debug_sections[debug_info].uncompressed_name; if (strcmp (msec->name, look) == 0) return msec; @@ -4933,7 +4956,7 @@ unset_sections (struct dwarf2_debug *stash) i = stash->adjusted_section_count; p = stash->adjusted_sections; for (; i > 0; i--, p++) - p->section->vma = 0; + p->section->vma = p->orig_vma; } /* Set VMAs for allocated and .debug_info sections in ORIG_BFD, a @@ -4974,10 +4997,9 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) { int is_debug_info; - if ((sect->output_section != NULL - && sect->output_section != sect - && (sect->flags & SEC_DEBUGGING) == 0) - || sect->vma != 0) + if (sect->output_section != NULL + && sect->output_section != sect + && (sect->flags & SEC_DEBUGGING) == 0) continue; is_debug_info = (strcmp (sect->name, debug_info_name) == 0 @@ -5018,10 +5040,9 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) bfd_size_type sz; int is_debug_info; - if ((sect->output_section != NULL - && sect->output_section != sect - && (sect->flags & SEC_DEBUGGING) == 0) - || sect->vma != 0) + if (sect->output_section != NULL + && sect->output_section != sect + && (sect->flags & SEC_DEBUGGING) == 0) continue; is_debug_info = (strcmp (sect->name, debug_info_name) == 0 @@ -5033,24 +5054,17 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) sz = sect->rawsize ? sect->rawsize : sect->size; - if (is_debug_info) - { - BFD_ASSERT (sect->alignment_power == 0); - sect->vma = last_dwarf; - last_dwarf += sz; - } - else - { - /* Align the new address to the current section - alignment. */ - last_vma = ((last_vma - + ~(-((bfd_vma) 1 << sect->alignment_power))) - & (-((bfd_vma) 1 << sect->alignment_power))); - sect->vma = last_vma; - last_vma += sz; - } - p->section = sect; + p->orig_vma = sect->vma; + + bfd_vma *v = is_debug_info ? &last_dwarf : &last_vma; + /* Align the new address to the current section + alignment. */ + bfd_vma mask = -(bfd_vma) 1 << sect->alignment_power; + *v = (*v + ~mask) & mask; + sect->vma = *v; + *v += sz; + p->adj_vma = sect->vma; p++; } @@ -5360,7 +5374,6 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, void **pinfo, bool do_place) { - size_t amt = sizeof (struct dwarf2_debug); bfd_size_type total_size; asection *msec; struct dwarf2_debug *stash = (struct dwarf2_debug *) *pinfo; @@ -5372,7 +5385,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, { /* Check that we did previously find some debug information before attempting to make use of it. */ - if (stash->f.bfd_ptr != NULL) + if (stash->f.dwarf_info_size != 0) { if (do_place && !place_sections (abfd, stash)) return false; @@ -5382,13 +5395,14 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, return false; } _bfd_dwarf2_cleanup_debug_info (abfd, pinfo); - memset (stash, 0, amt); + memset (stash, 0, sizeof (*stash)); } else { - stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt); + stash = (struct dwarf2_debug *) bfd_zalloc (abfd, sizeof (*stash)); if (! stash) return false; + *pinfo = stash; } stash->orig_bfd = abfd; stash->debug_sections = debug_sections; @@ -5414,8 +5428,6 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, if (!stash->alt.trie_root) return false; - *pinfo = stash; - if (debug_bfd == NULL) debug_bfd = abfd; @@ -5464,14 +5476,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, /* 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 - there's more than one, try case two: none of the sections is - compressed. In that case, read them all in and produce one - large stash. We do this in two passes - in the first pass we + there's more than one, try case two: read them all in and produce + one large stash. We do this in two passes - in the first pass we just accumulate the section sizes, and in the second pass we read in the section's contents. (The allows us to avoid - reallocing the data as we add sections to the stash.) If - some or all sections are compressed, then do things the slow - way, with a bunch of reallocs. */ + reallocing the data as we add sections to the stash.) */ if (! find_debug_info (debug_bfd, debug_sections, msec)) { @@ -5480,7 +5489,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; + goto restore_vma; } else { @@ -5490,19 +5499,19 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, msec = find_debug_info (debug_bfd, debug_sections, msec)) { if (_bfd_section_size_insane (debug_bfd, msec)) - return false; + goto restore_vma; /* Catch PR25070 testcase overflowing size calculation here. */ if (total_size + msec->size < total_size) { bfd_set_error (bfd_error_no_memory); - return false; + goto restore_vma; } total_size += msec->size; } stash->f.dwarf_info_buffer = (bfd_byte *) bfd_malloc (total_size); if (stash->f.dwarf_info_buffer == NULL) - return false; + goto restore_vma; total_size = 0; for (msec = find_debug_info (debug_bfd, debug_sections, NULL); @@ -5518,7 +5527,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; + goto restore_vma; total_size += size; } @@ -5527,6 +5536,10 @@ _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; + + restore_vma: + unset_sections (stash); + return false; } /* Parse the next DWARF2 compilation unit at FILE->INFO_PTR. */ @@ -5880,8 +5893,7 @@ _bfd_dwarf2_find_nearest_line_with_alt /* Check the previously read comp. units first. */ for (each = stash->f.all_comp_units; each; each = each->next_unit) if ((symbol->flags & BSF_FUNCTION) == 0 - || each->arange.high == 0 - || comp_unit_contains_address (each, addr)) + || comp_unit_may_contain_address (each, addr)) { found = comp_unit_find_line (each, symbol, addr, filename_ptr, linenumber_ptr); @@ -5963,13 +5975,11 @@ _bfd_dwarf2_find_nearest_line_with_alt address. */ if (do_line) found = (((symbol->flags & BSF_FUNCTION) == 0 - || each->arange.high == 0 - || comp_unit_contains_address (each, addr)) + || comp_unit_may_contain_address (each, addr)) && comp_unit_find_line (each, symbol, addr, filename_ptr, linenumber_ptr)); else - found = ((each->arange.high == 0 - || comp_unit_contains_address (each, addr)) + found = (comp_unit_may_contain_address (each, addr) && comp_unit_find_nearest_line (each, addr, filename_ptr, &function, @@ -6020,8 +6030,7 @@ _bfd_dwarf2_find_nearest_line_with_alt } } - if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0) - unset_sections (stash); + unset_sections (stash); return found; } @@ -6129,6 +6138,82 @@ _bfd_dwarf2_cleanup_debug_info (bfd *abfd, void **pinfo) bfd_close (stash->alt.bfd_ptr); } +typedef struct elf_find_function_cache +{ + asection * last_section; + asymbol * func; + const char * filename; + bfd_size_type code_size; + bfd_vma code_off; + +} elf_find_function_cache; + + +/* Returns TRUE if symbol SYM with address CODE_OFF and size CODE_SIZE + is a better fit to match OFFSET than whatever is currenly stored in + CACHE. */ + +static inline bool +better_fit (elf_find_function_cache * cache, + asymbol * sym, + bfd_vma code_off, + bfd_size_type code_size, + bfd_vma offset) +{ + /* If the symbol is beyond the desired offset, ignore it. */ + if (code_off > offset) + return false; + + /* If the symbol is further away from the desired + offset than our current best, then ignore it. */ + if (code_off < cache->code_off) + return false; + + /* On the other hand, if it is closer, then use it. */ + if (code_off > cache->code_off) + return true; + + /* assert (code_off == cache->code_off); */ + + /* If our current best fit does not actually reach the desired + offset... */ + if (cache->code_off + cache->code_size <= offset) + /* ... then return whichever candidate covers + more area and hence gets closer to OFFSET. */ + return code_size > cache->code_size; + + /* The current cache'd symbol covers OFFSET. */ + + /* If the new symbol does not cover the desired offset then skip it. */ + if (code_off + code_size <= offset) + return false; + + /* Both symbols cover OFFSET. */ + + /* Prefer functions over non-functions. */ + flagword cache_flags = cache->func->flags; + flagword sym_flags = sym->flags; + + if ((cache_flags & BSF_FUNCTION) && ((sym_flags & BSF_FUNCTION) == 0)) + return false; + if ((sym_flags & BSF_FUNCTION) && ((cache_flags & BSF_FUNCTION) == 0)) + return true; + + /* FIXME: Should we choose LOCAL over GLOBAL ? */ + + /* Prefer typed symbols over notyped. */ + int cache_type = ELF_ST_TYPE (((elf_symbol_type *) cache->func)->internal_elf_sym.st_info); + int sym_type = ELF_ST_TYPE (((elf_symbol_type *) sym)->internal_elf_sym.st_info); + + if (cache_type == STT_NOTYPE && sym_type != STT_NOTYPE) + return true; + if (cache_type != STT_NOTYPE && sym_type == STT_NOTYPE) + return false; + + /* Otherwise choose whichever symbol covers a smaller area. */ + return code_size < cache->code_size; +} + /* Find the function to a particular section and offset, for error reporting. */ @@ -6140,21 +6225,14 @@ _bfd_elf_find_function (bfd *abfd, const char **filename_ptr, const char **functionname_ptr) { - struct elf_find_function_cache - { - asection *last_section; - asymbol *func; - const char *filename; - bfd_size_type func_size; - } *cache; - if (symbols == NULL) return NULL; if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) return NULL; - cache = elf_tdata (abfd)->elf_find_function_cache; + elf_find_function_cache * cache = elf_tdata (abfd)->elf_find_function_cache; + if (cache == NULL) { cache = bfd_zalloc (abfd, sizeof (*cache)); @@ -6162,13 +6240,13 @@ _bfd_elf_find_function (bfd *abfd, if (cache == NULL) return NULL; } + if (cache->last_section != section || cache->func == NULL || offset < cache->func->value - || offset >= cache->func->value + cache->func_size) + || offset >= cache->func->value + cache->code_size) { asymbol *file; - bfd_vma low_func; asymbol **p; /* ??? Given multiple file symbols, it is impossible to reliably choose the right file name for global symbols. File symbols are @@ -6182,11 +6260,11 @@ _bfd_elf_find_function (bfd *abfd, const struct elf_backend_data *bed = get_elf_backend_data (abfd); file = NULL; - low_func = 0; state = nothing_seen; cache->filename = NULL; cache->func = NULL; - cache->func_size = 0; + cache->code_size = 0; + cache->code_off = 0; cache->last_section = section; for (p = symbols; *p != NULL; p++) @@ -6203,24 +6281,36 @@ _bfd_elf_find_function (bfd *abfd, continue; } + if (state == nothing_seen) + state = symbol_seen; + size = bed->maybe_function_sym (sym, section, &code_off); - if (size != 0 - && code_off <= offset - && (code_off > low_func - || (code_off == low_func - && size > cache->func_size))) + + if (size == 0) + continue; + + if (better_fit (cache, sym, code_off, size, offset)) { cache->func = sym; - cache->func_size = size; + cache->code_size = size; + cache->code_off = code_off; cache->filename = NULL; - low_func = code_off; + if (file != NULL && ((sym->flags & BSF_LOCAL) != 0 || state != file_after_symbol_seen)) cache->filename = bfd_asymbol_name (file); } - if (state == nothing_seen) - state = symbol_seen; + /* Otherwise, if the symbol is beyond the desired offset but it + lies within the bounds of the current best match then reduce + the size of the current best match so that future searches + will not not used the cached symbol by mistake. */ + else if (code_off > offset + && code_off > cache->code_off + && code_off < cache->code_off + cache->code_size) + { + cache->code_size = code_off - cache->code_off; + } } } diff --git a/bfd/ecoff-bfd.h b/bfd/ecoff-bfd.h index d43907361..cd7ded909 100644 --- a/bfd/ecoff-bfd.h +++ b/bfd/ecoff-bfd.h @@ -1,5 +1,5 @@ /* Externally visible ECOFF routines. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 2d26b855e..844f1a524 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -1,5 +1,5 @@ /* Generic ECOFF (Extended-COFF) routines. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -109,6 +109,26 @@ _bfd_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr) return (void *) ecoff; } +bool +_bfd_ecoff_bfd_free_cached_info (bfd *abfd) +{ + struct ecoff_tdata *tdata; + + if ((bfd_get_format (abfd) == bfd_object + || bfd_get_format (abfd) == bfd_core) + && (tdata = ecoff_data (abfd)) != NULL) + { + while (tdata->mips_refhi_list != NULL) + { + struct mips_hi *ref = tdata->mips_refhi_list; + tdata->mips_refhi_list = ref->next; + free (ref); + } + _bfd_ecoff_free_ecoff_debug_info (&tdata->debug_info); + } + return _bfd_generic_bfd_free_cached_info (abfd); +} + /* Initialize a new section. */ bool @@ -453,6 +473,23 @@ ecoff_slurp_symbolic_header (bfd *abfd) goto error_return; } +#define FIX(start, count) \ + if (internal_symhdr->start == 0) \ + internal_symhdr->count = 0; + + FIX (cbLineOffset, cbLine); + FIX (cbDnOffset, idnMax); + FIX (cbPdOffset, ipdMax); + FIX (cbSymOffset, isymMax); + FIX (cbOptOffset, ioptMax); + FIX (cbAuxOffset, iauxMax); + FIX (cbSsOffset, issMax); + FIX (cbSsExtOffset, issExtMax); + FIX (cbFdOffset, ifdMax); + FIX (cbRfdOffset, crfd); + FIX (cbExtOffset, iextMax); +#undef FIX + /* Now we can get the correct number of symbols. */ abfd->symcount = internal_symhdr->isymMax + internal_symhdr->iextMax; @@ -490,7 +527,7 @@ _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) + if (debug->alloc_syments) return true; if (ecoff_data (abfd)->sym_filepos == 0) { @@ -512,12 +549,24 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, documented section. And the ordering of the sections varies between statically and dynamically linked executables. If bfd supports SEEK_END someday, this code could be simplified. */ - raw_end = 0; + raw_end = raw_base; #define UPDATE_RAW_END(start, count, size) \ - cb_end = internal_symhdr->start + internal_symhdr->count * (size); \ - if (cb_end > raw_end) \ - raw_end = cb_end + do \ + if (internal_symhdr->count != 0) \ + { \ + if (internal_symhdr->start < raw_base) \ + goto err; \ + if (_bfd_mul_overflow ((unsigned long) internal_symhdr->count, \ + (size), &amt)) \ + goto err; \ + cb_end = internal_symhdr->start + amt; \ + if (cb_end < internal_symhdr->start) \ + goto err; \ + if (cb_end > raw_end) \ + raw_end = cb_end; \ + } \ + while (0) UPDATE_RAW_END (cbLineOffset, cbLine, sizeof (unsigned char)); UPDATE_RAW_END (cbDnOffset, idnMax, backend->debug_swap.external_dnr_size); @@ -549,30 +598,35 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, if (raw == NULL) return false; - ecoff_data (abfd)->raw_syments = raw; + debug->alloc_syments = true; /* Get pointers for the numeric offsets in the HDRR structure. */ -#define FIX(off1, off2, type) \ - if (internal_symhdr->off1 == 0) \ - debug->off2 = NULL; \ - else \ - debug->off2 = (type) ((char *) raw \ - + (internal_symhdr->off1 \ - - raw_base)) - - FIX (cbLineOffset, line, unsigned char *); - FIX (cbDnOffset, external_dnr, void *); - FIX (cbPdOffset, external_pdr, void *); - FIX (cbSymOffset, external_sym, void *); - FIX (cbOptOffset, external_opt, void *); - FIX (cbAuxOffset, external_aux, union aux_ext *); - FIX (cbSsOffset, ss, char *); - FIX (cbSsExtOffset, ssext, char *); - FIX (cbFdOffset, external_fdr, void *); - FIX (cbRfdOffset, external_rfd, void *); - FIX (cbExtOffset, external_ext, void *); +#define FIX(start, count, ptr, type) \ + if (internal_symhdr->count == 0) \ + debug->ptr = NULL; \ + else \ + debug->ptr = (type) ((char *) raw \ + + (internal_symhdr->start - raw_base)) + + FIX (cbLineOffset, cbLine, line, unsigned char *); + FIX (cbDnOffset, idnMax, external_dnr, void *); + FIX (cbPdOffset, ipdMax, external_pdr, void *); + FIX (cbSymOffset, isymMax, external_sym, void *); + FIX (cbOptOffset, ioptMax, external_opt, void *); + FIX (cbAuxOffset, iauxMax, external_aux, union aux_ext *); + FIX (cbSsOffset, issMax, ss, char *); + FIX (cbSsExtOffset, issExtMax, ssext, char *); + FIX (cbFdOffset, ifdMax, external_fdr, void *); + FIX (cbRfdOffset, crfd, external_rfd, void *); + FIX (cbExtOffset, iextMax, external_ext, void *); #undef FIX + /* Ensure string sections are zero terminated. */ + if (debug->ss) + debug->ss[internal_symhdr->issMax - 1] = 0; + if (debug->ssext) + debug->ssext[internal_symhdr->issExtMax - 1] = 0; + /* I don't want to always swap all the data, because it will just waste time and most programs will never look at it. The only time the linker needs most of the debugging information swapped @@ -584,6 +638,7 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, if (_bfd_mul_overflow ((unsigned long) internal_symhdr->ifdMax, sizeof (struct fdr), &amt)) { + err: bfd_set_error (bfd_error_file_too_big); return false; } @@ -868,9 +923,13 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) (*swap_ext_in) (abfd, (void *) eraw_src, &internal_esym); /* PR 17512: file: 3372-1000-0.004. */ - if (internal_esym.asym.iss >= ecoff_data (abfd)->debug_info.symbolic_header.issExtMax + HDRR *symhdr = &ecoff_data (abfd)->debug_info.symbolic_header; + if (internal_esym.asym.iss >= symhdr->issExtMax || internal_esym.asym.iss < 0) - return false; + { + bfd_set_error (bfd_error_bad_value); + return false; + } internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ssext + internal_esym.asym.iss); @@ -881,17 +940,13 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) return false; /* The alpha uses a negative ifd field for section symbols. */ - if (internal_esym.ifd >= 0) - { - /* PR 17512: file: 3372-1983-0.004. */ - if (internal_esym.ifd >= ecoff_data (abfd)->debug_info.symbolic_header.ifdMax) - internal_ptr->fdr = NULL; - else - internal_ptr->fdr = (ecoff_data (abfd)->debug_info.fdr - + internal_esym.ifd); - } - else + /* PR 17512: file: 3372-1983-0.004. */ + if (internal_esym.ifd >= symhdr->ifdMax + || internal_esym.ifd < 0) internal_ptr->fdr = NULL; + else + internal_ptr->fdr = (ecoff_data (abfd)->debug_info.fdr + + internal_esym.ifd); internal_ptr->local = false; internal_ptr->native = (void *) eraw_src; } @@ -904,7 +959,21 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) { char *lraw_src; char *lraw_end; + HDRR *symhdr = &ecoff_data (abfd)->debug_info.symbolic_header; + if (fdr_ptr->csym == 0) + continue; + if (fdr_ptr->isymBase < 0 + || fdr_ptr->isymBase > symhdr->isymMax + || fdr_ptr->csym < 0 + || fdr_ptr->csym > ((long) bfd_get_symcount (abfd) + - (internal_ptr - internal)) + || fdr_ptr->issBase < 0 + || fdr_ptr->issBase > symhdr->issMax) + { + bfd_set_error (bfd_error_bad_value); + return false; + } lraw_src = ((char *) ecoff_data (abfd)->debug_info.external_sym + fdr_ptr->isymBase * external_sym_size); lraw_end = lraw_src + fdr_ptr->csym * external_sym_size; @@ -915,6 +984,13 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) SYMR internal_sym; (*swap_sym_in) (abfd, (void *) lraw_src, &internal_sym); + + if (internal_sym.iss >= symhdr->issMax - fdr_ptr->issBase + || internal_sym.iss < 0) + { + bfd_set_error (bfd_error_bad_value); + return false; + } internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ss + fdr_ptr->issBase + internal_sym.iss); @@ -1845,6 +1921,9 @@ _bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) oinfo->symbolic_header.crfd = iinfo->symbolic_header.crfd; oinfo->external_rfd = iinfo->external_rfd; + + /* Flag that oinfo entries should not be freed. */ + oinfo->alloc_syments = true; } else { @@ -2188,7 +2267,7 @@ _bfd_ecoff_set_section_contents (bfd *abfd, pos = section->filepos + offset; if (bfd_seek (abfd, pos, SEEK_SET) != 0 - || bfd_bwrite (location, count, abfd) != count) + || bfd_write (location, count, abfd) != count) return false; return true; @@ -2393,7 +2472,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) } internal_f.f_nscns = 0; - if (bfd_seek (abfd, (file_ptr) (filhsz + aoutsz), SEEK_SET) != 0) + if (bfd_seek (abfd, filhsz + aoutsz, SEEK_SET) != 0) goto error_return; for (current = abfd->sections; @@ -2448,7 +2527,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) current->flags); if (bfd_coff_swap_scnhdr_out (abfd, (void *) §ion, buff) == 0 - || bfd_bwrite (buff, scnhsz, abfd) != scnhsz) + || bfd_write (buff, scnhsz, abfd) != scnhsz) goto error_return; if ((section.s_flags & STYP_TEXT) != 0 @@ -2593,15 +2672,15 @@ _bfd_ecoff_write_object_contents (bfd *abfd) } /* Write out the file header and the optional header. */ - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) + if (bfd_seek (abfd, 0, SEEK_SET) != 0) goto error_return; bfd_coff_swap_filehdr_out (abfd, (void *) &internal_f, buff); - if (bfd_bwrite (buff, filhsz, abfd) != filhsz) + if (bfd_write (buff, filhsz, abfd) != filhsz) goto error_return; bfd_coff_swap_aouthdr_out (abfd, (void *) &internal_a, buff); - if (bfd_bwrite (buff, aoutsz, abfd) != aoutsz) + if (bfd_write (buff, aoutsz, abfd) != aoutsz) goto error_return; /* Build the external symbol information. This must be done before @@ -2717,7 +2796,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) if (bfd_seek (abfd, current->rel_filepos, SEEK_SET) != 0) goto error_return; amt = current->reloc_count * external_reloc_size; - if (bfd_bwrite (reloc_buff, amt, abfd) != amt) + if (bfd_write (reloc_buff, amt, abfd) != amt) goto error_return; bfd_release (abfd, reloc_buff); reloc_buff = NULL; @@ -2743,15 +2822,13 @@ _bfd_ecoff_write_object_contents (bfd *abfd) { char c; - if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1, - SEEK_SET) != 0) + if (bfd_seek (abfd, ecoff_data (abfd)->sym_filepos - 1, SEEK_SET) != 0) goto error_return; - if (bfd_bread (&c, (bfd_size_type) 1, abfd) == 0) + if (bfd_read (&c, 1, abfd) == 0) c = 0; - if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1, - SEEK_SET) != 0) + if (bfd_seek (abfd, ecoff_data (abfd)->sym_filepos - 1, SEEK_SET) != 0) goto error_return; - if (bfd_bwrite (&c, (bfd_size_type) 1, abfd) != 1) + if (bfd_write (&c, 1, abfd) != 1) goto error_return; } @@ -2851,13 +2928,13 @@ _bfd_ecoff_slurp_armap (bfd *abfd) bfd_size_type amt; /* Get the name of the first element. */ - i = bfd_bread ((void *) nextname, (bfd_size_type) 16, abfd); + i = bfd_read (nextname, 16, abfd); if (i == 0) return true; if (i != 16) return false; - if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) + if (bfd_seek (abfd, -16, SEEK_CUR) != 0) return false; /* Irix 4.0.5F apparently can use either an ECOFF armap or a @@ -3087,12 +3164,11 @@ _bfd_ecoff_write_armap (bfd *abfd, if (((char *) (&hdr))[i] == '\0') (((char *) (&hdr))[i]) = ' '; - if (bfd_bwrite ((void *) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd) - != sizeof (struct ar_hdr)) + if (bfd_write (&hdr, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr)) return false; H_PUT_32 (abfd, hashsize, temp); - if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4) + if (bfd_write (temp, 4, abfd) != 4) return false; hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize); @@ -3141,21 +3217,21 @@ _bfd_ecoff_write_armap (bfd *abfd, H_PUT_32 (abfd, firstreal, (hashtable + hash * 8 + 4)); } - if (bfd_bwrite ((void *) hashtable, symdefsize, abfd) != symdefsize) + if (bfd_write (hashtable, symdefsize, abfd) != symdefsize) 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) + if (bfd_write (temp, 4, abfd) != 4) 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) + if (bfd_write (*map[i].name, len, abfd) != len) return false; } @@ -3163,7 +3239,7 @@ _bfd_ecoff_write_armap (bfd *abfd, bug-compatible for DECstation ar we use a null. */ if (padit) { - if (bfd_bwrite ("", (bfd_size_type) 1, abfd) != 1) + if (bfd_write ("", 1, abfd) != 1) return false; } @@ -3709,7 +3785,7 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, HDRR *symhdr = &debug->symbolic_header; bool ret; -#define READ(ptr, offset, count, size, type) \ +#define READ(ptr, offset, count, size) \ do \ { \ size_t amt; \ @@ -3727,29 +3803,28 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, ret = false; \ goto return_something; \ } \ - debug->ptr = (type) _bfd_malloc_and_read (input_bfd, amt, amt); \ + debug->ptr = _bfd_malloc_and_read (input_bfd, amt + 1, amt); \ if (debug->ptr == NULL) \ { \ ret = false; \ goto return_something; \ } \ + ((char *) debug->ptr)[amt] = 0; \ } while (0) - /* If raw_syments is not NULL, then the data was already by read by + /* If alloc_syments is true, then the data was already by read by _bfd_ecoff_slurp_symbolic_info. */ - if (ecoff_data (input_bfd)->raw_syments == NULL) + if (!debug->alloc_syments) { - READ (line, cbLineOffset, cbLine, sizeof (unsigned char), - unsigned char *); - READ (external_dnr, cbDnOffset, idnMax, swap->external_dnr_size, void *); - READ (external_pdr, cbPdOffset, ipdMax, swap->external_pdr_size, void *); - READ (external_sym, cbSymOffset, isymMax, swap->external_sym_size, void *); - READ (external_opt, cbOptOffset, ioptMax, swap->external_opt_size, void *); - READ (external_aux, cbAuxOffset, iauxMax, sizeof (union aux_ext), - union aux_ext *); - READ (ss, cbSsOffset, issMax, sizeof (char), char *); - READ (external_fdr, cbFdOffset, ifdMax, swap->external_fdr_size, void *); - READ (external_rfd, cbRfdOffset, crfd, swap->external_rfd_size, void *); + READ (line, cbLineOffset, cbLine, sizeof (unsigned char)); + READ (external_dnr, cbDnOffset, idnMax, swap->external_dnr_size); + READ (external_pdr, cbPdOffset, ipdMax, swap->external_pdr_size); + READ (external_sym, cbSymOffset, isymMax, swap->external_sym_size); + READ (external_opt, cbOptOffset, ioptMax, swap->external_opt_size); + READ (external_aux, cbAuxOffset, iauxMax, sizeof (union aux_ext)); + READ (ss, cbSsOffset, issMax, sizeof (char)); + READ (external_fdr, cbFdOffset, ifdMax, swap->external_fdr_size); + READ (external_rfd, cbRfdOffset, crfd, swap->external_rfd_size); } #undef READ @@ -3761,31 +3836,7 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, input_bfd, debug, swap, info)); return_something: - if (ecoff_data (input_bfd)->raw_syments == NULL) - { - free (debug->line); - free (debug->external_dnr); - free (debug->external_pdr); - free (debug->external_sym); - free (debug->external_opt); - free (debug->external_aux); - free (debug->ss); - free (debug->external_fdr); - free (debug->external_rfd); - - /* Make sure we don't accidentally follow one of these pointers - into freed memory. */ - debug->line = NULL; - debug->external_dnr = NULL; - debug->external_pdr = NULL; - debug->external_sym = NULL; - debug->external_opt = NULL; - debug->external_aux = NULL; - debug->ss = NULL; - debug->external_fdr = NULL; - debug->external_rfd = NULL; - } - + _bfd_ecoff_free_ecoff_debug_info (debug); return ret; } @@ -3854,7 +3905,7 @@ ecoff_indirect_link_order (bfd *output_bfd, file_ptr pos = (output_section->rel_filepos + output_section->reloc_count * external_reloc_size); if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 - || (bfd_bwrite (external_relocs, external_relocs_size, output_bfd) + || (bfd_write (external_relocs, external_relocs_size, output_bfd) != external_relocs_size)) goto error_return; output_section->reloc_count += input_section->reloc_count; @@ -4061,7 +4112,7 @@ ecoff_reloc_link_order (bfd *output_bfd, pos = (output_section->rel_filepos + output_section->reloc_count * external_reloc_size); ok = (bfd_seek (output_bfd, pos, SEEK_SET) == 0 - && (bfd_bwrite ((void *) rbuf, external_reloc_size, output_bfd) + && (bfd_write (rbuf, external_reloc_size, output_bfd) == external_reloc_size)); if (ok) diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c index 5ad723898..a5803f4b6 100644 --- a/bfd/ecofflink.c +++ b/bfd/ecofflink.c @@ -1,5 +1,5 @@ /* Routines to link ECOFF debugging information. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. @@ -1460,7 +1460,7 @@ ecoff_write_symhdr (bfd *abfd, goto error_return; (*swap->swap_hdr_out) (abfd, symhdr, buff); - if (bfd_bwrite (buff, swap->external_hdr_size, abfd) + if (bfd_write (buff, swap->external_hdr_size, abfd) != swap->external_hdr_size) goto error_return; @@ -1492,9 +1492,8 @@ bfd_ecoff_write_debug (bfd *abfd, BFD_ASSERT (symhdr->offset == 0 \ || (bfd_vma) bfd_tell (abfd) == symhdr->offset); \ if (symhdr->count != 0 \ - && bfd_bwrite (debug->ptr, \ - (bfd_size_type) size * symhdr->count, \ - abfd) != size * symhdr->count) \ + && bfd_write (debug->ptr, size * symhdr->count, \ + abfd) != size * symhdr->count) \ return false; WRITE (line, cbLine, sizeof (unsigned char), cbLineOffset); @@ -1502,8 +1501,7 @@ bfd_ecoff_write_debug (bfd *abfd, WRITE (external_pdr, ipdMax, swap->external_pdr_size, cbPdOffset); WRITE (external_sym, isymMax, swap->external_sym_size, cbSymOffset); WRITE (external_opt, ioptMax, swap->external_opt_size, cbOptOffset); - WRITE (external_aux, iauxMax, (bfd_size_type) sizeof (union aux_ext), - cbAuxOffset); + WRITE (external_aux, iauxMax, sizeof (union aux_ext), cbAuxOffset); WRITE (ss, issMax, sizeof (char), cbSsOffset); WRITE (ssext, issExtMax, sizeof (char), cbSsExtOffset); WRITE (external_fdr, ifdMax, swap->external_fdr_size, cbFdOffset); @@ -1524,23 +1522,21 @@ ecoff_write_shuffle (bfd *abfd, void * space) { struct shuffle *l; - unsigned long total; + size_t total; total = 0; - for (l = shuffle; l != (struct shuffle *) NULL; l = l->next) + for (l = shuffle; l != NULL; l = l->next) { if (! l->filep) { - if (bfd_bwrite (l->u.memory, (bfd_size_type) l->size, abfd) - != l->size) + if (bfd_write (l->u.memory, l->size, abfd) != l->size) return false; } else { if (bfd_seek (l->u.file.input_bfd, l->u.file.offset, SEEK_SET) != 0 - || 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) + || bfd_read (space, l->size, l->u.file.input_bfd) != l->size + || bfd_write (space, l->size, abfd) != l->size) return false; } total += l->size; @@ -1548,15 +1544,15 @@ ecoff_write_shuffle (bfd *abfd, if ((total & (swap->debug_align - 1)) != 0) { - unsigned int i; + size_t i; bfd_byte *s; i = swap->debug_align - (total & (swap->debug_align - 1)); - s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); + s = bfd_zmalloc (i); if (s == NULL && i != 0) return false; - if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i) + if (bfd_write (s, i, abfd) != i) { free (s); return false; @@ -1611,36 +1607,34 @@ bfd_ecoff_write_accumulated_debug (void * handle, bfd_byte null; struct string_hash_entry *sh; - BFD_ASSERT (ainfo->ss == (struct shuffle *) NULL); + BFD_ASSERT (ainfo->ss == NULL); null = 0; - if (bfd_bwrite (&null, (bfd_size_type) 1, abfd) != 1) + if (bfd_write (&null, 1, abfd) != 1) goto error_return; total = 1; BFD_ASSERT (ainfo->ss_hash == NULL || ainfo->ss_hash->val == 1); - for (sh = ainfo->ss_hash; - sh != (struct string_hash_entry *) NULL; - sh = sh->next) + for (sh = ainfo->ss_hash; sh != NULL; sh = sh->next) { size_t len; len = strlen (sh->root.string); amt = len + 1; - if (bfd_bwrite (sh->root.string, amt, abfd) != amt) + if (bfd_write (sh->root.string, amt, abfd) != amt) goto error_return; total += len + 1; } if ((total & (swap->debug_align - 1)) != 0) { - unsigned int i; + size_t i; bfd_byte *s; i = swap->debug_align - (total & (swap->debug_align - 1)); - s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); + s = bfd_zmalloc (i); if (s == NULL && i != 0) goto error_return; - if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i) + if (bfd_write (s, i, abfd) != i) { free (s); goto error_return; @@ -1652,20 +1646,20 @@ bfd_ecoff_write_accumulated_debug (void * handle, /* The external strings and symbol are not converted over to using shuffles. FIXME: They probably should be. */ amt = debug->symbolic_header.issExtMax; - if (amt != 0 && bfd_bwrite (debug->ssext, amt, abfd) != amt) + if (amt != 0 && bfd_write (debug->ssext, amt, abfd) != amt) goto error_return; if ((debug->symbolic_header.issExtMax & (swap->debug_align - 1)) != 0) { - unsigned int i; + size_t i; bfd_byte *s; i = (swap->debug_align - (debug->symbolic_header.issExtMax & (swap->debug_align - 1))); - s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); + s = bfd_zmalloc (i); if (s == NULL && i != 0) goto error_return; - if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i) + if (bfd_write (s, i, abfd) != i) { free (s); goto error_return; @@ -1682,7 +1676,7 @@ bfd_ecoff_write_accumulated_debug (void * handle, == (bfd_vma) bfd_tell (abfd))); amt = debug->symbolic_header.iextMax * swap->external_ext_size; - if (amt != 0 && bfd_bwrite (debug->external_ext, amt, abfd) != amt) + if (amt != 0 && bfd_write (debug->external_ext, amt, abfd) != amt) goto error_return; free (space); @@ -1696,6 +1690,38 @@ bfd_ecoff_write_accumulated_debug (void * handle, /* Handle the find_nearest_line function for both ECOFF and MIPS ELF files. */ +/* Free ECOFF debugging info used by find_nearest_line. */ + +void +_bfd_ecoff_free_ecoff_debug_info (struct ecoff_debug_info *debug) +{ + if (!debug->alloc_syments) + { + free (debug->line); + free (debug->external_dnr); + free (debug->external_pdr); + free (debug->external_sym); + free (debug->external_opt); + free (debug->external_aux); + free (debug->ss); + free (debug->ssext); + free (debug->external_fdr); + free (debug->external_rfd); + free (debug->external_ext); + } + debug->line= NULL; + debug->external_dnr= NULL; + debug->external_pdr= NULL; + debug->external_sym= NULL; + debug->external_opt= NULL; + debug->external_aux= NULL; + debug->ss= NULL; + debug->ssext= NULL; + debug->external_fdr= NULL; + debug->external_rfd= NULL; + debug->external_ext= NULL; +} + /* Compare FDR entries. This is called via qsort. */ static int @@ -1730,8 +1756,8 @@ mk_fdrtab (bfd *abfd, FDR *fdr_start; FDR *fdr_end; bool stabs; - long len; - bfd_size_type amt; + size_t len; + size_t amt; fdr_start = debug_info->fdr; fdr_end = fdr_start + debug_info->symbolic_header.ifdMax; @@ -1739,17 +1765,27 @@ mk_fdrtab (bfd *abfd, /* First, let's see how long the table needs to be. */ for (len = 0, fdr_ptr = fdr_start; fdr_ptr < fdr_end; fdr_ptr++) { - if (fdr_ptr->cpd == 0) /* Skip FDRs that have no PDRs. */ + /* Sanity check fdr procedure descriptor pointer. */ + long ipdMax = debug_info->symbolic_header.ipdMax; + if (fdr_ptr->ipdFirst >= ipdMax + || fdr_ptr->cpd < 0 + || fdr_ptr->cpd > ipdMax - fdr_ptr->ipdFirst) + fdr_ptr->cpd = 0; + /* Skip FDRs that have no PDRs. */ + if (fdr_ptr->cpd == 0) continue; ++len; } /* Now, create and fill in the table. */ - amt = (bfd_size_type) len * sizeof (struct ecoff_fdrtab_entry); + if (_bfd_mul_overflow (len, sizeof (struct ecoff_fdrtab_entry), &amt)) + { + bfd_set_error (bfd_error_file_too_big); + return false; + } line_info->fdrtab = (struct ecoff_fdrtab_entry*) bfd_zalloc (abfd, amt); if (line_info->fdrtab == NULL) return false; - line_info->fdrtab_len = len; tab = line_info->fdrtab; for (fdr_ptr = fdr_start; fdr_ptr < fdr_end; fdr_ptr++) @@ -1766,11 +1802,20 @@ mk_fdrtab (bfd *abfd, char *sym_ptr; SYMR sym; + if ((long) ((unsigned long) fdr_ptr->isymBase + 1) <= 0 + || fdr_ptr->isymBase + 1 >= debug_info->symbolic_header.isymMax) + continue; + sym_ptr = ((char *) debug_info->external_sym + (fdr_ptr->isymBase + 1) * debug_swap->external_sym_size); (*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym); - if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, - STABS_SYMBOL) == 0) + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && sym.iss >= 0 + && sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase) + && strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, + STABS_SYMBOL) == 0) stabs = true; } @@ -1797,12 +1842,14 @@ mk_fdrtab (bfd *abfd, tab->fdr = fdr_ptr; ++tab; } + len = tab - line_info->fdrtab; + line_info->fdrtab_len = len; /* Finally, the table is sorted in increasing memory-address order. The table is mostly sorted already, but there are cases (e.g., static functions in include files), where this does not hold. Use "odump -PFv" to verify... */ - qsort (line_info->fdrtab, (size_t) len, + qsort (line_info->fdrtab, len, sizeof (struct ecoff_fdrtab_entry), cmp_fdrtab_entry); return true; @@ -1966,14 +2013,27 @@ lookup_line (bfd *abfd, char *sym_ptr; SYMR sym; - sym_ptr = ((char *) debug_info->external_sym - + (fdr_ptr->isymBase + 1) * debug_swap->external_sym_size); - (*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym); - if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, - STABS_SYMBOL) == 0) - stabs = true; + if ((long) ((unsigned long) fdr_ptr->isymBase + 1) > 0 + && fdr_ptr->isymBase + 1 < debug_info->symbolic_header.isymMax) + { + sym_ptr = ((char *) debug_info->external_sym + + (fdr_ptr->isymBase + 1) * debug_swap->external_sym_size); + (*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym); + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && sym.iss >= 0 + && sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase) + && strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, + STABS_SYMBOL) == 0) + stabs = true; + } } + line_info->cache.filename = NULL; + line_info->cache.functionname = NULL; + line_info->cache.line_num = 0; + if (!stabs) { bfd_size_type external_pdr_size; @@ -2060,7 +2120,7 @@ lookup_line (bfd *abfd, because we iterate over every FDR rather than just ones with a base address less than or equal to 'offset'. */ bfd_signed_vma dist = -1, min_dist = -1; - char *pdr_hold; + char *pdr_hold = NULL; char *pdr_end; fdr_ptr = tab[i].fdr; @@ -2068,17 +2128,14 @@ lookup_line (bfd *abfd, pdr_ptr = ((char *) debug_info->external_pdr + fdr_ptr->ipdFirst * external_pdr_size); pdr_end = pdr_ptr + fdr_ptr->cpd * external_pdr_size; - (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr); /* Find PDR that is closest to OFFSET. If pdr.prof is set, the procedure entry-point *may* be 0x10 below pdr.adr. We simply pretend that pdr.prof *implies* a lower entry-point. This is safe because it just means that may identify 4 NOPs in front of the function as belonging to the function. */ - for (pdr_hold = NULL; - pdr_ptr < pdr_end; - (pdr_ptr += external_pdr_size, - (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr))) + for (; pdr_ptr < pdr_end; pdr_ptr += external_pdr_size) { + (*debug_swap->swap_pdr_in) (abfd, pdr_ptr, &pdr); if (offset >= (pdr.adr - 0x10 * pdr.prof)) { dist = offset - (pdr.adr - 0x10 * pdr.prof); @@ -2116,12 +2173,20 @@ lookup_line (bfd *abfd, are stored in a very funky format, which I won't try to describe. The search is bounded by the end of the FDRs line number entries. */ - line_end = debug_info->line + fdr_ptr->cbLineOffset + fdr_ptr->cbLine; + line_ptr = line_end = debug_info->line; + if (fdr_ptr->cbLineOffset < debug_info->symbolic_header.cbLine + && fdr_ptr->cbLine <= (debug_info->symbolic_header.cbLine + - fdr_ptr->cbLineOffset) + && pdr.cbLineOffset <= (debug_info->symbolic_header.cbLine + - fdr_ptr->cbLineOffset)) + { + line_end += fdr_ptr->cbLineOffset + fdr_ptr->cbLine; + line_ptr += fdr_ptr->cbLineOffset + pdr.cbLineOffset; + } /* Make offset relative to procedure entry. */ offset -= pdr.adr - 0x10 * pdr.prof; lineno = pdr.lnLow; - line_ptr = debug_info->line + fdr_ptr->cbLineOffset + pdr.cbLineOffset; while (line_ptr < line_end) { int delta; @@ -2152,38 +2217,50 @@ lookup_line (bfd *abfd, symbols, at least according to gdb/mipsread.c. */ if (fdr_ptr->rss == -1) { - line_info->cache.filename = NULL; - if (pdr.isym == -1) - line_info->cache.functionname = NULL; - else - { - EXTR proc_ext; + EXTR proc_ext; + if (pdr.isym >= 0 + && pdr.isym < debug_info->symbolic_header.iextMax) + { (*debug_swap->swap_ext_in) - (abfd, - ((char *) debug_info->external_ext - + pdr.isym * debug_swap->external_ext_size), + (abfd, ((char *) debug_info->external_ext + + pdr.isym * debug_swap->external_ext_size), &proc_ext); - line_info->cache.functionname = (debug_info->ssext - + proc_ext.asym.iss); + if (proc_ext.asym.iss >= 0 + && proc_ext.asym.iss < debug_info->symbolic_header.issExtMax) + line_info->cache.functionname = (debug_info->ssext + + proc_ext.asym.iss); } } - else + else if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && fdr_ptr->rss >= 0 + && fdr_ptr->rss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) { SYMR proc_sym; line_info->cache.filename = (debug_info->ss + fdr_ptr->issBase + fdr_ptr->rss); - (*debug_swap->swap_sym_in) - (abfd, - ((char *) debug_info->external_sym - + ((fdr_ptr->isymBase + pdr.isym) - * debug_swap->external_sym_size)), - &proc_sym); - line_info->cache.functionname = (debug_info->ss - + fdr_ptr->issBase - + proc_sym.iss); + if (fdr_ptr->isymBase >= 0 + && fdr_ptr->isymBase < debug_info->symbolic_header.isymMax + && pdr.isym >= 0 + && pdr.isym < (debug_info->symbolic_header.isymMax + - fdr_ptr->isymBase)) + { + (*debug_swap->swap_sym_in) + (abfd, ((char *) debug_info->external_sym + + ((fdr_ptr->isymBase + pdr.isym) + * debug_swap->external_sym_size)), + &proc_sym); + if (proc_sym.iss >= 0 + && proc_sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) + line_info->cache.functionname = (debug_info->ss + + fdr_ptr->issBase + + proc_sym.iss); + } } if (lineno == ilineNil) lineno = 0; @@ -2215,10 +2292,6 @@ lookup_line (bfd *abfd, looking through the symbols until we find both a line number and a function name which are beyond the address we want. */ - line_info->cache.filename = NULL; - line_info->cache.functionname = NULL; - line_info->cache.line_num = 0; - directory_name = NULL; main_file_name = NULL; current_file_name = NULL; @@ -2231,9 +2304,21 @@ lookup_line (bfd *abfd, external_sym_size = debug_swap->external_sym_size; - sym_ptr = ((char *) debug_info->external_sym - + (fdr_ptr->isymBase + 2) * external_sym_size); - sym_ptr_end = sym_ptr + (fdr_ptr->csym - 2) * external_sym_size; + if (fdr_ptr->isymBase >= 0 + && fdr_ptr->isymBase < debug_info->symbolic_header.isymMax + && fdr_ptr->csym >= 2 + && fdr_ptr->csym < (debug_info->symbolic_header.isymMax + - fdr_ptr->isymBase)) + { + sym_ptr = ((char *) debug_info->external_sym + + (fdr_ptr->isymBase + 2) * external_sym_size); + sym_ptr_end = sym_ptr + (fdr_ptr->csym - 2) * external_sym_size; + } + else + { + sym_ptr = NULL; + sym_ptr_end = sym_ptr; + } for (; sym_ptr < sym_ptr_end && (! past_line || ! past_fn); sym_ptr += external_sym_size) @@ -2247,8 +2332,13 @@ lookup_line (bfd *abfd, switch (ECOFF_UNMARK_STAB (sym.index)) { case N_SO: - main_file_name = current_file_name = - debug_info->ss + fdr_ptr->issBase + sym.iss; + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && sym.iss >= 0 + && sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) + main_file_name = current_file_name + = debug_info->ss + fdr_ptr->issBase + sym.iss; /* Check the next symbol to see if it is also an N_SO symbol. */ @@ -2263,16 +2353,26 @@ lookup_line (bfd *abfd, && ECOFF_UNMARK_STAB (nextsym.index) == N_SO) { directory_name = current_file_name; - main_file_name = current_file_name = - debug_info->ss + fdr_ptr->issBase + nextsym.iss; + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && nextsym.iss >= 0 + && nextsym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) + main_file_name = current_file_name + = debug_info->ss + fdr_ptr->issBase + nextsym.iss; sym_ptr += external_sym_size; } } break; case N_SOL: - current_file_name = - debug_info->ss + fdr_ptr->issBase + sym.iss; + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && sym.iss >= 0 + && sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) + current_file_name + = debug_info->ss + fdr_ptr->issBase + sym.iss; break; case N_FUN: @@ -2281,8 +2381,13 @@ lookup_line (bfd *abfd, else if (sym.value >= low_func_vma) { low_func_vma = sym.value; - function_name = - debug_info->ss + fdr_ptr->issBase + sym.iss; + if (fdr_ptr->issBase >= 0 + && fdr_ptr->issBase < debug_info->symbolic_header.issMax + && sym.iss >= 0 + && sym.iss < (debug_info->symbolic_header.issMax + - fdr_ptr->issBase)) + function_name + = debug_info->ss + fdr_ptr->issBase + sym.iss; } break; } @@ -2409,8 +2514,7 @@ ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff) else { 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)) + || bfd_read (buff, l->size, l->u.file.input_bfd) != l->size) return false; } buff += l->size; diff --git a/bfd/ecoffswap.h b/bfd/ecoffswap.h index 065db3a6d..2462a8797 100644 --- a/bfd/ecoffswap.h +++ b/bfd/ecoffswap.h @@ -1,5 +1,5 @@ /* Generic ECOFF swapping routines, for BFD. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index db8d32376..9a8ef23c7 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -1,5 +1,5 @@ /* ELF attributes support (based on ARM EABI attributes). - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -247,6 +247,8 @@ elf_new_obj_attr (bfd *abfd, int vendor, unsigned int tag) /* Create a new tag. */ list = (obj_attribute_list *) bfd_alloc (abfd, sizeof (obj_attribute_list)); + if (list == NULL) + return NULL; memset (list, 0, sizeof (obj_attribute_list)); list->tag = tag; /* Keep the tag list in order. */ @@ -292,14 +294,18 @@ bfd_elf_get_obj_attr_int (bfd *abfd, int vendor, unsigned int tag) } /* Add an integer object attribute. */ -void +obj_attribute * bfd_elf_add_obj_attr_int (bfd *abfd, int vendor, unsigned int tag, unsigned int i) { obj_attribute *attr; attr = elf_new_obj_attr (abfd, vendor, tag); - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); - attr->i = i; + if (attr != NULL) + { + attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->i = i; + } + return attr; } /* Duplicate an object attribute string value. */ @@ -330,42 +336,54 @@ _bfd_elf_attr_strdup (bfd *abfd, const char *s) } /* Add a string object attribute. */ -static void +static obj_attribute * elf_add_obj_attr_string (bfd *abfd, int vendor, unsigned int tag, const char *s, const char *end) { obj_attribute *attr; attr = elf_new_obj_attr (abfd, vendor, tag); - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); - attr->s = elf_attr_strdup (abfd, s, end); + if (attr != NULL) + { + attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->s = elf_attr_strdup (abfd, s, end); + if (attr->s == NULL) + return NULL; + } + return attr; } -void +obj_attribute * bfd_elf_add_obj_attr_string (bfd *abfd, int vendor, unsigned int tag, const char *s) { - elf_add_obj_attr_string (abfd, vendor, tag, s, NULL); + return elf_add_obj_attr_string (abfd, vendor, tag, s, NULL); } /* Add a int+string object attribute. */ -static void +static obj_attribute * elf_add_obj_attr_int_string (bfd *abfd, int vendor, unsigned int tag, unsigned int i, const char *s, const char *end) { obj_attribute *attr; attr = elf_new_obj_attr (abfd, vendor, tag); - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); - attr->i = i; - attr->s = elf_attr_strdup (abfd, s, end); + if (attr != NULL) + { + attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->i = i; + attr->s = elf_attr_strdup (abfd, s, end); + if (attr->s == NULL) + return NULL; + } + return attr; } -void +obj_attribute * bfd_elf_add_obj_attr_int_string (bfd *abfd, int vendor, unsigned int tag, unsigned int i, const char *s) { - elf_add_obj_attr_int_string (abfd, vendor, tag, i, s, NULL); + return elf_add_obj_attr_int_string (abfd, vendor, tag, i, s, NULL); } /* Copy the object attributes from IBFD to OBFD. */ @@ -393,7 +411,11 @@ _bfd_elf_copy_obj_attributes (bfd *ibfd, bfd *obfd) out_attr->type = in_attr->type; out_attr->i = in_attr->i; if (in_attr->s && *in_attr->s) - out_attr->s = _bfd_elf_attr_strdup (obfd, in_attr->s); + { + out_attr->s = _bfd_elf_attr_strdup (obfd, in_attr->s); + if (out_attr->s == NULL) + bfd_perror (_("error adding attribute")); + } in_attr++; out_attr++; } @@ -402,23 +424,27 @@ _bfd_elf_copy_obj_attributes (bfd *ibfd, bfd *obfd) list; list = list->next) { + bool ok = false; in_attr = &list->attr; switch (in_attr->type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL)) { case ATTR_TYPE_FLAG_INT_VAL: - bfd_elf_add_obj_attr_int (obfd, vendor, list->tag, in_attr->i); + ok = bfd_elf_add_obj_attr_int (obfd, vendor, + list->tag, in_attr->i); break; case ATTR_TYPE_FLAG_STR_VAL: - bfd_elf_add_obj_attr_string (obfd, vendor, list->tag, - in_attr->s); + ok = bfd_elf_add_obj_attr_string (obfd, vendor, list->tag, + in_attr->s); break; case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL: - bfd_elf_add_obj_attr_int_string (obfd, vendor, list->tag, - in_attr->i, in_attr->s); + ok = bfd_elf_add_obj_attr_int_string (obfd, vendor, list->tag, + in_attr->i, in_attr->s); break; default: abort (); } + if (!ok) + bfd_perror (_("error adding attribute")); } } } @@ -563,6 +589,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) while (p < end) { int type; + bool ok = false; tag = _bfd_safe_read_leb128 (abfd, &p, false, end); type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); @@ -570,28 +597,30 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) { case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL: val = _bfd_safe_read_leb128 (abfd, &p, false, end); - elf_add_obj_attr_int_string (abfd, vendor, tag, val, - (char *) p, - (char *) end); + ok = elf_add_obj_attr_int_string (abfd, vendor, tag, + val, (char *) p, + (char *) end); p += strnlen ((char *) p, end - p); if (p < end) p++; break; case ATTR_TYPE_FLAG_STR_VAL: - elf_add_obj_attr_string (abfd, vendor, tag, - (char *) p, - (char *) end); + ok = elf_add_obj_attr_string (abfd, vendor, tag, + (char *) p, + (char *) end); p += strnlen ((char *) p, end - p); if (p < end) p++; break; case ATTR_TYPE_FLAG_INT_VAL: val = _bfd_safe_read_leb128 (abfd, &p, false, end); - bfd_elf_add_obj_attr_int (abfd, vendor, tag, val); + ok = bfd_elf_add_obj_attr_int (abfd, vendor, tag, val); break; default: abort (); } + if (!ok) + bfd_perror (_("error adding attribute")); } break; case Tag_Section: diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index fc32fbe51..335081ec6 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1,5 +1,5 @@ /* BFD back-end data structures for ELF files. - Copyright (C) 1992-2022 Free Software Foundation, Inc. + Copyright (C) 1992-2023 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -545,6 +545,7 @@ enum elf_target_id HPPA64_ELF_DATA, I386_ELF_DATA, IA64_ELF_DATA, + KVX_ELF_DATA, LM32_ELF_DATA, LARCH_ELF_DATA, M32R_ELF_DATA, @@ -702,7 +703,7 @@ struct elf_link_hash_table /* Used by eh_frame code when editing .eh_frame. */ struct eh_frame_hdr_info eh_info; - /* Used to link unwind data in .sframe sections. */ + /* Used to link stack trace info in .sframe sections. */ struct sframe_enc_info sfe_info; /* A linked list of local symbols to be added to .dynsym. */ @@ -2031,6 +2032,15 @@ struct elf_obj_tdata Elf_Internal_Shdr dynversym_hdr; Elf_Internal_Shdr dynverref_hdr; Elf_Internal_Shdr dynverdef_hdr; + Elf_Internal_Sym *dt_symtab; + bfd_byte *dt_versym; + bfd_byte *dt_verdef; + bfd_byte *dt_verneed; + size_t dt_symtab_count; + size_t dt_verdef_count; + size_t dt_verneed_count; + char * dt_strtab; + size_t dt_strsz; elf_section_list * symtab_shndx_list; bfd_vma gp; /* The gp value */ unsigned int gp_size; /* The gp size */ @@ -2070,7 +2080,7 @@ struct elf_obj_tdata void *line_info; /* A place to stash dwarf1 info for this bfd. */ - struct dwarf1_debug *dwarf1_find_line_info; + void *dwarf1_find_line_info; /* A place to stash dwarf2 info for this bfd. */ void *dwarf2_find_line_info; @@ -2194,6 +2204,7 @@ struct elf_obj_tdata #define elf_dyn_lib_class(bfd) (elf_tdata(bfd) -> dyn_lib_class) #define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab) #define elf_flags_init(bfd) (elf_tdata(bfd) -> o->flags_init) +#define elf_use_dt_symtab_p(bfd) (elf_tdata(bfd) -> dt_symtab_count != 0) #define elf_known_obj_attributes(bfd) (elf_tdata (bfd) -> known_obj_attributes) #define elf_other_obj_attributes(bfd) (elf_tdata (bfd) -> other_obj_attributes) #define elf_known_obj_attributes_proc(bfd) \ @@ -2587,6 +2598,12 @@ extern bfd_reloc_status_type bfd_elf_perform_complex_relocation extern bool _bfd_elf_setup_sections (bfd *); +extern bool _bfd_elf_get_dynamic_symbols + (bfd *, Elf_Internal_Phdr *, Elf_Internal_Phdr *, size_t, + bfd_size_type); +extern asection *_bfd_elf_get_section_from_dynamic_symbol + (bfd *, Elf_Internal_Sym *); + extern struct bfd_link_hash_entry *bfd_elf_define_start_stop (struct bfd_link_info *, const char *, asection *); @@ -2721,7 +2738,7 @@ extern bool bfd_elf_link_record_dynamic_symbol extern int bfd_elf_link_record_local_dynamic_symbol (struct bfd_link_info *, bfd *, long); -extern bool _bfd_elf_close_and_cleanup +extern bool _bfd_elf_free_cached_info (bfd *); extern bool _bfd_elf_common_definition @@ -2924,6 +2941,12 @@ extern char *elfcore_write_aarch_pauth (bfd *, char *, int *, const void *, int); extern char *elfcore_write_aarch_mte (bfd *, char *, int *, const void *, int); +extern char *elfcore_write_aarch_ssve + (bfd *, char *, int *, const void *, int); +extern char *elfcore_write_aarch_za + (bfd *, char *, int *, const void *, int); +extern char *elfcore_write_aarch_zt + (bfd *, char *, int *, const void *, int); extern char *elfcore_write_arc_v2 (bfd *, char *, int *, const void *, int); extern char *elfcore_write_riscv_csr @@ -2987,14 +3010,16 @@ extern bfd *_bfd_elf64_bfd_from_remote_memory extern bfd_vma bfd_elf_obj_attr_size (bfd *); extern void bfd_elf_set_obj_attr_contents (bfd *, bfd_byte *, bfd_vma); extern int bfd_elf_get_obj_attr_int (bfd *, int, unsigned int); -extern void bfd_elf_add_obj_attr_int (bfd *, int, unsigned int, unsigned int); +extern obj_attribute *bfd_elf_add_obj_attr_int + (bfd *, int, unsigned int, unsigned int); #define bfd_elf_add_proc_attr_int(BFD, TAG, VALUE) \ bfd_elf_add_obj_attr_int ((BFD), OBJ_ATTR_PROC, (TAG), (VALUE)) -extern void bfd_elf_add_obj_attr_string (bfd *, int, unsigned int, const char *); +extern obj_attribute *bfd_elf_add_obj_attr_string + (bfd *, int, unsigned int, const char *); #define bfd_elf_add_proc_attr_string(BFD, TAG, VALUE) \ bfd_elf_add_obj_attr_string ((BFD), OBJ_ATTR_PROC, (TAG), (VALUE)) -extern void bfd_elf_add_obj_attr_int_string (bfd *, int, unsigned int, - unsigned int, const char *); +extern obj_attribute *bfd_elf_add_obj_attr_int_string + (bfd *, int, unsigned int, unsigned int, const char *); #define bfd_elf_add_proc_attr_int_string(BFD, TAG, INTVAL, STRVAL) \ bfd_elf_add_obj_attr_int_string ((BFD), OBJ_ATTR_PROC, (TAG), \ (INTVAL), (STRVAL)) diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 2e22d0c92..bf7a99023 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -1,5 +1,5 @@ /* .eh_frame section optimization. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Written by Jakub Jelinek . This file is part of BFD, the Binary File Descriptor library. @@ -602,6 +602,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, hdr_info = &htab->eh_info; if (sec->size == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || sec->sec_info_type != SEC_INFO_TYPE_NONE) { /* This file does not contain .eh_frame information. */ diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index b52ed3da3..747c5b1a1 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -1,5 +1,5 @@ /* Common code for PA ELF implementations. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -984,7 +984,8 @@ elf_hppa_sort_unwind (bfd *abfd) Consider what happens if someone inept creates a linker script that puts unwind information in .text. */ s = bfd_get_section_by_name (abfd, ".PARISC.unwind"); - if (s != NULL) + if (s != NULL && (s->flags & SEC_HAS_CONTENTS) != 0) + { bfd_size_type size; bfd_byte *contents; diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c index c8b385db5..ad07d88be 100644 --- a/bfd/elf-ifunc.c +++ b/bfd/elf-ifunc.c @@ -1,5 +1,5 @@ /* ELF STT_GNU_IFUNC support. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-linker-x86.h b/bfd/elf-linker-x86.h index 0badcf8ff..1e6ecb1bd 100644 --- a/bfd/elf-linker-x86.h +++ b/bfd/elf-linker-x86.h @@ -1,5 +1,5 @@ /* x86-specific ELF linker support between ld and bfd. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -61,6 +61,9 @@ struct elf_linker_x86_params /* Report relative relocations. */ unsigned int report_relative_reloc : 1; + /* Mark PLT with dynamic tags. */ + unsigned int mark_plt : 1; + /* X86-64 ISA level needed. */ unsigned int isa_level; diff --git a/bfd/elf-linux-core.h b/bfd/elf-linux-core.h index 61785d1e4..a5313c88b 100644 --- a/bfd/elf-linux-core.h +++ b/bfd/elf-linux-core.h @@ -1,5 +1,5 @@ /* Definitions for PRPSINFO structures under ELF on GNU/Linux. - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c index 948da5d9b..d7376cb2c 100644 --- a/bfd/elf-m10200.c +++ b/bfd/elf-m10200.c @@ -1,5 +1,5 @@ /* Matsushita 10200 specific support for 32-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -577,8 +577,9 @@ mn10200_elf_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 687223d83..7e084e64b 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -1,5 +1,5 @@ /* Matsushita 10300 specific support for 32-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2694,7 +2694,8 @@ mn10300_elf_relax_section (bfd *abfd, if (! ((section->flags & SEC_RELOC) != 0 && section->reloc_count != 0)) continue; - if ((section->flags & SEC_ALLOC) == 0) + if ((section->flags & SEC_ALLOC) == 0 + || (section->flags & SEC_HAS_CONTENTS) == 0) continue; /* Get cached copy of section contents if it exists. */ @@ -3034,7 +3035,9 @@ mn10300_elf_relax_section (bfd *abfd, unsigned int symcount; /* Skip non-code sections and empty sections. */ - if ((section->flags & SEC_CODE) == 0 || section->size == 0) + if ((section->flags & SEC_CODE) == 0 + || (section->flags & SEC_HAS_CONTENTS) == 0 + || section->size == 0) continue; if (section->reloc_count != 0) diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c index cc5886377..f701af6e6 100644 --- a/bfd/elf-nacl.c +++ b/bfd/elf-nacl.c @@ -1,5 +1,5 @@ /* Native Client support for ELF - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -348,7 +348,7 @@ nacl_final_write_processing (bfd *abfd) if (fill == NULL || bfd_seek (abfd, sec->filepos, SEEK_SET) != 0 - || bfd_bwrite (fill, sec->size, abfd) != sec->size) + || bfd_write (fill, sec->size, abfd) != sec->size) { /* We don't have a proper way to report an error here. So instead fudge things so that elf_write_shdrs_and_ehdr will diff --git a/bfd/elf-nacl.h b/bfd/elf-nacl.h index 7451725f8..e921c6458 100644 --- a/bfd/elf-nacl.h +++ b/bfd/elf-nacl.h @@ -1,5 +1,5 @@ /* Native Client support for ELF - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index d67aadde1..57d69e8f3 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -1,5 +1,5 @@ /* ELF program property support. - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c index f38306579..c0145bfba 100644 --- a/bfd/elf-s390-common.c +++ b/bfd/elf-s390-common.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for ELF 32 and 64 bit functions - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Andreas Krebbel. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-s390.h b/bfd/elf-s390.h index e7d92001d..ad6c59886 100644 --- a/bfd/elf-s390.h +++ b/bfd/elf-s390.h @@ -1,5 +1,5 @@ /* S/390-specific support for ELF. - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c index 8055aa3ea..1b38768ec 100644 --- a/bfd/elf-sframe.c +++ b/bfd/elf-sframe.c @@ -1,5 +1,5 @@ /* .sframe section processing. - Copyright (C) 2022 Free Software Foundation, Inc. + Copyright (C) 2022-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -193,6 +193,7 @@ _bfd_elf_parse_sframe (bfd *abfd, int decerr = 0; if (sec->size == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || sec->sec_info_type != SEC_INFO_TYPE_NONE) { /* This file does not contain .sframe information. */ @@ -206,7 +207,7 @@ _bfd_elf_parse_sframe (bfd *abfd, return false; } - /* Read the SFrame unwind information from abfd. */ + /* Read the SFrame stack trace information from abfd. */ if (!bfd_malloc_and_get_section (abfd, sec, &sfbuf)) goto fail_no_free; @@ -324,9 +325,11 @@ _bfd_elf_merge_section_sframe (bfd *abfd, struct sframe_enc_info *sfe_info; sframe_decoder_ctx *sfd_ctx; sframe_encoder_ctx *sfe_ctx; - unsigned char sfd_ctx_abi_arch; + uint8_t sfd_ctx_abi_arch; int8_t sfd_ctx_fixed_fp_offset; int8_t sfd_ctx_fixed_ra_offset; + uint8_t dctx_version; + uint8_t ectx_version; int encerr = 0; struct elf_link_hash_table *htab; @@ -360,7 +363,7 @@ _bfd_elf_merge_section_sframe (bfd *abfd, if (!sfd_ctx_abi_arch) return false; - htab->sfe_info.sfe_ctx = sframe_encode (SFRAME_VERSION_1, + htab->sfe_info.sfe_ctx = sframe_encode (SFRAME_VERSION_2, 0, /* SFrame flags. */ sfd_ctx_abi_arch, sfd_ctx_fixed_fp_offset, @@ -399,27 +402,41 @@ _bfd_elf_merge_section_sframe (bfd *abfd, return false; } + /* Check that all .sframe sections being linked have the same version. */ + dctx_version = sframe_decoder_get_version (sfd_ctx); + ectx_version = sframe_encoder_get_version (sfe_ctx); + if (dctx_version != SFRAME_VERSION_2 || dctx_version != ectx_version) + { + _bfd_error_handler + (_("input SFrame sections with different format versions prevent" + " .sframe generation")); + return false; + } + + /* Iterate over the function descriptor entries and the FREs of the function from the decoder context. Add each of them to the encoder context, if suitable. */ - unsigned int i = 0, j = 0, cur_fidx = 0; + uint32_t i = 0, j = 0, cur_fidx = 0; - unsigned int num_fidx = sframe_decoder_get_num_fidx (sfd_ctx); - unsigned int num_enc_fidx = sframe_encoder_get_num_fidx (sfe_ctx); + uint32_t num_fidx = sframe_decoder_get_num_fidx (sfd_ctx); + uint32_t num_enc_fidx = sframe_encoder_get_num_fidx (sfe_ctx); for (i = 0; i < num_fidx; i++) { unsigned int num_fres = 0; - int32_t func_start_address; + int32_t func_start_addr; bfd_vma address; uint32_t func_size = 0; unsigned char func_info = 0; unsigned int r_offset = 0; bool pltn_reloc_by_hand = false; unsigned int pltn_r_offset = 0; + uint8_t rep_block_size = 0; - if (!sframe_decoder_get_funcdesc (sfd_ctx, i, &num_fres, &func_size, - &func_start_address, &func_info)) + if (!sframe_decoder_get_funcdesc_v2 (sfd_ctx, i, &num_fres, &func_size, + &func_start_addr, &func_info, + &rep_block_size)) { /* If function belongs to a deleted section, skip editing the function descriptor entry. */ @@ -438,10 +455,11 @@ _bfd_elf_merge_section_sframe (bfd *abfd, } else { - /* Expected to land here for SFrame unwind info as created - for the .plt* sections. These sections can have upto two - FDE entries. Although the code should work for > 2, - leaving this assert here for safety. */ + /* Expected to land here when SFrame stack trace info is + created dynamically for the .plt* sections. These + sections are expected to have upto two SFrame FDE entries. + Although the code should work for > 2, leaving this + assert here for safety. */ BFD_ASSERT (num_fidx <= 2); /* For the first entry, we know the offset of the SFrame FDE's sfde_func_start_address. Side note: see how the value @@ -469,13 +487,13 @@ _bfd_elf_merge_section_sframe (bfd *abfd, /* FIXME For testing only. Cleanup later. */ // address += (sec->output_section->vma); - func_start_address = address; + func_start_addr = address; } /* Update the encoder context with updated content. */ - int err = sframe_encoder_add_funcdesc (sfe_ctx, func_start_address, - func_size, func_info, - num_fres); + int err = sframe_encoder_add_funcdesc_v2 (sfe_ctx, func_start_addr, + func_size, func_info, + rep_block_size, num_fres); cur_fidx++; BFD_ASSERT (!err); } diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index ea30a6e63..d52a3079f 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -1,5 +1,5 @@ /* ELF strtab with GC and suffix merging support. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Written by Jakub Jelinek . This file is part of BFD, the Binary File Descriptor library. @@ -116,6 +116,7 @@ _bfd_elf_strtab_init (void) bfd_malloc (table->alloced * amt)); if (table->array == NULL) { + bfd_hash_table_free (&table->table); free (table); return NULL; } @@ -315,7 +316,7 @@ _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) + if (bfd_write ("", 1, abfd) != 1) return false; for (i = 1; i < tab->size; ++i) @@ -329,7 +330,7 @@ _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab) continue; str = tab->array[i]->root.string; - if (bfd_bwrite (str, len, abfd) != len) + if (bfd_write (str, len, abfd) != len) return false; off += len; diff --git a/bfd/elf-vxworks.c b/bfd/elf-vxworks.c index 68f92880a..3a670c089 100644 --- a/bfd/elf-vxworks.c +++ b/bfd/elf-vxworks.c @@ -1,5 +1,5 @@ /* VxWorks support for ELF - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf-vxworks.h b/bfd/elf-vxworks.h index 1765c5734..87104cc59 100644 --- a/bfd/elf-vxworks.h +++ b/bfd/elf-vxworks.h @@ -1,5 +1,5 @@ /* VxWorks support for ELF - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf.c b/bfd/elf.c index 7317c52fa..b5b0c69e0 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -1,6 +1,6 @@ /* ELF executable support for BFD. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -196,23 +196,15 @@ _bfd_elf_swap_versym_out (bfd *abfd, unsigned long bfd_elf_hash (const char *namearg) { - const unsigned char *name = (const unsigned char *) namearg; - unsigned long h = 0; - unsigned long g; - int ch; + uint32_t h = 0; - while ((ch = *name++) != '\0') + for (const unsigned char *name = (const unsigned char *) namearg; + *name; name++) { - h = (h << 4) + ch; - if ((g = (h & 0xf0000000)) != 0) - { - h ^= g >> 24; - /* The ELF ABI says `h &= ~g', but this is equivalent in - this case and on some machines one insn instead of two. */ - h ^= g; - } + h = (h << 4) + *name; + h ^= (h >> 24) & 0xf0; } - return h & 0xffffffff; + return h & 0x0fffffff; } /* DT_GNU_HASH hash function. Do not change this function; you will @@ -221,13 +213,12 @@ bfd_elf_hash (const char *namearg) unsigned long bfd_elf_gnu_hash (const char *namearg) { - const unsigned char *name = (const unsigned char *) namearg; - unsigned long h = 5381; - unsigned char ch; + uint32_t h = 5381; - while ((ch = *name++) != '\0') - h = (h << 5) + h + ch; - return h & 0xffffffff; + for (const unsigned char *name = (const unsigned char *) namearg; + *name; name++) + h = (h << 5) + h + *name; + return h; } /* Create a tdata field OBJECT_SIZE bytes in length, zeroed out and with @@ -406,6 +397,17 @@ bfd_elf_get_elf_syms (bfd *ibfd, if (symcount == 0) return intsym_buf; + if (elf_use_dt_symtab_p (ibfd)) + { + /* Use dynamic symbol table. */ + if (elf_tdata (ibfd)->dt_symtab_count != symcount + symoffset) + { + bfd_set_error (bfd_error_invalid_operation); + return NULL; + } + return elf_tdata (ibfd)->dt_symtab + symoffset; + } + /* Normal syms might have section extension entries. */ shndx_hdr = NULL; if (elf_symtab_shndx_list (ibfd) != NULL) @@ -458,7 +460,7 @@ bfd_elf_get_elf_syms (bfd *ibfd, } if (extsym_buf == NULL || bfd_seek (ibfd, pos, SEEK_SET) != 0 - || bfd_bread (extsym_buf, amt, ibfd) != amt) + || bfd_read (extsym_buf, amt, ibfd) != amt) { intsym_buf = NULL; goto out; @@ -482,7 +484,7 @@ bfd_elf_get_elf_syms (bfd *ibfd, } if (extshndx_buf == NULL || bfd_seek (ibfd, pos, SEEK_SET) != 0 - || bfd_bread (extshndx_buf, amt, ibfd) != amt) + || bfd_read (extshndx_buf, amt, ibfd) != amt) { intsym_buf = NULL; goto out; @@ -1689,7 +1691,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) } s = bfd_get_section_by_name (abfd, ".dynamic"); - if (s != NULL) + if (s != NULL && (s->flags & SEC_HAS_CONTENTS) != 0) { unsigned int elfsec; unsigned long shlink; @@ -1882,6 +1884,555 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) return false; } +/* Find the file offset corresponding to VMA by using the program + headers. */ + +static file_ptr +offset_from_vma (Elf_Internal_Phdr *phdrs, size_t phnum, bfd_vma vma, + size_t size, size_t *max_size_p) +{ + Elf_Internal_Phdr *seg; + size_t i; + + for (seg = phdrs, i = 0; i < phnum; ++seg, ++i) + if (seg->p_type == PT_LOAD + && vma >= (seg->p_vaddr & -seg->p_align) + && vma + size <= seg->p_vaddr + seg->p_filesz) + { + if (max_size_p) + *max_size_p = seg->p_vaddr + seg->p_filesz - vma; + return vma - seg->p_vaddr + seg->p_offset; + } + + if (max_size_p) + *max_size_p = 0; + bfd_set_error (bfd_error_invalid_operation); + return (file_ptr) -1; +} + +/* Convert hash table to internal form. */ + +static bfd_vma * +get_hash_table_data (bfd *abfd, bfd_size_type number, + unsigned int ent_size, bfd_size_type filesize) +{ + unsigned char *e_data = NULL; + bfd_vma *i_data = NULL; + bfd_size_type size; + + if (ent_size != 4 && ent_size != 8) + return NULL; + + if ((size_t) number != number) + { + bfd_set_error (bfd_error_file_too_big); + return NULL; + } + + size = ent_size * number; + /* Be kind to memory checkers (eg valgrind, address sanitizer) by not + attempting to allocate memory when the read is bound to fail. */ + if (size > filesize + || number >= ~(size_t) 0 / ent_size + || number >= ~(size_t) 0 / sizeof (*i_data)) + { + bfd_set_error (bfd_error_file_too_big); + return NULL; + } + + e_data = _bfd_malloc_and_read (abfd, size, size); + if (e_data == NULL) + return NULL; + + i_data = (bfd_vma *) bfd_malloc (number * sizeof (*i_data)); + if (i_data == NULL) + { + free (e_data); + return NULL; + } + + if (ent_size == 4) + while (number--) + i_data[number] = bfd_get_32 (abfd, e_data + number * ent_size); + else + while (number--) + i_data[number] = bfd_get_64 (abfd, e_data + number * ent_size); + + free (e_data); + return i_data; +} + +/* Address of .MIPS.xhash section. FIXME: What is the best way to + support DT_MIPS_XHASH? */ +#define DT_MIPS_XHASH 0x70000036 + +/* Reconstruct dynamic symbol table from PT_DYNAMIC segment. */ + +bool +_bfd_elf_get_dynamic_symbols (bfd *abfd, Elf_Internal_Phdr *phdr, + Elf_Internal_Phdr *phdrs, size_t phnum, + bfd_size_type filesize) +{ + bfd_byte *extdyn, *extdynend; + size_t extdynsize; + void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *); + bool (*swap_symbol_in) (bfd *, const void *, const void *, + Elf_Internal_Sym *); + Elf_Internal_Dyn dyn; + bfd_vma dt_hash = 0; + bfd_vma dt_gnu_hash = 0; + bfd_vma dt_mips_xhash = 0; + bfd_vma dt_strtab = 0; + bfd_vma dt_symtab = 0; + size_t dt_strsz = 0; + bfd_vma dt_versym = 0; + bfd_vma dt_verdef = 0; + bfd_vma dt_verneed = 0; + bfd_byte *dynbuf = NULL; + char *strbuf = NULL; + bfd_vma *gnubuckets = NULL; + bfd_vma *gnuchains = NULL; + bfd_vma *mipsxlat = NULL; + file_ptr saved_filepos, filepos; + bool res = false; + size_t amt; + bfd_byte *esymbuf = NULL, *esym; + bfd_size_type symcount; + Elf_Internal_Sym *isymbuf = NULL; + Elf_Internal_Sym *isym, *isymend; + bfd_byte *versym = NULL; + bfd_byte *verdef = NULL; + bfd_byte *verneed = NULL; + size_t verdef_size = 0; + size_t verneed_size = 0; + size_t extsym_size; + const struct elf_backend_data *bed; + + /* Return TRUE if symbol table is bad. */ + if (elf_bad_symtab (abfd)) + return true; + + /* Return TRUE if DT_HASH/DT_GNU_HASH have bee processed before. */ + if (elf_tdata (abfd)->dt_strtab != NULL) + return true; + + bed = get_elf_backend_data (abfd); + + /* Save file position for elf_object_p. */ + saved_filepos = bfd_tell (abfd); + + if (bfd_seek (abfd, phdr->p_offset, SEEK_SET) != 0) + goto error_return; + + dynbuf = _bfd_malloc_and_read (abfd, phdr->p_filesz, phdr->p_filesz); + if (dynbuf == NULL) + goto error_return; + + extsym_size = bed->s->sizeof_sym; + extdynsize = bed->s->sizeof_dyn; + swap_dyn_in = bed->s->swap_dyn_in; + + extdyn = dynbuf; + if (phdr->p_filesz < extdynsize) + goto error_return; + extdynend = extdyn + phdr->p_filesz; + for (; extdyn <= (extdynend - extdynsize); extdyn += extdynsize) + { + swap_dyn_in (abfd, extdyn, &dyn); + + if (dyn.d_tag == DT_NULL) + break; + + switch (dyn.d_tag) + { + case DT_HASH: + dt_hash = dyn.d_un.d_val; + break; + case DT_GNU_HASH: + if (bed->elf_machine_code != EM_MIPS + && bed->elf_machine_code != EM_MIPS_RS3_LE) + dt_gnu_hash = dyn.d_un.d_val; + break; + case DT_STRTAB: + dt_strtab = dyn.d_un.d_val; + break; + case DT_SYMTAB: + dt_symtab = dyn.d_un.d_val; + break; + case DT_STRSZ: + dt_strsz = dyn.d_un.d_val; + break; + case DT_SYMENT: + if (dyn.d_un.d_val != extsym_size) + goto error_return; + break; + case DT_VERSYM: + dt_versym = dyn.d_un.d_val; + break; + case DT_VERDEF: + dt_verdef = dyn.d_un.d_val; + break; + case DT_VERNEED: + dt_verneed = dyn.d_un.d_val; + break; + default: + if (dyn.d_tag == DT_MIPS_XHASH + && (bed->elf_machine_code == EM_MIPS + || bed->elf_machine_code == EM_MIPS_RS3_LE)) + { + dt_gnu_hash = dyn.d_un.d_val; + dt_mips_xhash = dyn.d_un.d_val; + } + break; + } + } + + /* Check if we can reconstruct dynamic symbol table from PT_DYNAMIC + segment. */ + if ((!dt_hash && !dt_gnu_hash) + || !dt_strtab + || !dt_symtab + || !dt_strsz) + goto error_return; + + /* Get dynamic string table. */ + filepos = offset_from_vma (phdrs, phnum, dt_strtab, dt_strsz, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + /* Dynamic string table must be valid until ABFD is closed. */ + strbuf = (char *) _bfd_alloc_and_read (abfd, dt_strsz + 1, dt_strsz); + if (strbuf == NULL) + goto error_return; + /* Since this is a string table, make sure that it is terminated. */ + strbuf[dt_strsz] = 0; + + /* Get the real symbol count from DT_HASH or DT_GNU_HASH. Prefer + DT_HASH since it is simpler than DT_GNU_HASH. */ + if (dt_hash) + { + unsigned char nb[16]; + unsigned int hash_ent_size; + + switch (bed->elf_machine_code) + { + case EM_ALPHA: + case EM_S390: + case EM_S390_OLD: + if (bed->s->elfclass == ELFCLASS64) + { + hash_ent_size = 8; + break; + } + /* FALLTHROUGH */ + default: + hash_ent_size = 4; + break; + } + + filepos = offset_from_vma (phdrs, phnum, dt_hash, sizeof (nb), + NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0 + || bfd_read (nb, 2 * hash_ent_size, abfd) != 2 * hash_ent_size) + goto error_return; + + /* The number of dynamic symbol table entries equals the number + of chains. */ + if (hash_ent_size == 8) + symcount = bfd_get_64 (abfd, nb + hash_ent_size); + else + symcount = bfd_get_32 (abfd, nb + hash_ent_size); + } + else + { + /* For DT_GNU_HASH, only defined symbols with non-STB_LOCAL + bindings are in hash table. Since in dynamic symbol table, + all symbols with STB_LOCAL binding are placed before symbols + with other bindings and all undefined symbols are placed + before defined ones, the highest symbol index in DT_GNU_HASH + is the highest dynamic symbol table index. */ + unsigned char nb[16]; + bfd_vma ngnubuckets; + bfd_vma gnusymidx; + size_t i, ngnuchains; + bfd_vma maxchain = 0xffffffff, bitmaskwords; + bfd_vma buckets_vma; + + filepos = offset_from_vma (phdrs, phnum, dt_gnu_hash, + sizeof (nb), NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0 + || bfd_read (nb, sizeof (nb), abfd) != sizeof (nb)) + goto error_return; + + ngnubuckets = bfd_get_32 (abfd, nb); + gnusymidx = bfd_get_32 (abfd, nb + 4); + bitmaskwords = bfd_get_32 (abfd, nb + 8); + buckets_vma = dt_gnu_hash + 16; + if (bed->s->elfclass == ELFCLASS32) + buckets_vma += bitmaskwords * 4; + else + buckets_vma += bitmaskwords * 8; + filepos = offset_from_vma (phdrs, phnum, buckets_vma, 4, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + gnubuckets = get_hash_table_data (abfd, ngnubuckets, 4, filesize); + if (gnubuckets == NULL) + goto error_return; + + for (i = 0; i < ngnubuckets; i++) + if (gnubuckets[i] != 0) + { + if (gnubuckets[i] < gnusymidx) + goto error_return; + + if (maxchain == 0xffffffff || gnubuckets[i] > maxchain) + maxchain = gnubuckets[i]; + } + + if (maxchain == 0xffffffff) + { + symcount = 0; + goto empty_gnu_hash; + } + + maxchain -= gnusymidx; + filepos = offset_from_vma (phdrs, phnum, + (buckets_vma + + 4 * (ngnubuckets + maxchain)), + 4, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + do + { + if (bfd_read (nb, 4, abfd) != 4) + goto error_return; + ++maxchain; + if (maxchain == 0) + goto error_return; + } + while ((bfd_get_32 (abfd, nb) & 1) == 0); + + filepos = offset_from_vma (phdrs, phnum, + (buckets_vma + 4 * ngnubuckets), + 4, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + gnuchains = get_hash_table_data (abfd, maxchain, 4, filesize); + if (gnuchains == NULL) + goto error_return; + ngnuchains = maxchain; + + if (dt_mips_xhash) + { + filepos = offset_from_vma (phdrs, phnum, + (buckets_vma + + 4 * (ngnubuckets + maxchain)), + 4, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + mipsxlat = get_hash_table_data (abfd, maxchain, 4, filesize); + if (mipsxlat == NULL) + goto error_return; + } + + symcount = 0; + for (i = 0; i < ngnubuckets; ++i) + if (gnubuckets[i] != 0) + { + bfd_vma si = gnubuckets[i]; + bfd_vma off = si - gnusymidx; + do + { + if (mipsxlat) + { + if (mipsxlat[off] >= symcount) + symcount = mipsxlat[off] + 1; + } + else + { + if (si >= symcount) + symcount = si + 1; + } + si++; + } + while (off < ngnuchains && (gnuchains[off++] & 1) == 0); + } + } + + /* Swap in dynamic symbol table. */ + if (_bfd_mul_overflow (symcount, extsym_size, &amt)) + { + bfd_set_error (bfd_error_file_too_big); + goto error_return; + } + + filepos = offset_from_vma (phdrs, phnum, dt_symtab, amt, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + esymbuf = _bfd_malloc_and_read (abfd, amt, amt); + if (esymbuf == NULL) + goto error_return; + + if (_bfd_mul_overflow (symcount, sizeof (Elf_Internal_Sym), &amt)) + { + bfd_set_error (bfd_error_file_too_big); + goto error_return; + } + + /* Dynamic symbol table must be valid until ABFD is closed. */ + isymbuf = (Elf_Internal_Sym *) bfd_alloc (abfd, amt); + if (isymbuf == NULL) + goto error_return; + + swap_symbol_in = bed->s->swap_symbol_in; + + /* Convert the symbols to internal form. */ + isymend = isymbuf + symcount; + for (esym = esymbuf, isym = isymbuf; + isym < isymend; + esym += extsym_size, isym++) + if (!swap_symbol_in (abfd, esym, NULL, isym) + || isym->st_name >= dt_strsz) + { + bfd_set_error (bfd_error_invalid_operation); + goto error_return; + } + + if (dt_versym) + { + /* Swap in DT_VERSYM. */ + if (_bfd_mul_overflow (symcount, 2, &amt)) + { + bfd_set_error (bfd_error_file_too_big); + goto error_return; + } + + filepos = offset_from_vma (phdrs, phnum, dt_versym, amt, NULL); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + /* DT_VERSYM info must be valid until ABFD is closed. */ + versym = _bfd_alloc_and_read (abfd, amt, amt); + + if (dt_verdef) + { + /* Read in DT_VERDEF. */ + filepos = offset_from_vma (phdrs, phnum, dt_verdef, + 0, &verdef_size); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + /* DT_VERDEF info must be valid until ABFD is closed. */ + verdef = _bfd_alloc_and_read (abfd, verdef_size, + verdef_size); + } + + if (dt_verneed) + { + /* Read in DT_VERNEED. */ + filepos = offset_from_vma (phdrs, phnum, dt_verneed, + 0, &verneed_size); + if (filepos == (file_ptr) -1 + || bfd_seek (abfd, filepos, SEEK_SET) != 0) + goto error_return; + + /* DT_VERNEED info must be valid until ABFD is closed. */ + verneed = _bfd_alloc_and_read (abfd, verneed_size, + verneed_size); + } + } + + empty_gnu_hash: + elf_tdata (abfd)->dt_strtab = strbuf; + elf_tdata (abfd)->dt_strsz = dt_strsz; + elf_tdata (abfd)->dt_symtab = isymbuf; + elf_tdata (abfd)->dt_symtab_count = symcount; + elf_tdata (abfd)->dt_versym = versym; + elf_tdata (abfd)->dt_verdef = verdef; + elf_tdata (abfd)->dt_verneed = verneed; + elf_tdata (abfd)->dt_verdef_count + = verdef_size / sizeof (Elf_External_Verdef); + elf_tdata (abfd)->dt_verneed_count + = verneed_size / sizeof (Elf_External_Verneed); + + res = true; + + error_return: + /* Restore file position for elf_object_p. */ + if (bfd_seek (abfd, saved_filepos, SEEK_SET) != 0) + res = false; + free (dynbuf); + free (esymbuf); + free (gnubuckets); + free (gnuchains); + free (mipsxlat); + return res; +} + +/* Reconstruct section from dynamic symbol. */ + +asection * +_bfd_elf_get_section_from_dynamic_symbol (bfd *abfd, + Elf_Internal_Sym *isym) +{ + asection *sec; + flagword flags; + + if (!elf_use_dt_symtab_p (abfd)) + return NULL; + + flags = SEC_ALLOC | SEC_LOAD; + switch (ELF_ST_TYPE (isym->st_info)) + { + case STT_FUNC: + case STT_GNU_IFUNC: + sec = bfd_get_section_by_name (abfd, ".text"); + if (sec == NULL) + sec = bfd_make_section_with_flags (abfd, + ".text", + flags | SEC_CODE); + break; + case STT_COMMON: + sec = bfd_com_section_ptr; + break; + case STT_OBJECT: + sec = bfd_get_section_by_name (abfd, ".data"); + if (sec == NULL) + sec = bfd_make_section_with_flags (abfd, + ".data", + flags | SEC_DATA); + break; + case STT_TLS: + sec = bfd_get_section_by_name (abfd, ".tdata"); + if (sec == NULL) + sec = bfd_make_section_with_flags (abfd, + ".tdata", + (flags + | SEC_DATA + | SEC_THREAD_LOCAL)); + break; + default: + sec = bfd_abs_section_ptr; + break; + } + + return sec; +} + /* Get version name. If BASE_P is TRUE, return "Base" for VER_FLG_BASE and return symbol version for symbol version itself. */ @@ -1891,8 +2442,11 @@ _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol, bool *hidden) { const char *version_string = NULL; - if (elf_dynversym (abfd) != 0 - && (elf_dynverdef (abfd) != 0 || elf_dynverref (abfd) != 0)) + if ((elf_dynversym (abfd) != 0 + && (elf_dynverdef (abfd) != 0 || elf_dynverref (abfd) != 0)) + || (elf_tdata (abfd)->dt_versym != NULL + && (elf_tdata (abfd)->dt_verdef != NULL + || elf_tdata (abfd)->dt_verneed != NULL))) { unsigned int vernum = ((elf_symbol_type *) symbol)->version; @@ -2390,6 +2944,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) its sh_link points to the null section. */ if (((abfd->flags & (DYNAMIC | EXEC_P)) != 0 && (hdr->sh_flags & SHF_ALLOC) != 0) + || (hdr->sh_flags & SHF_COMPRESSED) != 0 || hdr->sh_type == SHT_RELR || hdr->sh_link == SHN_UNDEF || hdr->sh_link != elf_onesymtab (abfd) @@ -3107,6 +3662,8 @@ _bfd_elf_init_reloc_shdr (bfd *abfd, BFD_ASSERT (reldata->hdr == NULL); rel_hdr = bfd_zalloc (abfd, sizeof (*rel_hdr)); + if (rel_hdr == NULL) + return false; reldata->hdr = rel_hdr; if (delay_st_name_p) @@ -3870,21 +4427,23 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) { case SHT_REL: case SHT_RELA: - /* A reloc section which we are treating as a normal BFD - section. sh_link is the section index of the symbol - table. sh_info is the section index of the section to - which the relocation entries apply. We assume that an - allocated reloc section uses the dynamic symbol table - if there is one. Otherwise we guess the normal symbol - table. FIXME: How can we be sure? */ - if (d->this_hdr.sh_link == 0 && (sec->flags & SEC_ALLOC) != 0) - { - s = bfd_get_section_by_name (abfd, ".dynsym"); - if (s != NULL) - d->this_hdr.sh_link = elf_section_data (s)->this_idx; - } + /* sh_link is the section index of the symbol table. + sh_info is the section index of the section to which the + relocation entries apply. */ if (d->this_hdr.sh_link == 0) - d->this_hdr.sh_link = elf_onesymtab (abfd); + { + /* FIXME maybe: If this is a reloc section which we are + treating as a normal section then we likely should + not be assuming its sh_link is .dynsym or .symtab. */ + if ((sec->flags & SEC_ALLOC) != 0) + { + s = bfd_get_section_by_name (abfd, ".dynsym"); + if (s != NULL) + d->this_hdr.sh_link = elf_section_data (s)->this_idx; + } + else + d->this_hdr.sh_link = elf_onesymtab (abfd); + } s = elf_get_reloc_section (sec); if (s != NULL) @@ -4260,7 +4819,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, { bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed); if (failed) - return false; + goto err_free_strtab; } shstrtab_hdr = &elf_tdata (abfd)->shstrtab_hdr; @@ -4276,9 +4835,9 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, shstrtab_hdr->sh_addralign = 1; if (!assign_file_positions_except_relocs (abfd, link_info)) - return false; + goto err_free_strtab; - if (need_symtab) + if (strtab != NULL) { file_ptr off; Elf_Internal_Shdr *hdr; @@ -4305,13 +4864,17 @@ _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; + goto err_free_strtab; _bfd_elf_strtab_free (strtab); } abfd->output_has_begun = true; - return true; + + err_free_strtab: + if (strtab != NULL) + _bfd_elf_strtab_free (strtab); + return false; } /* Retrieve .eh_frame_hdr. Prior to size_dynamic_sections the @@ -5402,22 +5965,6 @@ print_segment_map (const struct elf_segment_map *m) fflush (stderr); } -static bool -write_zeros (bfd *abfd, file_ptr pos, bfd_size_type len) -{ - void *buf; - bool ret; - - if (bfd_seek (abfd, pos, SEEK_SET) != 0) - return false; - buf = bfd_zmalloc (len); - if (buf == NULL) - return false; - ret = bfd_bwrite (buf, len, abfd) == len; - free (buf); - return ret; -} - /* Assign file positions to the sections based on the mapping from sections to segments. This function also sets up some fields in the file header. */ @@ -5866,11 +6413,13 @@ assign_file_positions_for_load_sections (bfd *abfd, if (p->p_filesz + adjust < p->p_memsz) { /* We have a PROGBITS section following NOBITS ones. - Allocate file space for the NOBITS section(s) and - zero it. */ + Allocate file space for the NOBITS section(s). + We don't need to write out the zeros, posix + fseek past the end of data already written + followed by a write at that location is + guaranteed to result in zeros being read + from the gap. */ adjust = p->p_memsz - p->p_filesz; - if (!write_zeros (abfd, off, adjust)) - return false; } } /* We only adjust sh_offset in SHT_NOBITS sections @@ -6617,6 +7166,10 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) Elf_Internal_Ehdr *i_ehdrp; const struct elf_backend_data *bed; + /* Skip non-load sections without section header. */ + if ((abfd->flags & BFD_NO_SECTION_HEADER) != 0) + return true; + off = elf_next_file_pos (abfd); shdrpp = elf_elfsections (abfd); @@ -6740,9 +7293,11 @@ _bfd_elf_write_object_contents (bfd *abfd) num_sec = elf_numsections (abfd); for (count = 1; count < num_sec; count++) { - i_shdrp[count]->sh_name - = _bfd_elf_strtab_offset (elf_shstrtab (abfd), - i_shdrp[count]->sh_name); + /* Don't set the sh_name field without section header. */ + if ((abfd->flags & BFD_NO_SECTION_HEADER) == 0) + i_shdrp[count]->sh_name + = _bfd_elf_strtab_offset (elf_shstrtab (abfd), + i_shdrp[count]->sh_name); if (bed->elf_backend_section_processing) if (!(*bed->elf_backend_section_processing) (abfd, i_shdrp[count])) return false; @@ -6751,7 +7306,7 @@ _bfd_elf_write_object_contents (bfd *abfd) 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) + || bfd_write (i_shdrp[count]->contents, amt, abfd) != amt) return false; } } @@ -6759,6 +7314,7 @@ _bfd_elf_write_object_contents (bfd *abfd) /* Write out the section header names. */ t = elf_tdata (abfd); if (elf_shstrtab (abfd) != NULL + && t->shstrtab_hdr.sh_offset != -1 && (bfd_seek (abfd, t->shstrtab_hdr.sh_offset, SEEK_SET) != 0 || !_bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd)))) return false; @@ -6907,14 +7463,14 @@ section_size (asection *section, Elf_Internal_Phdr *segment) /* Returns TRUE if the given section is contained within the given segment. LMA addresses are compared against PADDR when - bed->want_p_paddr_set_to_zero is false, VMA against VADDR when true. */ + USE_VADDR is false, VMA against VADDR when true. */ static bool is_contained_by (asection *section, Elf_Internal_Phdr *segment, bfd_vma paddr, bfd_vma vaddr, unsigned int opb, - const struct elf_backend_data *bed) + bool use_vaddr) { - bfd_vma seg_addr = !bed->want_p_paddr_set_to_zero ? paddr : vaddr; - bfd_vma addr = !bed->want_p_paddr_set_to_zero ? section->lma : section->vma; + bfd_vma seg_addr = !use_vaddr ? paddr : vaddr; + bfd_vma addr = !use_vaddr ? section->lma : section->vma; bfd_vma octet; if (_bfd_mul_overflow (addr, opb, &octet)) return false; @@ -6996,7 +7552,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) (with the possible exception of .dynamic). */ #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed, opb) \ (((is_contained_by (section, segment, segment->p_paddr, \ - segment->p_vaddr, opb, bed) \ + segment->p_vaddr, opb, \ + bed->want_p_paddr_set_to_zero) \ && (section->flags & SEC_ALLOC) != 0) \ || is_note (section, segment)) \ && segment->p_type != PT_GNU_STACK \ @@ -7229,10 +7786,12 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) no sections, but ordinary, loadable segments should contain something. They are allowed by the ELF spec however, so only a warning is produced. + Don't warn if an empty PT_LOAD contains the program headers. There is however the valid use case of embedded systems which have segments with p_filesz of 0 and a p_memsz > 0 to initialize flash memory with zeros. No warning is shown for that case. */ if (segment->p_type == PT_LOAD + && !map->includes_phdrs && (segment->p_filesz > 0 || segment->p_memsz == 0)) /* xgettext:c-format */ _bfd_error_handler @@ -7323,7 +7882,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) /* Match up the physical address of the segment with the LMA address of the output section. */ if (is_contained_by (output_section, segment, map->p_paddr, - map->p_paddr + map->p_vaddr_offset, opb, bed) + 0, opb, false) || is_note (section, segment)) { if (matching_lma == NULL @@ -7441,7 +8000,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) BFD_ASSERT (output_section != NULL); if (is_contained_by (output_section, segment, map->p_paddr, - map->p_paddr + map->p_vaddr_offset, opb, bed) + 0, opb, false) || is_note (section, segment)) { if (map->count == 0) @@ -8619,6 +9178,11 @@ _bfd_elf_get_dynamic_symtab_upper_bound (bfd *abfd) if (elf_dynsymtab (abfd) == 0) { + /* Check if there is dynamic symbol table. */ + symcount = elf_tdata (abfd)->dt_symtab_count; + if (symcount) + goto compute_symtab_size; + bfd_set_error (bfd_error_invalid_operation); return -1; } @@ -8629,6 +9193,8 @@ _bfd_elf_get_dynamic_symtab_upper_bound (bfd *abfd) bfd_set_error (bfd_error_file_too_big); return -1; } + + compute_symtab_size: symtab_size = symcount * (sizeof (asymbol *)); if (symcount == 0) symtab_size = sizeof (asymbol *); @@ -8748,15 +9314,16 @@ _bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd) for (s = abfd->sections; s != NULL; s = s->next) if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) && (elf_section_data (s)->this_hdr.sh_type == SHT_REL - || elf_section_data (s)->this_hdr.sh_type == SHT_RELA)) + || elf_section_data (s)->this_hdr.sh_type == SHT_RELA) + && (elf_section_data (s)->this_hdr.sh_flags & SHF_COMPRESSED) == 0) { - ext_rel_size += s->size; - if (ext_rel_size < s->size) + ext_rel_size += elf_section_data (s)->this_hdr.sh_size; + if (ext_rel_size < elf_section_data (s)->this_hdr.sh_size) { bfd_set_error (bfd_error_file_truncated); return -1; } - count += s->size / elf_section_data (s)->this_hdr.sh_entsize; + count += NUM_SHDR_ENTRIES (&elf_section_data (s)->this_hdr); if (count > LONG_MAX / sizeof (arelent *)) { bfd_set_error (bfd_error_file_too_big); @@ -8805,14 +9372,15 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd, { if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) && (elf_section_data (s)->this_hdr.sh_type == SHT_REL - || elf_section_data (s)->this_hdr.sh_type == SHT_RELA)) + || elf_section_data (s)->this_hdr.sh_type == SHT_RELA) + && (elf_section_data (s)->this_hdr.sh_flags & SHF_COMPRESSED) == 0) { arelent *p; long count, i; if (! (*slurp_relocs) (abfd, s, syms, true)) return -1; - count = s->size / elf_section_data (s)->this_hdr.sh_entsize; + count = NUM_SHDR_ENTRIES (&elf_section_data (s)->this_hdr); p = s->relocation; for (i = 0; i < count; i++) *storage++ = p++; @@ -8831,38 +9399,56 @@ bool _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) { bfd_byte *contents = NULL; + bool free_contents = false; unsigned int freeidx = 0; size_t amt; - if (elf_dynverref (abfd) != 0) + if (elf_dynverref (abfd) != 0 || elf_tdata (abfd)->dt_verneed != NULL) { Elf_Internal_Shdr *hdr; Elf_External_Verneed *everneed; Elf_Internal_Verneed *iverneed; unsigned int i; bfd_byte *contents_end; + size_t verneed_count; + size_t verneed_size; - hdr = &elf_tdata (abfd)->dynverref_hdr; - - if (hdr->sh_info > hdr->sh_size / sizeof (Elf_External_Verneed)) + if (elf_tdata (abfd)->dt_verneed != NULL) { - error_return_bad_verref: - _bfd_error_handler - (_("%pB: .gnu.version_r invalid entry"), abfd); - bfd_set_error (bfd_error_bad_value); - error_return_verref: - elf_tdata (abfd)->verref = NULL; - elf_tdata (abfd)->cverrefs = 0; - goto error_return; + hdr = NULL; + contents = elf_tdata (abfd)->dt_verneed; + verneed_count = elf_tdata (abfd)->dt_verneed_count; + verneed_size = verneed_count * sizeof (Elf_External_Verneed); } + else + { + hdr = &elf_tdata (abfd)->dynverref_hdr; - if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) - goto error_return_verref; - contents = _bfd_malloc_and_read (abfd, hdr->sh_size, hdr->sh_size); - if (contents == NULL) - goto error_return_verref; + if (hdr->sh_info > hdr->sh_size / sizeof (Elf_External_Verneed)) + { + error_return_bad_verref: + _bfd_error_handler + (_("%pB: .gnu.version_r invalid entry"), abfd); + bfd_set_error (bfd_error_bad_value); + error_return_verref: + elf_tdata (abfd)->verref = NULL; + elf_tdata (abfd)->cverrefs = 0; + goto error_return; + } + + if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) + goto error_return_verref; + contents = _bfd_malloc_and_read (abfd, hdr->sh_size, hdr->sh_size); + if (contents == NULL) + goto error_return_verref; - if (_bfd_mul_overflow (hdr->sh_info, sizeof (Elf_Internal_Verneed), &amt)) + free_contents = true; + verneed_size = hdr->sh_size; + verneed_count = hdr->sh_info; + } + + if (_bfd_mul_overflow (verneed_count, + sizeof (Elf_Internal_Verneed), &amt)) { bfd_set_error (bfd_error_file_too_big); goto error_return_verref; @@ -8875,10 +9461,11 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) BFD_ASSERT (sizeof (Elf_External_Verneed) == sizeof (Elf_External_Vernaux)); - contents_end = contents + hdr->sh_size - sizeof (Elf_External_Verneed); + contents_end = (contents + verneed_size + - sizeof (Elf_External_Verneed)); everneed = (Elf_External_Verneed *) contents; iverneed = elf_tdata (abfd)->verref; - for (i = 0; i < hdr->sh_info; i++, iverneed++) + for (i = 0; i < verneed_count; i++, iverneed++) { Elf_External_Vernaux *evernaux; Elf_Internal_Vernaux *ivernaux; @@ -8888,9 +9475,20 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) iverneed->vn_bfd = abfd; - iverneed->vn_filename = - bfd_elf_string_from_elf_section (abfd, hdr->sh_link, - iverneed->vn_file); + if (elf_use_dt_symtab_p (abfd)) + { + if (iverneed->vn_file < elf_tdata (abfd)->dt_strsz) + iverneed->vn_filename + = elf_tdata (abfd)->dt_strtab + iverneed->vn_file; + else + iverneed->vn_filename = NULL; + } + else if (hdr == NULL) + goto error_return_bad_verref; + else + iverneed->vn_filename + = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, + iverneed->vn_file); if (iverneed->vn_filename == NULL) goto error_return_bad_verref; @@ -8921,9 +9519,20 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) { _bfd_elf_swap_vernaux_in (abfd, evernaux, ivernaux); - ivernaux->vna_nodename = - bfd_elf_string_from_elf_section (abfd, hdr->sh_link, - ivernaux->vna_name); + if (elf_use_dt_symtab_p (abfd)) + { + if (ivernaux->vna_name < elf_tdata (abfd)->dt_strsz) + ivernaux->vna_nodename + = elf_tdata (abfd)->dt_strtab + ivernaux->vna_name; + else + ivernaux->vna_nodename = NULL; + } + else if (hdr == NULL) + goto error_return_bad_verref; + else + ivernaux->vna_nodename + = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, + ivernaux->vna_name); if (ivernaux->vna_nodename == NULL) goto error_return_bad_verref; @@ -8950,7 +9559,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) iverneed->vn_nextref = NULL; if (iverneed->vn_next == 0) break; - if (i + 1 < hdr->sh_info) + if (hdr != NULL && (i + 1 < hdr->sh_info)) iverneed->vn_nextref = iverneed + 1; if (iverneed->vn_next @@ -8962,11 +9571,12 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) } elf_tdata (abfd)->cverrefs = i; - free (contents); + if (elf_tdata (abfd)->dt_verneed == NULL) + free (contents); contents = NULL; } - if (elf_dynverdef (abfd) != 0) + if (elf_dynverdef (abfd) != 0 || elf_tdata (abfd)->dt_verdef != NULL) { Elf_Internal_Shdr *hdr; Elf_External_Verdef *everdef; @@ -8976,40 +9586,56 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) unsigned int i; unsigned int maxidx; bfd_byte *contents_end_def, *contents_end_aux; + size_t verdef_count; + size_t verdef_size; - hdr = &elf_tdata (abfd)->dynverdef_hdr; - - if (hdr->sh_size < sizeof (Elf_External_Verdef)) + if (elf_tdata (abfd)->dt_verdef != NULL) { - error_return_bad_verdef: - _bfd_error_handler - (_("%pB: .gnu.version_d invalid entry"), abfd); - bfd_set_error (bfd_error_bad_value); - error_return_verdef: - elf_tdata (abfd)->verdef = NULL; - elf_tdata (abfd)->cverdefs = 0; - goto error_return; + hdr = NULL; + contents = elf_tdata (abfd)->dt_verdef; + verdef_count = elf_tdata (abfd)->dt_verdef_count; + verdef_size = verdef_count * sizeof (Elf_External_Verdef); } + else + { + hdr = &elf_tdata (abfd)->dynverdef_hdr; - if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) - goto error_return_verdef; - contents = _bfd_malloc_and_read (abfd, hdr->sh_size, hdr->sh_size); - if (contents == NULL) - goto error_return_verdef; + if (hdr->sh_size < sizeof (Elf_External_Verdef)) + { + error_return_bad_verdef: + _bfd_error_handler + (_("%pB: .gnu.version_d invalid entry"), abfd); + bfd_set_error (bfd_error_bad_value); + error_return_verdef: + elf_tdata (abfd)->verdef = NULL; + elf_tdata (abfd)->cverdefs = 0; + goto error_return; + } + + if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0) + goto error_return_verdef; + contents = _bfd_malloc_and_read (abfd, hdr->sh_size, hdr->sh_size); + if (contents == NULL) + goto error_return_verdef; - BFD_ASSERT (sizeof (Elf_External_Verdef) - >= sizeof (Elf_External_Verdaux)); - contents_end_def = contents + hdr->sh_size - - sizeof (Elf_External_Verdef); - contents_end_aux = contents + hdr->sh_size - - sizeof (Elf_External_Verdaux); + BFD_ASSERT (sizeof (Elf_External_Verdef) + >= sizeof (Elf_External_Verdaux)); + + verdef_count = hdr->sh_info; + verdef_size = hdr->sh_size; + } + + contents_end_def = (contents + verdef_size + - sizeof (Elf_External_Verdef)); + contents_end_aux = (contents + verdef_size + - sizeof (Elf_External_Verdaux)); /* We know the number of entries in the section but not the maximum index. Therefore we have to run through all entries and find the maximum. */ everdef = (Elf_External_Verdef *) contents; maxidx = 0; - for (i = 0; i < hdr->sh_info; ++i) + for (i = 0; i < verdef_count; ++i) { _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem); @@ -9041,6 +9667,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) bfd_set_error (bfd_error_file_too_big); goto error_return_verdef; } + + if (amt == 0) + goto error_return_verdef; elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); if (elf_tdata (abfd)->verdef == NULL) goto error_return_verdef; @@ -9049,7 +9678,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) everdef = (Elf_External_Verdef *) contents; iverdefarr = elf_tdata (abfd)->verdef; - for (i = 0; i < hdr->sh_info; i++) + for (i = 0; i < verdef_count; ++i) { Elf_External_Verdaux *everdaux; Elf_Internal_Verdaux *iverdaux; @@ -9092,9 +9721,18 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) { _bfd_elf_swap_verdaux_in (abfd, everdaux, iverdaux); - iverdaux->vda_nodename = - bfd_elf_string_from_elf_section (abfd, hdr->sh_link, - iverdaux->vda_name); + if (elf_use_dt_symtab_p (abfd)) + { + if (iverdaux->vda_name < elf_tdata (abfd)->dt_strsz) + iverdaux->vda_nodename + = elf_tdata (abfd)->dt_strtab + iverdaux->vda_name; + else + iverdaux->vda_nodename = NULL; + } + else + iverdaux->vda_nodename + = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, + iverdaux->vda_name); if (iverdaux->vda_nodename == NULL) goto error_return_bad_verdef; @@ -9129,7 +9767,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) ((bfd_byte *) everdef + iverdef->vd_next)); } - free (contents); + if (elf_tdata (abfd)->dt_verdef == NULL) + free (contents); contents = NULL; } else if (default_imported_symver) @@ -9144,6 +9783,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) bfd_set_error (bfd_error_file_too_big); goto error_return; } + if (amt == 0) + goto error_return; elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); if (elf_tdata (abfd)->verdef == NULL) goto error_return; @@ -9182,7 +9823,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) return true; error_return: - free (contents); + if (free_contents) + free (contents); return false; } @@ -9595,20 +10237,22 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc) } bool -_bfd_elf_close_and_cleanup (bfd *abfd) +_bfd_elf_free_cached_info (bfd *abfd) { - struct elf_obj_tdata *tdata = elf_tdata (abfd); - if (tdata != NULL - && (bfd_get_format (abfd) == bfd_object - || bfd_get_format (abfd) == bfd_core)) + struct elf_obj_tdata *tdata; + + if ((bfd_get_format (abfd) == bfd_object + || bfd_get_format (abfd) == bfd_core) + && (tdata = elf_tdata (abfd)) != NULL) { - if (elf_tdata (abfd)->o != NULL && elf_shstrtab (abfd) != NULL) + if (tdata->o != NULL && elf_shstrtab (abfd) != NULL) _bfd_elf_strtab_free (elf_shstrtab (abfd)); _bfd_dwarf2_cleanup_debug_info (abfd, &tdata->dwarf2_find_line_info); + _bfd_dwarf1_cleanup_debug_info (abfd, &tdata->dwarf1_find_line_info); _bfd_stab_cleanup (abfd, &tdata->line_info); } - return _bfd_generic_close_and_cleanup (abfd); + return _bfd_generic_bfd_free_cached_info (abfd); } /* For Rel targets, we encode meaningful data for BFD_RELOC_VTABLE_ENTRY @@ -10062,6 +10706,27 @@ elfcore_grok_aarch_mte (bfd *abfd, Elf_Internal_Note *note) note); } +static bool +elfcore_grok_aarch_ssve (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".reg-aarch-ssve", note); +} + +static bool +elfcore_grok_aarch_za (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".reg-aarch-za", note); +} + +/* Convert NOTE into a bfd_section called ".reg-aarch-zt". Return TRUE if + successful, otherwise return FALSE. */ + +static bool +elfcore_grok_aarch_zt (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".reg-aarch-zt", note); +} + static bool elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note) { @@ -10777,6 +11442,27 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) else return true; + case NT_ARM_SSVE: + if (note->namesz == 6 + && strcmp (note->namedata, "LINUX") == 0) + return elfcore_grok_aarch_ssve (abfd, note); + else + return true; + + case NT_ARM_ZA: + if (note->namesz == 6 + && strcmp (note->namedata, "LINUX") == 0) + return elfcore_grok_aarch_za (abfd, note); + else + return true; + + case NT_ARM_ZT: + if (note->namesz == 6 + && strcmp (note->namedata, "LINUX") == 0) + return elfcore_grok_aarch_zt (abfd, note); + else + return true; + case NT_GDB_TDESC: if (note->namesz == 4 && strcmp (note->namedata, "GDB") == 0) @@ -11557,11 +12243,6 @@ elfcore_grok_nto_regs (bfd *abfd, return true; } -#define BFD_QNT_CORE_INFO 7 -#define BFD_QNT_CORE_STATUS 8 -#define BFD_QNT_CORE_GREG 9 -#define BFD_QNT_CORE_FPREG 10 - static bool elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) { @@ -11572,13 +12253,13 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) switch (note->type) { - case BFD_QNT_CORE_INFO: + case QNT_CORE_INFO: return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); - case BFD_QNT_CORE_STATUS: + case QNT_CORE_STATUS: return elfcore_grok_nto_status (abfd, note, &tid); - case BFD_QNT_CORE_GREG: + case QNT_CORE_GREG: return elfcore_grok_nto_regs (abfd, note, tid, ".reg"); - case BFD_QNT_CORE_FPREG: + case QNT_CORE_FPREG: return elfcore_grok_nto_regs (abfd, note, tid, ".reg2"); default: return true; @@ -12396,6 +13077,53 @@ elfcore_write_aarch_mte (bfd *abfd, size); } +char * +elfcore_write_aarch_ssve (bfd *abfd, + char *buf, + int *bufsiz, + const void *aarch_ssve, + int size) +{ + char *note_name = "LINUX"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_ARM_SSVE, + aarch_ssve, + size); +} + +char * +elfcore_write_aarch_za (bfd *abfd, + char *buf, + int *bufsiz, + const void *aarch_za, + int size) +{ + char *note_name = "LINUX"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_ARM_ZA, + aarch_za, + size); +} + +/* Write the buffer of zt register values in aarch_zt (length SIZE) into + the note buffer BUF and update *BUFSIZ. ABFD is the bfd the note is being + written into. Return a pointer to the new start of the note buffer, to + replace BUF which may no longer be valid. */ + +char * +elfcore_write_aarch_zt (bfd *abfd, + char *buf, + int *bufsiz, + const void *aarch_zt, + int size) +{ + char *note_name = "LINUX"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_ARM_ZT, + aarch_zt, + size); +} + char * elfcore_write_arc_v2 (bfd *abfd, char *buf, @@ -12577,6 +13305,12 @@ elfcore_write_register_note (bfd *abfd, return elfcore_write_aarch_pauth (abfd, buf, bufsiz, data, size); if (strcmp (section, ".reg-aarch-mte") == 0) return elfcore_write_aarch_mte (abfd, buf, bufsiz, data, size); + if (strcmp (section, ".reg-aarch-ssve") == 0) + return elfcore_write_aarch_ssve (abfd, buf, bufsiz, data, size); + if (strcmp (section, ".reg-aarch-za") == 0) + return elfcore_write_aarch_za (abfd, buf, bufsiz, data, size); + if (strcmp (section, ".reg-aarch-zt") == 0) + return elfcore_write_aarch_zt (abfd, buf, bufsiz, data, size); if (strcmp (section, ".reg-arc-v2") == 0) return elfcore_write_arc_v2 (abfd, buf, bufsiz, data, size); if (strcmp (section, ".gdb-tdesc") == 0) @@ -12879,31 +13613,6 @@ _bfd_elf_section_offset (bfd *abfd, } } -/* Create a new BFD as if by bfd_openr. Rather than opening a file, - reconstruct an ELF file by reading the segments out of remote memory - based on the ELF file header at EHDR_VMA and the ELF program headers it - points to. If not null, *LOADBASEP is filled in with the difference - between the VMAs from which the segments were read, and the VMAs the - file headers (and hence BFD's idea of each section's VMA) put them at. - - The function TARGET_READ_MEMORY is called to copy LEN bytes from the - remote memory at target address VMA into the local buffer at MYADDR; it - should return zero on success or an `errno' code on failure. TEMPL must - be a BFD for an ELF target with the word size and byte order found in - the remote memory. */ - -bfd * -bfd_elf_bfd_from_remote_memory - (bfd *templ, - bfd_vma ehdr_vma, - bfd_size_type size, - bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)) -{ - return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory) - (templ, ehdr_vma, size, loadbasep, target_read_memory); -} - long _bfd_elf_get_synthetic_symtab (bfd *abfd, long symcount ATTRIBUTE_UNUSED, @@ -12955,7 +13664,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, if (! (*slurp_relocs) (abfd, relplt, dynsyms, true)) return -1; - count = relplt->size / hdr->sh_entsize; + count = NUM_SHDR_ENTRIES (hdr); size = count * sizeof (asymbol); p = relplt->relocation; for (i = 0; i < count; i++, p += bed->s->int_rels_per_ext_rel) @@ -13231,8 +13940,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, } if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0 - || (bfd_bread (native_relocs, hdr->sh_size, abfd) - != hdr->sh_size)) + || bfd_read (native_relocs, hdr->sh_size, abfd) != hdr->sh_size) { free (native_relocs); /* The internal_relocs will be freed when diff --git a/bfd/elf32-am33lin.c b/bfd/elf32-am33lin.c index 9d8e834b8..cd4cc0f15 100644 --- a/bfd/elf32-am33lin.c +++ b/bfd/elf32-am33lin.c @@ -1,5 +1,5 @@ /* Matsushita AM33/2.0 support for 32-bit GNU/Linux ELF - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index 4c9fc0128..ac9970545 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -1,5 +1,5 @@ /* ARC-specific support for 32-bit ELF - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Contributed by Cupertino Miranda (cmiranda@synopsys.com). This file is part of BFD, the Binary File Descriptor library. @@ -1226,10 +1226,8 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data, (bfd_signed_vma) (reloc_data.sym_section->output_section->vma) #define JLI (bfd_signed_vma) (reloc_data.sym_section->output_section->vma) #define _SDA_BASE_ (bfd_signed_vma) (reloc_data.sdata_begin_symbol_vma) -#define TLS_REL (bfd_signed_vma) \ - ((elf_hash_table (info))->tls_sec->output_section->vma) -#define TLS_TBSS (align_power(TCB_SIZE, \ - reloc_data.sym_section->alignment_power)) +#define TLS_REL (bfd_signed_vma)(tls_sec->output_section->vma) +#define TLS_TBSS (align_power (TCB_SIZE, tls_sec->alignment_power)) #define none (0) @@ -1307,6 +1305,7 @@ arc_do_relocation (bfd_byte * contents, bfd * abfd = reloc_data.input_section->owner; struct elf_link_hash_table *htab ATTRIBUTE_UNUSED = elf_hash_table (info); bfd_reloc_status_type flag; + asection *tls_sec = htab->tls_sec; if (!reloc_data.should_relocate) return bfd_reloc_ok; @@ -1336,6 +1335,20 @@ arc_do_relocation (bfd_byte * contents, orig_insn = insn; + /* If we resolve a TLS relocation, make sure we do have a valid TLS + section. */ + switch (reloc_data.howto->type) + { + case R_ARC_TLS_LE_32: + if (tls_sec == NULL) + return bfd_reloc_notsupported; + break; + + default: + break; + } + + switch (reloc_data.howto->type) { #include "elf/arc-reloc.def" @@ -2972,8 +2985,9 @@ arc_elf_relax_section (bfd *abfd, asection *sec, section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 86cc961f7..f3ad270a6 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -5053,7 +5053,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, section. The user should fix his linker script. */ if (stub_entry->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), stub_entry->target_section); @@ -7113,10 +7113,13 @@ find_thumb_glue (struct bfd_link_info *link_info, hash = elf_link_hash_lookup (&(hash_table)->root, tmp_name, false, false, true); - if (hash == NULL - && asprintf (error_message, _("unable to find %s glue '%s' for '%s'"), - "Thumb", tmp_name, name) == -1) - *error_message = (char *) bfd_errmsg (bfd_error_system_call); + if (hash == NULL) + { + *error_message = bfd_asprintf (_("unable to find %s glue '%s' for '%s'"), + "Thumb", tmp_name, name); + if (*error_message == NULL) + *error_message = (char *) bfd_errmsg (bfd_error_system_call); + } free (tmp_name); @@ -7148,11 +7151,13 @@ find_arm_glue (struct bfd_link_info *link_info, myh = elf_link_hash_lookup (&(hash_table)->root, tmp_name, false, false, true); - if (myh == NULL - && asprintf (error_message, _("unable to find %s glue '%s' for '%s'"), - "ARM", tmp_name, name) == -1) - *error_message = (char *) bfd_errmsg (bfd_error_system_call); - + if (myh == NULL) + { + *error_message = bfd_asprintf (_("unable to find %s glue '%s' for '%s'"), + "ARM", tmp_name, name); + if (*error_message == NULL) + *error_message = (char *) bfd_errmsg (bfd_error_system_call); + } free (tmp_name); return myh; @@ -7882,7 +7887,8 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, if (sec->reloc_count == 0) continue; - if ((sec->flags & SEC_EXCLUDE) != 0) + if ((sec->flags & SEC_EXCLUDE) != 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0) continue; symtab_hdr = & elf_symtab_hdr (abfd); @@ -14113,7 +14119,7 @@ set_secondary_compatible_arch (bfd *abfd, int arch) static int tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, - int newtag, int secondary_compat) + int newtag, int secondary_compat, const char* name_table[]) { #define T(X) TAG_CPU_ARCH_##X int tagl, tagh, result; @@ -14430,8 +14436,8 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, if (result == -1) { - _bfd_error_handler (_("error: %pB: conflicting CPU architectures %d/%d"), - ibfd, oldtag, newtag); + _bfd_error_handler (_("error: conflicting CPU architectures %s vs %s in %pB"), + name_table[oldtag], name_table[newtag], ibfd); return -1; } @@ -14626,7 +14632,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) arch_attr = tag_cpu_arch_combine (ibfd, out_attr[i].i, &secondary_compat_out, in_attr[i].i, - secondary_compat); + secondary_compat, + name_table); /* Return with error if failed to merge. */ if (arch_attr == -1) @@ -15936,7 +15943,7 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, struct elf_link_hash_entry **sym_hashes; struct elf32_arm_link_hash_entry *cmse_hash; bool again, is_v8m, first_bfd_browse = true; - bool debug_sec_need_to_be_marked = false; + bool extra_marks_added = false; asection *isec; _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook); @@ -15980,6 +15987,8 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, of them so no need for a second browsing. */ if (is_v8m && first_bfd_browse) { + bool debug_sec_need_to_be_marked = false; + sym_hashes = elf_sym_hashes (sub); bed = get_elf_backend_data (sub); symtab_hdr = &elf_tdata (sub)->symtab_hdr; @@ -15996,7 +16005,7 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, /* Assume it is a special symbol. If not, cmse_scan will warn about it and user can do something about it. */ if (startswith (cmse_hash->root.root.root.string, - CMSE_PREFIX)) + CMSE_PREFIX)) { cmse_sec = cmse_hash->root.root.u.def.section; if (!cmse_sec->gc_mark @@ -16017,15 +16026,24 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, { /* If not a debug sections, skip it. */ if (!isec->gc_mark && (isec->flags & SEC_DEBUGGING)) - isec->gc_mark = 1 ; + { + isec->gc_mark = 1; + extra_marks_added = true; + } } debug_sec_need_to_be_marked = false; } } } + first_bfd_browse = false; } + /* PR 30354: If we have added extra marks then make sure that any + dependencies of the newly marked sections are also marked. */ + if (extra_marks_added) + _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook); + return true; } @@ -17691,6 +17709,35 @@ elf32_arm_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, const asection *rel_sec ATTRIBUTE_UNUSED, const Elf_Internal_Rela *rela) { + struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); + + if (htab->root.dynsym != NULL + && htab->root.dynsym->contents != NULL) + { + /* Check relocation against STT_GNU_IFUNC symbol if there are + dynamic symbols. */ + bfd *abfd = info->output_bfd; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); + unsigned long r_symndx = ELF32_R_SYM (rela->r_info); + if (r_symndx != STN_UNDEF) + { + Elf_Internal_Sym sym; + if (!bed->s->swap_symbol_in (abfd, + (htab->root.dynsym->contents + + r_symndx * bed->s->sizeof_sym), + 0, &sym)) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB symbol number %lu references" + " nonexistent SHT_SYMTAB_SHNDX section"), + abfd, r_symndx); + /* Ideally an error class should be returned here. */ + } + else if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC) + return reloc_class_ifunc; + } + } + switch ((int) ELF32_R_TYPE (rela->r_info)) { case R_ARM_RELATIVE: @@ -20027,17 +20074,11 @@ elf32_arm_get_synthetic_symtab (bfd *abfd, if (!elf32_arm_size_info.slurp_reloc_table (abfd, relplt, dynsyms, true)) return -1; - data = plt->contents; - if (data == NULL) - { - if (!bfd_get_full_section_contents (abfd, plt, &data) - || data == NULL) - return -1; - plt->contents = data; - plt->flags |= SEC_IN_MEMORY; - } + data = NULL; + if (!bfd_get_full_section_contents (abfd, plt, &data)) + return -1; - count = relplt->size / hdr->sh_entsize; + count = NUM_SHDR_ENTRIES (hdr); size = count * sizeof (asymbol); p = relplt->relocation; for (i = 0; i < count; i++, p += elf32_arm_size_info.int_rels_per_ext_rel) @@ -20047,13 +20088,13 @@ elf32_arm_get_synthetic_symtab (bfd *abfd, size += sizeof ("+0x") - 1 + 8; } - s = *ret = (asymbol *) bfd_malloc (size); - if (s == NULL) - return -1; - offset = elf32_arm_plt0_size (abfd, data); - if (offset == (bfd_vma) -1) - return -1; + if (offset == (bfd_vma) -1 + || (s = *ret = (asymbol *) bfd_malloc (size)) == NULL) + { + free (data); + return -1; + } names = (char *) (s + count); p = relplt->relocation; @@ -20098,6 +20139,7 @@ elf32_arm_get_synthetic_symtab (bfd *abfd, offset += plt_size; } + free (data); return n; } @@ -20261,11 +20303,7 @@ elf32_arm_backend_symbol_processing (bfd *abfd, asymbol *sym) #define ELF_ARCH bfd_arch_arm #define ELF_TARGET_ID ARM_ELF_DATA #define ELF_MACHINE_CODE EM_ARM -#ifdef __QNXTARGET__ #define ELF_MAXPAGESIZE 0x1000 -#else -#define ELF_MAXPAGESIZE 0x10000 -#endif #define ELF_COMMONPAGESIZE 0x1000 #define bfd_elf32_mkobject elf32_arm_mkobject diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 63c6cdd6c..ad7834227 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 9ab73528c..702719136 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1,5 +1,5 @@ /* AVR-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Denis Chertykov This file is part of BFD, the Binary File Descriptor library. @@ -2522,8 +2522,9 @@ elf32_avr_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; @@ -4216,7 +4217,7 @@ avr_elf32_load_property_records (bfd *abfd) /* Find the '.avr.prop' section and load the contents into memory. */ sec = bfd_get_section_by_name (abfd, AVR_PROPERTY_RECORD_SECTION_NAME); - if (sec == NULL) + if (sec == NULL || (sec->flags & SEC_HAS_CONTENTS) == 0) return NULL; return avr_elf32_load_records_from_section (abfd, sec); } diff --git a/bfd/elf32-avr.h b/bfd/elf32-avr.h index 963ea80a0..674c786dc 100644 --- a/bfd/elf32-avr.h +++ b/bfd/elf32-avr.h @@ -1,5 +1,5 @@ /* AVR-specific support for 32-bit ELF. - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. Written by Bjoern Haase diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 991083095..c47a8e888 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1,5 +1,5 @@ /* ADI Blackfin BFD support for 32-bit ELF. - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -4917,8 +4917,7 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, && (info->symbolic || h->dynindx == -1 || h->forced_local) && h->def_regular) { - _bfd_error_handler (_("*** check this relocation %s"), - __FUNCTION__); + _bfd_error_handler (_("*** check this relocation %s"), __func__); rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24); rela.r_addend = bfd_get_signed_32 (output_bfd, (sgot->contents diff --git a/bfd/elf32-bfin.h b/bfd/elf32-bfin.h index 606666ae5..b4b32046f 100644 --- a/bfd/elf32-bfin.h +++ b/bfd/elf32-bfin.h @@ -1,5 +1,5 @@ /* ADI Blackfin BFD support for 32-bit ELF. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index 555736cc2..caaf3bdbf 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CR16 ELF - Copyright (C) 2007-2022 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. Written by M R Swami Reddy. This file is part of BFD, the Binary File Descriptor library. @@ -1718,8 +1718,9 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-cr16.h b/bfd/elf32-cr16.h index ac35a6745..e299f7fd1 100644 --- a/bfd/elf32-cr16.h +++ b/bfd/elf32-cr16.h @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CR16 ELF - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 747de318d..85e78ae7d 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1,5 +1,5 @@ /* CRIS-specific support for 32-bit ELF. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Axis Communications AB. Written by Hans-Peter Nilsson, based on elf32-fr30.c PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c. diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c index a7406c003..811440d12 100644 --- a/bfd/elf32-crx.c +++ b/bfd/elf32-crx.c @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CRX ELF - Copyright (C) 2004-2022 Free Software Foundation, Inc. + Copyright (C) 2004-2023 Free Software Foundation, Inc. Written by Tomer Levi, NSC, Israel. This file is part of BFD, the Binary File Descriptor library. @@ -973,8 +973,9 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c index 3333eec9e..40d776169 100644 --- a/bfd/elf32-csky.c +++ b/bfd/elf32-csky.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for C-SKY. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. Contributed by C-SKY Microsystems and Mentor Graphics. This file is part of BFD, the Binary File Descriptor library. @@ -1942,8 +1942,7 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { struct elf_dyn_relocs *p; - for (p = *((struct elf_dyn_relocs **) - &elf_section_data (s)->local_dynrel); + for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next) { @@ -2864,7 +2863,6 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) bfd *obfd = info->output_bfd; obj_attribute *in_attr; obj_attribute *out_attr; - obj_attribute tattr; csky_arch_for_merge *old_arch = NULL; csky_arch_for_merge *new_arch = NULL; int i; @@ -2892,16 +2890,8 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* This is the first object. Copy the attributes. */ out_attr = elf_known_obj_attributes_proc (obfd); - /* If Tag_CSKY_CPU_NAME is already set, save it. */ - memcpy (&tattr, &out_attr[Tag_CSKY_ARCH_NAME], sizeof (tattr)); - _bfd_elf_copy_obj_attributes (ibfd, obfd); - out_attr = elf_known_obj_attributes_proc (obfd); - - /* Restore Tag_CSKY_CPU_NAME. */ - memcpy (&out_attr[Tag_CSKY_ARCH_NAME], &tattr, sizeof (tattr)); - /* Use the Tag_null value to indicate the attributes have been initialized. */ out_attr[0].i = 1; @@ -3066,12 +3056,14 @@ csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) old_flags = elf_elfheader (obfd)->e_flags; out_attr = elf_known_obj_attributes_proc (obfd); - /* the flags like"e , f ,g ..." , we take collection. */ - newest_flag = (old_flags & (~CSKY_ARCH_MASK)) - | (new_flags & (~CSKY_ARCH_MASK)); + /* The flags like "e , f ,g ..." , we take collection. */ + newest_flag = old_flags | new_flags; sec_name = get_elf_backend_data (ibfd)->obj_attrs_section; - if (bfd_get_section_by_name (ibfd, sec_name) == NULL) + + if (bfd_get_section_by_name (ibfd, sec_name) == NULL + || ((new_flags & (CSKY_ARCH_MASK | CSKY_ABI_MASK)) != + (old_flags & (CSKY_ARCH_MASK | CSKY_ABI_MASK)))) { /* Input BFDs have no ".csky.attribute" section. */ new_arch = csky_find_arch_with_eflag (new_flags & CSKY_ARCH_MASK); @@ -3110,9 +3102,6 @@ csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) out_attr[Tag_CSKY_ARCH_NAME].s = _bfd_elf_attr_strdup (obfd, newest_arch->name); } - else - newest_flag |= ((new_flags & (CSKY_ARCH_MASK | CSKY_ABI_MASK)) - | (old_flags & (CSKY_ARCH_MASK | CSKY_ABI_MASK))); } else { @@ -3739,7 +3728,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, section. The user should fix his linker script. */ if (stub_entry->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), stub_entry->target_section); diff --git a/bfd/elf32-csky.h b/bfd/elf32-csky.h index 33bcbe17a..70e109b70 100644 --- a/bfd/elf32-csky.h +++ b/bfd/elf32-csky.h @@ -1,5 +1,5 @@ /* 32-bit ELF support for C-SKY. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index cc9985566..0677d73f2 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -1,5 +1,5 @@ /* D10V-specific support for 32-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-d30v.c b/bfd/elf32-d30v.c index a22e0c5bb..b653d5407 100644 --- a/bfd/elf32-d30v.c +++ b/bfd/elf32-d30v.c @@ -1,5 +1,5 @@ /* D30V-specific support for 32-bit ELF - Copyright (C) 1997-2022 Free Software Foundation, Inc. + Copyright (C) 1997-2023 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index 58da2ffd0..c0f9d8cf5 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -1,5 +1,5 @@ /* DLX specific support for 32-bit ELF - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-dlx.h b/bfd/elf32-dlx.h index c4f2a5f21..564bf011d 100644 --- a/bfd/elf32-dlx.h +++ b/bfd/elf32-dlx.h @@ -1,5 +1,5 @@ /* DLX specific support for 32-bit ELF - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c index f927407e8..da874dadd 100644 --- a/bfd/elf32-epiphany.c +++ b/bfd/elf32-epiphany.c @@ -1,5 +1,5 @@ /* Adapteva epiphany specific support for 32-bit ELF - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Embecosm on behalf of Adapteva, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -213,8 +213,9 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, if this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index 83402bbb4..37d3e0f65 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -1,5 +1,5 @@ /* FR30-specific support for 32-bit ELF. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 0ab65f142..b94c8813a 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -1,5 +1,5 @@ /* FRV-specific support for 32-bit ELF. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c index 24b691ef0..ce4946aef 100644 --- a/bfd/elf32-ft32.c +++ b/bfd/elf32-ft32.c @@ -1,8 +1,8 @@ /* ft32-specific support for 32-bit ELF. - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Copied from elf32-moxie.c which is.. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1092,8 +1092,9 @@ ft32_elf_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-gen.c b/bfd/elf32-gen.c index 38a3bd64e..fed814e44 100644 --- a/bfd/elf32-gen.c +++ b/bfd/elf32-gen.c @@ -1,5 +1,5 @@ /* Generic support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 5afb8a7ec..3039b824f 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -1,5 +1,5 @@ /* BFD back-end for Renesas H8/300 ELF binaries. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -706,8 +706,9 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 153a3ce11..44129c801 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1,5 +1,5 @@ /* BFD back-end for HP PA-RISC ELF files. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Original code by Center for Software Science @@ -729,7 +729,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) section. The user should fix his linker script. */ if (hsh->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output " "section. Retry without " "--enable-non-contiguous-regions.\n"), hsh->target_section); @@ -758,7 +758,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) section. The user should fix his linker script. */ if (hsh->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign %pA to an output " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output " "section. Retry without " "--enable-non-contiguous-regions.\n"), hsh->target_section); @@ -839,7 +839,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) section. The user should fix his linker script. */ if (hsh->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign %pA to an output " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output " "section. Retry without " "--enable-non-contiguous-regions.\n"), hsh->target_section); diff --git a/bfd/elf32-hppa.h b/bfd/elf32-hppa.h index 51232ac23..063fecf2b 100644 --- a/bfd/elf32-hppa.h +++ b/bfd/elf32-hppa.h @@ -4,7 +4,7 @@ in the Stratus FTX/Golf Object File Format (SED-1762) dated February 1994. - Copyright (C) 1990-2022 Free Software Foundation, Inc. + Copyright (C) 1990-2023 Free Software Foundation, Inc. Written by: diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 9717e2c5e..7e6823b40 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1,5 +1,5 @@ /* Intel 80386/80486-specific support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -963,7 +963,8 @@ elf_i386_check_tls_transition (asection *sec, || !((struct elf_x86_link_hash_entry *) h)->tls_get_addr) return false; else if (indirect_call) - return (ELF32_R_TYPE (rel[1].r_info) == R_386_GOT32X); + return (ELF32_R_TYPE (rel[1].r_info) == R_386_GOT32X + || ELF32_R_TYPE (rel[1].r_info) == R_386_GOT32); else return (ELF32_R_TYPE (rel[1].r_info) == R_386_PC32 || ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32); @@ -1062,6 +1063,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, unsigned int from_type = *r_type; unsigned int to_type = from_type; bool check = true; + unsigned int to_le_type, to_ie_type; /* Skip TLS transition for functions. */ if (h != NULL @@ -1069,6 +1071,18 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, || h->type == STT_GNU_IFUNC)) return true; + if (get_elf_backend_data (abfd)->target_os == is_solaris) + { + /* NB: Solaris only supports R_386_TLS_LE and R_386_TLS_IE. */ + to_le_type = R_386_TLS_LE; + to_ie_type = R_386_TLS_IE; + } + else + { + to_le_type = R_386_TLS_LE_32; + to_ie_type = R_386_TLS_IE_32; + } + switch (from_type) { case R_386_TLS_GD: @@ -1080,10 +1094,10 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, if (bfd_link_executable (info)) { if (h == NULL) - to_type = R_386_TLS_LE_32; + to_type = to_le_type; else if (from_type != R_386_TLS_IE && from_type != R_386_TLS_GOTIE) - to_type = R_386_TLS_IE_32; + to_type = to_ie_type; } /* When we are called from elf_i386_relocate_section, there may @@ -1093,7 +1107,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, unsigned int new_to_type = to_type; if (TLS_TRANSITION_IE_TO_LE_P (info, h, tls_type)) - new_to_type = R_386_TLS_LE_32; + new_to_type = to_le_type; if (to_type == R_386_TLS_GD || to_type == R_386_TLS_GOTDESC @@ -1102,7 +1116,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, if (tls_type == GOT_TLS_IE_POS) new_to_type = R_386_TLS_GOTIE; else if (tls_type & GOT_TLS_IE) - new_to_type = R_386_TLS_IE_32; + new_to_type = to_ie_type; } /* We checked the transition before when we were called from @@ -1116,7 +1130,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, case R_386_TLS_LDM: if (bfd_link_executable (info)) - to_type = R_386_TLS_LE_32; + to_type = to_le_type; break; default: @@ -2024,6 +2038,7 @@ elf_i386_relocate_section (bfd *output_bfd, Elf_Internal_Rela *wrel; Elf_Internal_Rela *relend; bool is_vxworks_tls; + unsigned expected_tls_le; unsigned plt_entry_size; /* Skip if check_relocs or scan_relocs failed. */ @@ -2853,9 +2868,17 @@ elf_i386_relocate_section (bfd *output_bfd, relend, h, r_symndx, true)) return false; - if (r_type_tls == R_386_TLS_LE_32) + expected_tls_le = htab->elf.target_os == is_solaris + ? R_386_TLS_LE : R_386_TLS_LE_32; + if (r_type_tls == expected_tls_le) { - BFD_ASSERT (! unresolved_reloc); + /* NB: Solaris only supports R_386_TLS_GD->R_386_TLS_LE. */ + BFD_ASSERT (! unresolved_reloc + && (htab->elf.target_os != is_solaris + || (htab->elf.target_os == is_solaris + && (r_type == R_386_TLS_GD + || r_type == R_386_TLS_IE + || r_type == R_386_TLS_GOTIE)))); if (r_type == R_386_TLS_GD) { unsigned int type; @@ -3352,7 +3375,9 @@ elf_i386_relocate_section (bfd *output_bfd, into: movl %gs:0, %eax leal 0(%esi), %esi */ - BFD_ASSERT (r_type == R_386_TLS_LE_32); + expected_tls_le = htab->elf.target_os == is_solaris + ? R_386_TLS_LE : R_386_TLS_LE_32; + BFD_ASSERT (r_type == expected_tls_le); if (*(contents + rel->r_offset + 4) == 0xff || *(contents + rel->r_offset + 4) == 0x67) memcpy (contents + rel->r_offset - 2, diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c index 59c064304..901043790 100644 --- a/bfd/elf32-ip2k.c +++ b/bfd/elf32-ip2k.c @@ -1,5 +1,5 @@ /* Ubicom IP2xxx specific support for 32-bit ELF - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -623,7 +623,7 @@ adjust_all_relocations (bfd *abfd, /* Now fix the stab relocations. */ stab = bfd_get_section_by_name (abfd, ".stab"); - if (stab) + if (stab && stab->reloc_count != 0) { bfd_byte *stabcontents, *stabend, *stabp; bfd_size_type stab_size = stab->rawsize ? stab->rawsize : stab->size; @@ -1096,8 +1096,9 @@ ip2k_elf_relax_section (bfd *abfd, if this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c index 8cdbceeb4..e8421dd5f 100644 --- a/bfd/elf32-iq2000.c +++ b/bfd/elf32-iq2000.c @@ -1,5 +1,5 @@ /* IQ2000-specific support for 32-bit ELF. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c index 64b3edef4..c4cf148a2 100644 --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -1,5 +1,5 @@ /* Lattice Mico32-specific support for 32-bit ELF - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. Contributed by Jon Beniston This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c index fe564df0b..129d6a92c 100644 --- a/bfd/elf32-m32c.c +++ b/bfd/elf32-m32c.c @@ -1,5 +1,5 @@ /* M16C/M32C specific support for 32-bit ELF. - Copyright (C) 2005-2022 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1459,8 +1459,9 @@ m32c_elf_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 5ba509a60..0f3c582b9 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1,5 +1,5 @@ /* M32R-specific support for 32-bit ELF. - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c index 21e7a1149..67a8dad09 100644 --- a/bfd/elf32-m68hc11.c +++ b/bfd/elf32-m68hc11.c @@ -1,5 +1,5 @@ /* Motorola 68HC11-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com)) @@ -419,7 +419,7 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) section. The user should fix his linker script. */ if (stub_entry->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), stub_entry->target_section); @@ -709,8 +709,9 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c index 3a4458d3f..39c665d10 100644 --- a/bfd/elf32-m68hc12.c +++ b/bfd/elf32-m68hc12.c @@ -1,5 +1,5 @@ /* Motorola 68HC12-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com)) @@ -539,7 +539,7 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) section. The user should fix his linker script. */ if (stub_entry->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), stub_entry->target_section); diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 04bd7ccde..da6e3c388 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -1,5 +1,5 @@ /* Motorola 68HC11/HC12-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h index 59ef46fdc..4558aa595 100644 --- a/bfd/elf32-m68hc1x.h +++ b/bfd/elf32-m68hc1x.h @@ -1,5 +1,5 @@ /* Motorola 68HC11/68HC12-specific support for 32-bit ELF - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 150b63815..36d3452bb 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -1,5 +1,5 @@ /* Motorola 68k series support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-m68k.h b/bfd/elf32-m68k.h index 9642da1b7..b2b45c112 100644 --- a/bfd/elf32-m68k.h +++ b/bfd/elf32-m68k.h @@ -1,5 +1,5 @@ /* Motorola 68k series support for 32-bit ELF - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c index 7e2ad8dd9..40558e6ce 100644 --- a/bfd/elf32-mcore.c +++ b/bfd/elf32-mcore.c @@ -1,5 +1,5 @@ /* Motorola MCore specific support for 32-bit ELF - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c index f700dfce9..56e5cef55 100644 --- a/bfd/elf32-mep.c +++ b/bfd/elf32-mep.c @@ -1,5 +1,5 @@ /* MeP-specific support for 32-bit ELF. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 5099e8fc6..43b76a9f9 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -1,5 +1,5 @@ /* Meta support for 32-bit ELF - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Contributed by Imagination Technologies Ltd. This file is part of BFD, the Binary File Descriptor library. @@ -3342,7 +3342,7 @@ metag_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) section. The user should fix his linker script. */ if (hsh->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), hsh->target_section); diff --git a/bfd/elf32-metag.h b/bfd/elf32-metag.h index c4acab318..300193168 100644 --- a/bfd/elf32-metag.h +++ b/bfd/elf32-metag.h @@ -1,5 +1,5 @@ /* Meta support for 32-bit ELF - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Contributed by Imagination Technologies Ltd. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 013c32a1e..a7e81c70f 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -1,6 +1,6 @@ /* Xilinx MicroBlaze-specific support for 32-bit ELF - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1467,9 +1467,9 @@ microblaze_elf_relocate_section (bfd *output_bfd, relocation += addend; relocation -= dtprel_base(info); bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, - contents + offset + 2); + contents + offset + endian); bfd_put_16 (input_bfd, relocation & 0xffff, - contents + offset + 2 + INST_WORD_SIZE); + contents + offset + endian + INST_WORD_SIZE); break; case (int) R_MICROBLAZE_TEXTREL_64: case (int) R_MICROBLAZE_TEXTREL_32_LO: diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 0ffa9017d..03be42e84 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1,5 +1,5 @@ /* MIPS-specific support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -1858,8 +1858,11 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, else relocation = symbol->value; - relocation += symbol->section->output_section->vma; - relocation += symbol->section->output_offset; + if (symbol->section->output_section != NULL) + { + relocation += symbol->section->output_section->vma; + relocation += symbol->section->output_offset; + } if (!_bfd_mips_reloc_offset_in_range (abfd, input_section, reloc_entry, check_inplace)) @@ -2599,7 +2602,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { _bfd_mips_elf_print_private_bfd_data #define bfd_elf32_bfd_relax_section _bfd_mips_elf_relax_section #define bfd_elf32_mkobject _bfd_mips_elf_mkobject -#define bfd_elf32_close_and_cleanup _bfd_mips_elf_close_and_cleanup +#define bfd_elf32_bfd_free_cached_info _bfd_mips_elf_free_cached_info /* Support for SGI-ish mips targets. */ #define TARGET_LITTLE_SYM mips_elf32_le_vec diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c index d857617c5..6836c2b47 100644 --- a/bfd/elf32-moxie.c +++ b/bfd/elf32-moxie.c @@ -1,8 +1,8 @@ /* moxie-specific support for 32-bit ELF. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Copied from elf32-fr30.c which is.. - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index a1a59e099..e77ca392f 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -1,5 +1,5 @@ /* MSP430-specific support for 32-bit ELF - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. Contributed by Dmitry Diky This file is part of BFD, the Binary File Descriptor library. @@ -2014,8 +2014,10 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 - || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) + || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 + || (sec->flags & SEC_CODE) == 0) return true; if (debug_relocs) diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c index 1d231a577..687edf15f 100644 --- a/bfd/elf32-mt.c +++ b/bfd/elf32-mt.c @@ -1,5 +1,5 @@ /* Morpho Technologies MT specific support for 32-bit ELF - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 5d22002d1..ac9106a55 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -1,5 +1,5 @@ /* NDS32-specific support for 32-bit ELF. - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. Contributed by Andes Technology Corporation. This file is part of BFD, the Binary File Descriptor library. @@ -6385,18 +6385,18 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) case DT_PLTGOT: /* name = ".got"; */ - s = ehtab->sgot->output_section; + s = ehtab->sgot; goto get_vma; case DT_JMPREL: - s = ehtab->srelplt->output_section; + s = ehtab->srelplt; get_vma: BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; case DT_PLTRELSZ: - s = ehtab->srelplt->output_section; + s = ehtab->srelplt; BFD_ASSERT (s != NULL); dyn.d_un.d_val = s->size; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); @@ -6414,7 +6414,7 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) about changing the DT_RELA entry. */ if (ehtab->srelplt != NULL) { - s = ehtab->srelplt->output_section; + s = ehtab->srelplt; dyn.d_un.d_val -= s->size; } bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); diff --git a/bfd/elf32-nds32.h b/bfd/elf32-nds32.h index 58ce79135..38fdb4cce 100644 --- a/bfd/elf32-nds32.h +++ b/bfd/elf32-nds32.h @@ -1,5 +1,5 @@ /* NDS32-specific support for 32-bit ELF. - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. Contributed by Andes Technology Corporation. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index 806ec314c..b02de7417 100644 --- a/bfd/elf32-nios2.c +++ b/bfd/elf32-nios2.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for Nios II. - Copyright (C) 2012-2022 Free Software Foundation, Inc. + Copyright (C) 2012-2023 Free Software Foundation, Inc. Contributed by Nigel Gray (ngray@altera.com). Contributed by Mentor Graphics, Inc. @@ -2491,7 +2491,7 @@ nios2_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_U section. The user should fix his linker script. */ if (hsh->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), hsh->target_section); @@ -3724,7 +3724,6 @@ nios2_elf32_relocate_section (bfd *output_bfd, const char *name = NULL; int r_type; const char *format; - char *msgbuf = NULL; char *msg = NULL; bool unresolved_reloc; bfd_vma off; @@ -3825,10 +3824,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, format = _("global pointer relative relocation at address " "%#" PRIx64 " when _gp not defined\n"); - if (asprintf (&msgbuf, format, - (uint64_t) reloc_address) == -1) - msgbuf = NULL; - msg = msgbuf; + msg = bfd_asprintf (format, (uint64_t) reloc_address); r = bfd_reloc_dangerous; } else @@ -3857,11 +3853,10 @@ nios2_elf32_relocate_section (bfd *output_bfd, "the global pointer (at %#" PRIx64 ") " "because the offset (%" PRId64 ") is out of " "the allowed range, -32678 to 32767\n" ); - if (asprintf (&msgbuf, format, name, - (uint64_t) symbol_address, (uint64_t) gp, - (int64_t) relocation) == -1) - msgbuf = NULL; - msg = msgbuf; + msg = bfd_asprintf (format, name, + (uint64_t) symbol_address, + (uint64_t) gp, + (int64_t) relocation); r = bfd_reloc_outofrange; } else @@ -4531,7 +4526,6 @@ nios2_elf32_relocate_section (bfd *output_bfd, { (*info->callbacks->warning) (info, msg, name, input_bfd, input_section, rel->r_offset); - free (msgbuf); return false; } } diff --git a/bfd/elf32-nios2.h b/bfd/elf32-nios2.h index db5d2bc70..60ee7c5f4 100644 --- a/bfd/elf32-nios2.h +++ b/bfd/elf32-nios2.h @@ -1,5 +1,5 @@ /* Nios II support for 32-bit ELF - Copyright (C) 2013-2022 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. Contributed by Mentor Graphics This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 2967a62fe..6b20e27cf 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -1,5 +1,5 @@ /* Or1k-specific support for 32-bit ELF. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org PIC parts added by Stefan Kristiansson, stefan.kristiansson@saunalahti.fi, @@ -1341,6 +1341,17 @@ or1k_elf_relocate_section (bfd *output_bfd, sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; + /* Make a full scan for R_OR1K_GOT_AHI16, since it could be AFTER R_OR1K_GOT16. */ + for (rel = relocs; rel < relend; rel++) + { + int r_type = ELF32_R_TYPE (rel->r_info); + if (r_type==R_OR1K_GOT_AHI16) + { + saw_gotha = true; + break; + } + } + for (rel = relocs; rel < relend; rel++) { reloc_howto_type *howto; @@ -1520,9 +1531,6 @@ or1k_elf_relocate_section (bfd *output_bfd, || r_type == R_OR1K_GOT_AHI16) relocation -= got_sym_value; - if (r_type == R_OR1K_GOT_AHI16) - saw_gotha = true; - /* If we have a R_OR1K_GOT16 following a R_OR1K_GOT_AHI16 relocation we assume the code is doing the right thing to avoid overflows. */ diff --git a/bfd/elf32-pj.c b/bfd/elf32-pj.c index f2399759e..dc0798202 100644 --- a/bfd/elf32-pj.c +++ b/bfd/elf32-pj.c @@ -1,5 +1,5 @@ /* picoJava specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Contributed by Steve Chamberlan of Transmeta (sac@pobox.com). This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 0eebadc1e..5622aaa30 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1,5 +1,5 @@ /* PowerPC-specific support for 32-bit ELF - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -987,14 +987,8 @@ ppc_elf_unhandled_reloc (bfd *abfd, input_section, output_bfd, error_message); if (error_message != NULL) - { - static char *message; - free (message); - if (asprintf (&message, _("generic linker can't handle %s"), - reloc_entry->howto->name) < 0) - message = NULL; - *error_message = message; - } + *error_message = bfd_asprintf (_("generic linker can't handle %s"), + reloc_entry->howto->name); return bfd_reloc_dangerous; } @@ -1087,6 +1081,7 @@ _bfd_elf_ppc_set_arch (bfd *abfd) s = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME); if (s != NULL && s->size >= 24 + && (s->flags & SEC_HAS_CONTENTS) != 0 && bfd_malloc_and_get_section (abfd, s, &contents)) { unsigned int apuinfo_size = bfd_get_32 (abfd, contents + 4); @@ -1646,7 +1641,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) } if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0 - || (bfd_bread (buffer, length, ibfd) != length)) + || (bfd_read (buffer, length, ibfd) != length)) { /* xgettext:c-format */ error_message = _("unable to read in %s section from %pB"); @@ -1840,7 +1835,8 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, /* If this object was prelinked, the prelinker stored the address of .glink at got[1]. If it wasn't prelinked, got[1] will be zero. */ dynamic = bfd_get_section_by_name (abfd, ".dynamic"); - if (dynamic != NULL) + if (dynamic != NULL + && (dynamic->flags & SEC_HAS_CONTENTS) != 0) { bfd_byte *dynbuf, *extdyn, *extdynend; size_t extdynsize; @@ -1918,7 +1914,7 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, } } - count = relplt->size / sizeof (Elf32_External_Rela); + count = NUM_SHDR_ENTRIES (&elf_section_data (relplt)->this_hdr); /* If the stubs are those for -shared/-pie then we might have multiple stubs for each plt entry. If that is the case then there is no way to associate stubs with their plt entries short @@ -4020,12 +4016,19 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED, htab->plt_type = plt_type; } } - if (htab->plt_type == PLT_OLD && htab->params->plt_style == PLT_NEW) + if (htab->plt_type == PLT_OLD) { - if (htab->old_bfd != NULL) - _bfd_error_handler (_("bss-plt forced due to %pB"), htab->old_bfd); - else - _bfd_error_handler (_("bss-plt forced by profiling")); + if (!info->user_warn_rwx_segments) + info->no_warn_rwx_segments = 1; + if (htab->params->plt_style == PLT_NEW + || (htab->params->plt_style != PLT_OLD + && !info->no_warn_rwx_segments)) + { + if (htab->old_bfd != NULL) + _bfd_error_handler (_("bss-plt forced due to %pB"), htab->old_bfd); + else + _bfd_error_handler (_("bss-plt forced by profiling")); + } } BFD_ASSERT (htab->plt_type != PLT_VXWORKS); @@ -5123,13 +5126,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && eh->has_addr16_lo && htab->params->pic_fixup > 0)) { - unsigned int need; - /* Make sure this symbol is output as a dynamic symbol. */ if (!ensure_undef_dynamic (info, &eh->elf)) return false; - need = 0; + unsigned int need = got_entries_needed (eh->tls_mask); + unsigned int rel_need = need * sizeof (Elf32_External_Rela) / 4; if ((eh->tls_mask & (TLS_TLS | TLS_LD)) == (TLS_TLS | TLS_LD)) { if (SYMBOL_REFERENCES_LOCAL (info, &eh->elf)) @@ -5138,9 +5140,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) a local dynamic reloc against a non-local symbol. */ htab->tlsld_got.refcount += 1; else - need += 8; + { + need += 8; + rel_need += sizeof (Elf32_External_Rela); + } } - need += got_entries_needed (eh->tls_mask); if (need == 0) eh->elf.got.offset = (bfd_vma) -1; else @@ -5158,13 +5162,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { asection *rsec; - need *= sizeof (Elf32_External_Rela) / 4; - if ((eh->tls_mask & (TLS_TLS | TLS_LD)) == (TLS_TLS | TLS_LD)) - need -= sizeof (Elf32_External_Rela); rsec = htab->elf.srelgot; if (eh->elf.type == STT_GNU_IFUNC) rsec = htab->elf.irelplt; - rsec->size += need; + rsec->size += rel_need; } } } @@ -6099,6 +6100,7 @@ ppc_elf_relax_section (bfd *abfd, /* 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_HAS_CONTENTS) == 0 || (isec->flags & SEC_LINKER_CREATED) != 0 || isec->size < 4) return true; @@ -6933,6 +6935,23 @@ is_insn_dq_form (unsigned int insn) && (insn & 3) == 1)); } +static bool +swap_reloc_out (bfd *obfd, Elf_Internal_Rela *rel, bfd_byte *loc, asection *s) +{ + if ((size_t) (loc - s->contents) >= s->size) + return false; + bfd_elf32_swap_reloca_out (obfd, rel, loc); + return true; +} + +static bool +count_and_swap_reloc_out (bfd *obfd, Elf_Internal_Rela *rel, asection *s) +{ + bfd_byte *loc = s->contents; + loc += s->reloc_count++ * sizeof (Elf32_External_Rela); + return swap_reloc_out (obfd, rel, loc, s); +} + /* The RELOCATE_SECTION function is called by the ELF backend linker to handle the relocations for a section. @@ -7804,7 +7823,6 @@ ppc_elf_relocate_section (bfd *output_bfd, : sym->st_shndx != SHN_ABS))) { asection *rsec = htab->elf.srelgot; - bfd_byte * loc; if (ifunc != NULL) { @@ -7823,11 +7841,9 @@ ppc_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF32_R_INFO (indx, R_PPC_DTPMOD32); if (tls_ty == (TLS_TLS | TLS_GD)) { - loc = rsec->contents; - loc += (rsec->reloc_count++ - * sizeof (Elf32_External_Rela)); - bfd_elf32_swap_reloca_out (output_bfd, - &outrel, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, + &outrel, + rsec)); outrel.r_offset += 4; outrel.r_info = ELF32_R_INFO (indx, R_PPC_DTPREL32); @@ -7854,10 +7870,8 @@ ppc_elf_relocate_section (bfd *output_bfd, outrel.r_addend -= htab->elf.tls_sec->vma; } } - loc = rsec->contents; - loc += (rsec->reloc_count++ - * sizeof (Elf32_External_Rela)); - bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, + &outrel, rsec)); } /* Init the .got section contents if we're not @@ -8087,7 +8101,6 @@ ppc_elf_relocate_section (bfd *output_bfd, && h->dyn_relocs != NULL)) { int skip; - bfd_byte *loc; asection *sreloc; long indx = 0; @@ -8219,9 +8232,8 @@ ppc_elf_relocate_section (bfd *output_bfd, if (sreloc == NULL) return false; - loc = sreloc->contents; - loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela); - bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, &outrel, + sreloc)); if (skip == -1) goto copy_reloc; @@ -9571,7 +9583,8 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA); rela.r_addend = got_offset; - bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (info->output_bfd, &rela, loc, + htab->srelplt2)); loc += sizeof (Elf32_External_Rela); /* Provide the @l relocation for the second instruction. */ @@ -9581,7 +9594,8 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO); rela.r_addend = got_offset; - bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (info->output_bfd, &rela, loc, + htab->srelplt2)); loc += sizeof (Elf32_External_Rela); /* Provide a relocation for the GOT entry corresponding to this @@ -9592,7 +9606,8 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_PPC_ADDR32); rela.r_addend = ent->plt.offset + 16; - bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (info->output_bfd, &rela, loc, + htab->srelplt2)); } /* VxWorks uses non-standard semantics for R_PPC_JMP_SLOT. @@ -9674,7 +9689,8 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) if (h->type == STT_GNU_IFUNC && is_static_defined (h)) htab->maybe_local_ifunc_resolver = 1; } - bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (info->output_bfd, &rela, + loc, relplt)); } doneone = true; } @@ -9791,9 +9807,8 @@ ppc_finish_symbols (struct bfd_link_info *info) + plt->output_offset + plt->output_section->vma); rela.r_addend = val; - loc = relplt->contents + (relplt->reloc_count++ - * sizeof (Elf32_External_Rela)); - bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (count_and_swap_reloc_out (info->output_bfd, &rela, + relplt)); p = (unsigned char *) htab->glink->contents + ent->glink_offset; write_glink_stub (NULL, ent, htab->elf.iplt, p, info); @@ -9877,7 +9892,6 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, { asection *s; Elf_Internal_Rela rela; - bfd_byte *loc; /* This symbols needs a copy reloc. Set it up. */ @@ -9898,8 +9912,7 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, rela.r_offset = SYM_VAL (h); rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY); rela.r_addend = 0; - loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela); - bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, &rela, s)); } #ifdef DEBUG @@ -10103,7 +10116,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, + 2); rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA); rela.r_addend = 0; - bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (output_bfd, &rela, loc, htab->srelplt2)); loc += sizeof (Elf32_External_Rela); /* Output the @l relocation for the second instruction. */ @@ -10112,7 +10125,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, + 6); rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO); rela.r_addend = 0; - bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (output_bfd, &rela, loc, htab->srelplt2)); loc += sizeof (Elf32_External_Rela); /* Fix up the remaining relocations. They may have the wrong diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h index b3dd52db4..c1d56bf71 100644 --- a/bfd/elf32-ppc.h +++ b/bfd/elf32-ppc.h @@ -1,5 +1,5 @@ /* PowerPC-specific support for 64-bit ELF. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c index a6ce478f4..2bb4cb7a8 100644 --- a/bfd/elf32-pru.c +++ b/bfd/elf32-pru.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for TI PRU. - Copyright (C) 2014-2022 Free Software Foundation, Inc. + Copyright (C) 2014-2023 Free Software Foundation, Inc. Contributed by Dimitar Dimitrov Based on elf32-nios2.c @@ -1354,8 +1354,10 @@ pru_elf32_relax_section (bfd *abfd, asection *sec, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 - || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) + || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 + || (sec->flags & SEC_CODE) == 0) return true; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c index 958bff056..c8b767ea1 100644 --- a/bfd/elf32-rl78.c +++ b/bfd/elf32-rl78.c @@ -1,5 +1,5 @@ /* Renesas RL78 specific support for 32-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -396,18 +396,18 @@ rl78_compute_complex_reloc (unsigned long r_type, { int32_t tmp1, tmp2; bfd_vma relocation = 0; - bfd_reloc_status_type stat = bfd_reloc_ok; + bfd_reloc_status_type status = bfd_reloc_ok; switch (r_type) { default: - stat = bfd_reloc_notsupported; + status = bfd_reloc_notsupported; break; case R_RL78_ABS24S_PCREL: case R_RL78_ABS16S_PCREL: case R_RL78_ABS8S_PCREL: - relocation = rl78_stack_pop (&stat); + relocation = rl78_stack_pop (&status); relocation -= input_section->output_section->vma + input_section->output_offset; break; @@ -420,141 +420,141 @@ rl78_compute_complex_reloc (unsigned long r_type, case R_RL78_ABS8: case R_RL78_ABS8U: case R_RL78_ABS8S: - relocation = rl78_stack_pop (&stat); + relocation = rl78_stack_pop (&status); break; case R_RL78_ABS16UL: case R_RL78_ABS8UL: - relocation = rl78_stack_pop (&stat) >> 2; + relocation = rl78_stack_pop (&status) >> 2; break;; case R_RL78_ABS16UW: case R_RL78_ABS8UW: - relocation = rl78_stack_pop (&stat) >> 1; + relocation = rl78_stack_pop (&status) >> 1; break; /* The rest of the relocs compute values and then push them onto the stack. */ case R_RL78_OPramtop: case R_RL78_OPromtop: case R_RL78_SYM: - rl78_stack_push (symval, &stat); + rl78_stack_push (symval, &status); break; case R_RL78_OPneg: - tmp1 = rl78_stack_pop (&stat); + tmp1 = rl78_stack_pop (&status); tmp1 = - tmp1; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPadd: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 += tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPsub: /* For the expression "A - B", the assembler pushes A, then B, then OPSUB. So the first op we pop is B, not A. */ - tmp2 = rl78_stack_pop (&stat); /* B */ - tmp1 = rl78_stack_pop (&stat); /* A */ + tmp2 = rl78_stack_pop (&status); /* B */ + tmp1 = rl78_stack_pop (&status); /* A */ tmp1 -= tmp2; /* A - B */ - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPmul: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 *= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPdiv: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); if (tmp2 != 0) tmp1 /= tmp2; else { tmp1 = 0; - stat = bfd_reloc_overflow; + status = bfd_reloc_overflow; } - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPshla: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 <<= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPshra: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 >>= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPsctsize: - rl78_stack_push (input_section->size, &stat); + rl78_stack_push (input_section->size, &status); break; case R_RL78_OPscttop: - rl78_stack_push (input_section->output_section->vma, &stat); + rl78_stack_push (input_section->output_section->vma, &status); break; case R_RL78_OPand: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 &= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPor: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 |= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPxor: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); tmp1 ^= tmp2; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPnot: - tmp1 = rl78_stack_pop (&stat); + tmp1 = rl78_stack_pop (&status); tmp1 = ~ tmp1; - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; case R_RL78_OPmod: - tmp2 = rl78_stack_pop (&stat); - tmp1 = rl78_stack_pop (&stat); + tmp2 = rl78_stack_pop (&status); + tmp1 = rl78_stack_pop (&status); if (tmp2 != 0) tmp1 %= tmp2; else { tmp1 = 0; - stat = bfd_reloc_overflow; + status = bfd_reloc_overflow; } - rl78_stack_push (tmp1, &stat); + rl78_stack_push (tmp1, &status); break; } if (r) { - if (stat == bfd_reloc_dangerous) + if (status == bfd_reloc_dangerous) *error_message = (_("RL78 reloc stack overflow/underflow")); - else if (stat == bfd_reloc_overflow) + else if (status == bfd_reloc_overflow) { - stat = bfd_reloc_dangerous; + status = bfd_reloc_dangerous; *error_message = (_("RL78 reloc divide by zero")); } - *r = stat; + *r = status; } return relocation; } @@ -2106,8 +2106,9 @@ rl78_elf_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index 34eb88403..d14c23831 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -1,5 +1,5 @@ /* Renesas RX specific support for 32-bit ELF. - Copyright (C) 2008-2022 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2038,8 +2038,9 @@ elf32_rx_relax_section (bfd *abfd, this section does not have relocs, or if this is not a code section. */ if (bfd_link_relocatable (link_info) - || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_CODE) == 0) return true; diff --git a/bfd/elf32-rx.h b/bfd/elf32-rx.h index 7ac621756..5d46a603c 100644 --- a/bfd/elf32-rx.h +++ b/bfd/elf32-rx.h @@ -1,5 +1,5 @@ /* Renesas RX specific support for 32-bit ELF. - Copyright (C) 2014-2022 Free Software Foundation, Inc. + Copyright (C) 2014-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-s12z.c b/bfd/elf32-s12z.c index 8c346d767..b02a34ff7 100644 --- a/bfd/elf32-s12z.c +++ b/bfd/elf32-s12z.c @@ -1,5 +1,5 @@ /* Freescale S12Z-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com)) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 45b4581f8..9496b1472 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 32-bit ELF - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. @@ -2706,7 +2706,7 @@ elf_s390_relocate_section (bfd *output_bfd, /* This relocation gets optimized away by the local exec access optimization. */ BFD_ASSERT (! unresolved_reloc); - bfd_put_32 (output_bfd, -tpoff (info, relocation), + bfd_put_32 (output_bfd, -tpoff (info, relocation) + rel->r_addend, contents + rel->r_offset); continue; } @@ -2901,7 +2901,7 @@ elf_s390_relocate_section (bfd *output_bfd, else { BFD_ASSERT (! unresolved_reloc); - bfd_put_32 (output_bfd, -tpoff (info, relocation), + bfd_put_32 (output_bfd, -tpoff (info, relocation) + rel->r_addend, contents + rel->r_offset); } continue; diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index 41c8aff4f..a5bef1ae4 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for S+core. - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. Contributed by Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) diff --git a/bfd/elf32-score.h b/bfd/elf32-score.h index 419fc27c4..c11c578df 100644 --- a/bfd/elf32-score.h +++ b/bfd/elf32-score.h @@ -1,5 +1,5 @@ /* 32-bit ELF support for S+core. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Contributed by Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index 761d85364..e936fd2ca 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for S+core. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Contributed by Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) diff --git a/bfd/elf32-sh-relocs.h b/bfd/elf32-sh-relocs.h index dc9487c2b..63eb34c56 100644 --- a/bfd/elf32-sh-relocs.h +++ b/bfd/elf32-sh-relocs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2022 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 8ababcf51..817efb584 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -1,5 +1,5 @@ /* Renesas / SuperH SH specific support for 32-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -468,6 +468,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, *again = false; if (bfd_link_relocatable (link_info) + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) return true; @@ -1154,6 +1155,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, bfd_byte *ocontents; if (o == sec + || (o->flags & SEC_HAS_CONTENTS) == 0 || (o->flags & SEC_RELOC) == 0 || o->reloc_count == 0) continue; @@ -5008,14 +5010,14 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { info->callbacks->einfo /* xgettext:c-format */ - (_("%X%C: relocation to \"%s\" references a different segment\n"), + (_("%X%H: relocation to \"%s\" references a different segment\n"), input_bfd, input_section, rel->r_offset, symname); return false; } else info->callbacks->einfo /* xgettext:c-format */ - (_("%C: warning: relocation to \"%s\" references a different segment\n"), + (_("%H: warning: relocation to \"%s\" references a different segment\n"), input_bfd, input_section, rel->r_offset, symname); } @@ -6172,6 +6174,8 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, The entry in the global offset table will already have been initialized in the relocate_section function. */ if (bfd_link_pic (info) + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) && SYMBOL_REFERENCES_LOCAL (info, h)) { if (htab->fdpic_p) @@ -6287,15 +6291,13 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) break; case DT_JMPREL: - s = htab->root.srelplt->output_section; - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; + s = htab->root.srelplt; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; case DT_PLTRELSZ: - s = htab->root.srelplt->output_section; - BFD_ASSERT (s != NULL); + s = htab->root.srelplt; dyn.d_un.d_val = s->size; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index 1bfd40e9a..0de3ab367 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 1e2002ed8..8b7ce0158 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -1,6 +1,6 @@ /* SPU specific support for 32-bit ELF - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-spu.h b/bfd/elf32-spu.h index 43a35f79f..2b7a8a1a9 100644 --- a/bfd/elf32-spu.h +++ b/bfd/elf32-spu.h @@ -1,6 +1,6 @@ /* SPU specific support for 32-bit ELF. - Copyright (C) 2006-2022 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 4150d2481..c1865de99 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for TI C6X - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. Contributed by Joseph Myers Bernd Schmidt diff --git a/bfd/elf32-tic6x.h b/bfd/elf32-tic6x.h index 7b2756f7e..26095cc6b 100644 --- a/bfd/elf32-tic6x.h +++ b/bfd/elf32-tic6x.h @@ -1,5 +1,5 @@ /* 32-bit ELF support for TI C6X - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-tilegx.c b/bfd/elf32-tilegx.c index 10dd4effe..31874b0b3 100644 --- a/bfd/elf32-tilegx.c +++ b/bfd/elf32-tilegx.c @@ -1,5 +1,5 @@ /* TILE-Gx-specific support for 32-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-tilegx.h b/bfd/elf32-tilegx.h index b7382353d..d2581945c 100644 --- a/bfd/elf32-tilegx.h +++ b/bfd/elf32-tilegx.h @@ -1,5 +1,5 @@ /* TILE-Gx-specific support for 32-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index 6f2f6ed7e..edaa49ee1 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -1,5 +1,5 @@ /* TILEPro-specific support for 32-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-tilepro.h b/bfd/elf32-tilepro.h index 7683c3d10..0654b1a75 100644 --- a/bfd/elf32-tilepro.h +++ b/bfd/elf32-tilepro.h @@ -1,5 +1,5 @@ /* TILEPro-specific support for 32-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index e9fcfeecd..4ce54990e 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1,5 +1,5 @@ /* V850-specific support for 32-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -3440,6 +3440,7 @@ v850_elf_relax_section (bfd *abfd, *again = false; if (bfd_link_relocatable (link_info) + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) return true; diff --git a/bfd/elf32-v850.h b/bfd/elf32-v850.h index b0c77ab11..99dde86bd 100644 --- a/bfd/elf32-v850.h +++ b/bfd/elf32-v850.h @@ -1,5 +1,5 @@ /* V850 Note manipulation routines. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index dc23b5710..6fd86aa43 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -1,5 +1,5 @@ /* VAX series support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Contributed by Matt Thomas . This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c index 097f21bc1..2c40aee9c 100644 --- a/bfd/elf32-visium.c +++ b/bfd/elf32-visium.c @@ -1,6 +1,6 @@ /* Visium-specific support for 32-bit ELF. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-wasm32.c b/bfd/elf32-wasm32.c index b1f0258c2..45cbf27f2 100644 --- a/bfd/elf32-wasm32.c +++ b/bfd/elf32-wasm32.c @@ -1,5 +1,5 @@ /* 32-bit ELF for the WebAssembly target - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-xgate.c b/bfd/elf32-xgate.c index be5228a08..dbd889da9 100644 --- a/bfd/elf32-xgate.c +++ b/bfd/elf32-xgate.c @@ -1,5 +1,5 @@ /* Freescale XGATE-specific support for 32-bit ELF - Copyright (C) 2010-2022 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. Contributed by Sean Keys(skeys@ipdatasys.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index 65e65cd77..d7a334d67 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -1,5 +1,5 @@ /* Xstormy16-specific support for 32-bit ELF. - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 68eaada2f..7772e2a5f 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -1,5 +1,5 @@ /* Xtensa-specific support for 32-bit ELF. - Copyright (C) 2003-2022 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -5230,6 +5230,13 @@ literal_value_equal (const literal_value *src1, (if undefined or weak). */ h1 = r_reloc_get_hash_entry (&src1->r_rel); h2 = r_reloc_get_hash_entry (&src2->r_rel); + + /* Keep start_stop literals always unique to avoid dropping it due to them + having late initialization. + Now they are equal because initialized with zeroed values. */ + if (h2 && h2->start_stop) + return false; + if (r_reloc_is_defined (&src1->r_rel) && (final_static_link || ((!h1 || h1->root.type != bfd_link_hash_defweak) diff --git a/bfd/elf32-z80.c b/bfd/elf32-z80.c index 3a28bc96c..8cd63c7e4 100644 --- a/bfd/elf32-z80.c +++ b/bfd/elf32-z80.c @@ -1,5 +1,5 @@ /* Zilog (e)Z80-specific support for 32-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. (Heavily copied from the S12Z port by Sergey Belyashov (sergey.belyashov@gmail.com)) This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32.c b/bfd/elf32.c index 60d72870f..c2653b4af 100644 --- a/bfd/elf32.c +++ b/bfd/elf32.c @@ -1,5 +1,5 @@ /* ELF 32-bit executable support for BFD. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 75e522dbc..eb60410f6 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1,5 +1,5 @@ /* Alpha specific support for 64-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of BFD, the Binary File Descriptor library. @@ -1425,17 +1425,7 @@ elf64_alpha_read_ecoff_info (bfd *abfd, asection *section, error_return: free (ext_hdr); - free (debug->line); - free (debug->external_dnr); - free (debug->external_pdr); - free (debug->external_sym); - free (debug->external_opt); - free (debug->external_aux); - free (debug->ss); - free (debug->ssext); - free (debug->external_fdr); - free (debug->external_rfd); - free (debug->external_ext); + _bfd_ecoff_free_ecoff_debug_info (debug); return false; } @@ -1519,13 +1509,6 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, (*swap->swap_fdr_in) (abfd, fraw_src, fdr_ptr); alpha_elf_tdata (abfd)->find_line_info = fi; - - /* Note that we don't bother to ever free this information. - find_nearest_line is either called all the time, as in - objdump -l, so the information should be saved, or it is - rarely called, as in ld error messages, so the memory - wasted is unimportant. Still, it would probably be a - good idea for free_cached_info to throw it away. */ } if (_bfd_ecoff_locate_line (abfd, section, offset, &fi->d, swap, @@ -1999,9 +1982,9 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, { info->flags |= DF_TEXTREL; info->callbacks->minfo - (_("%pB: dynamic relocation against `%pT' in " + (_("%pB: dynamic relocation against a local symbol in " "read-only section `%pA'\n"), - sec->owner, h->root.root.root.string, sec); + sec->owner, sec); } } } @@ -3726,8 +3709,8 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec, *again = false; if (bfd_link_relocatable (link_info) - || ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC)) - != (SEC_CODE | SEC_RELOC | SEC_ALLOC)) + || ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC | SEC_HAS_CONTENTS)) + != (SEC_CODE | SEC_RELOC | SEC_ALLOC | SEC_HAS_CONTENTS)) || sec->reloc_count == 0) return true; diff --git a/bfd/elf64-amdgcn.c b/bfd/elf64-amdgcn.c index 691fa0a34..17c810850 100644 --- a/bfd/elf64-amdgcn.c +++ b/bfd/elf64-amdgcn.c @@ -1,6 +1,6 @@ /* AMDGCN ELF support for BFD. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c index e7c27544a..aefad7da5 100644 --- a/bfd/elf64-bpf.c +++ b/bfd/elf64-bpf.c @@ -1,5 +1,5 @@ /* Linux bpf specific support for 64-bit ELF - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. Contributed by Oracle Inc. This file is part of BFD, the Binary File Descriptor library. @@ -34,214 +34,40 @@ static bfd_reloc_status_type bpf_elf_generic_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); +#undef BPF_HOWTO +#define BPF_HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + type##_IDX, +enum bpf_reloc_index { + R_BPF_INVALID_IDX = -1, +#include "bpf-reloc.def" + R_BPF_SIZE +}; +#undef BPF_HOWTO + /* Relocation tables. */ +#define BPF_HOWTO(...) HOWTO(__VA_ARGS__), static reloc_howto_type bpf_elf_howto_table [] = { - /* This reloc does nothing. */ - HOWTO (R_BPF_NONE, /* type */ - 0, /* rightshift */ - 0, /* size */ - 0, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ - complain_overflow_dont, /* complain_on_overflow */ - bpf_elf_generic_reloc, /* special_function */ - "R_BPF_NONE", /* name */ - false, /* partial_inplace */ - 0, /* src_mask */ - 0, /* dst_mask */ - false), /* pcrel_offset */ - - /* 64-immediate in LDDW instruction. */ - HOWTO (R_BPF_INSN_64, /* type */ - 0, /* rightshift */ - 8, /* size */ - 64, /* bitsize */ - 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 */ - MINUS_ONE, /* src_mask */ - MINUS_ONE, /* dst_mask */ - true), /* pcrel_offset */ - - /* 32-immediate in many instructions. */ - HOWTO (R_BPF_INSN_32, /* type */ - 0, /* rightshift */ - 4, /* size */ - 32, /* bitsize */ - 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 */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ - true), /* pcrel_offset */ - - /* 16-bit offsets in instructions. */ - HOWTO (R_BPF_INSN_16, /* type */ - 0, /* rightshift */ - 2, /* size */ - 16, /* bitsize */ - 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 */ - 0x0000ffff, /* src_mask */ - 0x0000ffff, /* dst_mask */ - true), /* pcrel_offset */ - - /* 16-bit PC-relative address in jump instructions. */ - HOWTO (R_BPF_INSN_DISP16, /* type */ - 0, /* rightshift */ - 2, /* size */ - 16, /* bitsize */ - 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 */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ - true), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_8_PCREL, - 0, /* rightshift */ - 1, /* size */ - 8, /* bitsize */ - 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 */ - 0xff, /* src_mask */ - 0xff, /* dst_mask */ - true), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_16_PCREL, - 0, /* rightshift */ - 2, /* size */ - 16, /* bitsize */ - 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 */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ - true), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_32_PCREL, - 0, /* rightshift */ - 4, /* size */ - 32, /* bitsize */ - 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 */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ - true), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_8, - 0, /* rightshift */ - 1, /* size */ - 8, /* bitsize */ - 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 */ - 0xff, /* src_mask */ - 0xff, /* dst_mask */ - false), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_16, - 0, /* rightshift */ - 2, /* size */ - 16, /* bitsize */ - 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 */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ - false), /* pcrel_offset */ - - /* 32-bit PC-relative address in call instructions. */ - HOWTO (R_BPF_INSN_DISP32, /* type */ - 0, /* rightshift */ - 4, /* size */ - 32, /* bitsize */ - 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 */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ - true), /* pcrel_offset */ - - /* 32-bit data. */ - HOWTO (R_BPF_DATA_32, /* type */ - 0, /* rightshift */ - 4, /* size */ - 32, /* bitsize */ - 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 */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ - true), /* pcrel_offset */ - - /* 64-bit data. */ - HOWTO (R_BPF_DATA_64, /* type */ - 0, /* rightshift */ - 8, /* size */ - 64, /* bitsize */ - 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 */ - 0, /* src_mask */ - MINUS_ONE, /* dst_mask */ - true), /* pcrel_offset */ - - HOWTO (R_BPF_DATA_64_PCREL, - 0, /* rightshift */ - 8, /* size */ - 64, /* bitsize */ - 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 */ - MINUS_ONE, /* src_mask */ - MINUS_ONE, /* dst_mask */ - true), /* pcrel_offset */ + #include "bpf-reloc.def" }; #undef AHOW +#undef BPF_HOWTO + +#define BPF_HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + case type: { return type##_IDX; } +static enum bpf_reloc_index +bpf_index_for_rtype(unsigned int r_type) +{ + switch(r_type) { +#include "bpf-reloc.def" + default: + /* Unreachable code. */ + BFD_ASSERT(0); + return -1; + }; +} /* Map BFD reloc types to bpf ELF reloc types. */ @@ -249,44 +75,23 @@ static reloc_howto_type * bpf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code) { - /* Note that the bpf_elf_howto_table is indexed by the R_ constants. - Thus, the order that the howto records appear in the table *must* - match the order of the relocation types defined in - include/elf/bpf.h. */ - switch (code) { case BFD_RELOC_NONE: - return &bpf_elf_howto_table[ (int) R_BPF_NONE]; - - case BFD_RELOC_8_PCREL: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_8_PCREL]; - case BFD_RELOC_16_PCREL: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_16_PCREL]; - case BFD_RELOC_32_PCREL: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_32_PCREL]; - case BFD_RELOC_64_PCREL: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_64_PCREL]; - - case BFD_RELOC_8: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_8]; - case BFD_RELOC_16: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_16]; + return &bpf_elf_howto_table[ (int) R_BPF_NONE_IDX]; + case BFD_RELOC_32: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_32]; + return &bpf_elf_howto_table[ (int) R_BPF_64_ABS32_IDX]; case BFD_RELOC_64: - return &bpf_elf_howto_table[ (int) R_BPF_DATA_64]; + return &bpf_elf_howto_table[ (int) R_BPF_64_ABS64_IDX]; case BFD_RELOC_BPF_64: - return &bpf_elf_howto_table[ (int) R_BPF_INSN_64]; - case BFD_RELOC_BPF_32: - return &bpf_elf_howto_table[ (int) R_BPF_INSN_32]; - case BFD_RELOC_BPF_16: - return &bpf_elf_howto_table[ (int) R_BPF_INSN_16]; - case BFD_RELOC_BPF_DISP16: - return &bpf_elf_howto_table[ (int) R_BPF_INSN_DISP16]; + return &bpf_elf_howto_table[ (int) R_BPF_64_64_IDX]; case BFD_RELOC_BPF_DISP32: - return &bpf_elf_howto_table[ (int) R_BPF_INSN_DISP32]; + case BFD_RELOC_BPF_DISPCALL32: + return &bpf_elf_howto_table[ (int) R_BPF_64_32_IDX]; + case BFD_RELOC_BPF_DISP16: + return &bpf_elf_howto_table[ (int) R_BPF_GNU_64_16_IDX]; default: /* Pacify gcc -Wall. */ @@ -302,7 +107,7 @@ bpf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) { unsigned int i; - for (i = 0; i < ARRAY_SIZE (bpf_elf_howto_table); i++) + for (i = 0; i < R_BPF_SIZE; i++) if (bpf_elf_howto_table[i].name != NULL && strcasecmp (bpf_elf_howto_table[i].name, r_name) == 0) return &bpf_elf_howto_table[i]; @@ -317,9 +122,11 @@ bpf_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { unsigned int r_type; - + unsigned int i; r_type = ELF64_R_TYPE (elf_reloc->r_info); - if (r_type >= (unsigned int) R_BPF_max) + + i = bpf_index_for_rtype(r_type); + if (i == (unsigned int) -1) { /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), @@ -328,7 +135,7 @@ bpf_info_to_howto (bfd *abfd, arelent *bfd_reloc, return false; } - bfd_reloc->howto = &bpf_elf_howto_table [r_type]; + bfd_reloc->howto = &bpf_elf_howto_table [i]; return true; } @@ -386,6 +193,7 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, for (rel = relocs; rel < relend; rel ++) { reloc_howto_type * howto; + unsigned int howto_index; unsigned long r_symndx; Elf_Internal_Sym * sym; asection * sec; @@ -399,7 +207,9 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, r_type = ELF64_R_TYPE (rel->r_info); r_symndx = ELF64_R_SYM (rel->r_info); - howto = bpf_elf_howto_table + ELF64_R_TYPE (rel->r_info); + + howto_index = bpf_index_for_rtype (ELF64_R_TYPE (rel->r_info)); + howto = &bpf_elf_howto_table[howto_index]; h = NULL; sym = NULL; sec = NULL; @@ -438,8 +248,7 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, switch (howto->type) { - case R_BPF_INSN_DISP16: - case R_BPF_INSN_DISP32: + case R_BPF_64_32: { /* Make the relocation PC-relative, and change its unit to 64-bit words. Note we need *signed* arithmetic @@ -465,10 +274,8 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, r = bfd_reloc_ok; break; } - case R_BPF_DATA_8: - case R_BPF_DATA_16: - case R_BPF_DATA_32: - case R_BPF_DATA_64: + case R_BPF_64_ABS64: + case R_BPF_64_ABS32: { addend = bfd_get (howto->bitsize, input_bfd, where); relocation += addend; @@ -477,28 +284,7 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, r = bfd_reloc_ok; break; } - case R_BPF_INSN_16: - { - - addend = bfd_get_16 (input_bfd, where + 2); - relocation += addend; - bfd_put_16 (input_bfd, relocation, where + 2); - - r = bfd_reloc_ok; - break; - } - case R_BPF_INSN_32: - { - /* Write relocated value */ - - addend = bfd_get_32 (input_bfd, where + 4); - relocation += addend; - bfd_put_32 (input_bfd, relocation, where + 4); - - r = bfd_reloc_ok; - break; - } - case R_BPF_INSN_64: + case R_BPF_64_64: { /* LDDW instructions are 128 bits long, with a 64-bit immediate. @@ -610,7 +396,7 @@ bpf_elf_generic_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, /* Sanity check that the address is in range. */ bfd_size_type end = bfd_get_section_limit_octets (abfd, input_section); bfd_size_type reloc_size; - if (reloc_entry->howto->type == R_BPF_INSN_64) + if (reloc_entry->howto->type == R_BPF_64_64) reloc_size = 16; else reloc_size = (reloc_entry->howto->bitsize @@ -642,7 +428,7 @@ bpf_elf_generic_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return status; /* Now finally install the relocation. */ - if (reloc_entry->howto->type == R_BPF_INSN_64) + if (reloc_entry->howto->type == R_BPF_64_64) { /* lddw is a 128-bit (!) instruction that allows loading a 64-bit immediate into a register. the immediate is split in half, with the diff --git a/bfd/elf64-gen.c b/bfd/elf64-gen.c index ef5c84235..bbe4af7a7 100644 --- a/bfd/elf64-gen.c +++ b/bfd/elf64-gen.c @@ -1,5 +1,5 @@ /* Generic support for 64-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 030e6e3a1..c181523a8 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -1,5 +1,5 @@ /* Support for HPPA 64-bit ELF - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2720,7 +2720,7 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index, if (bfd_seek (abfd, hdr->p_offset, SEEK_SET) != 0) return false; - if (bfd_bread (&sig, 4, abfd) != 4) + if (bfd_read (&sig, 4, abfd) != 4) return false; elf_tdata (abfd)->core->signal = sig; diff --git a/bfd/elf64-hppa.h b/bfd/elf64-hppa.h index d63418064..880424943 100644 --- a/bfd/elf64-hppa.h +++ b/bfd/elf64-hppa.h @@ -1,6 +1,6 @@ /* ELF64/HPPA support - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 613dacd75..ab1f18b8d 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -1,5 +1,5 @@ /* IA-64 support for OpenVMS - Copyright (C) 1998-2022 Free Software Foundation, Inc. + Copyright (C) 1998-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -370,8 +370,9 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, /* Nothing to do if there are no relocations or there is no need for the current pass. */ - if ((sec->flags & SEC_RELOC) == 0 - || sec->reloc_count == 0 + if (sec->reloc_count == 0 + || (sec->flags & SEC_RELOC) == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0 || (link_info->relax_pass == 0 && sec->skip_relax_pass_0) || (link_info->relax_pass == 1 && sec->skip_relax_pass_1)) return true; @@ -4702,7 +4703,7 @@ elf64_vms_write_shdrs_and_ehdr (bfd *abfd) 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) + || bfd_write (needed_count, 8, abfd) != 8) return false; return true; @@ -4711,7 +4712,9 @@ elf64_vms_write_shdrs_and_ehdr (bfd *abfd) static bool elf64_vms_close_and_cleanup (bfd *abfd) { - if (bfd_get_format (abfd) == bfd_object) + bool ret = true; + if (bfd_get_format (abfd) == bfd_object + && bfd_write_p (abfd)) { long isize; @@ -4719,15 +4722,16 @@ elf64_vms_close_and_cleanup (bfd *abfd) isize = bfd_get_size (abfd); if ((isize & 7) != 0) { - int ishort = 8 - (isize & 7); + unsigned int ishort = 8 - (isize & 7); uint64_t pad = 0; - bfd_seek (abfd, isize, SEEK_SET); - bfd_bwrite (&pad, ishort, abfd); + if (bfd_seek (abfd, isize, SEEK_SET) != 0 + || bfd_write (&pad, ishort, abfd) != ishort) + ret = false; } } - return _bfd_elf_close_and_cleanup (abfd); + return _bfd_generic_close_and_cleanup (abfd) && ret; } /* Add symbols from an ELF object file to the linker hash table. */ diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index 9b0120b81..9af4e4047 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -1,5 +1,5 @@ /* MIPS-specific support for 64-bit ELF - Copyright (C) 1996-2022 Free Software Foundation, Inc. + Copyright (C) 1996-2023 Free Software Foundation, Inc. Ian Lance Taylor, Cygnus Support Linker support added by Mark Mitchell, CodeSourcery, LLC. @@ -3577,8 +3577,11 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, else relocation = symbol->value; - relocation += symbol->section->output_section->vma; - relocation += symbol->section->output_offset; + if (symbol->section->output_section != NULL) + { + relocation += symbol->section->output_section->vma; + relocation += symbol->section->output_offset; + } if (!_bfd_mips_reloc_offset_in_range (abfd, input_section, reloc_entry, check_inplace)) @@ -4815,7 +4818,7 @@ const struct elf_size_info mips_elf64_size_info = #define bfd_elf64_get_dynamic_reloc_upper_bound mips_elf64_get_dynamic_reloc_upper_bound #define bfd_elf64_mkobject _bfd_mips_elf_mkobject -#define bfd_elf64_close_and_cleanup _bfd_mips_elf_close_and_cleanup +#define bfd_elf64_bfd_free_cached_info _bfd_mips_elf_free_cached_info /* The SGI style (n)64 NewABI. */ #define TARGET_LITTLE_SYM mips_elf64_le_vec diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index b516ba71d..367a4ca84 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -1,5 +1,5 @@ /* MMIX-specific support for 64-bit ELF. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-nfp.c b/bfd/elf64-nfp.c index d012806bc..a0e3bd6a4 100644 --- a/bfd/elf64-nfp.c +++ b/bfd/elf64-nfp.c @@ -1,5 +1,5 @@ /* NFP-specific support for 64-bit ELF - Copyright (C) 2017-2022 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. Contributed by Francois H. Theron This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 5329bb64a..744e4d0ef 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -1,5 +1,5 @@ /* PowerPC64-specific support for 64-bit ELF. - Copyright (C) 1999-2022 Free Software Foundation, Inc. + Copyright (C) 1999-2023 Free Software Foundation, Inc. Written by Linus Nordberg, Swox AB , based on elf32-ppc.c by Ian Lance Taylor. Largely rewritten by Alan Modra. @@ -90,6 +90,7 @@ static bfd_vma opd_entry_value #define elf_backend_default_execstack 0 #define bfd_elf64_mkobject ppc64_elf_mkobject +#define bfd_elf64_bfd_free_cached_info ppc64_elf_free_cached_info #define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup #define bfd_elf64_bfd_reloc_name_lookup ppc64_elf_reloc_name_lookup #define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data @@ -296,6 +297,10 @@ set_abiversion (bfd *abfd, int ver) elf_elfheader (abfd)->e_flags &= ~EF_PPC64_ABI; elf_elfheader (abfd)->e_flags |= ver & EF_PPC64_ABI; } + +#define is_ppc64_elf(bfd) \ + (bfd_get_flavour (bfd) == bfd_target_elf_flavour \ + && elf_object_id (bfd) == PPC64_ELF_DATA) /* Relocation HOWTO's. */ /* Like other ELF RELA targets that don't apply multiple @@ -1462,6 +1467,10 @@ ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message); + if (symbol->section->owner == NULL + || !is_ppc64_elf (symbol->section->owner)) + return bfd_reloc_continue; + if (strcmp (symbol->section->name, ".opd") == 0 && (symbol->section->owner->flags & DYNAMIC) == 0) { @@ -1478,7 +1487,6 @@ ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, elf_symbol_type *elfsym = (elf_symbol_type *) symbol; if (symbol->section->owner != abfd - && symbol->section->owner != NULL && abiversion (symbol->section->owner) >= 2) { unsigned int i; @@ -1742,14 +1750,8 @@ ppc64_elf_unhandled_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, input_section, output_bfd, error_message); if (error_message != NULL) - { - static char *message; - free (message); - if (asprintf (&message, _("generic linker can't handle %s"), - reloc_entry->howto->name) < 0) - message = NULL; - *error_message = message; - } + *error_message = bfd_asprintf (_("generic linker can't handle %s"), + reloc_entry->howto->name); return bfd_reloc_dangerous; } @@ -1817,15 +1819,6 @@ struct ppc64_elf_obj_tdata sections means we potentially need one of these for each input bfd. */ struct got_entry tlsld_got; - union - { - /* A copy of relocs before they are modified for --emit-relocs. */ - Elf_Internal_Rela *relocs; - - /* Section contents. */ - bfd_byte *contents; - } opd; - /* Nonzero if this bfd has small toc/got relocs, ie. that expect the reloc to be in the range -32768 to 32767. */ unsigned int has_small_toc_reloc : 1; @@ -1845,10 +1838,6 @@ struct ppc64_elf_obj_tdata #define ppc64_tlsld_got(bfd) \ (&ppc64_elf_tdata (bfd)->tlsld_got) -#define is_ppc64_elf(bfd) \ - (bfd_get_flavour (bfd) == bfd_target_elf_flavour \ - && elf_object_id (bfd) == PPC64_ELF_DATA) - /* Override the generic function because we store some extras. */ static bool @@ -2016,6 +2005,15 @@ struct _ppc64_elf_section_data /* After editing .opd, adjust references to opd local syms. */ long *adjust; + + union + { + /* A copy of relocs before they are modified for --emit-relocs. */ + Elf_Internal_Rela *relocs; + + /* Section contents. */ + bfd_byte *contents; + } u; } opd; /* An array for toc sections, indexed by offset/8. */ @@ -2472,7 +2470,9 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, asection *dynamic, *glink = NULL, *relplt = NULL; arelent *p; - if (opd != NULL && !bfd_malloc_and_get_section (abfd, opd, &contents)) + if (opd != NULL + && ((opd->flags & SEC_HAS_CONTENTS) == 0 + || !bfd_malloc_and_get_section (abfd, opd, &contents))) { free_contents_and_exit_err: count = -1; @@ -2507,7 +2507,8 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, size_t extdynsize; void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *); - if (!bfd_malloc_and_get_section (abfd, dynamic, &dynbuf)) + if ((dynamic->flags & SEC_HAS_CONTENTS) == 0 + || !bfd_malloc_and_get_section (abfd, dynamic, &dynbuf)) goto free_contents_and_exit_err; extdynsize = get_elf_backend_data (abfd)->s->sizeof_dyn; @@ -2573,7 +2574,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, if (!(*slurp_relocs) (abfd, relplt, dyn_syms, true)) goto free_contents_and_exit_err; - plt_count = relplt->size / sizeof (Elf64_External_Rela); + plt_count = NUM_SHDR_ENTRIES (&elf_section_data (relplt)->this_hdr); size += plt_count * sizeof (asymbol); p = relplt->relocation; @@ -4476,8 +4477,10 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) if (opd != NULL && opd->size != 0) { - BFD_ASSERT (ppc64_elf_section_data (opd)->sec_type == sec_normal); - ppc64_elf_section_data (opd)->sec_type = sec_opd; + if (ppc64_elf_section_data (opd)->sec_type == sec_normal) + ppc64_elf_section_data (opd)->sec_type = sec_opd; + else if (ppc64_elf_section_data (opd)->sec_type != sec_opd) + BFD_FAIL (); if (abiversion (ibfd) == 0) set_abiversion (ibfd, 1); @@ -5231,7 +5234,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, return false; ppc64_sec = ppc64_elf_section_data (sec); - if (ppc64_sec->sec_type != sec_toc) + if (ppc64_sec->sec_type == sec_normal) { bfd_size_type amt; @@ -5244,10 +5247,17 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, ppc64_sec->u.toc.add = bfd_zalloc (abfd, amt); if (ppc64_sec->u.toc.add == NULL) return false; - BFD_ASSERT (ppc64_sec->sec_type == sec_normal); ppc64_sec->sec_type = sec_toc; } - BFD_ASSERT (rel->r_offset % 8 == 0); + if (ppc64_sec->sec_type != sec_toc + || rel->r_offset % 8 != 0) + { + info->callbacks->einfo (_("%H: %s reloc unsupported here\n"), + abfd, sec, rel->r_offset, + ppc64_elf_howto_table[r_type]->name); + bfd_set_error (bfd_error_bad_value); + return false; + } ppc64_sec->u.toc.symndx[rel->r_offset / 8] = r_symndx; ppc64_sec->u.toc.add[rel->r_offset / 8] = rel->r_addend; @@ -5528,17 +5538,26 @@ opd_entry_value (asection *opd_sec, Elf_Internal_Rela *lo, *hi, *look; bfd_vma val; + if (!is_ppc64_elf (opd_bfd)) + return (bfd_vma) -1; + + if (ppc64_elf_section_data (opd_sec)->sec_type == sec_normal) + ppc64_elf_section_data (opd_sec)->sec_type = sec_opd; + else if (ppc64_elf_section_data (opd_sec)->sec_type != sec_opd) + return (bfd_vma) -1; + /* No relocs implies we are linking a --just-symbols object, or looking at a final linked executable with addr2line or somesuch. */ if (opd_sec->reloc_count == 0) { - bfd_byte *contents = ppc64_elf_tdata (opd_bfd)->opd.contents; + bfd_byte *contents = ppc64_elf_section_data (opd_sec)->u.opd.u.contents; if (contents == NULL) { - if (!bfd_malloc_and_get_section (opd_bfd, opd_sec, &contents)) + if ((opd_sec->flags & SEC_HAS_CONTENTS) == 0 + || !bfd_malloc_and_get_section (opd_bfd, opd_sec, &contents)) return (bfd_vma) -1; - ppc64_elf_tdata (opd_bfd)->opd.contents = contents; + ppc64_elf_section_data (opd_sec)->u.opd.u.contents = contents; } /* PR 17512: file: 64b9dfbb. */ @@ -5575,9 +5594,7 @@ opd_entry_value (asection *opd_sec, return val; } - BFD_ASSERT (is_ppc64_elf (opd_bfd)); - - relocs = ppc64_elf_tdata (opd_bfd)->opd.relocs; + relocs = ppc64_elf_section_data (opd_sec)->u.opd.u.relocs; if (relocs == NULL) relocs = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, true); /* PR 17512: file: df8e1fd6. */ @@ -7361,7 +7378,9 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) continue; sec = bfd_get_section_by_name (ibfd, ".opd"); - if (sec == NULL || sec->size == 0) + if (sec == NULL + || sec->size == 0 + || (sec->flags & SEC_HAS_CONTENTS) == 0) continue; if (sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) @@ -8922,6 +8941,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) toc = bfd_get_section_by_name (ibfd, ".toc"); if (toc == NULL || toc->size == 0 + || (toc->flags & SEC_HAS_CONTENTS) == 0 || toc->sec_info_type == SEC_INFO_TYPE_JUST_SYMS || discarded_section (toc)) continue; @@ -11549,6 +11569,24 @@ get_relocs (asection *sec, int count) return relocs; } +static bool +swap_reloc_out (bfd *obfd, Elf_Internal_Rela *rel, bfd_byte *loc, asection *s) +{ + if ((size_t) (loc - s->contents) >= s->size) + return false; + bfd_elf64_swap_reloca_out (obfd, rel, loc); + return true; +} + +static bool +count_and_swap_reloc_out (bfd *obfd, Elf_Internal_Rela *rel, asection *s) +{ + bfd_byte *loc = s->contents; + loc += s->reloc_count++ * sizeof (Elf64_External_Rela); + return swap_reloc_out (obfd, rel, loc, s); +} + + /* Convert the relocs R[0] thru R[-NUM_REL+1], which are all no-symbol forms, to the equivalent relocs against the global symbol given by STUB_ENTRY->H. */ @@ -11701,25 +11739,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) stub_entry = (struct ppc_stub_hash_entry *) gen_entry; info = in_arg; - /* Fail if the target section could not be assigned to an output - section. The user should fix his linker script. */ - if (stub_entry->target_section != NULL - && stub_entry->target_section->output_section == NULL - && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output section. " - "Retry without --enable-non-contiguous-regions.\n"), - stub_entry->target_section); - - /* Same for the group. */ - if (stub_entry->group->stub_sec != NULL - && stub_entry->group->stub_sec->output_section == NULL - && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an " - "output section. Retry without " - "--enable-non-contiguous-regions.\n"), - stub_entry->group->stub_sec, - stub_entry->target_section); - htab = ppc_hash_table (info); if (htab == NULL) return false; @@ -11846,7 +11865,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { /* Create a reloc for the branch lookup table entry. */ Elf_Internal_Rela rela; - bfd_byte *rl; rela.r_offset = (br_entry->offset + htab->brlt->output_offset @@ -11854,10 +11872,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); rela.r_addend = targ; - rl = htab->relbrlt->contents; - rl += (htab->relbrlt->reloc_count++ - * sizeof (Elf64_External_Rela)); - bfd_elf64_swap_reloca_out (htab->relbrlt->owner, &rela, rl); + BFD_ASSERT (count_and_swap_reloc_out (htab->relbrlt->owner, &rela, + htab->relbrlt)); } else if (info->emitrelocations) { @@ -12254,7 +12270,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (stub_entry->target_section != NULL && stub_entry->target_section->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign %pA to an output section. " + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " "Retry without --enable-non-contiguous-regions.\n"), stub_entry->target_section); @@ -12262,11 +12278,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (stub_entry->group->stub_sec != NULL && stub_entry->group->stub_sec->output_section == NULL && info->non_contiguous_regions) - info->callbacks->einfo (_("%F%P: Could not assign group %pA target %pA to an " - "output section. Retry without " - "--enable-non-contiguous-regions.\n"), - stub_entry->group->stub_sec, - stub_entry->target_section); + info->callbacks->einfo (_("%F%P: Could not assign `%pA' to an output section. " + "Retry without --enable-non-contiguous-regions.\n"), + stub_entry->group->stub_sec); /* Make a note of the offset within the stubs for this entry. */ stub_offset = stub_entry->group->stub_sec->size; @@ -14653,9 +14667,8 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) rela.r_offset = (plt->output_section->vma + plt->output_offset + ent->plt.offset); - loc = relplt->contents + (relplt->reloc_count++ - * sizeof (Elf64_External_Rela)); - bfd_elf64_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (count_and_swap_reloc_out (info->output_bfd, &rela, + relplt)); } } else @@ -14670,7 +14683,8 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) / PLT_ENTRY_SIZE (htab) * sizeof (Elf64_External_Rela))); if (h->type == STT_GNU_IFUNC && is_static_defined (h)) htab->elf.ifunc_resolvers = true; - bfd_elf64_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (swap_reloc_out (info->output_bfd, &rela, + loc, htab->elf.srelplt)); } } @@ -14791,7 +14805,6 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) Elf_Internal_Sym *sym; asection *sym_sec; asection *plt, *relplt; - bfd_byte *loc; bfd_vma val; if (!get_sym_h (NULL, &sym, &sym_sec, NULL, &local_syms, @@ -14823,7 +14836,7 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) if (relplt == NULL) { - loc = plt->contents + ent->plt.offset; + bfd_byte *loc = plt->contents + ent->plt.offset; bfd_put_64 (info->output_bfd, val, loc); if (htab->opd_abi) { @@ -14852,9 +14865,8 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); } rela.r_addend = val; - loc = relplt->contents + (relplt->reloc_count++ - * sizeof (Elf64_External_Rela)); - bfd_elf64_swap_reloca_out (info->output_bfd, &rela, loc); + BFD_ASSERT (count_and_swap_reloc_out (info->output_bfd, + &rela, relplt)); } } @@ -15334,19 +15346,19 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, { char *groupmsg; if (asprintf (&groupmsg, - ngettext ("linker stubs in %u group\n", - "linker stubs in %u groups\n", + ngettext ("linker stubs in %u group", + "linker stubs in %u groups", stub_sec_count), stub_sec_count) < 0) *stats = NULL; else { - if (asprintf (stats, _("%s" + if (asprintf (stats, _("%s, iter %u\n" " branch %lu\n" " long branch %lu\n" " plt call %lu\n" " global entry %lu"), - groupmsg, + groupmsg, htab->stub_iteration, htab->stub_count[ppc_stub_long_branch - 1], htab->stub_count[ppc_stub_plt_branch - 1], htab->stub_count[ppc_stub_plt_call - 1], @@ -16992,11 +17004,9 @@ ppc64_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPMOD64); if (tls_type == (TLS_TLS | TLS_GD)) { - loc = relgot->contents; - loc += (relgot->reloc_count++ - * sizeof (Elf64_External_Rela)); - bfd_elf64_swap_reloca_out (output_bfd, - &outrel, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, + &outrel, + relgot)); outrel.r_offset += 8; outrel.r_addend = orig_rel.r_addend; outrel.r_info @@ -17036,12 +17046,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, } if (!(info->enable_dt_relr && ELF64_R_TYPE (outrel.r_info) == R_PPC64_RELATIVE)) - { - loc = relgot->contents; - loc += (relgot->reloc_count++ - * sizeof (Elf64_External_Rela)); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); - } + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, + &outrel, relgot)); } /* Init the .got section contents here if we're not @@ -17527,12 +17533,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (sreloc == NULL) abort (); - if (sreloc->reloc_count * sizeof (Elf64_External_Rela) - >= sreloc->size) - abort (); - loc = sreloc->contents; - loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, &outrel, + sreloc)); } if (!warned_dynamic @@ -18069,13 +18071,14 @@ ppc64_elf_relocate_section (bfd *output_bfd, adjusted. Worse, reloc symbol indices will be for the output file rather than the input. Save a copy of the relocs for opd_entry_value. */ - if (is_opd && (info->emitrelocations || bfd_link_relocatable (info))) + if (is_opd + && (info->emitrelocations || bfd_link_relocatable (info)) + && input_section->reloc_count != 0) { bfd_size_type amt; amt = input_section->reloc_count * sizeof (Elf_Internal_Rela); rel = bfd_alloc (input_bfd, amt); - BFD_ASSERT (ppc64_elf_tdata (input_bfd)->opd.relocs == NULL); - ppc64_elf_tdata (input_bfd)->opd.relocs = rel; + ppc64_elf_section_data (input_section)->u.opd.u.relocs = rel; if (rel == NULL) return false; memcpy (rel, relocs, amt); @@ -18164,7 +18167,6 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, /* This symbol needs a copy reloc. Set it up. */ Elf_Internal_Rela rela; asection *srel; - bfd_byte *loc; if (h->dynindx == -1) abort (); @@ -18176,9 +18178,7 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, srel = htab->elf.sreldynrelro; else srel = htab->elf.srelbss; - loc = srel->contents; - loc += srel->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); + BFD_ASSERT (count_and_swap_reloc_out (output_bfd, &rela, srel)); } return true; @@ -18390,6 +18390,19 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, return true; } +static bool +ppc64_elf_free_cached_info (bfd *abfd) +{ + if (abfd->sections) + for (asection *opd = bfd_get_section_by_name (abfd, ".opd"); + opd != NULL; + opd = bfd_get_next_section_by_name (NULL, opd)) + if (opd->reloc_count == 0) + free (ppc64_elf_section_data (opd)->u.opd.u.contents); + + return _bfd_elf_free_cached_info (abfd); +} + #include "elf64-target.h" /* FreeBSD support */ diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h index 5dbffc9ee..78e153805 100644 --- a/bfd/elf64-ppc.h +++ b/bfd/elf64-ppc.h @@ -1,5 +1,5 @@ /* PowerPC64-specific support for 64-bit ELF. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index fa4497181..bcf59032c 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 64-bit ELF - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of BFD, the Binary File Descriptor library. @@ -2714,7 +2714,7 @@ elf_s390_relocate_section (bfd *output_bfd, /* This relocation gets optimized away by the local exec access optimization. */ BFD_ASSERT (! unresolved_reloc); - bfd_put_64 (output_bfd, -tpoff (info, relocation), + bfd_put_64 (output_bfd, -tpoff (info, relocation) + rel->r_addend, contents + rel->r_offset); continue; } @@ -2907,7 +2907,7 @@ elf_s390_relocate_section (bfd *output_bfd, else { BFD_ASSERT (! unresolved_reloc); - bfd_put_64 (output_bfd, -tpoff (info, relocation), + bfd_put_64 (output_bfd, -tpoff (info, relocation) + rel->r_addend, contents + rel->r_offset); } continue; diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index c6d0d3e5b..1ea85e6d3 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for 64-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-tilegx.c b/bfd/elf64-tilegx.c index aae2b098f..1efed6e24 100644 --- a/bfd/elf64-tilegx.c +++ b/bfd/elf64-tilegx.c @@ -1,5 +1,5 @@ /* TILE-Gx-specific support for 64-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-tilegx.h b/bfd/elf64-tilegx.h index b786f0bb1..1f678e427 100644 --- a/bfd/elf64-tilegx.h +++ b/bfd/elf64-tilegx.h @@ -1,5 +1,5 @@ /* TILE-Gx-specific support for 64-bit ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 8cf733d89..3b7a8aeee 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1,5 +1,5 @@ /* X86-64 specific support for ELF - Copyright (C) 2000-2022 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. Contributed by Jan Hubicka . This file is part of BFD, the Binary File Descriptor library. @@ -389,7 +389,8 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) default: return false; - case 124: /* sizeof(struct elf_prpsinfo) on Linux/x32 */ + case 124: + /* sizeof (struct elf_external_linux_prpsinfo32_ugid16). */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 12); elf_tdata (abfd)->core->program @@ -398,7 +399,18 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); break; - case 136: /* sizeof(struct elf_prpsinfo) on Linux/x86_64 */ + case 128: + /* sizeof (struct elf_external_linux_prpsinfo32_ugid32). */ + elf_tdata (abfd)->core->pid + = bfd_get_32 (abfd, note->descdata + 12); + elf_tdata (abfd)->core->program + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16); + elf_tdata (abfd)->core->command + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80); + break; + + case 136: + /* sizeof (struct elf_prpsinfo) on Linux/x86_64. */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24); elf_tdata (abfd)->core->program @@ -895,7 +907,7 @@ static const struct elf_x86_sframe_plt elf_x86_64_sframe_plt = { &elf_x86_64_sframe_pltn_fre1, &elf_x86_64_sframe_pltn_fre2 }, NON_LAZY_PLT_ENTRY_SIZE, 1, /* Number of FREs for PLTn for second PLT. */ - /* FREs for second plt ( unwind info for .plt.got is + /* FREs for second plt (stack trace info for .plt.got is identical). Used when IBT or non-lazy PLT is in effect. */ { &elf_x86_64_sframe_sec_pltn_fre1 } }; @@ -1241,7 +1253,7 @@ elf_x86_64_check_tls_transition (bfd *abfd, if (largepic) return r_type == R_X86_64_PLTOFF64; else if (indirect_call) - return r_type == R_X86_64_GOTPCRELX; + return (r_type == R_X86_64_GOTPCRELX || r_type == R_X86_64_GOTPCREL); else return (r_type == R_X86_64_PC32 || r_type == R_X86_64_PLT32); } @@ -3489,6 +3501,9 @@ elf_x86_64_relocate_section (bfd *output_bfd, { bfd_vma roff = rel->r_offset; + if (roff >= input_section->size) + goto corrupt_input; + BFD_ASSERT (! unresolved_reloc); if (r_type == R_X86_64_TLSGD) @@ -3529,6 +3544,8 @@ elf_x86_64_relocate_section (bfd *output_bfd, int largepic = 0; if (ABI_64_P (output_bfd)) { + if (roff + 5 >= input_section->size) + goto corrupt_input; if (contents[roff + 5] == 0xb8) { if (roff < 3 @@ -3564,6 +3581,10 @@ elf_x86_64_relocate_section (bfd *output_bfd, "\x64\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0", 15); } + + if (roff + 8 + largepic >= input_section->size) + goto corrupt_input; + bfd_put_32 (output_bfd, elf_x86_64_tpoff (info, relocation), contents + roff + 8 + largepic); @@ -3621,12 +3642,18 @@ elf_x86_64_relocate_section (bfd *output_bfd, } if (prefix) { + if (roff + 2 >= input_section->size) + goto corrupt_input; + bfd_put_8 (output_bfd, 0x0f, contents + roff); bfd_put_8 (output_bfd, 0x1f, contents + roff + 1); bfd_put_8 (output_bfd, 0x00, contents + roff + 2); } else { + if (roff + 1 >= input_section->size) + goto corrupt_input; + bfd_put_8 (output_bfd, 0x66, contents + roff); bfd_put_8 (output_bfd, 0x90, contents + roff + 1); } @@ -4428,7 +4455,12 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, else { rela.r_info = htab->r_info (h->dynindx, R_X86_64_JUMP_SLOT); - rela.r_addend = 0; + if (htab->params->mark_plt) + rela.r_addend = (resolved_plt->output_section->vma + + plt_offset + + htab->plt.plt_indirect_branch_offset); + else + rela.r_addend = 0; plt_index = htab->next_jump_slot_index++; } @@ -4967,7 +4999,9 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd, for (j = 0; plts[j].name != NULL; j++) { plt = bfd_get_section_by_name (abfd, plts[j].name); - if (plt == NULL || plt->size == 0) + if (plt == NULL + || plt->size == 0 + || (plt->flags & SEC_HAS_CONTENTS) == 0) continue; /* Get the PLT section contents. */ @@ -5252,6 +5286,39 @@ elf_x86_64_merge_symbol (struct elf_link_hash_entry *h, return true; } +static bool +elf_x86_64_section_flags (const Elf_Internal_Shdr *hdr) +{ + if ((hdr->sh_flags & SHF_X86_64_LARGE) != 0) + hdr->bfd_section->flags |= SEC_ELF_LARGE; + + return true; +} + +static bool +elf_x86_64_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, + Elf_Internal_Shdr *hdr, asection *sec) +{ + if (sec->flags & SEC_ELF_LARGE) + hdr->sh_flags |= SHF_X86_64_LARGE; + + return true; +} + +static bool +elf_x86_64_copy_private_section_data (bfd *ibfd, asection *isec, + bfd *obfd, asection *osec) +{ + if (!_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)) + return false; + + /* objcopy --set-section-flags without "large" drops SHF_X86_64_LARGE. */ + if (ibfd != obfd) + elf_section_flags (osec) &= ~SHF_X86_64_LARGE; + + return true; +} + static int elf_x86_64_additional_program_headers (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) @@ -5379,6 +5446,8 @@ elf_x86_64_special_sections[]= #define elf_info_to_howto elf_x86_64_info_to_howto +#define bfd_elf64_bfd_copy_private_section_data \ + elf_x86_64_copy_private_section_data #define bfd_elf64_bfd_reloc_type_lookup elf_x86_64_reloc_type_lookup #define bfd_elf64_bfd_reloc_name_lookup \ elf_x86_64_reloc_name_lookup @@ -5419,6 +5488,8 @@ elf_x86_64_special_sections[]= elf_x86_64_merge_symbol #define elf_backend_special_sections \ elf_x86_64_special_sections +#define elf_backend_section_flags elf_x86_64_section_flags +#define elf_backend_fake_sections elf_x86_64_fake_sections #define elf_backend_additional_program_headers \ elf_x86_64_additional_program_headers #define elf_backend_setup_gnu_properties \ @@ -5535,6 +5606,8 @@ elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUS #undef ELF_TARGET_OS #undef ELF_OSABI +#define bfd_elf32_bfd_copy_private_section_data \ + elf_x86_64_copy_private_section_data #define bfd_elf32_bfd_reloc_type_lookup \ elf_x86_64_reloc_type_lookup #define bfd_elf32_bfd_reloc_name_lookup \ diff --git a/bfd/elf64.c b/bfd/elf64.c index ff050b6be..bb0e4e780 100644 --- a/bfd/elf64.c +++ b/bfd/elf64.c @@ -1,5 +1,5 @@ /* ELF 64-bit executable support for BFD. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 7a4de82a0..ab8c3eaaf 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1,5 +1,5 @@ /* ELF executable support for BFD. - Copyright (C) 1991-2022 Free Software Foundation, Inc. + Copyright (C) 1991-2023 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -266,6 +266,7 @@ elf_swap_ehdr_out (bfd *abfd, { unsigned int tmp; int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; + bool no_section_header = (abfd->flags & BFD_NO_SECTION_HEADER) != 0; memcpy (dst->e_ident, src->e_ident, EI_NIDENT); /* note that all elements of dst are *arrays of unsigned char* already... */ H_PUT_16 (abfd, src->e_type, dst->e_type); @@ -276,7 +277,10 @@ elf_swap_ehdr_out (bfd *abfd, else H_PUT_WORD (abfd, src->e_entry, dst->e_entry); H_PUT_WORD (abfd, src->e_phoff, dst->e_phoff); - H_PUT_WORD (abfd, src->e_shoff, dst->e_shoff); + if (no_section_header) + H_PUT_WORD (abfd, 0, dst->e_shoff); + else + H_PUT_WORD (abfd, src->e_shoff, dst->e_shoff); H_PUT_32 (abfd, src->e_flags, dst->e_flags); H_PUT_16 (abfd, src->e_ehsize, dst->e_ehsize); H_PUT_16 (abfd, src->e_phentsize, dst->e_phentsize); @@ -284,15 +288,24 @@ elf_swap_ehdr_out (bfd *abfd, if (tmp > PN_XNUM) tmp = PN_XNUM; H_PUT_16 (abfd, tmp, dst->e_phnum); - H_PUT_16 (abfd, src->e_shentsize, dst->e_shentsize); - tmp = src->e_shnum; - if (tmp >= (SHN_LORESERVE & 0xffff)) - tmp = SHN_UNDEF; - H_PUT_16 (abfd, tmp, dst->e_shnum); - tmp = src->e_shstrndx; - if (tmp >= (SHN_LORESERVE & 0xffff)) - tmp = SHN_XINDEX & 0xffff; - H_PUT_16 (abfd, tmp, dst->e_shstrndx); + if (no_section_header) + { + H_PUT_16 (abfd, 0, dst->e_shentsize); + H_PUT_16 (abfd, 0, dst->e_shnum); + H_PUT_16 (abfd, 0, dst->e_shstrndx); + } + else + { + H_PUT_16 (abfd, src->e_shentsize, dst->e_shentsize); + tmp = src->e_shnum; + if (tmp >= (SHN_LORESERVE & 0xffff)) + tmp = SHN_UNDEF; + H_PUT_16 (abfd, tmp, dst->e_shnum); + tmp = src->e_shstrndx; + if (tmp >= (SHN_LORESERVE & 0xffff)) + tmp = SHN_XINDEX & 0xffff; + H_PUT_16 (abfd, tmp, dst->e_shstrndx); + } } /* Translate an ELF section header table entry in external format into an @@ -516,7 +529,7 @@ elf_object_p (bfd *abfd) /* Read in the ELF header in external format. */ - if (bfd_bread (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) + if (bfd_read (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) { if (bfd_get_error () != bfd_error_system_call) goto got_wrong_format_error; @@ -629,7 +642,7 @@ elf_object_p (bfd *abfd) /* Read the first section header at index 0, and convert to internal form. */ - if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) + if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) goto got_no_match; elf_swap_shdr_in (abfd, &x_shdr, &i_shdr); @@ -675,7 +688,7 @@ elf_object_p (bfd *abfd) if (bfd_seek (abfd, where, SEEK_SET) != 0) goto got_no_match; - if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) + if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) goto got_no_match; /* Back to where we were. */ @@ -717,7 +730,7 @@ elf_object_p (bfd *abfd) to internal form. */ for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++) { - if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) + if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)) goto got_no_match; elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex); @@ -804,14 +817,15 @@ elf_object_p (bfd *abfd) = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); if (elf_tdata (abfd)->phdr == NULL) goto got_no_match; - if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0) + if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0) goto got_no_match; + bool eu_strip_broken_phdrs = false; i_phdr = elf_tdata (abfd)->phdr; for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++) { Elf_External_Phdr x_phdr; - if (bfd_bread (&x_phdr, sizeof x_phdr, abfd) != sizeof x_phdr) + if (bfd_read (&x_phdr, sizeof x_phdr, abfd) != sizeof x_phdr) goto got_no_match; elf_swap_phdr_in (abfd, &x_phdr, i_phdr); /* Too much code in BFD relies on alignment being a power of @@ -826,6 +840,31 @@ elf_object_p (bfd *abfd) abfd->read_only = 1; } } + /* Detect eu-strip -f debug files, which have program + headers that describe the original file. */ + if (i_phdr->p_filesz != 0 + && (i_phdr->p_filesz > filesize + || i_phdr->p_offset > filesize - i_phdr->p_filesz)) + eu_strip_broken_phdrs = true; + } + if (!eu_strip_broken_phdrs + && i_ehdrp->e_shoff == 0 + && i_ehdrp->e_shstrndx == 0) + { + /* Try to reconstruct dynamic symbol table from PT_DYNAMIC + segment if there is no section header. */ + i_phdr = elf_tdata (abfd)->phdr; + for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++) + if (i_phdr->p_type == PT_DYNAMIC) + { + if (i_phdr->p_filesz != 0 + && !_bfd_elf_get_dynamic_symbols (abfd, i_phdr, + elf_tdata (abfd)->phdr, + i_ehdrp->e_phnum, + filesize)) + goto got_no_match; + break; + } } } @@ -1043,7 +1082,7 @@ elf_write_out_phdrs (bfd *abfd, Elf_External_Phdr extphdr; elf_swap_phdr_out (abfd, phdr, &extphdr); - if (bfd_bwrite (&extphdr, sizeof (Elf_External_Phdr), abfd) + if (bfd_write (&extphdr, sizeof (Elf_External_Phdr), abfd) != sizeof (Elf_External_Phdr)) return -1; phdr++; @@ -1073,10 +1112,13 @@ elf_write_shdrs_and_ehdr (bfd *abfd) #endif elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr); amt = sizeof (x_ehdr); - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 - || bfd_bwrite (&x_ehdr, amt, abfd) != amt) + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || bfd_write (&x_ehdr, amt, abfd) != amt) return false; + if ((abfd->flags & BFD_NO_SECTION_HEADER) != 0) + return true; + /* Some fields in the first section header handle overflow of ehdr fields. */ if (i_ehdrp->e_phnum >= PN_XNUM) @@ -1104,8 +1146,8 @@ elf_write_shdrs_and_ehdr (bfd *abfd) elf_swap_shdr_out (abfd, *i_shdrp, x_shdrp + count); } 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) + if (bfd_seek (abfd, i_ehdrp->e_shoff, SEEK_SET) != 0 + || bfd_write (x_shdrp, amt, abfd) != amt) return false; /* need to dump the string table too... */ @@ -1213,11 +1255,13 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) symbols. We actually use all the ELF symbols, so there will be no space left over at the end. When we have all the symbols, we build the caller's pointer vector. */ + ebd = get_elf_backend_data (abfd); if (! dynamic) { hdr = &elf_tdata (abfd)->symtab_hdr; verhdr = NULL; + symcount = hdr->sh_size / ebd->s->sizeof_sym; } else { @@ -1229,19 +1273,26 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) if ((elf_dynverdef (abfd) != 0 && elf_tdata (abfd)->verdef == NULL) || (elf_dynverref (abfd) != 0 - && elf_tdata (abfd)->verref == NULL)) + && elf_tdata (abfd)->verref == NULL) + || elf_tdata (abfd)->dt_verdef != NULL + || elf_tdata (abfd)->dt_verneed != NULL) { if (!_bfd_elf_slurp_version_tables (abfd, false)) return -1; } + + symcount = elf_tdata (abfd)->dt_symtab_count; } - ebd = get_elf_backend_data (abfd); - symcount = hdr->sh_size / sizeof (Elf_External_Sym); + if (symcount == 0) + symcount = hdr->sh_size / sizeof (Elf_External_Sym); + if (symcount == 0) sym = symbase = NULL; else { + size_t i; + isymbuf = bfd_elf_get_elf_syms (abfd, hdr, symcount, 0, NULL, NULL, NULL); if (isymbuf == NULL) @@ -1288,12 +1339,18 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) if (xver != NULL) ++xver; isymend = isymbuf + symcount; - for (isym = isymbuf + 1, sym = symbase; isym < isymend; isym++, sym++) + for (isym = isymbuf + 1, sym = symbase, i = 1; + isym < isymend; + isym++, sym++, i++) { memcpy (&sym->internal_elf_sym, isym, sizeof (Elf_Internal_Sym)); sym->symbol.the_bfd = abfd; - sym->symbol.name = bfd_elf_sym_name (abfd, hdr, isym, NULL); + if (elf_use_dt_symtab_p (abfd)) + sym->symbol.name = (elf_tdata (abfd)->dt_strtab + + isym->st_name); + else + sym->symbol.name = bfd_elf_sym_name (abfd, hdr, isym, NULL); sym->symbol.value = isym->st_value; if (isym->st_shndx == SHN_UNDEF) @@ -1327,6 +1384,15 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) moment) about the alignment. */ sym->symbol.value = isym->st_size; } + else if (elf_use_dt_symtab_p (abfd)) + { + asection *sec; + sec = _bfd_elf_get_section_from_dynamic_symbol (abfd, + isym); + if (sec == NULL) + goto error_return; + sym->symbol.section = sec; + } else { sym->symbol.section @@ -1407,7 +1473,10 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) if (dynamic) sym->symbol.flags |= BSF_DYNAMIC; - if (xver != NULL) + if (elf_tdata (abfd)->dt_versym) + sym->version = bfd_get_16 (abfd, + elf_tdata (abfd)->dt_versym + 2 * i); + else if (xver != NULL) { Elf_Internal_Versym iversym; @@ -1445,13 +1514,15 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) } free (xverbuf); - if (hdr->contents != (unsigned char *) isymbuf) + if (hdr->contents != (unsigned char *) isymbuf + && !elf_use_dt_symtab_p (abfd)) free (isymbuf); return symcount; error_return: free (xverbuf); - if (hdr->contents != (unsigned char *) isymbuf) + if (hdr->contents != (unsigned char *) isymbuf + && !elf_use_dt_symtab_p (abfd)) free (isymbuf); return -1; } diff --git a/bfd/elfcore.h b/bfd/elfcore.h index 59b73bd57..543f40b77 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -1,5 +1,5 @@ /* ELF core file support for BFD. - Copyright (C) 1995-2022 Free Software Foundation, Inc. + Copyright (C) 1995-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -95,7 +95,7 @@ elf_core_file_p (bfd *abfd) ufile_ptr filesize; /* Read in the ELF header in external format. */ - if (bfd_bread (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) + if (bfd_read (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) { if (bfd_get_error () != bfd_error_system_call) goto wrong; @@ -185,7 +185,7 @@ elf_core_file_p (bfd *abfd) /* Read the first section header at index 0, and convert to internal form. */ - if (bfd_bread (&x_shdr, sizeof (x_shdr), abfd) != sizeof (x_shdr)) + if (bfd_read (&x_shdr, sizeof (x_shdr), abfd) != sizeof (x_shdr)) goto fail; elf_swap_shdr_in (abfd, &x_shdr, &i_shdr); @@ -217,12 +217,12 @@ elf_core_file_p (bfd *abfd) if (bfd_seek (abfd, where, SEEK_SET) != 0) goto fail; - if (bfd_bread (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) + if (bfd_read (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) goto fail; } /* Move to the start of the program headers. */ - if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0) + if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0) goto wrong; /* Allocate space for the program headers. */ @@ -238,7 +238,7 @@ elf_core_file_p (bfd *abfd) { Elf_External_Phdr x_phdr; - if (bfd_bread (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) + if (bfd_read (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) goto fail; elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex); @@ -315,7 +315,7 @@ NAME(_bfd_elf, core_find_build_id) goto fail; /* Read in the ELF header in external format. */ - if (bfd_bread (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) + if (bfd_read (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr)) { if (bfd_get_error () != bfd_error_system_call) goto wrong; @@ -367,7 +367,7 @@ NAME(_bfd_elf, core_find_build_id) if (i_phdr == NULL) goto fail; - if (bfd_seek (abfd, (file_ptr) (offset + i_ehdr.e_phoff), SEEK_SET) != 0) + if (bfd_seek (abfd, offset + i_ehdr.e_phoff, SEEK_SET) != 0) goto fail; /* Read in program headers and parse notes. */ @@ -375,7 +375,7 @@ NAME(_bfd_elf, core_find_build_id) { Elf_External_Phdr x_phdr; - if (bfd_bread (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) + if (bfd_read (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr)) goto fail; elf_swap_phdr_in (abfd, &x_phdr, i_phdr); @@ -385,8 +385,8 @@ NAME(_bfd_elf, core_find_build_id) i_phdr->p_filesz, i_phdr->p_align); /* Make sure ABFD returns to processing the program headers. */ - if (bfd_seek (abfd, (file_ptr) (offset + i_ehdr.e_phoff - + (i + 1) * sizeof (x_phdr)), + if (bfd_seek (abfd, + offset + i_ehdr.e_phoff + (i + 1) * sizeof (x_phdr), SEEK_SET) != 0) goto fail; diff --git a/bfd/elflink.c b/bfd/elflink.c index fc3edef9a..ca162145f 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1,5 +1,5 @@ /* ELF linking support for BFD. - Copyright (C) 1995-2022 Free Software Foundation, Inc. + Copyright (C) 1995-2023 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2651,7 +2651,7 @@ elf_link_read_relocs_from_section (bfd *abfd, return false; /* Read the relocations. */ - if (bfd_bread (external_relocs, shdr->sh_size, abfd) != shdr->sh_size) + if (bfd_read (external_relocs, shdr->sh_size, abfd) != shdr->sh_size) return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -3586,10 +3586,19 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) abfd = abfd->plugin_dummy_bfd; hdr = &elf_tdata (abfd)->symtab_hdr; } - else if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) - hdr = &elf_tdata (abfd)->symtab_hdr; else - hdr = &elf_tdata (abfd)->dynsymtab_hdr; + { + if (elf_use_dt_symtab_p (abfd)) + { + bfd_set_error (bfd_error_wrong_format); + return false; + } + + if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) + hdr = &elf_tdata (abfd)->symtab_hdr; + else + hdr = &elf_tdata (abfd)->dynsymtab_hdr; + } symcount = hdr->sh_size / get_elf_backend_data (abfd)->s->sizeof_sym; @@ -4233,6 +4242,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) htab = elf_hash_table (info); bed = get_elf_backend_data (abfd); + if (elf_use_dt_symtab_p (abfd)) + { + bfd_set_error (bfd_error_wrong_format); + return false; + } + if ((abfd->flags & DYNAMIC) == 0) dynamic = false; else @@ -4386,7 +4401,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) | DYN_NO_NEEDED)) == 0; s = bfd_get_section_by_name (abfd, ".dynamic"); - if (s != NULL && s->size != 0) + if (s != NULL && s->size != 0 && (s->flags & SEC_HAS_CONTENTS) != 0) { bfd_byte *dynbuf; bfd_byte *extdyn; @@ -5302,10 +5317,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) else _bfd_error_handler /* xgettext:c-format */ - (_("warning: alignment %u of symbol `%s' in %pB" - " is smaller than %u in %pB"), + (_("warning: alignment %u of normal symbol `%s' in %pB" + " is smaller than %u used by the common definition in %pB"), 1 << normal_align, name, normal_bfd, 1 << common_align, common_bfd); + + /* PR 30499: make sure that users understand that this warning is serious. */ + _bfd_error_handler + (_("warning: NOTE: alignment discrepancies can cause real problems. Investigation is advised.")); } } @@ -5317,12 +5336,18 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (h->size != 0 && h->size != isym->st_size && ! size_change_ok) - _bfd_error_handler - /* xgettext:c-format */ - (_("warning: size of symbol `%s' changed" - " from %" PRIu64 " in %pB to %" PRIu64 " in %pB"), - name, (uint64_t) h->size, old_bfd, - (uint64_t) isym->st_size, abfd); + { + _bfd_error_handler + /* xgettext:c-format */ + (_("warning: size of symbol `%s' changed" + " from %" PRIu64 " in %pB to %" PRIu64 " in %pB"), + name, (uint64_t) h->size, old_bfd, + (uint64_t) isym->st_size, abfd); + + /* PR 30499: make sure that users understand that this warning is serious. */ + _bfd_error_handler + (_("warning: NOTE: size discrepancies can cause real problems. Investigation is advised.")); + } h->size = isym->st_size; } @@ -5382,7 +5407,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) h->unique_global = (flags & BSF_GNU_UNIQUE) != 0; } - if (definition && !dynamic) + /* Don't add indirect symbols for .symver x, x@FOO aliases + in IR. Since all data or text symbols in IR have the + same type, value and section, we can't tell if a symbol + is an alias of another symbol by their types, values and + sections. */ + if (definition + && !dynamic + && (abfd->flags & BFD_PLUGIN) == 0) { char *p = strchr (name, ELF_VER_CHR); if (p != NULL && p[1] != ELF_VER_CHR) @@ -8204,7 +8236,7 @@ bfd_elf_get_bfd_needed_list (bfd *abfd, return true; s = bfd_get_section_by_name (abfd, ".dynamic"); - if (s == NULL || s->size == 0) + if (s == NULL || s->size == 0 || (s->flags & SEC_HAS_CONTENTS) == 0) return true; if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) @@ -10159,7 +10191,7 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) pos = hdr->sh_offset + hdr->sh_size; amt = bed->s->sizeof_sym * flinfo->output_bfd->symcount; if (bfd_seek (flinfo->output_bfd, pos, SEEK_SET) == 0 - && bfd_bwrite (symbuf, amt, flinfo->output_bfd) == amt) + && bfd_write (symbuf, amt, flinfo->output_bfd) == amt) { hdr->sh_size += amt; ret = true; @@ -11151,22 +11183,10 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) /* If this symbol is defined in a section which we are discarding, we don't need to keep it. */ - if (isym->st_shndx != SHN_UNDEF - && isym->st_shndx < SHN_LORESERVE - && isec->output_section == NULL - && flinfo->info->non_contiguous_regions - && flinfo->info->non_contiguous_regions_warnings) - { - _bfd_error_handler (_("warning: --enable-non-contiguous-regions " - "discards section `%s' from '%s'\n"), - isec->name, bfd_get_filename (isec->owner)); - continue; - } - - if (isym->st_shndx != SHN_UNDEF - && isym->st_shndx < SHN_LORESERVE - && bfd_section_removed_from_list (output_bfd, - isec->output_section)) + if (isym->st_shndx < SHN_LORESERVE + && (isec->output_section == NULL + || bfd_section_removed_from_list (output_bfd, + isec->output_section))) continue; /* Get the name of the symbol. */ @@ -11373,6 +11393,13 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) contents = flinfo->contents; } } + else if (!(o->flags & SEC_RELOC) + && !bed->elf_backend_write_section + && o->sec_info_type == SEC_INFO_TYPE_MERGE) + /* A MERGE section that has no relocations doesn't need the + contents anymore, they have been recorded earlier. Except + if the backend has special provisions for writing sections. */ + contents = NULL; else { contents = flinfo->contents; @@ -13047,7 +13074,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) off, true); if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 - || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) + || (bfd_write (flinfo.symshndxbuf, amt, abfd) != amt)) { ret = false; goto return_local_hash_table; diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 452a2a7b7..ab3b58994 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -1,5 +1,5 @@ /* MIPS-specific support for 32-bit ELF - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -3300,7 +3300,8 @@ mips_elf_gprel16_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, else { relocatable = false; - output_bfd = symbol->section->output_section->owner; + if (symbol->section->output_section != NULL) + output_bfd = symbol->section->output_section->owner; } ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, @@ -3340,7 +3341,8 @@ mips_elf_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, else { relocatable = false; - output_bfd = symbol->section->output_section->owner; + if (symbol->section->output_section != NULL) + output_bfd = symbol->section->output_section->owner; } ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, @@ -3383,7 +3385,8 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, else { relocatable = false; - output_bfd = symbol->section->output_section->owner; + if (symbol->section->output_section != NULL) + output_bfd = symbol->section->output_section->owner; ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, &gp); @@ -3408,8 +3411,11 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, else relocation = symbol->value; - relocation += symbol->section->output_section->vma; - relocation += symbol->section->output_offset; + if (symbol->section->output_section != NULL) + { + relocation += symbol->section->output_section->vma; + relocation += symbol->section->output_offset; + } if (!bfd_reloc_offset_in_range (reloc_entry->howto, abfd, input_section, reloc_entry->address)) @@ -3484,7 +3490,8 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, else { relocatable = false; - output_bfd = symbol->section->output_section->owner; + if (symbol->section->output_section != NULL) + output_bfd = symbol->section->output_section->owner; } ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, @@ -4197,7 +4204,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define bfd_elf32_bfd_print_private_bfd_data \ _bfd_mips_elf_print_private_bfd_data #define bfd_elf32_mkobject mips_elf_n32_mkobject -#define bfd_elf32_close_and_cleanup _bfd_mips_elf_close_and_cleanup +#define bfd_elf32_bfd_free_cached_info _bfd_mips_elf_free_cached_info /* Support for SGI-ish mips targets using n32 ABI. */ diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index a9fefbd44..4592bd6da 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -1,5 +1,5 @@ /* AArch64-specific support for NN-bit ELF. - Copyright (C) 2009-2022 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of BFD, the Binary File Descriptor library. @@ -478,7 +478,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS64), /* name */ false, /* partial_inplace */ - ALL_ONES, /* src_mask */ + 0, /* src_mask */ ALL_ONES, /* dst_mask */ false), /* pcrel_offset */ @@ -493,7 +493,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS32), /* name */ false, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ @@ -508,7 +508,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS16), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -523,7 +523,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL64), /* name */ false, /* partial_inplace */ - ALL_ONES, /* src_mask */ + 0, /* src_mask */ ALL_ONES, /* dst_mask */ true), /* pcrel_offset */ @@ -538,7 +538,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL32), /* name */ false, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ @@ -553,7 +553,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL16), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -571,7 +571,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G0), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -586,7 +586,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -601,7 +601,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -616,7 +616,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G1_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -631,7 +631,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G2), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -646,7 +646,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G2_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -661,7 +661,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G3), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -680,7 +680,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G0), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -695,7 +695,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -710,7 +710,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G2), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -728,7 +728,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G0), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -743,7 +743,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -758,7 +758,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -773,7 +773,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G1_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -788,7 +788,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G2), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -803,7 +803,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G2_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -818,7 +818,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G3), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ true), /* pcrel_offset */ @@ -836,7 +836,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD_PREL_LO19), /* name */ false, /* partial_inplace */ - 0x7ffff, /* src_mask */ + 0, /* src_mask */ 0x7ffff, /* dst_mask */ true), /* pcrel_offset */ @@ -851,7 +851,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_LO21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -866,7 +866,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_PG_HI21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -881,7 +881,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_PG_HI21_NC), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -896,7 +896,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADD_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -911,7 +911,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST8_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -928,7 +928,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TSTBR14), /* name */ false, /* partial_inplace */ - 0x3fff, /* src_mask */ + 0, /* src_mask */ 0x3fff, /* dst_mask */ true), /* pcrel_offset */ @@ -943,7 +943,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (CONDBR19), /* name */ false, /* partial_inplace */ - 0x7ffff, /* src_mask */ + 0, /* src_mask */ 0x7ffff, /* dst_mask */ true), /* pcrel_offset */ @@ -958,7 +958,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (JUMP26), /* name */ false, /* partial_inplace */ - 0x3ffffff, /* src_mask */ + 0, /* src_mask */ 0x3ffffff, /* dst_mask */ true), /* pcrel_offset */ @@ -973,7 +973,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (CALL26), /* name */ false, /* partial_inplace */ - 0x3ffffff, /* src_mask */ + 0, /* src_mask */ 0x3ffffff, /* dst_mask */ true), /* pcrel_offset */ @@ -988,7 +988,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST16_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffe, /* src_mask */ + 0, /* src_mask */ 0xffe, /* dst_mask */ false), /* pcrel_offset */ @@ -1003,7 +1003,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST32_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc, /* src_mask */ + 0, /* src_mask */ 0xffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1018,7 +1018,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST64_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0xff8, /* src_mask */ + 0, /* src_mask */ 0xff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1033,7 +1033,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST128_ABS_LO12_NC), /* name */ false, /* partial_inplace */ - 0xff0, /* src_mask */ + 0, /* src_mask */ 0xff0, /* dst_mask */ false), /* pcrel_offset */ @@ -1049,7 +1049,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (GOT_LD_PREL19), /* name */ false, /* partial_inplace */ - 0xffffe0, /* src_mask */ + 0, /* src_mask */ 0xffffe0, /* dst_mask */ true), /* pcrel_offset */ @@ -1065,7 +1065,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_GOT_PAGE), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1080,7 +1080,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOT_LO12_NC), /* name */ false, /* partial_inplace */ - 0xff8, /* src_mask */ + 0, /* src_mask */ 0xff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1095,7 +1095,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD32_GOT_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc, /* src_mask */ + 0, /* src_mask */ 0xffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1110,7 +1110,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_GOTOFF_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1125,7 +1125,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_GOTOFF_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1140,7 +1140,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOTOFF_LO15), /* name */ false, /* partial_inplace */ - 0x7ff8, /* src_mask */ + 0, /* src_mask */ 0x7ff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1156,7 +1156,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD32_GOTPAGE_LO14), /* name */ false, /* partial_inplace */ - 0x5ffc, /* src_mask */ + 0, /* src_mask */ 0x5ffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1172,7 +1172,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOTPAGE_LO15), /* name */ false, /* partial_inplace */ - 0x7ff8, /* src_mask */ + 0, /* src_mask */ 0x7ff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1188,7 +1188,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADR_PAGE21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1202,7 +1202,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADR_PREL21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1217,7 +1217,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADD_LO12_NC), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1232,7 +1232,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_MOVW_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1247,7 +1247,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_MOVW_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1261,7 +1261,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_ADR_GOTTPREL_PAGE21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1275,7 +1275,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD64_GOTTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xff8, /* src_mask */ + 0, /* src_mask */ 0xff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1289,7 +1289,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD32_GOTTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc, /* src_mask */ + 0, /* src_mask */ 0xffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1303,7 +1303,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD_GOTTPREL_PREL19), /* name */ false, /* partial_inplace */ - 0x1ffffc, /* src_mask */ + 0, /* src_mask */ 0x1ffffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1317,7 +1317,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1331,7 +1331,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1346,7 +1346,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_HI12), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1361,7 +1361,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1376,7 +1376,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1391,7 +1391,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_LO12_NC), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1407,7 +1407,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADR_PAGE21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1421,7 +1421,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADR_PREL21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1436,7 +1436,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12), /* name */ false, /* partial_inplace */ - 0x1ffc00, /* src_mask */ + 0, /* src_mask */ 0x1ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1451,7 +1451,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x1ffc00, /* src_mask */ + 0, /* src_mask */ 0x1ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1466,7 +1466,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1481,7 +1481,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc00, /* src_mask */ + 0, /* src_mask */ 0xffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1496,7 +1496,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1511,7 +1511,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x7fc00, /* src_mask */ + 0, /* src_mask */ 0x7fc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1526,7 +1526,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1541,7 +1541,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1556,7 +1556,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1571,7 +1571,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1586,7 +1586,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1601,7 +1601,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1616,7 +1616,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G2), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1630,7 +1630,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G2), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1644,7 +1644,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1658,7 +1658,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G1_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1672,7 +1672,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G0), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1686,7 +1686,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1700,7 +1700,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_HI12), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1714,7 +1714,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_LO12), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1728,7 +1728,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1743,7 +1743,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST16_TPREL_LO12), /* name */ false, /* partial_inplace */ - 0x1ffc00, /* src_mask */ + 0, /* src_mask */ 0x1ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1758,7 +1758,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST16_TPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x1ffc00, /* src_mask */ + 0, /* src_mask */ 0x1ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1773,7 +1773,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST32_TPREL_LO12), /* name */ false, /* partial_inplace */ - 0xffc00, /* src_mask */ + 0, /* src_mask */ 0xffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1788,7 +1788,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST32_TPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc00, /* src_mask */ + 0, /* src_mask */ 0xffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1803,7 +1803,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST64_TPREL_LO12), /* name */ false, /* partial_inplace */ - 0x7fc00, /* src_mask */ + 0, /* src_mask */ 0x7fc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1818,7 +1818,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST64_TPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x7fc00, /* src_mask */ + 0, /* src_mask */ 0x7fc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1833,7 +1833,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST8_TPREL_LO12), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1848,7 +1848,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST8_TPREL_LO12_NC), /* name */ false, /* partial_inplace */ - 0x3ffc00, /* src_mask */ + 0, /* src_mask */ 0x3ffc00, /* dst_mask */ false), /* pcrel_offset */ @@ -1862,7 +1862,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD_PREL19), /* name */ false, /* partial_inplace */ - 0x0ffffe0, /* src_mask */ + 0, /* src_mask */ 0x0ffffe0, /* dst_mask */ true), /* pcrel_offset */ @@ -1876,7 +1876,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADR_PREL21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1892,7 +1892,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADR_PAGE21), /* name */ false, /* partial_inplace */ - 0x1fffff, /* src_mask */ + 0, /* src_mask */ 0x1fffff, /* dst_mask */ true), /* pcrel_offset */ @@ -1907,7 +1907,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD64_LO12), /* name */ false, /* partial_inplace */ - 0xff8, /* src_mask */ + 0, /* src_mask */ 0xff8, /* dst_mask */ false), /* pcrel_offset */ @@ -1922,7 +1922,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD32_LO12_NC), /* name */ false, /* partial_inplace */ - 0xffc, /* src_mask */ + 0, /* src_mask */ 0xffc, /* dst_mask */ false), /* pcrel_offset */ @@ -1937,7 +1937,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADD_LO12), /* name */ false, /* partial_inplace */ - 0xfff, /* src_mask */ + 0, /* src_mask */ 0xfff, /* dst_mask */ false), /* pcrel_offset */ @@ -1951,7 +1951,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_OFF_G1), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -1965,7 +1965,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_OFF_G0_NC), /* name */ false, /* partial_inplace */ - 0xffff, /* src_mask */ + 0, /* src_mask */ 0xffff, /* dst_mask */ false), /* pcrel_offset */ @@ -2021,7 +2021,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (COPY), /* name */ true, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ @@ -2035,7 +2035,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (GLOB_DAT), /* name */ true, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ @@ -2049,7 +2049,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (JUMP_SLOT), /* name */ true, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ @@ -2063,7 +2063,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (RELATIVE), /* name */ true, /* partial_inplace */ - ALL_ONES, /* src_mask */ + 0, /* src_mask */ ALL_ONES, /* dst_mask */ false), /* pcrel_offset */ @@ -2354,6 +2354,9 @@ elfNN_aarch64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, name can be changed. The only requirement is the %s be present. */ #define STUB_ENTRY_NAME "__%s_veneer" +/* Stub name for a BTI landing stub. */ +#define BTI_STUB_ENTRY_NAME "__%s_bti_veneer" + /* The name of the dynamic interpreter. This is put in the .interp section. */ #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1" @@ -2406,6 +2409,12 @@ static const uint32_t aarch64_long_branch_stub[] = 0x00000000, }; +static const uint32_t aarch64_bti_direct_branch_stub[] = +{ + 0xd503245f, /* bti c */ + 0x14000000, /* b