From fd1285b2ec62a6a32941b543a3ce9f693d353dae Mon Sep 17 00:00:00 2001 From: Marcelo Alencar Date: Wed, 31 Mar 2021 02:31:48 -0300 Subject: [PATCH] tools/binutils: Synchronize on NetBSD-current (30/03/2021 16:09 UTC) --- distrib/sets/lists/base/shl.mi | 4 +- distrib/sets/lists/comp/ad.arm | 26 + distrib/sets/lists/minix-base/mi | 11 +- distrib/sets/lists/minix-comp/md.evbarm | 26 + etc/mtree/NetBSD.dist.base | 1 + external/gpl3/binutils/Makefile.inc | 4 + external/gpl3/binutils/fetch.sh | 15 +- external/gpl3/binutils/files/yyscript.c | 3540 -- external/gpl3/binutils/files/yyscript.h | 295 - external/gpl3/binutils/lib/Makefile | 4 +- external/gpl3/binutils/lib/Makefile.inc | 2 + external/gpl3/binutils/lib/libbfd/Makefile | 29 +- .../binutils/lib/libbfd/arch/aarch64/bfd.h | 4046 +- .../lib/libbfd/arch/aarch64/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/aarch64/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/aarch64/config.h | 75 +- .../binutils/lib/libbfd/arch/aarch64/defs.mk | 13 +- .../binutils/lib/libbfd/arch/aarch64eb/bfd.h | 7862 ++++ .../lib/libbfd/arch/aarch64eb/bfd_stdint.h | 51 + .../lib/libbfd/arch/aarch64eb/bfdver.h | 26 + .../lib/libbfd/arch/aarch64eb/config.h | 423 + .../lib/libbfd/arch/aarch64eb/defs.mk | 10 + .../gpl3/binutils/lib/libbfd/arch/alpha/bfd.h | 4046 +- .../lib/libbfd/arch/alpha/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/alpha/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/alpha/config.h | 75 +- .../binutils/lib/libbfd/arch/alpha/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/arm/bfd.h | 4046 +- .../binutils/lib/libbfd/arch/arm/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/arm/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/arm/config.h | 75 +- .../gpl3/binutils/lib/libbfd/arch/arm/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/armeb/bfd.h | 4046 +- .../lib/libbfd/arch/armeb/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/armeb/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/armeb/config.h | 75 +- .../binutils/lib/libbfd/arch/armeb/defs.mk | 13 +- .../binutils/lib/libbfd/arch/coldfire/bfd.h | 1571 +- .../lib/libbfd/arch/coldfire/bfd_stdint.h | 6 +- .../lib/libbfd/arch/coldfire/bfdver.h | 10 +- .../lib/libbfd/arch/coldfire/config.h | 43 +- .../binutils/lib/libbfd/arch/coldfire/defs.mk | 12 +- .../gpl3/binutils/lib/libbfd/arch/earm/bfd.h | 4046 +- .../lib/libbfd/arch/earm/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/earm/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/earm/config.h | 75 +- .../binutils/lib/libbfd/arch/earm/defs.mk | 13 +- .../binutils/lib/libbfd/arch/earmeb/bfd.h | 4046 +- .../lib/libbfd/arch/earmeb/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/earmeb/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/earmeb/config.h | 75 +- .../binutils/lib/libbfd/arch/earmeb/defs.mk | 13 +- .../binutils/lib/libbfd/arch/earmhf/bfd.h | 4046 +- .../lib/libbfd/arch/earmhf/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/earmhf/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/earmhf/config.h | 75 +- .../binutils/lib/libbfd/arch/earmhf/defs.mk | 13 +- .../binutils/lib/libbfd/arch/earmhfeb/bfd.h | 4046 +- .../lib/libbfd/arch/earmhfeb/bfd_stdint.h | 6 +- .../lib/libbfd/arch/earmhfeb/bfdver.h | 28 +- .../lib/libbfd/arch/earmhfeb/config.h | 75 +- .../binutils/lib/libbfd/arch/earmhfeb/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/hppa/bfd.h | 4046 +- .../lib/libbfd/arch/hppa/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/hppa/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/hppa/config.h | 75 +- .../binutils/lib/libbfd/arch/hppa/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/i386/bfd.h | 4046 +- .../lib/libbfd/arch/i386/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/i386/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/i386/config.h | 75 +- .../binutils/lib/libbfd/arch/i386/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/ia64/bfd.h | 4046 +- .../lib/libbfd/arch/ia64/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/ia64/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/ia64/config.h | 75 +- .../binutils/lib/libbfd/arch/ia64/defs.mk | 13 +- .../binutils/lib/libbfd/arch/m68000/bfd.h | 4046 +- .../lib/libbfd/arch/m68000/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/m68000/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/m68000/config.h | 75 +- .../binutils/lib/libbfd/arch/m68000/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/m68k/bfd.h | 4046 +- .../lib/libbfd/arch/m68k/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/m68k/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/m68k/config.h | 75 +- .../binutils/lib/libbfd/arch/m68k/defs.mk | 13 +- .../binutils/lib/libbfd/arch/mips64eb/bfd.h | 4046 +- .../lib/libbfd/arch/mips64eb/bfd_stdint.h | 6 +- .../lib/libbfd/arch/mips64eb/bfdver.h | 28 +- .../lib/libbfd/arch/mips64eb/config.h | 75 +- .../binutils/lib/libbfd/arch/mips64eb/defs.mk | 13 +- .../binutils/lib/libbfd/arch/mips64el/bfd.h | 4046 +- .../lib/libbfd/arch/mips64el/bfd_stdint.h | 6 +- .../lib/libbfd/arch/mips64el/bfdver.h | 28 +- .../lib/libbfd/arch/mips64el/config.h | 75 +- .../binutils/lib/libbfd/arch/mips64el/defs.mk | 13 +- .../binutils/lib/libbfd/arch/mipseb/bfd.h | 4046 +- .../lib/libbfd/arch/mipseb/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/mipseb/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/mipseb/config.h | 75 +- .../binutils/lib/libbfd/arch/mipseb/defs.mk | 13 +- .../binutils/lib/libbfd/arch/mipsel/bfd.h | 4046 +- .../lib/libbfd/arch/mipsel/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/mipsel/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/mipsel/config.h | 75 +- .../binutils/lib/libbfd/arch/mipsel/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/or1k/bfd.h | 1539 +- .../lib/libbfd/arch/or1k/bfd_stdint.h | 2 +- .../binutils/lib/libbfd/arch/or1k/bfdver.h | 6 +- .../binutils/lib/libbfd/arch/or1k/config.h | 39 +- .../binutils/lib/libbfd/arch/or1k/defs.mk | 8 +- .../binutils/lib/libbfd/arch/powerpc/bfd.h | 4062 +- .../lib/libbfd/arch/powerpc/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/powerpc/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/powerpc/config.h | 75 +- .../binutils/lib/libbfd/arch/powerpc/defs.mk | 13 +- .../binutils/lib/libbfd/arch/powerpc64/bfd.h | 4046 +- .../lib/libbfd/arch/powerpc64/bfd_stdint.h | 6 +- .../lib/libbfd/arch/powerpc64/bfdver.h | 28 +- .../lib/libbfd/arch/powerpc64/config.h | 75 +- .../lib/libbfd/arch/powerpc64/defs.mk | 13 +- .../binutils/lib/libbfd/arch/riscv32/bfd.h | 4064 +- .../lib/libbfd/arch/riscv32/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/riscv32/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/riscv32/config.h | 75 +- .../binutils/lib/libbfd/arch/riscv32/defs.mk | 13 +- .../binutils/lib/libbfd/arch/riscv64/bfd.h | 4062 +- .../lib/libbfd/arch/riscv64/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/riscv64/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/riscv64/config.h | 75 +- .../binutils/lib/libbfd/arch/riscv64/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h | 4046 +- .../lib/libbfd/arch/sh3eb/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/sh3eb/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/sh3eb/config.h | 75 +- .../binutils/lib/libbfd/arch/sh3eb/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h | 4048 +- .../lib/libbfd/arch/sh3el/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/sh3el/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/sh3el/config.h | 75 +- .../binutils/lib/libbfd/arch/sh3el/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/sparc/bfd.h | 4046 +- .../lib/libbfd/arch/sparc/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/sparc/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/sparc/config.h | 75 +- .../binutils/lib/libbfd/arch/sparc/defs.mk | 13 +- .../binutils/lib/libbfd/arch/sparc64/bfd.h | 4046 +- .../lib/libbfd/arch/sparc64/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/sparc64/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/sparc64/config.h | 75 +- .../binutils/lib/libbfd/arch/sparc64/defs.mk | 13 +- .../gpl3/binutils/lib/libbfd/arch/vax/bfd.h | 4046 +- .../binutils/lib/libbfd/arch/vax/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/vax/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/vax/config.h | 75 +- .../gpl3/binutils/lib/libbfd/arch/vax/defs.mk | 13 +- .../binutils/lib/libbfd/arch/x86_64/bfd.h | 4046 +- .../lib/libbfd/arch/x86_64/bfd_stdint.h | 6 +- .../binutils/lib/libbfd/arch/x86_64/bfdver.h | 28 +- .../binutils/lib/libbfd/arch/x86_64/config.h | 75 +- .../binutils/lib/libbfd/arch/x86_64/defs.mk | 13 +- external/gpl3/binutils/lib/libgnuctf/Makefile | 47 + .../lib/libgnuctf/arch/aarch64/config.h | 162 + .../lib/libgnuctf/arch/aarch64/defs.mk | 5 + .../lib/libgnuctf/arch/aarch64eb/config.h | 162 + .../lib/libgnuctf/arch/aarch64eb/defs.mk | 5 + .../lib/libgnuctf/arch/alpha/config.h | 162 + .../binutils/lib/libgnuctf/arch/alpha/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/arm/config.h | 162 + .../binutils/lib/libgnuctf/arch/arm/defs.mk | 5 + .../lib/libgnuctf/arch/armeb/config.h | 162 + .../binutils/lib/libgnuctf/arch/armeb/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/earm/config.h | 164 + .../binutils/lib/libgnuctf/arch/earm/defs.mk | 5 + .../lib/libgnuctf/arch/earmeb/config.h | 162 + .../lib/libgnuctf/arch/earmeb/defs.mk | 5 + .../lib/libgnuctf/arch/earmhf/config.h | 162 + .../lib/libgnuctf/arch/earmhf/defs.mk | 5 + .../lib/libgnuctf/arch/earmhfeb/config.h | 162 + .../lib/libgnuctf/arch/earmhfeb/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/hppa/config.h | 162 + .../binutils/lib/libgnuctf/arch/hppa/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/i386/config.h | 164 + .../binutils/lib/libgnuctf/arch/i386/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/ia64/config.h | 162 + .../binutils/lib/libgnuctf/arch/ia64/defs.mk | 5 + .../lib/libgnuctf/arch/m68000/config.h | 162 + .../lib/libgnuctf/arch/m68000/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/m68k/config.h | 162 + .../binutils/lib/libgnuctf/arch/m68k/defs.mk | 5 + .../lib/libgnuctf/arch/mips64eb/config.h | 162 + .../lib/libgnuctf/arch/mips64eb/defs.mk | 5 + .../lib/libgnuctf/arch/mips64el/config.h | 162 + .../lib/libgnuctf/arch/mips64el/defs.mk | 5 + .../lib/libgnuctf/arch/mipseb/config.h | 162 + .../lib/libgnuctf/arch/mipseb/defs.mk | 5 + .../lib/libgnuctf/arch/mipsel/config.h | 162 + .../lib/libgnuctf/arch/mipsel/defs.mk | 5 + .../lib/libgnuctf/arch/powerpc/config.h | 162 + .../lib/libgnuctf/arch/powerpc/defs.mk | 5 + .../lib/libgnuctf/arch/powerpc64/config.h | 162 + .../lib/libgnuctf/arch/powerpc64/defs.mk | 5 + .../lib/libgnuctf/arch/riscv32/config.h | 162 + .../lib/libgnuctf/arch/riscv32/defs.mk | 5 + .../lib/libgnuctf/arch/riscv64/config.h | 162 + .../lib/libgnuctf/arch/riscv64/defs.mk | 5 + .../lib/libgnuctf/arch/sh3eb/config.h | 162 + .../binutils/lib/libgnuctf/arch/sh3eb/defs.mk | 5 + .../lib/libgnuctf/arch/sh3el/config.h | 162 + .../binutils/lib/libgnuctf/arch/sh3el/defs.mk | 5 + .../lib/libgnuctf/arch/sparc/config.h | 162 + .../binutils/lib/libgnuctf/arch/sparc/defs.mk | 5 + .../lib/libgnuctf/arch/sparc64/config.h | 162 + .../lib/libgnuctf/arch/sparc64/defs.mk | 5 + .../binutils/lib/libgnuctf/arch/vax/config.h | 162 + .../binutils/lib/libgnuctf/arch/vax/defs.mk | 5 + .../lib/libgnuctf/arch/x86_64/config.h | 162 + .../lib/libgnuctf/arch/x86_64/defs.mk | 5 + external/gpl3/binutils/lib/libiberty/Makefile | 7 +- .../lib/libiberty/arch/aarch64/config.h | 87 +- .../lib/libiberty/arch/aarch64/defs.mk | 8 +- .../lib/libiberty/arch/aarch64eb/config.h | 582 + .../lib/libiberty/arch/aarch64eb/defs.mk | 8 + .../lib/libiberty/arch/alpha/config.h | 87 +- .../binutils/lib/libiberty/arch/alpha/defs.mk | 8 +- .../binutils/lib/libiberty/arch/arm/config.h | 87 +- .../binutils/lib/libiberty/arch/arm/defs.mk | 8 +- .../lib/libiberty/arch/armeb/config.h | 89 +- .../binutils/lib/libiberty/arch/armeb/defs.mk | 8 +- .../lib/libiberty/arch/coldfire/config.h | 75 +- .../lib/libiberty/arch/coldfire/defs.mk | 8 +- .../binutils/lib/libiberty/arch/earm/config.h | 87 +- .../binutils/lib/libiberty/arch/earm/defs.mk | 8 +- .../lib/libiberty/arch/earmeb/config.h | 87 +- .../lib/libiberty/arch/earmeb/defs.mk | 8 +- .../lib/libiberty/arch/earmhf/config.h | 87 +- .../lib/libiberty/arch/earmhf/defs.mk | 8 +- .../lib/libiberty/arch/earmhfeb/config.h | 87 +- .../lib/libiberty/arch/earmhfeb/defs.mk | 8 +- .../binutils/lib/libiberty/arch/hppa/config.h | 87 +- .../binutils/lib/libiberty/arch/hppa/defs.mk | 8 +- .../binutils/lib/libiberty/arch/i386/config.h | 87 +- .../binutils/lib/libiberty/arch/i386/defs.mk | 8 +- .../binutils/lib/libiberty/arch/ia64/config.h | 95 +- .../binutils/lib/libiberty/arch/ia64/defs.mk | 8 +- .../lib/libiberty/arch/m68000/config.h | 87 +- .../lib/libiberty/arch/m68000/defs.mk | 8 +- .../binutils/lib/libiberty/arch/m68k/config.h | 87 +- .../binutils/lib/libiberty/arch/m68k/defs.mk | 8 +- .../lib/libiberty/arch/mips64eb/config.h | 87 +- .../lib/libiberty/arch/mips64eb/defs.mk | 8 +- .../lib/libiberty/arch/mips64el/config.h | 87 +- .../lib/libiberty/arch/mips64el/defs.mk | 8 +- .../lib/libiberty/arch/mipseb/config.h | 87 +- .../lib/libiberty/arch/mipseb/defs.mk | 8 +- .../lib/libiberty/arch/mipsel/config.h | 87 +- .../lib/libiberty/arch/mipsel/defs.mk | 8 +- .../binutils/lib/libiberty/arch/or1k/config.h | 69 + .../binutils/lib/libiberty/arch/or1k/defs.mk | 2 +- .../lib/libiberty/arch/powerpc/config.h | 85 +- .../lib/libiberty/arch/powerpc/defs.mk | 6 +- .../lib/libiberty/arch/powerpc64/config.h | 87 +- .../lib/libiberty/arch/powerpc64/defs.mk | 8 +- .../lib/libiberty/arch/riscv32/config.h | 85 +- .../lib/libiberty/arch/riscv32/defs.mk | 6 +- .../lib/libiberty/arch/riscv64/config.h | 85 +- .../lib/libiberty/arch/riscv64/defs.mk | 6 +- .../lib/libiberty/arch/sh3eb/config.h | 87 +- .../binutils/lib/libiberty/arch/sh3eb/defs.mk | 8 +- .../lib/libiberty/arch/sh3el/config.h | 87 +- .../binutils/lib/libiberty/arch/sh3el/defs.mk | 8 +- .../lib/libiberty/arch/sparc/config.h | 87 +- .../binutils/lib/libiberty/arch/sparc/defs.mk | 8 +- .../lib/libiberty/arch/sparc64/config.h | 87 +- .../lib/libiberty/arch/sparc64/defs.mk | 8 +- .../binutils/lib/libiberty/arch/vax/config.h | 87 +- .../binutils/lib/libiberty/arch/vax/defs.mk | 8 +- .../lib/libiberty/arch/x86_64/config.h | 87 +- .../lib/libiberty/arch/x86_64/defs.mk | 8 +- .../gpl3/binutils/lib/libopcodes/Makefile | 8 +- .../lib/libopcodes/arch/aarch64/config.h | 19 +- .../lib/libopcodes/arch/aarch64eb/config.h | 127 + .../lib/libopcodes/arch/aarch64eb/defs.mk | 7 + .../lib/libopcodes/arch/alpha/config.h | 19 +- .../binutils/lib/libopcodes/arch/arm/config.h | 19 +- .../lib/libopcodes/arch/armeb/config.h | 19 +- .../lib/libopcodes/arch/coldfire/config.h | 19 +- .../lib/libopcodes/arch/earm/config.h | 19 +- .../lib/libopcodes/arch/earmeb/config.h | 19 +- .../lib/libopcodes/arch/earmhf/config.h | 19 +- .../lib/libopcodes/arch/earmhfeb/config.h | 19 +- .../lib/libopcodes/arch/hppa/config.h | 19 +- .../lib/libopcodes/arch/i386/config.h | 19 +- .../binutils/lib/libopcodes/arch/i386/defs.mk | 6 +- .../lib/libopcodes/arch/ia64/config.h | 19 +- .../lib/libopcodes/arch/m68000/config.h | 19 +- .../lib/libopcodes/arch/m68k/config.h | 19 +- .../lib/libopcodes/arch/mips64eb/config.h | 19 +- .../lib/libopcodes/arch/mips64el/config.h | 19 +- .../lib/libopcodes/arch/mipseb/config.h | 19 +- .../lib/libopcodes/arch/mipsel/config.h | 19 +- .../lib/libopcodes/arch/or1k/config.h | 15 +- .../lib/libopcodes/arch/powerpc/config.h | 19 +- .../lib/libopcodes/arch/powerpc64/config.h | 19 +- .../lib/libopcodes/arch/riscv32/config.h | 19 +- .../lib/libopcodes/arch/riscv64/config.h | 19 +- .../lib/libopcodes/arch/sh3eb/config.h | 19 +- .../lib/libopcodes/arch/sh3el/config.h | 19 +- .../lib/libopcodes/arch/sparc/config.h | 19 +- .../lib/libopcodes/arch/sparc64/config.h | 19 +- .../binutils/lib/libopcodes/arch/vax/config.h | 19 +- .../lib/libopcodes/arch/x86_64/config.h | 19 +- .../lib/libopcodes/arch/x86_64/defs.mk | 6 +- .../binutils/patches/0000-Base-NetBSD.patch | 14319 ++++++ .../binutils/patches/0000-binutils_nbsd.patch | 37997 ---------------- .../binutils/patches/0001-NetBSD-Minix.patch | 248 + .../gpl3/binutils/patches/0001-minix.patch | 249 - .../patches/0002-minix-on-minix.patch | 11 - .../binutils/patches/0003-gold-target.patch | 13 - .../patches/0004-libdl-and-reconf.patch | 238 - .../binutils/patches/0005-gold-libdl.patch | 112 - .../gpl3/binutils/patches/0006-gold-plt.patch | 21 - .../patches/0007-gold-as-tool-on-minix.patch | 147 - .../patches/0008-Fix-build-error-on-OSX.patch | 40 - .../patches/0009-Slash-means-divide.patch | 11 - .../patches/0010-armelf_minix-update.patch | 28 - external/gpl3/binutils/usr.bin/Makefile | 4 +- external/gpl3/binutils/usr.bin/Makefile.inc | 19 +- .../gpl3/binutils/usr.bin/addr2line/Makefile | 4 +- external/gpl3/binutils/usr.bin/ar/Makefile | 4 +- .../gpl3/binutils/usr.bin/c++filt/Makefile | 4 +- .../gpl3/binutils/usr.bin/coffdump/Makefile | 4 +- .../gpl3/binutils/usr.bin/common/Makefile | 6 +- .../gpl3/binutils/usr.bin/common/Makefile.inc | 13 +- .../binutils/usr.bin/common/Makefile.prog | 8 +- .../usr.bin/common/arch/aarch64/config.h | 57 +- .../usr.bin/common/arch/aarch64/defs.mk | 24 +- .../usr.bin/common/arch/aarch64eb/config.h | 309 + .../usr.bin/common/arch/aarch64eb/defs.mk | 40 + .../usr.bin/common/arch/alpha/config.h | 59 +- .../usr.bin/common/arch/alpha/defs.mk | 24 +- .../binutils/usr.bin/common/arch/arm/config.h | 57 +- .../binutils/usr.bin/common/arch/arm/defs.mk | 24 +- .../usr.bin/common/arch/armeb/config.h | 59 +- .../usr.bin/common/arch/armeb/defs.mk | 24 +- .../usr.bin/common/arch/coldfire/config.h | 38 +- .../usr.bin/common/arch/coldfire/defs.mk | 12 +- .../usr.bin/common/arch/earm/config.h | 59 +- .../binutils/usr.bin/common/arch/earm/defs.mk | 24 +- .../usr.bin/common/arch/earmeb/config.h | 59 +- .../usr.bin/common/arch/earmeb/defs.mk | 24 +- .../usr.bin/common/arch/earmhf/config.h | 57 +- .../usr.bin/common/arch/earmhf/defs.mk | 24 +- .../usr.bin/common/arch/earmhfeb/config.h | 59 +- .../usr.bin/common/arch/earmhfeb/defs.mk | 24 +- .../usr.bin/common/arch/hppa/config.h | 59 +- .../binutils/usr.bin/common/arch/hppa/defs.mk | 24 +- .../usr.bin/common/arch/i386/config.h | 59 +- .../binutils/usr.bin/common/arch/i386/defs.mk | 24 +- .../usr.bin/common/arch/ia64/config.h | 59 +- .../binutils/usr.bin/common/arch/ia64/defs.mk | 24 +- .../usr.bin/common/arch/m68000/config.h | 59 +- .../usr.bin/common/arch/m68000/defs.mk | 24 +- .../usr.bin/common/arch/m68k/config.h | 59 +- .../binutils/usr.bin/common/arch/m68k/defs.mk | 24 +- .../usr.bin/common/arch/mips64eb/config.h | 57 +- .../usr.bin/common/arch/mips64eb/defs.mk | 24 +- .../usr.bin/common/arch/mips64el/config.h | 57 +- .../usr.bin/common/arch/mips64el/defs.mk | 24 +- .../usr.bin/common/arch/mipseb/config.h | 57 +- .../usr.bin/common/arch/mipseb/defs.mk | 24 +- .../usr.bin/common/arch/mipsel/config.h | 57 +- .../usr.bin/common/arch/mipsel/defs.mk | 24 +- .../usr.bin/common/arch/or1k/config.h | 38 +- .../binutils/usr.bin/common/arch/or1k/defs.mk | 8 +- .../usr.bin/common/arch/powerpc/config.h | 59 +- .../usr.bin/common/arch/powerpc/defs.mk | 24 +- .../usr.bin/common/arch/powerpc64/config.h | 59 +- .../usr.bin/common/arch/powerpc64/defs.mk | 24 +- .../usr.bin/common/arch/riscv32/config.h | 61 +- .../usr.bin/common/arch/riscv32/defs.mk | 24 +- .../usr.bin/common/arch/riscv64/config.h | 61 +- .../usr.bin/common/arch/riscv64/defs.mk | 24 +- .../usr.bin/common/arch/sh3eb/config.h | 59 +- .../usr.bin/common/arch/sh3eb/defs.mk | 24 +- .../usr.bin/common/arch/sh3el/config.h | 57 +- .../usr.bin/common/arch/sh3el/defs.mk | 24 +- .../usr.bin/common/arch/sparc/config.h | 59 +- .../usr.bin/common/arch/sparc/defs.mk | 24 +- .../usr.bin/common/arch/sparc64/config.h | 59 +- .../usr.bin/common/arch/sparc64/defs.mk | 24 +- .../binutils/usr.bin/common/arch/vax/config.h | 59 +- .../binutils/usr.bin/common/arch/vax/defs.mk | 24 +- .../usr.bin/common/arch/x86_64/config.h | 59 +- .../usr.bin/common/arch/x86_64/defs.mk | 24 +- .../gpl3/binutils/usr.bin/elfedit/Makefile | 4 +- external/gpl3/binutils/usr.bin/gas/Makefile | 12 +- .../usr.bin/gas/arch/aarch64/config.h | 106 +- .../usr.bin/gas/arch/aarch64eb/config.h | 421 + .../usr.bin/gas/arch/aarch64eb/defs.mk | 8 + .../usr.bin/gas/arch/aarch64eb/itbl-cpu.h | 5 + .../usr.bin/gas/arch/aarch64eb/obj-format.h | 5 + .../usr.bin/gas/arch/aarch64eb/targ-cpu.h | 5 + .../usr.bin/gas/arch/aarch64eb/targ-env.h | 5 + .../binutils/usr.bin/gas/arch/alpha/config.h | 104 +- .../binutils/usr.bin/gas/arch/arm/config.h | 104 +- .../binutils/usr.bin/gas/arch/armeb/config.h | 106 +- .../usr.bin/gas/arch/coldfire/config.h | 50 +- .../binutils/usr.bin/gas/arch/earm/config.h | 104 +- .../binutils/usr.bin/gas/arch/earm/targ-env.h | 4 +- .../binutils/usr.bin/gas/arch/earmeb/config.h | 104 +- .../usr.bin/gas/arch/earmeb/targ-env.h | 4 +- .../binutils/usr.bin/gas/arch/earmhf/config.h | 104 +- .../usr.bin/gas/arch/earmhf/targ-env.h | 4 +- .../usr.bin/gas/arch/earmhfeb/config.h | 104 +- .../usr.bin/gas/arch/earmhfeb/targ-env.h | 4 +- .../binutils/usr.bin/gas/arch/hppa/config.h | 104 +- .../binutils/usr.bin/gas/arch/i386/config.h | 104 +- .../binutils/usr.bin/gas/arch/ia64/config.h | 108 +- .../binutils/usr.bin/gas/arch/m68000/config.h | 104 +- .../binutils/usr.bin/gas/arch/m68k/config.h | 104 +- .../usr.bin/gas/arch/mips64eb/config.h | 104 +- .../usr.bin/gas/arch/mips64el/config.h | 104 +- .../binutils/usr.bin/gas/arch/mipseb/config.h | 104 +- .../binutils/usr.bin/gas/arch/mipsel/config.h | 104 +- .../binutils/usr.bin/gas/arch/or1k/config.h | 52 +- .../usr.bin/gas/arch/powerpc/config.h | 104 +- .../usr.bin/gas/arch/powerpc64/config.h | 104 +- .../usr.bin/gas/arch/riscv32/config.h | 110 +- .../usr.bin/gas/arch/riscv32/targ-env.h | 6 +- .../usr.bin/gas/arch/riscv64/config.h | 110 +- .../usr.bin/gas/arch/riscv64/targ-env.h | 6 +- .../binutils/usr.bin/gas/arch/sh3eb/config.h | 104 +- .../binutils/usr.bin/gas/arch/sh3el/config.h | 104 +- .../binutils/usr.bin/gas/arch/sparc/config.h | 104 +- .../usr.bin/gas/arch/sparc64/config.h | 104 +- .../binutils/usr.bin/gas/arch/vax/config.h | 104 +- .../binutils/usr.bin/gas/arch/x86_64/config.h | 104 +- .../binutils/usr.bin/gas/arch/x86_64/defs.mk | 4 +- external/gpl3/binutils/usr.bin/gprof/Makefile | 11 +- .../usr.bin/gprof/arch/aarch64/defs.mk | 6 +- .../usr.bin/gprof/arch/aarch64/gconfig.h | 24 +- .../usr.bin/gprof/arch/aarch64eb/defs.mk | 8 + .../usr.bin/gprof/arch/aarch64eb/gconfig.h | 126 + .../binutils/usr.bin/gprof/arch/alpha/defs.mk | 6 +- .../usr.bin/gprof/arch/alpha/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/arm/defs.mk | 6 +- .../binutils/usr.bin/gprof/arch/arm/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/armeb/defs.mk | 6 +- .../usr.bin/gprof/arch/armeb/gconfig.h | 24 +- .../usr.bin/gprof/arch/coldfire/defs.mk | 6 +- .../usr.bin/gprof/arch/coldfire/gconfig.h | 19 +- .../binutils/usr.bin/gprof/arch/earm/defs.mk | 6 +- .../usr.bin/gprof/arch/earm/gconfig.h | 26 +- .../usr.bin/gprof/arch/earmeb/defs.mk | 6 +- .../usr.bin/gprof/arch/earmeb/gconfig.h | 24 +- .../usr.bin/gprof/arch/earmhf/defs.mk | 6 +- .../usr.bin/gprof/arch/earmhf/gconfig.h | 24 +- .../usr.bin/gprof/arch/earmhfeb/defs.mk | 6 +- .../usr.bin/gprof/arch/earmhfeb/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/hppa/defs.mk | 6 +- .../usr.bin/gprof/arch/hppa/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/i386/defs.mk | 6 +- .../usr.bin/gprof/arch/i386/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/ia64/defs.mk | 6 +- .../usr.bin/gprof/arch/ia64/gconfig.h | 24 +- .../usr.bin/gprof/arch/m68000/defs.mk | 6 +- .../usr.bin/gprof/arch/m68000/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/m68k/defs.mk | 6 +- .../usr.bin/gprof/arch/m68k/gconfig.h | 24 +- .../usr.bin/gprof/arch/mips64eb/defs.mk | 6 +- .../usr.bin/gprof/arch/mips64eb/gconfig.h | 24 +- .../usr.bin/gprof/arch/mips64el/defs.mk | 6 +- .../usr.bin/gprof/arch/mips64el/gconfig.h | 24 +- .../usr.bin/gprof/arch/mipseb/defs.mk | 6 +- .../usr.bin/gprof/arch/mipseb/gconfig.h | 24 +- .../usr.bin/gprof/arch/mipsel/defs.mk | 6 +- .../usr.bin/gprof/arch/mipsel/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/or1k/defs.mk | 2 +- .../usr.bin/gprof/arch/or1k/gconfig.h | 15 +- .../usr.bin/gprof/arch/powerpc/defs.mk | 6 +- .../usr.bin/gprof/arch/powerpc/gconfig.h | 24 +- .../usr.bin/gprof/arch/powerpc64/defs.mk | 6 +- .../usr.bin/gprof/arch/powerpc64/gconfig.h | 24 +- .../usr.bin/gprof/arch/riscv32/defs.mk | 6 +- .../usr.bin/gprof/arch/riscv32/gconfig.h | 24 +- .../usr.bin/gprof/arch/riscv64/defs.mk | 6 +- .../usr.bin/gprof/arch/riscv64/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/sh3eb/defs.mk | 6 +- .../usr.bin/gprof/arch/sh3eb/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/sh3el/defs.mk | 6 +- .../usr.bin/gprof/arch/sh3el/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/sparc/defs.mk | 6 +- .../usr.bin/gprof/arch/sparc/gconfig.h | 24 +- .../usr.bin/gprof/arch/sparc64/defs.mk | 6 +- .../usr.bin/gprof/arch/sparc64/gconfig.h | 24 +- .../binutils/usr.bin/gprof/arch/vax/defs.mk | 6 +- .../binutils/usr.bin/gprof/arch/vax/gconfig.h | 24 +- .../usr.bin/gprof/arch/x86_64/defs.mk | 6 +- .../usr.bin/gprof/arch/x86_64/gconfig.h | 24 +- external/gpl3/binutils/usr.bin/ld/Makefile | 93 +- .../binutils/usr.bin/ld/arch/aarch64/config.h | 59 +- .../binutils/usr.bin/ld/arch/aarch64/defs.mk | 10 +- .../usr.bin/ld/arch/aarch64/ldemul-list.h | 12 +- .../usr.bin/ld/arch/aarch64eb/config.h | 261 + .../usr.bin/ld/arch/aarch64eb/defs.mk | 13 + .../usr.bin/ld/arch/aarch64eb/ldemul-list.h | 32 + .../binutils/usr.bin/ld/arch/alpha/config.h | 59 +- .../binutils/usr.bin/ld/arch/alpha/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/arm/config.h | 59 +- .../gpl3/binutils/usr.bin/ld/arch/arm/defs.mk | 10 +- .../usr.bin/ld/arch/arm/ldemul-list.h | 5 +- .../binutils/usr.bin/ld/arch/armeb/config.h | 59 +- .../binutils/usr.bin/ld/arch/armeb/defs.mk | 10 +- .../usr.bin/ld/arch/armeb/ldemul-list.h | 5 +- .../usr.bin/ld/arch/coldfire/config.h | 37 +- .../binutils/usr.bin/ld/arch/coldfire/defs.mk | 6 +- .../binutils/usr.bin/ld/arch/earm/config.h | 59 +- .../binutils/usr.bin/ld/arch/earm/defs.mk | 8 +- .../usr.bin/ld/arch/earm/ldemul-list.h | 4 +- .../binutils/usr.bin/ld/arch/earmeb/config.h | 59 +- .../binutils/usr.bin/ld/arch/earmeb/defs.mk | 10 +- .../usr.bin/ld/arch/earmeb/ldemul-list.h | 6 +- .../binutils/usr.bin/ld/arch/earmhf/config.h | 59 +- .../binutils/usr.bin/ld/arch/earmhf/defs.mk | 10 +- .../usr.bin/ld/arch/earmhf/ldemul-list.h | 6 +- .../usr.bin/ld/arch/earmhfeb/config.h | 59 +- .../binutils/usr.bin/ld/arch/earmhfeb/defs.mk | 10 +- .../usr.bin/ld/arch/earmhfeb/ldemul-list.h | 6 +- .../binutils/usr.bin/ld/arch/hppa/config.h | 59 +- .../binutils/usr.bin/ld/arch/hppa/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/i386/config.h | 59 +- .../binutils/usr.bin/ld/arch/i386/defs.mk | 8 +- .../usr.bin/ld/arch/i386/ldemul-list.h | 3 +- .../binutils/usr.bin/ld/arch/ia64/config.h | 61 +- .../binutils/usr.bin/ld/arch/ia64/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/m68000/config.h | 59 +- .../binutils/usr.bin/ld/arch/m68000/defs.mk | 10 +- .../usr.bin/ld/arch/m68000/ldemul-list.h | 7 +- .../binutils/usr.bin/ld/arch/m68k/config.h | 59 +- .../binutils/usr.bin/ld/arch/m68k/defs.mk | 10 +- .../usr.bin/ld/arch/m68k/ldemul-list.h | 7 +- .../usr.bin/ld/arch/mips64eb/config.h | 59 +- .../binutils/usr.bin/ld/arch/mips64eb/defs.mk | 8 +- .../usr.bin/ld/arch/mips64eb/ldemul-list.h | 4 +- .../usr.bin/ld/arch/mips64el/config.h | 59 +- .../binutils/usr.bin/ld/arch/mips64el/defs.mk | 8 +- .../usr.bin/ld/arch/mips64el/ldemul-list.h | 4 +- .../binutils/usr.bin/ld/arch/mipseb/config.h | 59 +- .../binutils/usr.bin/ld/arch/mipseb/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/mipsel/config.h | 59 +- .../binutils/usr.bin/ld/arch/mipsel/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/or1k/config.h | 35 +- .../binutils/usr.bin/ld/arch/or1k/defs.mk | 2 +- .../binutils/usr.bin/ld/arch/powerpc/config.h | 59 +- .../binutils/usr.bin/ld/arch/powerpc/defs.mk | 8 +- .../usr.bin/ld/arch/powerpc64/config.h | 59 +- .../usr.bin/ld/arch/powerpc64/defs.mk | 10 +- .../usr.bin/ld/arch/powerpc64/ldemul-list.h | 8 +- .../binutils/usr.bin/ld/arch/riscv32/config.h | 59 +- .../binutils/usr.bin/ld/arch/riscv32/defs.mk | 10 +- .../usr.bin/ld/arch/riscv32/ldemul-list.h | 12 +- .../binutils/usr.bin/ld/arch/riscv64/config.h | 59 +- .../binutils/usr.bin/ld/arch/riscv64/defs.mk | 10 +- .../usr.bin/ld/arch/riscv64/ldemul-list.h | 12 +- .../binutils/usr.bin/ld/arch/sh3eb/config.h | 59 +- .../binutils/usr.bin/ld/arch/sh3eb/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/sh3el/config.h | 59 +- .../binutils/usr.bin/ld/arch/sh3el/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/sparc/config.h | 59 +- .../binutils/usr.bin/ld/arch/sparc/defs.mk | 10 +- .../usr.bin/ld/arch/sparc/ldemul-list.h | 5 +- .../binutils/usr.bin/ld/arch/sparc64/config.h | 59 +- .../binutils/usr.bin/ld/arch/sparc64/defs.mk | 10 +- .../usr.bin/ld/arch/sparc64/ldemul-list.h | 5 +- .../binutils/usr.bin/ld/arch/vax/config.h | 59 +- .../gpl3/binutils/usr.bin/ld/arch/vax/defs.mk | 8 +- .../binutils/usr.bin/ld/arch/x86_64/config.h | 59 +- .../binutils/usr.bin/ld/arch/x86_64/defs.mk | 10 +- .../usr.bin/ld/arch/x86_64/ldemul-list.h | 8 +- .../gpl3/binutils/usr.bin/nlmconv/Makefile | 4 +- external/gpl3/binutils/usr.bin/nm/Makefile | 4 +- .../gpl3/binutils/usr.bin/objcopy/Makefile | 4 +- .../gpl3/binutils/usr.bin/objdump/Makefile | 6 +- .../gpl3/binutils/usr.bin/ranlib/Makefile | 4 +- .../gpl3/binutils/usr.bin/readelf/Makefile | 5 +- external/gpl3/binutils/usr.bin/size/Makefile | 4 +- .../gpl3/binutils/usr.bin/strings/Makefile | 4 +- external/gpl3/binutils/usr.bin/strip/Makefile | 4 +- external/gpl3/binutils/usr.sbin/Makefile.inc | 3 +- .../gpl3/binutils/usr.sbin/dbsym/Makefile | 4 +- external/gpl3/binutils/usr.sbin/dbsym/dbsym.c | 27 +- .../binutils/usr.sbin/mdsetimage/Makefile | 12 +- .../binutils/usr.sbin/mdsetimage/bin_bfd.c | 151 + .../binutils/usr.sbin/mdsetimage/mdsetimage.8 | 92 - .../binutils/usr.sbin/mdsetimage/mdsetimage.c | 317 - share/mk/bsd.hostinit.mk | 13 + tools/binutils/Makefile | 34 +- tools/binutils/mknative-binutils | 18 +- 600 files changed, 113782 insertions(+), 86860 deletions(-) create mode 100644 external/gpl3/binutils/Makefile.inc delete mode 100644 external/gpl3/binutils/files/yyscript.c delete mode 100644 external/gpl3/binutils/files/yyscript.h create mode 100644 external/gpl3/binutils/lib/Makefile.inc create mode 100644 external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd.h create mode 100644 external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h create mode 100644 external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfdver.h create mode 100644 external/gpl3/binutils/lib/libbfd/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/lib/libbfd/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/Makefile create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/aarch64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/aarch64/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/alpha/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/alpha/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/arm/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/arm/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/armeb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/armeb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earm/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earm/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmeb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmeb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmhf/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmhf/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/hppa/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/hppa/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/i386/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/i386/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/ia64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/ia64/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/m68000/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/m68000/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/m68k/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/m68k/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mips64el/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mips64el/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mipseb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mipseb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mipsel/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/mipsel/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/powerpc/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/powerpc/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/riscv32/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/riscv32/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/riscv64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/riscv64/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sh3el/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sh3el/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sparc64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/sparc64/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/vax/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/vax/defs.mk create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/x86_64/config.h create mode 100644 external/gpl3/binutils/lib/libgnuctf/arch/x86_64/defs.mk create mode 100644 external/gpl3/binutils/lib/libiberty/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/lib/libiberty/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/patches/0000-Base-NetBSD.patch delete mode 100644 external/gpl3/binutils/patches/0000-binutils_nbsd.patch create mode 100644 external/gpl3/binutils/patches/0001-NetBSD-Minix.patch delete mode 100644 external/gpl3/binutils/patches/0001-minix.patch delete mode 100644 external/gpl3/binutils/patches/0002-minix-on-minix.patch delete mode 100644 external/gpl3/binutils/patches/0003-gold-target.patch delete mode 100644 external/gpl3/binutils/patches/0004-libdl-and-reconf.patch delete mode 100644 external/gpl3/binutils/patches/0005-gold-libdl.patch delete mode 100644 external/gpl3/binutils/patches/0006-gold-plt.patch delete mode 100644 external/gpl3/binutils/patches/0007-gold-as-tool-on-minix.patch delete mode 100644 external/gpl3/binutils/patches/0008-Fix-build-error-on-OSX.patch delete mode 100644 external/gpl3/binutils/patches/0009-Slash-means-divide.patch delete mode 100644 external/gpl3/binutils/patches/0010-armelf_minix-update.patch create mode 100644 external/gpl3/binutils/usr.bin/common/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/usr.bin/common/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/itbl-cpu.h create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/obj-format.h create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-cpu.h create mode 100644 external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-env.h create mode 100644 external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/gconfig.h create mode 100644 external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/config.h create mode 100644 external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/defs.mk create mode 100644 external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/ldemul-list.h create mode 100644 external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c delete mode 100644 external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.8 delete mode 100644 external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.c create mode 100644 share/mk/bsd.hostinit.mk diff --git a/distrib/sets/lists/base/shl.mi b/distrib/sets/lists/base/shl.mi index 1bbb78c86..8b02437f0 100644 --- a/distrib/sets/lists/base/shl.mi +++ b/distrib/sets/lists/base/shl.mi @@ -187,8 +187,8 @@ ./usr/lib/libavl.so base-zfs-shlib compatfile,zfs ./usr/lib/libavl.so.0 base-zfs-shlib compatfile,zfs ./usr/lib/libavl.so.0.0 base-zfs-shlib compatfile,zfs -./usr/lib/libbfd.so.13 base-sys-shlib compatfile,binutils -./usr/lib/libbfd.so.13.0 base-sys-shlib compatfile,binutils +./usr/lib/libbfd.so.17 base-sys-shlib compatfile,binutils +./usr/lib/libbfd.so.17.0 base-sys-shlib compatfile,binutils ./usr/lib/libbind9.so base-bind-shlib compatfile ./usr/lib/libbind9.so.8 base-bind-shlib compatfile ./usr/lib/libbind9.so.8.2 base-bind-shlib compatfile diff --git a/distrib/sets/lists/comp/ad.arm b/distrib/sets/lists/comp/ad.arm index 55c27b586..726b72164 100644 --- a/distrib/sets/lists/comp/ad.arm +++ b/distrib/sets/lists/comp/ad.arm @@ -663,6 +663,32 @@ ./usr/lib/oabi/libc_vfp.a comp-c-lib compat ./usr/lib/oabi/libc_vfp.so base-sys-shlib compat,pic ./usr/lib/oabi/libc_vfp_p.a comp-c-proflib compat,profile +./usr/libdata/ldscripts/armelf.x comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xbn comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xc comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xd comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xdc comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xdw comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xn comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xr comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xs comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xsc comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xsw comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xu comp-util-bin binutils +./usr/libdata/ldscripts/armelf.xw comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.x comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xbn comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xc comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xd comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xdc comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xdw comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xn comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xr comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xs comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xsc comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xsw comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xu comp-util-bin binutils +./usr/libdata/ldscripts/armelf_minix.xw comp-util-bin binutils ./usr/libdata/lint/llib-larm.ln comp-c-lintlib lint ./usr/libdata/lint/llib-larm32.ln comp-obsolete obsolete ./usr/libdata/lint/llib-lpmc.ln comp-c-lintlib lint diff --git a/distrib/sets/lists/minix-base/mi b/distrib/sets/lists/minix-base/mi index d976c05da..e850720e1 100644 --- a/distrib/sets/lists/minix-base/mi +++ b/distrib/sets/lists/minix-base/mi @@ -804,8 +804,8 @@ ./usr/lib/libatf-c.so.0 minix-base atf ./usr/lib/libatf-c.so minix-base atf ./usr/lib/libatf-c_pic.a minix-base atf -./usr/lib/libbfd.so.13.0 minix-base binutils -./usr/lib/libbfd.so.13 minix-base binutils +./usr/lib/libbfd.so.17.0 minix-base binutils +./usr/lib/libbfd.so.17 minix-base binutils ./usr/lib/libbind9.so minix-base ./usr/lib/libbind9.so.8 minix-base ./usr/lib/libbind9.so.8.2 minix-base @@ -882,6 +882,8 @@ ./usr/lib/libgcc_s.so minix-base ./usr/lib/libgcc_s.so.1 minix-base ./usr/lib/libgcc_s.so.1.0 minix-base +./usr/lib/libgnuctf.so.0 minix-base binutils +./usr/lib/libgnuctf.so.0.0 minix-base binutils ./usr/lib/libintl.so minix-base ./usr/lib/libintl.so.1 minix-base ./usr/lib/libintl.so.1.1 minix-base @@ -957,8 +959,8 @@ ./usr/lib/libobjc.so.4 minix-base gcc=5 ./usr/lib/libobjc.so minix-base gcc ./usr/lib/libobjc_pic.a minix-base gcc=5 -./usr/lib/libopcodes.so.6.0 minix-base binutils -./usr/lib/libopcodes.so.6 minix-base binutils +./usr/lib/libopcodes.so.10.0 minix-base binutils +./usr/lib/libopcodes.so.10 minix-base binutils ./usr/lib/libpcap.so minix-base ./usr/lib/libpcap.so.5 minix-base ./usr/lib/libpcap.so.5.1 minix-base @@ -1058,6 +1060,7 @@ ./usr/libdata/debug/usr/tests/minix-posix/blocktest minix-base ./usr/libdata/debug/usr/tests/minix-posix/ddekit minix-base ./usr/libdata/debug/usr/tests/minix-posix/rmibtest minix-base +./usr/libdata/ldscripts minix-base binutils ./usr/libexec minix-base ./usr/libexec/atf-check minix-base atf ./usr/libexec/blacklistd-helper minix-base diff --git a/distrib/sets/lists/minix-comp/md.evbarm b/distrib/sets/lists/minix-comp/md.evbarm index 8be3b6706..21fa2ef31 100644 --- a/distrib/sets/lists/minix-comp/md.evbarm +++ b/distrib/sets/lists/minix-comp/md.evbarm @@ -88,3 +88,29 @@ ./usr/include/gcc-4.5/arm_neon.h minix-comp gcc=45,gcccmds,obsolete ./usr/include/gcc-4.8/arm_neon.h minix-comp gcc=5,gcccmds ./usr/include/gcc-4.8/unwind-arm-common.h minix-comp gcc=5,gcccmds +./usr/libdata/ldscripts/armelf.x minix-comp binutils +./usr/libdata/ldscripts/armelf.xbn minix-comp binutils +./usr/libdata/ldscripts/armelf.xc minix-comp binutils +./usr/libdata/ldscripts/armelf.xd minix-comp binutils +./usr/libdata/ldscripts/armelf.xdc minix-comp binutils +./usr/libdata/ldscripts/armelf.xdw minix-comp binutils +./usr/libdata/ldscripts/armelf.xn minix-comp binutils +./usr/libdata/ldscripts/armelf.xr minix-comp binutils +./usr/libdata/ldscripts/armelf.xs minix-comp binutils +./usr/libdata/ldscripts/armelf.xsc minix-comp binutils +./usr/libdata/ldscripts/armelf.xsw minix-comp binutils +./usr/libdata/ldscripts/armelf.xu minix-comp binutils +./usr/libdata/ldscripts/armelf.xw minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.x minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xbn minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xc minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xd minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xdc minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xdw minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xn minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xr minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xs minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xsc minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xsw minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xu minix-comp binutils +./usr/libdata/ldscripts/armelf_minix.xw minix-comp binutils diff --git a/etc/mtree/NetBSD.dist.base b/etc/mtree/NetBSD.dist.base index 074ce2097..1d45091eb 100644 --- a/etc/mtree/NetBSD.dist.base +++ b/etc/mtree/NetBSD.dist.base @@ -153,6 +153,7 @@ ./usr/libdata/debug/usr/tests/minix-posix/blocktest ./usr/libdata/debug/usr/tests/minix-posix/ddekit ./usr/libdata/debug/usr/tests/minix-posix/rmibtest +./usr/libdata/ldscripts ./usr/libexec ./usr/log ./usr/man diff --git a/external/gpl3/binutils/Makefile.inc b/external/gpl3/binutils/Makefile.inc new file mode 100644 index 000000000..31088f147 --- /dev/null +++ b/external/gpl3/binutils/Makefile.inc @@ -0,0 +1,4 @@ +# $NetBSD: Makefile.inc,v 1.2 2016/10/26 18:00:46 christos Exp $ +.include +TOP:= ${.PARSEDIR} +DIST:= ${TOP}/dist diff --git a/external/gpl3/binutils/fetch.sh b/external/gpl3/binutils/fetch.sh index 89100de5c..d11af6aa6 100755 --- a/external/gpl3/binutils/fetch.sh +++ b/external/gpl3/binutils/fetch.sh @@ -5,8 +5,8 @@ echo $0 cd `dirname $0` # Configure fetch method -URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.4.0/binutils-2.23.2.tar.bz2" -BACKUP_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2" +URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.4.0/binutils-2.34.tar.bz2" +BACKUP_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2" FETCH=ftp which curl >/dev/null if [ $? -eq 0 ]; then @@ -16,19 +16,18 @@ fi # Fetch sources if not available if [ ! -d dist ]; then - if [ ! -f binutils-2.23.2.tar.bz2 ]; then + if [ ! -f binutils-2.34.tar.bz2 ]; then $FETCH $URL if [ $? -ne 0 ]; then $FETCH $BACKUP_URL fi fi - tar -oxjf binutils-2.23.2.tar.bz2 && \ - mv binutils-2.23.2 dist && \ + tar -oxjf binutils-2.34.tar.bz2 && \ + mv binutils-2.34 dist && \ cd dist && \ + find . -name testsuite -exec rm -fr {} + && \ + find . -name .gitignore -delete && \ cat ../patches/* | patch -p1 - cp ../files/yyscript.h gold && \ - cp ../files/yyscript.c gold && \ - rm -f ld/configdoc.texi fi diff --git a/external/gpl3/binutils/files/yyscript.c b/external/gpl3/binutils/files/yyscript.c deleted file mode 100644 index cc26466a9..000000000 --- a/external/gpl3/binutils/files/yyscript.c +++ /dev/null @@ -1,3540 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.2" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ -#line 26 "yyscript.y" /* yacc.c:339 */ - - -#include "config.h" - -#include -#include -#include -#include - -#include "script-c.h" - - -#line 79 "yyscript.c" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ -#ifndef YY_YY_Y_TAB_H_INCLUDED -# define YY_YY_Y_TAB_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - PLUSEQ = 258, - MINUSEQ = 259, - MULTEQ = 260, - DIVEQ = 261, - LSHIFTEQ = 262, - RSHIFTEQ = 263, - ANDEQ = 264, - OREQ = 265, - OROR = 266, - ANDAND = 267, - EQ = 268, - NE = 269, - LE = 270, - GE = 271, - LSHIFT = 272, - RSHIFT = 273, - UNARY = 274, - STRING = 275, - QUOTED_STRING = 276, - INTEGER = 277, - ABSOLUTE = 278, - ADDR = 279, - ALIGN_K = 280, - ALIGNOF = 281, - ASSERT_K = 282, - AS_NEEDED = 283, - AT = 284, - BIND = 285, - BLOCK = 286, - BYTE = 287, - CONSTANT = 288, - CONSTRUCTORS = 289, - COPY = 290, - CREATE_OBJECT_SYMBOLS = 291, - DATA_SEGMENT_ALIGN = 292, - DATA_SEGMENT_END = 293, - DATA_SEGMENT_RELRO_END = 294, - DEFINED = 295, - DSECT = 296, - ENTRY = 297, - EXCLUDE_FILE = 298, - EXTERN = 299, - FILL = 300, - FLOAT = 301, - FORCE_COMMON_ALLOCATION = 302, - GLOBAL = 303, - GROUP = 304, - HLL = 305, - INCLUDE = 306, - INHIBIT_COMMON_ALLOCATION = 307, - INFO = 308, - INPUT = 309, - KEEP = 310, - LEN = 311, - LENGTH = 312, - LOADADDR = 313, - LOCAL = 314, - LONG = 315, - MAP = 316, - MAX_K = 317, - MEMORY = 318, - MIN_K = 319, - NEXT = 320, - NOCROSSREFS = 321, - NOFLOAT = 322, - NOLOAD = 323, - ONLY_IF_RO = 324, - ONLY_IF_RW = 325, - ORG = 326, - ORIGIN = 327, - OUTPUT = 328, - OUTPUT_ARCH = 329, - OUTPUT_FORMAT = 330, - OVERLAY = 331, - PHDRS = 332, - PROVIDE = 333, - PROVIDE_HIDDEN = 334, - QUAD = 335, - SEARCH_DIR = 336, - SECTIONS = 337, - SEGMENT_START = 338, - SHORT = 339, - SIZEOF = 340, - SIZEOF_HEADERS = 341, - SORT_BY_ALIGNMENT = 342, - SORT_BY_NAME = 343, - SPECIAL = 344, - SQUAD = 345, - STARTUP = 346, - SUBALIGN = 347, - SYSLIB = 348, - TARGET_K = 349, - TRUNCATE = 350, - VERSIONK = 351, - OPTION = 352, - PARSING_LINKER_SCRIPT = 353, - PARSING_VERSION_SCRIPT = 354, - PARSING_DEFSYM = 355, - PARSING_DYNAMIC_LIST = 356 - }; -#endif -/* Tokens. */ -#define PLUSEQ 258 -#define MINUSEQ 259 -#define MULTEQ 260 -#define DIVEQ 261 -#define LSHIFTEQ 262 -#define RSHIFTEQ 263 -#define ANDEQ 264 -#define OREQ 265 -#define OROR 266 -#define ANDAND 267 -#define EQ 268 -#define NE 269 -#define LE 270 -#define GE 271 -#define LSHIFT 272 -#define RSHIFT 273 -#define UNARY 274 -#define STRING 275 -#define QUOTED_STRING 276 -#define INTEGER 277 -#define ABSOLUTE 278 -#define ADDR 279 -#define ALIGN_K 280 -#define ALIGNOF 281 -#define ASSERT_K 282 -#define AS_NEEDED 283 -#define AT 284 -#define BIND 285 -#define BLOCK 286 -#define BYTE 287 -#define CONSTANT 288 -#define CONSTRUCTORS 289 -#define COPY 290 -#define CREATE_OBJECT_SYMBOLS 291 -#define DATA_SEGMENT_ALIGN 292 -#define DATA_SEGMENT_END 293 -#define DATA_SEGMENT_RELRO_END 294 -#define DEFINED 295 -#define DSECT 296 -#define ENTRY 297 -#define EXCLUDE_FILE 298 -#define EXTERN 299 -#define FILL 300 -#define FLOAT 301 -#define FORCE_COMMON_ALLOCATION 302 -#define GLOBAL 303 -#define GROUP 304 -#define HLL 305 -#define INCLUDE 306 -#define INHIBIT_COMMON_ALLOCATION 307 -#define INFO 308 -#define INPUT 309 -#define KEEP 310 -#define LEN 311 -#define LENGTH 312 -#define LOADADDR 313 -#define LOCAL 314 -#define LONG 315 -#define MAP 316 -#define MAX_K 317 -#define MEMORY 318 -#define MIN_K 319 -#define NEXT 320 -#define NOCROSSREFS 321 -#define NOFLOAT 322 -#define NOLOAD 323 -#define ONLY_IF_RO 324 -#define ONLY_IF_RW 325 -#define ORG 326 -#define ORIGIN 327 -#define OUTPUT 328 -#define OUTPUT_ARCH 329 -#define OUTPUT_FORMAT 330 -#define OVERLAY 331 -#define PHDRS 332 -#define PROVIDE 333 -#define PROVIDE_HIDDEN 334 -#define QUAD 335 -#define SEARCH_DIR 336 -#define SECTIONS 337 -#define SEGMENT_START 338 -#define SHORT 339 -#define SIZEOF 340 -#define SIZEOF_HEADERS 341 -#define SORT_BY_ALIGNMENT 342 -#define SORT_BY_NAME 343 -#define SPECIAL 344 -#define SQUAD 345 -#define STARTUP 346 -#define SUBALIGN 347 -#define SYSLIB 348 -#define TARGET_K 349 -#define TRUNCATE 350 -#define VERSIONK 351 -#define OPTION 352 -#define PARSING_LINKER_SCRIPT 353 -#define PARSING_VERSION_SCRIPT 354 -#define PARSING_DEFSYM 355 -#define PARSING_DYNAMIC_LIST 356 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; -union YYSTYPE -{ -#line 53 "yyscript.y" /* yacc.c:355 */ - - /* A string. */ - struct Parser_string string; - /* A number. */ - uint64_t integer; - /* An expression. */ - Expression_ptr expr; - /* An output section header. */ - struct Parser_output_section_header output_section_header; - /* An output section trailer. */ - struct Parser_output_section_trailer output_section_trailer; - /* A section constraint. */ - enum Section_constraint constraint; - /* A complete input section specification. */ - struct Input_section_spec input_section_spec; - /* A list of wildcard specifications, with exclusions. */ - struct Wildcard_sections wildcard_sections; - /* A single wildcard specification. */ - struct Wildcard_section wildcard_section; - /* A list of strings. */ - String_list_ptr string_list; - /* Information for a program header. */ - struct Phdr_info phdr_info; - /* Used for version scripts and within VERSION {}. */ - struct Version_dependency_list* deplist; - struct Version_expression_list* versyms; - struct Version_tree* versnode; - enum Script_section_type section_type; - -#line 351 "yyscript.c" /* yacc.c:355 */ -}; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int yyparse (void* closure); - -#endif /* !YY_YY_Y_TAB_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 365 "yyscript.c" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 20 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1329 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 125 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 71 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 234 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 527 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 356 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 121, 2, 2, 2, 31, 18, 2, - 115, 116, 29, 27, 119, 28, 2, 30, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 13, 120, - 21, 7, 22, 12, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 17, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 123, 2, - 2, 122, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 117, 16, 118, 124, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 8, 9, 10, 11, 14, 15, 19, 20, - 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 231, 231, 232, 233, 234, 239, 240, 245, 246, - 249, 248, 252, 254, 255, 256, 258, 264, 271, 272, - 275, 274, 278, 281, 280, 284, 285, 286, 294, 302, - 302, 308, 310, 312, 318, 319, 324, 326, 329, 328, - 336, 337, 342, 344, 343, 352, 354, 352, 371, 376, - 381, 386, 391, 396, 405, 407, 412, 417, 422, 432, - 433, 440, 441, 448, 449, 456, 457, 459, 461, 467, - 476, 478, 483, 485, 490, 493, 499, 502, 507, 509, - 515, 516, 517, 519, 521, 523, 530, 531, 533, 539, - 541, 543, 545, 547, 554, 556, 562, 569, 578, 583, - 592, 597, 602, 607, 616, 621, 640, 663, 665, 672, - 674, 679, 689, 691, 692, 694, 700, 701, 706, 710, - 712, 717, 720, 723, 727, 729, 731, 735, 737, 739, - 744, 745, 750, 759, 761, 768, 769, 777, 782, 793, - 802, 804, 810, 816, 822, 828, 834, 840, 846, 852, - 854, 860, 860, 870, 872, 874, 876, 878, 880, 882, - 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, - 904, 906, 908, 910, 912, 914, 916, 918, 920, 922, - 924, 926, 928, 930, 932, 934, 936, 938, 940, 942, - 944, 946, 948, 950, 952, 957, 962, 964, 972, 978, - 988, 991, 992, 996, 1002, 1006, 1007, 1011, 1015, 1020, - 1027, 1031, 1039, 1040, 1042, 1044, 1046, 1055, 1060, 1065, - 1070, 1077, 1076, 1087, 1086, 1093, 1098, 1108, 1110, 1117, - 1118, 1123, 1124, 1129, 1130 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "PLUSEQ", "MINUSEQ", "MULTEQ", "DIVEQ", - "'='", "LSHIFTEQ", "RSHIFTEQ", "ANDEQ", "OREQ", "'?'", "':'", "OROR", - "ANDAND", "'|'", "'^'", "'&'", "EQ", "NE", "'<'", "'>'", "LE", "GE", - "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "STRING", - "QUOTED_STRING", "INTEGER", "ABSOLUTE", "ADDR", "ALIGN_K", "ALIGNOF", - "ASSERT_K", "AS_NEEDED", "AT", "BIND", "BLOCK", "BYTE", "CONSTANT", - "CONSTRUCTORS", "COPY", "CREATE_OBJECT_SYMBOLS", "DATA_SEGMENT_ALIGN", - "DATA_SEGMENT_END", "DATA_SEGMENT_RELRO_END", "DEFINED", "DSECT", - "ENTRY", "EXCLUDE_FILE", "EXTERN", "FILL", "FLOAT", - "FORCE_COMMON_ALLOCATION", "GLOBAL", "GROUP", "HLL", "INCLUDE", - "INHIBIT_COMMON_ALLOCATION", "INFO", "INPUT", "KEEP", "LEN", "LENGTH", - "LOADADDR", "LOCAL", "LONG", "MAP", "MAX_K", "MEMORY", "MIN_K", "NEXT", - "NOCROSSREFS", "NOFLOAT", "NOLOAD", "ONLY_IF_RO", "ONLY_IF_RW", "ORG", - "ORIGIN", "OUTPUT", "OUTPUT_ARCH", "OUTPUT_FORMAT", "OVERLAY", "PHDRS", - "PROVIDE", "PROVIDE_HIDDEN", "QUAD", "SEARCH_DIR", "SECTIONS", - "SEGMENT_START", "SHORT", "SIZEOF", "SIZEOF_HEADERS", - "SORT_BY_ALIGNMENT", "SORT_BY_NAME", "SPECIAL", "SQUAD", "STARTUP", - "SUBALIGN", "SYSLIB", "TARGET_K", "TRUNCATE", "VERSIONK", "OPTION", - "PARSING_LINKER_SCRIPT", "PARSING_VERSION_SCRIPT", "PARSING_DEFSYM", - "PARSING_DYNAMIC_LIST", "'('", "')'", "'{'", "'}'", "','", "';'", "'!'", - "'o'", "'l'", "'~'", "$accept", "top", "linker_script", "file_cmd", - "$@1", "$@2", "$@3", "ignore_cmd", "extern_name_list", "$@4", - "extern_name_list_body", "input_list", "input_list_element", "$@5", - "sections_block", "section_block_cmd", "$@6", "section_header", "$@7", - "$@8", "opt_address_and_section_type", "section_type", "opt_at", - "opt_align", "opt_subalign", "opt_constraint", "section_trailer", - "opt_memspec", "opt_at_memspec", "opt_phdr", "opt_fill", "section_cmds", - "section_cmd", "data_length", "input_section_spec", - "input_section_no_keep", "wildcard_file", "wildcard_sections", - "wildcard_section", "exclude_names", "wildcard_name", - "file_or_sections_cmd", "memory_defs", "memory_def", "memory_attr", - "memory_origin", "memory_length", "phdrs_defs", "phdr_def", "phdr_type", - "phdr_info", "assignment", "parse_exp", "$@9", "exp", "defsym_expr", - "dynamic_list_expr", "dynamic_list_nodes", "dynamic_list_node", - "version_script", "vers_nodes", "vers_node", "verdep", "vers_tag", - "vers_defns", "$@10", "$@11", "string", "end", "opt_semicolon", - "opt_comma", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 61, 262, 263, - 264, 265, 63, 58, 266, 267, 124, 94, 38, 268, - 269, 60, 62, 270, 271, 272, 273, 43, 45, 42, - 47, 37, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 40, 41, 123, 125, 44, - 59, 33, 111, 108, 126 -}; -# endif - -#define YYPACT_NINF -396 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-396))) - -#define YYTABLE_NINF -110 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 155, -396, 42, 90, -106, 13, 1169, -396, -396, 122, - -396, 42, -396, -85, -396, 36, 135, -396, -106, -396, - -396, -68, -55, -46, -396, -396, 90, -396, -37, -29, - 4, 19, 29, 46, 52, 69, 35, 78, 54, 82, - -396, -396, -396, -396, 20, 321, -396, -396, 90, 144, - 202, -6, 103, -396, 122, -396, 105, -396, -396, 90, - -396, 102, -396, 185, -396, 90, 90, -396, 90, 90, - 90, -396, 90, -396, 90, -396, -396, -396, -396, -396, - -396, -396, -396, -396, -396, -396, -396, 111, 135, 135, - 118, 143, 127, -396, 1129, 72, 110, 157, 182, 90, - 185, 210, -396, -63, -396, -396, 84, 186, 108, 40, - 297, 301, 218, -396, 220, 42, 232, -396, -396, -396, - -396, -396, -396, -396, -396, -396, -396, 229, 231, -396, - -396, -396, 90, -3, 1129, 1129, -396, 237, 258, 259, - 262, 263, 289, 300, 302, 303, 304, 305, 306, 309, - 332, 333, 334, 337, 338, -396, 1129, 1129, 1129, 1298, - -396, 335, 90, -396, -396, -5, -396, 120, -396, 339, - -396, -396, 185, -396, 131, -396, -396, 90, -396, -396, - 310, -396, -396, -396, 56, -396, 340, -396, 135, 109, - 143, 343, -396, 25, -396, -396, -396, 1129, 90, 1129, - 90, 1129, 1129, 90, 1129, 1129, 1129, 90, 90, 90, - 1129, 1129, 90, 90, 90, 234, -396, -396, 1129, 1129, - 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, - 1129, 1129, 1129, 1129, 1129, 1129, 1129, -396, 341, 90, - -396, -396, 185, -396, 90, -396, 346, 344, -396, 59, - -396, 349, 351, -396, -396, -396, 321, -396, 336, 455, - -396, -396, -396, 718, 353, 260, 356, 411, 744, 358, - 638, 764, 658, 360, 361, 362, 678, 698, 363, 365, - 366, -396, 1278, 590, 364, 801, 617, 900, 291, 291, - 383, 383, 383, 383, 204, 204, 372, 372, -396, -396, - -396, -396, -396, 125, -396, -27, 467, 90, 368, 59, - 367, 99, -396, -396, -396, 476, 143, 373, 135, 135, - -396, -396, -396, 1129, -396, 90, -396, -396, 1129, -396, - 1129, -396, -396, -396, 1129, 1129, -396, 1129, -396, 1129, - -396, 90, 369, 51, 374, -396, -396, -396, 446, -396, - 376, -396, 1037, 452, 1029, -396, 378, 336, 784, 384, - 821, 847, 867, 887, 924, 1298, 385, -396, -396, -396, - -396, 495, -396, 390, 391, -396, -396, -396, -396, -396, - -396, 504, 392, 404, 485, -396, 37, 143, 406, -396, - -396, -396, -396, -396, -396, -396, -396, -396, 59, 59, - 531, -396, 512, 1129, 416, 427, 520, 418, -396, 417, - -396, -396, -396, -396, 420, -396, -396, 422, 90, 423, - -396, -396, -396, 425, -396, 519, -396, -396, 429, -396, - -396, 430, -396, 20, 12, -396, 950, 1129, 433, -396, - -396, 529, 39, -396, -396, -396, 53, 175, 90, -396, - 507, -396, 15, -396, -396, 970, 1129, -57, -396, -396, - -396, -396, 543, 435, 436, 440, 441, 443, 447, 450, - -396, -396, 534, -396, 451, 444, 453, 454, 176, -396, - -396, -396, 990, -396, -396, -396, -396, -396, 90, -396, - 187, -396, -396, -396, 90, 97, -396, 187, 50, 50, - -396, 21, -396, -396, 461, -396, -396, 90, 417, 180, - -396, 463, 464, 466, -396, -396, -396, -396, -396, -396, - 187, -396, -396, 187, -396, 181, -396 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 7, 0, 0, 0, 0, 2, 227, 228, 212, - 3, 204, 205, 0, 4, 0, 0, 5, 200, 201, - 1, 0, 0, 0, 9, 10, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 6, 26, 25, 0, 0, 217, 218, 225, 0, - 0, 0, 0, 206, 212, 151, 0, 202, 151, 0, - 29, 0, 115, 0, 117, 0, 0, 131, 0, 0, - 0, 20, 0, 23, 0, 230, 229, 113, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 0, 0, 0, - 0, 213, 0, 199, 0, 0, 0, 0, 0, 0, - 0, 0, 38, 234, 34, 36, 234, 0, 0, 0, - 0, 0, 0, 41, 0, 0, 0, 141, 142, 143, - 144, 140, 145, 146, 147, 148, 221, 0, 0, 207, - 219, 220, 226, 0, 0, 0, 177, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 182, 0, 0, 0, 152, - 178, 0, 0, 112, 8, 30, 31, 234, 37, 0, - 13, 233, 0, 14, 120, 28, 16, 0, 18, 130, - 0, 151, 151, 19, 0, 22, 0, 15, 0, 214, - 215, 0, 208, 0, 210, 157, 154, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 155, 156, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, - 32, 11, 0, 35, 0, 116, 123, 0, 134, 135, - 133, 0, 0, 21, 40, 42, 45, 24, 232, 0, - 223, 209, 211, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 153, 0, 175, 174, 173, 172, 171, 165, 166, - 169, 170, 167, 168, 163, 164, 161, 162, 158, 159, - 160, 114, 33, 234, 119, 0, 0, 0, 0, 135, - 0, 135, 149, 150, 43, 0, 231, 0, 0, 0, - 190, 185, 191, 0, 183, 0, 193, 189, 0, 196, - 0, 181, 188, 186, 0, 0, 187, 0, 184, 0, - 39, 0, 0, 0, 0, 151, 137, 132, 0, 136, - 0, 48, 0, 59, 0, 222, 0, 232, 0, 0, - 0, 0, 0, 0, 0, 176, 0, 121, 125, 124, - 126, 0, 17, 0, 0, 78, 56, 55, 57, 54, - 58, 0, 0, 0, 61, 50, 0, 216, 0, 192, - 198, 194, 195, 179, 180, 197, 122, 151, 135, 135, - 0, 49, 0, 0, 0, 63, 0, 0, 224, 234, - 139, 138, 111, 110, 0, 93, 85, 0, 0, 0, - 91, 89, 92, 0, 90, 71, 88, 79, 0, 81, - 94, 0, 98, 0, 96, 52, 0, 0, 0, 46, - 51, 0, 0, 151, 151, 87, 0, 0, 0, 44, - 73, 151, 0, 80, 60, 0, 0, 65, 53, 128, - 127, 129, 0, 0, 0, 0, 0, 96, 0, 0, - 109, 70, 0, 75, 0, 0, 0, 0, 234, 101, - 104, 62, 0, 66, 67, 68, 47, 151, 0, 84, - 0, 95, 86, 99, 0, 77, 82, 0, 0, 0, - 97, 0, 64, 118, 0, 72, 151, 0, 234, 234, - 108, 0, 0, 0, 100, 83, 76, 74, 69, 103, - 0, 106, 105, 0, 107, 234, 102 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, - -396, -98, 398, -396, -396, -396, -396, -396, -396, -396, - -396, 196, -396, -396, -396, -396, -396, -396, -396, -396, - -396, -396, -396, -396, -396, 116, -396, -396, -313, 60, - -395, 400, -396, -396, -396, -396, -396, -396, -396, -396, - -299, 188, -44, -396, 136, -396, -396, -396, 567, 471, - -396, 576, -396, 536, -8, -396, -396, -2, 160, 239, - -103 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 5, 6, 41, 61, 113, 115, 42, 98, 99, - 165, 103, 104, 169, 184, 254, 350, 314, 315, 457, - 353, 382, 384, 405, 439, 486, 449, 450, 473, 495, - 508, 400, 427, 428, 429, 430, 431, 478, 479, 509, - 480, 43, 106, 245, 306, 371, 462, 109, 179, 249, - 310, 44, 93, 94, 215, 14, 17, 18, 19, 10, - 11, 12, 193, 51, 52, 188, 319, 160, 77, 317, - 172 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 13, 15, 167, 174, 45, 432, 7, 8, 56, 13, - 346, 16, 349, 20, 96, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 62, 483, 484, 412, 7, 8, - 7, 8, 54, 412, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 55, 413, 485, 87, 58, 7, 8, - 413, 432, 469, 170, 7, 8, 171, 97, 7, 8, - 59, 105, 412, 107, 108, 412, 110, 111, 112, 60, - 114, 475, 116, 7, 8, 7, 8, 513, 63, 413, - 127, 128, 413, 7, 8, 376, 7, 8, 64, 7, - 8, 377, 7, 8, 341, 469, 21, 166, 105, 410, - 411, 308, 510, 378, 506, 130, 131, 180, 459, 460, - 507, 22, 90, 13, 239, 476, 477, 192, 379, 65, - 26, 476, 477, 7, 8, 524, 380, -109, 510, 132, - 191, 194, 7, 8, 66, 368, 369, 251, 252, 75, - 76, 308, 130, 131, 303, 261, 67, 33, 34, 309, - 476, 477, 71, 406, 465, 46, 47, 88, 178, 9, - 238, 68, 461, 240, 7, 8, 132, 69, 46, 47, - 105, 73, 246, 370, 253, 247, 130, 131, 250, 48, - 258, 259, 256, 49, 70, 511, 512, 412, 514, 309, - 161, 262, 48, 72, 50, 244, 264, 74, 266, 412, - 132, 269, 173, 171, 413, 273, 274, 275, 7, 8, - 278, 279, 280, 101, 348, 89, 413, 100, 7, 8, - 7, 8, 468, 91, 176, 95, 102, 177, 126, 162, - 159, 232, 233, 234, 235, 236, 241, 302, 129, 171, - 105, 340, 304, 168, 171, 133, 218, 311, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 1, 2, 3, 4, - 195, 196, 218, 163, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 500, 216, 217, 171, 519, 526, 164, 171, - 171, 373, 175, 342, 181, 344, 442, 311, 182, 311, - 356, 357, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 359, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 263, 183, 265, 185, 267, 268, 366, - 270, 271, 272, 7, 8, 248, 276, 277, 187, 189, - 281, 190, 197, 409, 282, 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 198, 199, 501, 322, 200, 201, 323, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 311, 311, 434, 463, - 464, 234, 235, 236, 202, 518, 520, 474, 230, 231, - 232, 233, 234, 235, 236, 203, 445, 204, 205, 206, - 207, 208, 520, 218, 209, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 503, 467, 470, 471, 210, 211, 212, - 470, 354, 213, 214, 242, 237, 316, 301, 257, 358, - 260, 305, 516, 307, 360, 312, 361, 313, 318, 321, - 362, 363, 324, 364, 327, 365, 331, 332, 333, 336, - 343, 374, 338, 345, 337, 367, 504, 347, 470, 351, - 372, 355, 505, 375, 383, 470, 470, 470, 387, 470, - 390, 396, 397, 134, 135, 517, 398, 399, 402, 7, - 8, 136, 137, 138, 139, 140, 141, 401, 470, 403, - 142, 470, 143, 404, 408, 435, 144, 145, 146, 147, - 325, 437, 438, 440, 441, 443, 171, 444, 446, 436, - 447, 448, 458, 412, 451, 452, 148, 149, 456, 472, - 487, 150, 489, 151, 488, 490, 494, 491, -109, 497, - 413, 152, 466, 492, 7, 8, 493, 496, 498, 499, - 243, 414, 153, 455, 154, 155, 415, 515, 416, 521, - 522, 523, 407, 525, 255, 57, 186, 53, 433, 417, - 92, 352, 482, 453, 0, 418, 388, 157, 0, 419, - 158, 0, 0, 0, 420, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 33, 34, 421, 0, 0, 0, 422, 0, - 0, 0, 423, 0, 424, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 425, - 218, 426, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 0, 0, 0, 0, 0, 0, 218, 328, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 218, 330, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 218, 334, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 0, 335, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 218, 320, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 0, 0, 0, 0, 0, 0, 218, - 326, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 218, - 329, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 218, - 389, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 0, 0, 0, 0, 218, 391, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 0, 0, 0, 0, - 0, 0, 218, 392, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 218, 393, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 218, 394, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 395, 218, 385, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 0, 0, 0, 134, 135, 454, 0, 0, 0, - 7, 8, 136, 137, 138, 139, 140, 141, 0, 0, - 0, 142, 0, 143, 0, 376, 481, 144, 145, 146, - 147, 377, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 378, 0, 0, 502, 148, 149, 0, - 0, 0, 150, 0, 151, 0, 0, 0, 379, 0, - 0, 0, 152, 0, 0, 0, 380, 0, 0, 0, - 0, 0, 0, 153, 0, 154, 155, 0, 0, 0, - 0, 0, 0, 0, 386, 0, 0, 0, 0, 0, - 0, 0, 156, 381, 0, 0, 134, 135, 157, 0, - 0, 158, 7, 8, 136, 137, 138, 139, 140, 141, - 0, 0, 0, 142, 0, 143, 0, 0, 0, 144, - 145, 146, 147, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, - 149, 0, 7, 8, 150, 0, 151, 0, 0, 21, - 0, 0, 0, 0, 152, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 22, 153, 23, 154, 155, 24, - 0, 25, 0, 26, 27, 0, 28, 0, 0, 0, - 0, 0, 0, 0, 156, 29, 0, 0, 0, 0, - 157, 0, 0, 158, 0, 0, 30, 31, 0, 32, - 33, 34, 0, 35, 36, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 37, 0, 38, 39, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, - 218, 339, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236 -}; - -static const yytype_int16 yycheck[] = -{ - 2, 3, 100, 106, 6, 400, 33, 34, 16, 11, - 309, 117, 311, 0, 58, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 26, 82, 83, 12, 33, 34, - 33, 34, 117, 12, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 7, 29, 102, 48, 115, 33, 34, - 29, 446, 447, 116, 33, 34, 119, 59, 33, 34, - 115, 63, 12, 65, 66, 12, 68, 69, 70, 115, - 72, 56, 74, 33, 34, 33, 34, 56, 115, 29, - 88, 89, 29, 33, 34, 48, 33, 34, 117, 33, - 34, 54, 33, 34, 121, 490, 40, 99, 100, 398, - 399, 42, 497, 66, 7, 33, 34, 109, 69, 70, - 13, 55, 118, 115, 119, 100, 101, 120, 81, 115, - 64, 100, 101, 33, 34, 520, 89, 115, 523, 57, - 132, 133, 33, 34, 115, 84, 85, 181, 182, 119, - 120, 42, 33, 34, 242, 120, 117, 91, 92, 90, - 100, 101, 117, 116, 101, 33, 34, 13, 118, 117, - 162, 115, 123, 165, 33, 34, 57, 115, 33, 34, - 172, 117, 174, 122, 118, 177, 33, 34, 180, 57, - 188, 72, 184, 61, 115, 498, 499, 12, 501, 90, - 118, 193, 57, 115, 72, 64, 198, 115, 200, 12, - 57, 203, 118, 119, 29, 207, 208, 209, 33, 34, - 212, 213, 214, 28, 115, 13, 29, 115, 33, 34, - 33, 34, 47, 120, 116, 120, 41, 119, 117, 119, - 94, 27, 28, 29, 30, 31, 116, 239, 120, 119, - 242, 116, 244, 33, 119, 118, 12, 249, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 111, 112, 113, 114, - 134, 135, 12, 116, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 116, 157, 158, 119, 116, 116, 116, 119, - 119, 345, 116, 305, 7, 307, 409, 309, 7, 311, - 318, 319, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 325, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 197, 116, 199, 116, 201, 202, 341, - 204, 205, 206, 33, 34, 35, 210, 211, 116, 120, - 116, 120, 115, 397, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 115, 115, 478, 116, 115, 115, 119, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 398, 399, 400, 443, - 444, 29, 30, 31, 115, 508, 509, 451, 25, 26, - 27, 28, 29, 30, 31, 115, 418, 115, 115, 115, - 115, 115, 525, 12, 115, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 487, 446, 447, 448, 115, 115, 115, - 452, 315, 115, 115, 115, 120, 120, 116, 118, 323, - 117, 115, 506, 119, 328, 116, 330, 116, 13, 116, - 334, 335, 116, 337, 116, 339, 116, 116, 116, 116, - 13, 35, 116, 115, 119, 116, 488, 120, 490, 13, - 116, 118, 494, 117, 42, 497, 498, 499, 120, 501, - 116, 116, 7, 27, 28, 507, 116, 116, 116, 33, - 34, 35, 36, 37, 38, 39, 40, 13, 520, 115, - 44, 523, 46, 38, 118, 13, 50, 51, 52, 53, - 119, 115, 105, 13, 116, 115, 119, 115, 115, 403, - 115, 22, 13, 12, 115, 115, 70, 71, 115, 42, - 7, 75, 116, 77, 119, 115, 22, 116, 115, 115, - 29, 85, 446, 116, 33, 34, 116, 116, 115, 115, - 172, 40, 96, 437, 98, 99, 45, 116, 47, 116, - 116, 115, 386, 523, 184, 18, 115, 11, 400, 58, - 54, 115, 456, 433, -1, 64, 357, 121, -1, 68, - 124, -1, -1, -1, 73, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 91, 92, 93, -1, -1, -1, 97, -1, - -1, -1, 101, -1, 103, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 118, - 12, 120, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - -1, -1, -1, -1, -1, -1, 12, 119, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 12, 119, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 12, 119, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, 119, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 12, 116, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, -1, -1, -1, -1, -1, -1, 12, - 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, - 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, - 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, -1, -1, -1, 12, 116, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 12, 116, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 12, 116, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 12, 116, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, -1, -1, -1, 27, 28, 116, -1, -1, -1, - 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, - -1, 44, -1, 46, -1, 48, 116, 50, 51, 52, - 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 66, -1, -1, 116, 70, 71, -1, - -1, -1, 75, -1, 77, -1, -1, -1, 81, -1, - -1, -1, 85, -1, -1, -1, 89, -1, -1, -1, - -1, -1, -1, 96, -1, 98, 99, -1, -1, -1, - -1, -1, -1, -1, 115, -1, -1, -1, -1, -1, - -1, -1, 115, 116, -1, -1, 27, 28, 121, -1, - -1, 124, 33, 34, 35, 36, 37, 38, 39, 40, - -1, -1, -1, 44, -1, 46, -1, -1, -1, 50, - 51, 52, 53, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, - 71, -1, 33, 34, 75, -1, 77, -1, -1, 40, - -1, -1, -1, -1, 85, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 55, 96, 57, 98, 99, 60, - -1, 62, -1, 64, 65, -1, 67, -1, -1, -1, - -1, -1, -1, -1, 115, 76, -1, -1, -1, -1, - 121, -1, -1, 124, -1, -1, 87, 88, -1, 90, - 91, 92, -1, 94, 95, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 107, -1, 109, 110, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 120, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 111, 112, 113, 114, 126, 127, 33, 34, 117, - 184, 185, 186, 192, 180, 192, 117, 181, 182, 183, - 0, 40, 55, 57, 60, 62, 64, 65, 67, 76, - 87, 88, 90, 91, 92, 94, 95, 107, 109, 110, - 120, 128, 132, 166, 176, 192, 33, 34, 57, 61, - 72, 188, 189, 186, 117, 7, 189, 183, 115, 115, - 115, 129, 192, 115, 117, 115, 115, 117, 115, 115, - 115, 117, 115, 117, 115, 119, 120, 193, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 192, 13, 13, - 118, 120, 188, 177, 178, 120, 177, 192, 133, 134, - 115, 28, 41, 136, 137, 192, 167, 192, 192, 172, - 192, 192, 192, 130, 192, 131, 192, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 117, 189, 189, 120, - 33, 34, 57, 118, 27, 28, 35, 36, 37, 38, - 39, 40, 44, 46, 50, 51, 52, 53, 70, 71, - 75, 77, 85, 96, 98, 99, 115, 121, 124, 179, - 192, 118, 119, 116, 116, 135, 192, 136, 33, 138, - 116, 119, 195, 118, 195, 116, 116, 119, 118, 173, - 192, 7, 7, 116, 139, 116, 184, 116, 190, 120, - 120, 192, 120, 187, 192, 179, 179, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 179, 179, 179, 12, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 120, 192, 119, - 192, 116, 115, 137, 64, 168, 192, 192, 35, 174, - 192, 177, 177, 118, 140, 166, 192, 118, 189, 72, - 117, 120, 192, 179, 192, 179, 192, 179, 179, 192, - 179, 179, 179, 192, 192, 192, 179, 179, 192, 192, - 192, 116, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 116, 192, 136, 192, 115, 169, 119, 42, 90, - 175, 192, 116, 116, 142, 143, 120, 194, 13, 191, - 116, 116, 116, 119, 116, 119, 116, 116, 119, 116, - 119, 116, 116, 116, 119, 119, 116, 119, 116, 13, - 116, 121, 192, 13, 192, 115, 175, 120, 115, 175, - 141, 13, 115, 145, 179, 118, 189, 189, 179, 192, - 179, 179, 179, 179, 179, 179, 192, 116, 84, 85, - 122, 170, 116, 177, 35, 117, 48, 54, 66, 81, - 89, 116, 146, 42, 147, 13, 115, 120, 194, 116, - 116, 116, 116, 116, 116, 116, 116, 7, 116, 116, - 156, 13, 116, 115, 38, 148, 116, 146, 118, 177, - 175, 175, 12, 29, 40, 45, 47, 58, 64, 68, - 73, 93, 97, 101, 103, 118, 120, 157, 158, 159, - 160, 161, 165, 176, 192, 13, 179, 115, 105, 149, - 13, 116, 195, 115, 115, 192, 115, 115, 22, 151, - 152, 115, 115, 193, 116, 179, 115, 144, 13, 69, - 70, 123, 171, 177, 177, 101, 160, 192, 47, 165, - 192, 192, 42, 153, 177, 56, 100, 101, 162, 163, - 165, 116, 179, 82, 83, 102, 150, 7, 119, 116, - 115, 116, 116, 116, 22, 154, 116, 115, 115, 115, - 116, 195, 116, 177, 192, 192, 7, 13, 155, 164, - 165, 163, 163, 56, 163, 116, 177, 192, 195, 116, - 195, 116, 116, 115, 165, 164, 116 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 125, 126, 126, 126, 126, 127, 127, 128, 128, - 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 130, 128, 128, 131, 128, 128, 128, 128, 132, 134, - 133, 135, 135, 135, 136, 136, 137, 137, 138, 137, - 139, 139, 140, 141, 140, 143, 144, 142, 145, 145, - 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, - 147, 148, 148, 149, 149, 150, 150, 150, 150, 151, - 152, 152, 153, 153, 154, 154, 155, 155, 156, 156, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, - 158, 158, 158, 158, 159, 159, 160, 160, 161, 161, - 162, 162, 162, 162, 163, 163, 163, 164, 164, 165, - 165, 165, 166, 166, 166, 166, 167, 167, 168, 168, - 168, 169, 169, 169, 170, 170, 170, 171, 171, 171, - 172, 172, 173, 174, 174, 175, 175, 175, 175, 175, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 178, 177, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, - 181, 182, 182, 183, 184, 185, 185, 186, 186, 186, - 187, 187, 188, 188, 188, 188, 188, 189, 189, 189, - 189, 190, 189, 191, 189, 189, 189, 192, 192, 193, - 193, 194, 194, 195, 195 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 2, 2, 2, 2, 2, 0, 4, 1, - 0, 5, 1, 4, 4, 4, 4, 8, 4, 4, - 0, 5, 4, 0, 5, 1, 1, 1, 4, 0, - 2, 1, 2, 3, 1, 3, 1, 2, 0, 5, - 2, 0, 1, 0, 7, 0, 0, 7, 1, 3, - 2, 4, 4, 5, 1, 1, 1, 1, 1, 0, - 4, 0, 4, 0, 4, 0, 1, 1, 1, 5, - 2, 0, 3, 0, 3, 0, 2, 0, 0, 2, - 2, 1, 4, 6, 4, 1, 4, 2, 1, 1, - 1, 1, 1, 1, 1, 4, 1, 4, 1, 4, - 3, 1, 6, 4, 1, 4, 4, 3, 1, 1, - 1, 1, 4, 2, 6, 2, 3, 0, 10, 2, - 0, 3, 4, 0, 1, 1, 1, 1, 1, 1, - 2, 0, 4, 1, 1, 0, 2, 2, 5, 5, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, - 6, 0, 2, 3, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 1, 1, 6, - 6, 4, 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 6, 4, 6, 6, 4, 6, 6, 3, - 1, 1, 2, 5, 1, 1, 2, 4, 5, 6, - 1, 2, 0, 2, 4, 4, 8, 1, 1, 3, - 3, 0, 7, 0, 9, 1, 3, 1, 1, 1, - 1, 1, 0, 1, 0 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (closure, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, closure); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (closure); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, closure); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void* closure) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , closure); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, closure); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void* closure) -{ - YYUSE (yyvaluep); - YYUSE (closure); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (void* closure) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, closure); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 9: -#line 247 "yyscript.y" /* yacc.c:1646 */ - { script_set_common_allocation(closure, 1); } -#line 1996 "yyscript.c" /* yacc.c:1646 */ - break; - - case 10: -#line 249 "yyscript.y" /* yacc.c:1646 */ - { script_start_group(closure); } -#line 2002 "yyscript.c" /* yacc.c:1646 */ - break; - - case 11: -#line 251 "yyscript.y" /* yacc.c:1646 */ - { script_end_group(closure); } -#line 2008 "yyscript.c" /* yacc.c:1646 */ - break; - - case 12: -#line 253 "yyscript.y" /* yacc.c:1646 */ - { script_set_common_allocation(closure, 0); } -#line 2014 "yyscript.c" /* yacc.c:1646 */ - break; - - case 15: -#line 257 "yyscript.y" /* yacc.c:1646 */ - { script_parse_option(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2020 "yyscript.c" /* yacc.c:1646 */ - break; - - case 16: -#line 259 "yyscript.y" /* yacc.c:1646 */ - { - if (!script_check_output_format(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, - NULL, 0, NULL, 0)) - YYABORT; - } -#line 2030 "yyscript.c" /* yacc.c:1646 */ - break; - - case 17: -#line 265 "yyscript.y" /* yacc.c:1646 */ - { - if (!script_check_output_format(closure, (yyvsp[-5].string).value, (yyvsp[-5].string).length, - (yyvsp[-3].string).value, (yyvsp[-3].string).length, - (yyvsp[-1].string).value, (yyvsp[-1].string).length)) - YYABORT; - } -#line 2041 "yyscript.c" /* yacc.c:1646 */ - break; - - case 19: -#line 273 "yyscript.y" /* yacc.c:1646 */ - { script_add_search_dir(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2047 "yyscript.c" /* yacc.c:1646 */ - break; - - case 20: -#line 275 "yyscript.y" /* yacc.c:1646 */ - { script_start_sections(closure); } -#line 2053 "yyscript.c" /* yacc.c:1646 */ - break; - - case 21: -#line 277 "yyscript.y" /* yacc.c:1646 */ - { script_finish_sections(closure); } -#line 2059 "yyscript.c" /* yacc.c:1646 */ - break; - - case 22: -#line 279 "yyscript.y" /* yacc.c:1646 */ - { script_set_target(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2065 "yyscript.c" /* yacc.c:1646 */ - break; - - case 23: -#line 281 "yyscript.y" /* yacc.c:1646 */ - { script_push_lex_into_version_mode(closure); } -#line 2071 "yyscript.c" /* yacc.c:1646 */ - break; - - case 24: -#line 283 "yyscript.y" /* yacc.c:1646 */ - { script_pop_lex_mode(closure); } -#line 2077 "yyscript.c" /* yacc.c:1646 */ - break; - - case 29: -#line 302 "yyscript.y" /* yacc.c:1646 */ - { script_push_lex_into_expression_mode(closure); } -#line 2083 "yyscript.c" /* yacc.c:1646 */ - break; - - case 30: -#line 304 "yyscript.y" /* yacc.c:1646 */ - { script_pop_lex_mode(closure); } -#line 2089 "yyscript.c" /* yacc.c:1646 */ - break; - - case 31: -#line 309 "yyscript.y" /* yacc.c:1646 */ - { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2095 "yyscript.c" /* yacc.c:1646 */ - break; - - case 32: -#line 311 "yyscript.y" /* yacc.c:1646 */ - { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2101 "yyscript.c" /* yacc.c:1646 */ - break; - - case 33: -#line 313 "yyscript.y" /* yacc.c:1646 */ - { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2107 "yyscript.c" /* yacc.c:1646 */ - break; - - case 36: -#line 325 "yyscript.y" /* yacc.c:1646 */ - { script_add_file(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2113 "yyscript.c" /* yacc.c:1646 */ - break; - - case 37: -#line 327 "yyscript.y" /* yacc.c:1646 */ - { script_add_library(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2119 "yyscript.c" /* yacc.c:1646 */ - break; - - case 38: -#line 329 "yyscript.y" /* yacc.c:1646 */ - { script_start_as_needed(closure); } -#line 2125 "yyscript.c" /* yacc.c:1646 */ - break; - - case 39: -#line 331 "yyscript.y" /* yacc.c:1646 */ - { script_end_as_needed(closure); } -#line 2131 "yyscript.c" /* yacc.c:1646 */ - break; - - case 43: -#line 344 "yyscript.y" /* yacc.c:1646 */ - { script_start_output_section(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, &(yyvsp[0].output_section_header)); } -#line 2137 "yyscript.c" /* yacc.c:1646 */ - break; - - case 44: -#line 346 "yyscript.y" /* yacc.c:1646 */ - { script_finish_output_section(closure, &(yyvsp[0].output_section_trailer)); } -#line 2143 "yyscript.c" /* yacc.c:1646 */ - break; - - case 45: -#line 352 "yyscript.y" /* yacc.c:1646 */ - { script_push_lex_into_expression_mode(closure); } -#line 2149 "yyscript.c" /* yacc.c:1646 */ - break; - - case 46: -#line 354 "yyscript.y" /* yacc.c:1646 */ - { script_pop_lex_mode(closure); } -#line 2155 "yyscript.c" /* yacc.c:1646 */ - break; - - case 47: -#line 356 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = (yyvsp[-5].output_section_header).address; - (yyval.output_section_header).section_type = (yyvsp[-5].output_section_header).section_type; - (yyval.output_section_header).load_address = (yyvsp[-4].expr); - (yyval.output_section_header).align = (yyvsp[-3].expr); - (yyval.output_section_header).subalign = (yyvsp[-2].expr); - (yyval.output_section_header).constraint = (yyvsp[0].constraint); - } -#line 2168 "yyscript.c" /* yacc.c:1646 */ - break; - - case 48: -#line 372 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = NULL; - (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; - } -#line 2177 "yyscript.c" /* yacc.c:1646 */ - break; - - case 49: -#line 377 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = NULL; - (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; - } -#line 2186 "yyscript.c" /* yacc.c:1646 */ - break; - - case 50: -#line 382 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = (yyvsp[-1].expr); - (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; - } -#line 2195 "yyscript.c" /* yacc.c:1646 */ - break; - - case 51: -#line 387 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = (yyvsp[-3].expr); - (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; - } -#line 2204 "yyscript.c" /* yacc.c:1646 */ - break; - - case 52: -#line 392 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = NULL; - (yyval.output_section_header).section_type = (yyvsp[-2].section_type); - } -#line 2213 "yyscript.c" /* yacc.c:1646 */ - break; - - case 53: -#line 397 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_header).address = (yyvsp[-4].expr); - (yyval.output_section_header).section_type = (yyvsp[-2].section_type); - } -#line 2222 "yyscript.c" /* yacc.c:1646 */ - break; - - case 54: -#line 406 "yyscript.y" /* yacc.c:1646 */ - { (yyval.section_type) = SCRIPT_SECTION_TYPE_NOLOAD; } -#line 2228 "yyscript.c" /* yacc.c:1646 */ - break; - - case 55: -#line 408 "yyscript.y" /* yacc.c:1646 */ - { - yyerror(closure, "DSECT section type is unsupported"); - (yyval.section_type) = SCRIPT_SECTION_TYPE_DSECT; - } -#line 2237 "yyscript.c" /* yacc.c:1646 */ - break; - - case 56: -#line 413 "yyscript.y" /* yacc.c:1646 */ - { - yyerror(closure, "COPY section type is unsupported"); - (yyval.section_type) = SCRIPT_SECTION_TYPE_COPY; - } -#line 2246 "yyscript.c" /* yacc.c:1646 */ - break; - - case 57: -#line 418 "yyscript.y" /* yacc.c:1646 */ - { - yyerror(closure, "INFO section type is unsupported"); - (yyval.section_type) = SCRIPT_SECTION_TYPE_INFO; - } -#line 2255 "yyscript.c" /* yacc.c:1646 */ - break; - - case 58: -#line 423 "yyscript.y" /* yacc.c:1646 */ - { - yyerror(closure, "OVERLAY section type is unsupported"); - (yyval.section_type) = SCRIPT_SECTION_TYPE_OVERLAY; - } -#line 2264 "yyscript.c" /* yacc.c:1646 */ - break; - - case 59: -#line 432 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2270 "yyscript.c" /* yacc.c:1646 */ - break; - - case 60: -#line 434 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2276 "yyscript.c" /* yacc.c:1646 */ - break; - - case 61: -#line 440 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2282 "yyscript.c" /* yacc.c:1646 */ - break; - - case 62: -#line 442 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2288 "yyscript.c" /* yacc.c:1646 */ - break; - - case 63: -#line 448 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2294 "yyscript.c" /* yacc.c:1646 */ - break; - - case 64: -#line 450 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2300 "yyscript.c" /* yacc.c:1646 */ - break; - - case 65: -#line 456 "yyscript.y" /* yacc.c:1646 */ - { (yyval.constraint) = CONSTRAINT_NONE; } -#line 2306 "yyscript.c" /* yacc.c:1646 */ - break; - - case 66: -#line 458 "yyscript.y" /* yacc.c:1646 */ - { (yyval.constraint) = CONSTRAINT_ONLY_IF_RO; } -#line 2312 "yyscript.c" /* yacc.c:1646 */ - break; - - case 67: -#line 460 "yyscript.y" /* yacc.c:1646 */ - { (yyval.constraint) = CONSTRAINT_ONLY_IF_RW; } -#line 2318 "yyscript.c" /* yacc.c:1646 */ - break; - - case 68: -#line 462 "yyscript.y" /* yacc.c:1646 */ - { (yyval.constraint) = CONSTRAINT_SPECIAL; } -#line 2324 "yyscript.c" /* yacc.c:1646 */ - break; - - case 69: -#line 468 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.output_section_trailer).fill = (yyvsp[-1].expr); - (yyval.output_section_trailer).phdrs = (yyvsp[-2].string_list); - } -#line 2333 "yyscript.c" /* yacc.c:1646 */ - break; - - case 70: -#line 477 "yyscript.y" /* yacc.c:1646 */ - { script_set_section_region(closure, (yyvsp[0].string).value, (yyvsp[0].string).length, 1); } -#line 2339 "yyscript.c" /* yacc.c:1646 */ - break; - - case 72: -#line 484 "yyscript.y" /* yacc.c:1646 */ - { script_set_section_region(closure, (yyvsp[0].string).value, (yyvsp[0].string).length, 0); } -#line 2345 "yyscript.c" /* yacc.c:1646 */ - break; - - case 74: -#line 491 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string_list) = script_string_list_push_back((yyvsp[-2].string_list), (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2351 "yyscript.c" /* yacc.c:1646 */ - break; - - case 75: -#line 493 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string_list) = NULL; } -#line 2357 "yyscript.c" /* yacc.c:1646 */ - break; - - case 76: -#line 500 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2363 "yyscript.c" /* yacc.c:1646 */ - break; - - case 77: -#line 502 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = NULL; } -#line 2369 "yyscript.c" /* yacc.c:1646 */ - break; - - case 82: -#line 518 "yyscript.y" /* yacc.c:1646 */ - { script_add_data(closure, (yyvsp[-3].integer), (yyvsp[-1].expr)); } -#line 2375 "yyscript.c" /* yacc.c:1646 */ - break; - - case 83: -#line 520 "yyscript.y" /* yacc.c:1646 */ - { script_add_assertion(closure, (yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2381 "yyscript.c" /* yacc.c:1646 */ - break; - - case 84: -#line 522 "yyscript.y" /* yacc.c:1646 */ - { script_add_fill(closure, (yyvsp[-1].expr)); } -#line 2387 "yyscript.c" /* yacc.c:1646 */ - break; - - case 85: -#line 524 "yyscript.y" /* yacc.c:1646 */ - { - /* The GNU linker uses CONSTRUCTORS for the a.out object - file format. It does nothing when using ELF. Since - some ELF linker scripts use it although it does - nothing, we accept it and ignore it. */ - } -#line 2398 "yyscript.c" /* yacc.c:1646 */ - break; - - case 87: -#line 532 "yyscript.y" /* yacc.c:1646 */ - { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2404 "yyscript.c" /* yacc.c:1646 */ - break; - - case 89: -#line 540 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = QUAD; } -#line 2410 "yyscript.c" /* yacc.c:1646 */ - break; - - case 90: -#line 542 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = SQUAD; } -#line 2416 "yyscript.c" /* yacc.c:1646 */ - break; - - case 91: -#line 544 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = LONG; } -#line 2422 "yyscript.c" /* yacc.c:1646 */ - break; - - case 92: -#line 546 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = SHORT; } -#line 2428 "yyscript.c" /* yacc.c:1646 */ - break; - - case 93: -#line 548 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = BYTE; } -#line 2434 "yyscript.c" /* yacc.c:1646 */ - break; - - case 94: -#line 555 "yyscript.y" /* yacc.c:1646 */ - { script_add_input_section(closure, &(yyvsp[0].input_section_spec), 0); } -#line 2440 "yyscript.c" /* yacc.c:1646 */ - break; - - case 95: -#line 557 "yyscript.y" /* yacc.c:1646 */ - { script_add_input_section(closure, &(yyvsp[-1].input_section_spec), 1); } -#line 2446 "yyscript.c" /* yacc.c:1646 */ - break; - - case 96: -#line 563 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.input_section_spec).file.name = (yyvsp[0].string); - (yyval.input_section_spec).file.sort = SORT_WILDCARD_NONE; - (yyval.input_section_spec).input_sections.sections = NULL; - (yyval.input_section_spec).input_sections.exclude = NULL; - } -#line 2457 "yyscript.c" /* yacc.c:1646 */ - break; - - case 97: -#line 570 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.input_section_spec).file = (yyvsp[-3].wildcard_section); - (yyval.input_section_spec).input_sections = (yyvsp[-1].wildcard_sections); - } -#line 2466 "yyscript.c" /* yacc.c:1646 */ - break; - - case 98: -#line 579 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_section).name = (yyvsp[0].string); - (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; - } -#line 2475 "yyscript.c" /* yacc.c:1646 */ - break; - - case 99: -#line 584 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_section).name = (yyvsp[-1].string); - (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; - } -#line 2484 "yyscript.c" /* yacc.c:1646 */ - break; - - case 100: -#line 593 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_sections).sections = script_string_sort_list_add((yyvsp[-2].wildcard_sections).sections, &(yyvsp[0].wildcard_section)); - (yyval.wildcard_sections).exclude = (yyvsp[-2].wildcard_sections).exclude; - } -#line 2493 "yyscript.c" /* yacc.c:1646 */ - break; - - case 101: -#line 598 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_sections).sections = script_new_string_sort_list(&(yyvsp[0].wildcard_section)); - (yyval.wildcard_sections).exclude = NULL; - } -#line 2502 "yyscript.c" /* yacc.c:1646 */ - break; - - case 102: -#line 603 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_sections).sections = (yyvsp[-5].wildcard_sections).sections; - (yyval.wildcard_sections).exclude = script_string_list_append((yyvsp[-5].wildcard_sections).exclude, (yyvsp[-1].string_list)); - } -#line 2511 "yyscript.c" /* yacc.c:1646 */ - break; - - case 103: -#line 608 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_sections).sections = NULL; - (yyval.wildcard_sections).exclude = (yyvsp[-1].string_list); - } -#line 2520 "yyscript.c" /* yacc.c:1646 */ - break; - - case 104: -#line 617 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_section).name = (yyvsp[0].string); - (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; - } -#line 2529 "yyscript.c" /* yacc.c:1646 */ - break; - - case 105: -#line 622 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_section).name = (yyvsp[-1].wildcard_section).name; - switch ((yyvsp[-1].wildcard_section).sort) - { - case SORT_WILDCARD_NONE: - (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; - break; - case SORT_WILDCARD_BY_NAME: - case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: - break; - case SORT_WILDCARD_BY_ALIGNMENT: - case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: - (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME_BY_ALIGNMENT; - break; - default: - abort(); - } - } -#line 2552 "yyscript.c" /* yacc.c:1646 */ - break; - - case 106: -#line 641 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.wildcard_section).name = (yyvsp[-1].wildcard_section).name; - switch ((yyvsp[-1].wildcard_section).sort) - { - case SORT_WILDCARD_NONE: - (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT; - break; - case SORT_WILDCARD_BY_ALIGNMENT: - case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: - break; - case SORT_WILDCARD_BY_NAME: - case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: - (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT_BY_NAME; - break; - default: - abort(); - } - } -#line 2575 "yyscript.c" /* yacc.c:1646 */ - break; - - case 107: -#line 664 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string_list) = script_string_list_push_back((yyvsp[-2].string_list), (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2581 "yyscript.c" /* yacc.c:1646 */ - break; - - case 108: -#line 666 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string_list) = script_new_string_list((yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2587 "yyscript.c" /* yacc.c:1646 */ - break; - - case 109: -#line 673 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string) = (yyvsp[0].string); } -#line 2593 "yyscript.c" /* yacc.c:1646 */ - break; - - case 110: -#line 675 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.string).value = "*"; - (yyval.string).length = 1; - } -#line 2602 "yyscript.c" /* yacc.c:1646 */ - break; - - case 111: -#line 680 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.string).value = "?"; - (yyval.string).length = 1; - } -#line 2611 "yyscript.c" /* yacc.c:1646 */ - break; - - case 112: -#line 690 "yyscript.y" /* yacc.c:1646 */ - { script_set_entry(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2617 "yyscript.c" /* yacc.c:1646 */ - break; - - case 114: -#line 693 "yyscript.y" /* yacc.c:1646 */ - { script_add_assertion(closure, (yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 2623 "yyscript.c" /* yacc.c:1646 */ - break; - - case 115: -#line 695 "yyscript.y" /* yacc.c:1646 */ - { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2629 "yyscript.c" /* yacc.c:1646 */ - break; - - case 118: -#line 707 "yyscript.y" /* yacc.c:1646 */ - { script_add_memory(closure, (yyvsp[-9].string).value, (yyvsp[-9].string).length, (yyvsp[-8].integer), (yyvsp[-4].expr), (yyvsp[0].expr)); } -#line 2635 "yyscript.c" /* yacc.c:1646 */ - break; - - case 119: -#line 711 "yyscript.y" /* yacc.c:1646 */ - { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2641 "yyscript.c" /* yacc.c:1646 */ - break; - - case 121: -#line 718 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, 0); } -#line 2647 "yyscript.c" /* yacc.c:1646 */ - break; - - case 122: -#line 721 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, 1); } -#line 2653 "yyscript.c" /* yacc.c:1646 */ - break; - - case 123: -#line 723 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = 0; } -#line 2659 "yyscript.c" /* yacc.c:1646 */ - break; - - case 132: -#line 751 "yyscript.y" /* yacc.c:1646 */ - { script_add_phdr(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-2].integer), &(yyvsp[-1].phdr_info)); } -#line 2665 "yyscript.c" /* yacc.c:1646 */ - break; - - case 133: -#line 760 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = script_phdr_string_to_type(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2671 "yyscript.c" /* yacc.c:1646 */ - break; - - case 134: -#line 762 "yyscript.y" /* yacc.c:1646 */ - { (yyval.integer) = (yyvsp[0].integer); } -#line 2677 "yyscript.c" /* yacc.c:1646 */ - break; - - case 135: -#line 768 "yyscript.y" /* yacc.c:1646 */ - { memset(&(yyval.phdr_info), 0, sizeof(struct Phdr_info)); } -#line 2683 "yyscript.c" /* yacc.c:1646 */ - break; - - case 136: -#line 770 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.phdr_info) = (yyvsp[0].phdr_info); - if ((yyvsp[-1].string).length == 7 && strncmp((yyvsp[-1].string).value, "FILEHDR", 7) == 0) - (yyval.phdr_info).includes_filehdr = 1; - else - yyerror(closure, "PHDRS syntax error"); - } -#line 2695 "yyscript.c" /* yacc.c:1646 */ - break; - - case 137: -#line 778 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.phdr_info) = (yyvsp[0].phdr_info); - (yyval.phdr_info).includes_phdrs = 1; - } -#line 2704 "yyscript.c" /* yacc.c:1646 */ - break; - - case 138: -#line 783 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.phdr_info) = (yyvsp[0].phdr_info); - if ((yyvsp[-4].string).length == 5 && strncmp((yyvsp[-4].string).value, "FLAGS", 5) == 0) - { - (yyval.phdr_info).is_flags_valid = 1; - (yyval.phdr_info).flags = (yyvsp[-2].integer); - } - else - yyerror(closure, "PHDRS syntax error"); - } -#line 2719 "yyscript.c" /* yacc.c:1646 */ - break; - - case 139: -#line 794 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.phdr_info) = (yyvsp[0].phdr_info); - (yyval.phdr_info).load_address = (yyvsp[-2].expr); - } -#line 2728 "yyscript.c" /* yacc.c:1646 */ - break; - - case 140: -#line 803 "yyscript.y" /* yacc.c:1646 */ - { script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, (yyvsp[0].expr), 0, 0); } -#line 2734 "yyscript.c" /* yacc.c:1646 */ - break; - - case 141: -#line 805 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_add(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2744 "yyscript.c" /* yacc.c:1646 */ - break; - - case 142: -#line 811 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_sub(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2754 "yyscript.c" /* yacc.c:1646 */ - break; - - case 143: -#line 817 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_mult(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2764 "yyscript.c" /* yacc.c:1646 */ - break; - - case 144: -#line 823 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_div(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2774 "yyscript.c" /* yacc.c:1646 */ - break; - - case 145: -#line 829 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_lshift(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2784 "yyscript.c" /* yacc.c:1646 */ - break; - - case 146: -#line 835 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_rshift(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2794 "yyscript.c" /* yacc.c:1646 */ - break; - - case 147: -#line 841 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_bitwise_and(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2804 "yyscript.c" /* yacc.c:1646 */ - break; - - case 148: -#line 847 "yyscript.y" /* yacc.c:1646 */ - { - Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); - Expression_ptr e = script_exp_binary_bitwise_or(s, (yyvsp[0].expr)); - script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); - } -#line 2814 "yyscript.c" /* yacc.c:1646 */ - break; - - case 149: -#line 853 "yyscript.y" /* yacc.c:1646 */ - { script_set_symbol(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr), 1, 0); } -#line 2820 "yyscript.c" /* yacc.c:1646 */ - break; - - case 150: -#line 855 "yyscript.y" /* yacc.c:1646 */ - { script_set_symbol(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr), 1, 1); } -#line 2826 "yyscript.c" /* yacc.c:1646 */ - break; - - case 151: -#line 860 "yyscript.y" /* yacc.c:1646 */ - { script_push_lex_into_expression_mode(closure); } -#line 2832 "yyscript.c" /* yacc.c:1646 */ - break; - - case 152: -#line 862 "yyscript.y" /* yacc.c:1646 */ - { - script_pop_lex_mode(closure); - (yyval.expr) = (yyvsp[0].expr); - } -#line 2841 "yyscript.c" /* yacc.c:1646 */ - break; - - case 153: -#line 871 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } -#line 2847 "yyscript.c" /* yacc.c:1646 */ - break; - - case 154: -#line 873 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_unary_minus((yyvsp[0].expr)); } -#line 2853 "yyscript.c" /* yacc.c:1646 */ - break; - - case 155: -#line 875 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_unary_logical_not((yyvsp[0].expr)); } -#line 2859 "yyscript.c" /* yacc.c:1646 */ - break; - - case 156: -#line 877 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_unary_bitwise_not((yyvsp[0].expr)); } -#line 2865 "yyscript.c" /* yacc.c:1646 */ - break; - - case 157: -#line 879 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 2871 "yyscript.c" /* yacc.c:1646 */ - break; - - case 158: -#line 881 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_mult((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2877 "yyscript.c" /* yacc.c:1646 */ - break; - - case 159: -#line 883 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_div((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2883 "yyscript.c" /* yacc.c:1646 */ - break; - - case 160: -#line 885 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_mod((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2889 "yyscript.c" /* yacc.c:1646 */ - break; - - case 161: -#line 887 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_add((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2895 "yyscript.c" /* yacc.c:1646 */ - break; - - case 162: -#line 889 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_sub((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2901 "yyscript.c" /* yacc.c:1646 */ - break; - - case 163: -#line 891 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_lshift((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2907 "yyscript.c" /* yacc.c:1646 */ - break; - - case 164: -#line 893 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_rshift((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2913 "yyscript.c" /* yacc.c:1646 */ - break; - - case 165: -#line 895 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_eq((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2919 "yyscript.c" /* yacc.c:1646 */ - break; - - case 166: -#line 897 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_ne((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2925 "yyscript.c" /* yacc.c:1646 */ - break; - - case 167: -#line 899 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_le((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2931 "yyscript.c" /* yacc.c:1646 */ - break; - - case 168: -#line 901 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_ge((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2937 "yyscript.c" /* yacc.c:1646 */ - break; - - case 169: -#line 903 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_lt((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2943 "yyscript.c" /* yacc.c:1646 */ - break; - - case 170: -#line 905 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_gt((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2949 "yyscript.c" /* yacc.c:1646 */ - break; - - case 171: -#line 907 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_bitwise_and((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2955 "yyscript.c" /* yacc.c:1646 */ - break; - - case 172: -#line 909 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_bitwise_xor((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2961 "yyscript.c" /* yacc.c:1646 */ - break; - - case 173: -#line 911 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_bitwise_or((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2967 "yyscript.c" /* yacc.c:1646 */ - break; - - case 174: -#line 913 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_logical_and((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2973 "yyscript.c" /* yacc.c:1646 */ - break; - - case 175: -#line 915 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_binary_logical_or((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2979 "yyscript.c" /* yacc.c:1646 */ - break; - - case 176: -#line 917 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_trinary_cond((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 2985 "yyscript.c" /* yacc.c:1646 */ - break; - - case 177: -#line 919 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_integer((yyvsp[0].integer)); } -#line 2991 "yyscript.c" /* yacc.c:1646 */ - break; - - case 178: -#line 921 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_symbol(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } -#line 2997 "yyscript.c" /* yacc.c:1646 */ - break; - - case 179: -#line 923 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_max((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3003 "yyscript.c" /* yacc.c:1646 */ - break; - - case 180: -#line 925 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_min((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3009 "yyscript.c" /* yacc.c:1646 */ - break; - - case 181: -#line 927 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_defined((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3015 "yyscript.c" /* yacc.c:1646 */ - break; - - case 182: -#line 929 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_sizeof_headers(); } -#line 3021 "yyscript.c" /* yacc.c:1646 */ - break; - - case 183: -#line 931 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_alignof((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3027 "yyscript.c" /* yacc.c:1646 */ - break; - - case 184: -#line 933 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_sizeof((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3033 "yyscript.c" /* yacc.c:1646 */ - break; - - case 185: -#line 935 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_addr((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3039 "yyscript.c" /* yacc.c:1646 */ - break; - - case 186: -#line 937 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_loadaddr((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3045 "yyscript.c" /* yacc.c:1646 */ - break; - - case 187: -#line 939 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_origin(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3051 "yyscript.c" /* yacc.c:1646 */ - break; - - case 188: -#line 941 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_length(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3057 "yyscript.c" /* yacc.c:1646 */ - break; - - case 189: -#line 943 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_constant((yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3063 "yyscript.c" /* yacc.c:1646 */ - break; - - case 190: -#line 945 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_absolute((yyvsp[-1].expr)); } -#line 3069 "yyscript.c" /* yacc.c:1646 */ - break; - - case 191: -#line 947 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[-1].expr)); } -#line 3075 "yyscript.c" /* yacc.c:1646 */ - break; - - case 192: -#line 949 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_align((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3081 "yyscript.c" /* yacc.c:1646 */ - break; - - case 193: -#line 951 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[-1].expr)); } -#line 3087 "yyscript.c" /* yacc.c:1646 */ - break; - - case 194: -#line 953 "yyscript.y" /* yacc.c:1646 */ - { - script_data_segment_align(closure); - (yyval.expr) = script_exp_function_data_segment_align((yyvsp[-3].expr), (yyvsp[-1].expr)); - } -#line 3096 "yyscript.c" /* yacc.c:1646 */ - break; - - case 195: -#line 958 "yyscript.y" /* yacc.c:1646 */ - { - script_data_segment_relro_end(closure); - (yyval.expr) = script_exp_function_data_segment_relro_end((yyvsp[-3].expr), (yyvsp[-1].expr)); - } -#line 3105 "yyscript.c" /* yacc.c:1646 */ - break; - - case 196: -#line 963 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_data_segment_end((yyvsp[-1].expr)); } -#line 3111 "yyscript.c" /* yacc.c:1646 */ - break; - - case 197: -#line 965 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.expr) = script_exp_function_segment_start((yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr)); - /* We need to take note of any SEGMENT_START expressions - because they change the behaviour of -Ttext, -Tdata and - -Tbss options. */ - script_saw_segment_start_expression(closure); - } -#line 3123 "yyscript.c" /* yacc.c:1646 */ - break; - - case 198: -#line 973 "yyscript.y" /* yacc.c:1646 */ - { (yyval.expr) = script_exp_function_assert((yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3129 "yyscript.c" /* yacc.c:1646 */ - break; - - case 199: -#line 979 "yyscript.y" /* yacc.c:1646 */ - { script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, (yyvsp[0].expr), 0, 0); } -#line 3135 "yyscript.c" /* yacc.c:1646 */ - break; - - case 203: -#line 997 "yyscript.y" /* yacc.c:1646 */ - { script_new_vers_node (closure, NULL, (yyvsp[-3].versyms)); } -#line 3141 "yyscript.c" /* yacc.c:1646 */ - break; - - case 207: -#line 1012 "yyscript.y" /* yacc.c:1646 */ - { - script_register_vers_node (closure, NULL, 0, (yyvsp[-2].versnode), NULL); - } -#line 3149 "yyscript.c" /* yacc.c:1646 */ - break; - - case 208: -#line 1016 "yyscript.y" /* yacc.c:1646 */ - { - script_register_vers_node (closure, (yyvsp[-4].string).value, (yyvsp[-4].string).length, (yyvsp[-2].versnode), - NULL); - } -#line 3158 "yyscript.c" /* yacc.c:1646 */ - break; - - case 209: -#line 1021 "yyscript.y" /* yacc.c:1646 */ - { - script_register_vers_node (closure, (yyvsp[-5].string).value, (yyvsp[-5].string).length, (yyvsp[-3].versnode), (yyvsp[-1].deplist)); - } -#line 3166 "yyscript.c" /* yacc.c:1646 */ - break; - - case 210: -#line 1028 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.deplist) = script_add_vers_depend (closure, NULL, (yyvsp[0].string).value, (yyvsp[0].string).length); - } -#line 3174 "yyscript.c" /* yacc.c:1646 */ - break; - - case 211: -#line 1032 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.deplist) = script_add_vers_depend (closure, (yyvsp[-1].deplist), (yyvsp[0].string).value, (yyvsp[0].string).length); - } -#line 3182 "yyscript.c" /* yacc.c:1646 */ - break; - - case 212: -#line 1039 "yyscript.y" /* yacc.c:1646 */ - { (yyval.versnode) = script_new_vers_node (closure, NULL, NULL); } -#line 3188 "yyscript.c" /* yacc.c:1646 */ - break; - - case 213: -#line 1041 "yyscript.y" /* yacc.c:1646 */ - { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-1].versyms), NULL); } -#line 3194 "yyscript.c" /* yacc.c:1646 */ - break; - - case 214: -#line 1043 "yyscript.y" /* yacc.c:1646 */ - { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-1].versyms), NULL); } -#line 3200 "yyscript.c" /* yacc.c:1646 */ - break; - - case 215: -#line 1045 "yyscript.y" /* yacc.c:1646 */ - { (yyval.versnode) = script_new_vers_node (closure, NULL, (yyvsp[-1].versyms)); } -#line 3206 "yyscript.c" /* yacc.c:1646 */ - break; - - case 216: -#line 1047 "yyscript.y" /* yacc.c:1646 */ - { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-5].versyms), (yyvsp[-1].versyms)); } -#line 3212 "yyscript.c" /* yacc.c:1646 */ - break; - - case 217: -#line 1056 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[0].string).value, - (yyvsp[0].string).length, 0); - } -#line 3221 "yyscript.c" /* yacc.c:1646 */ - break; - - case 218: -#line 1061 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[0].string).value, - (yyvsp[0].string).length, 1); - } -#line 3230 "yyscript.c" /* yacc.c:1646 */ - break; - - case 219: -#line 1066 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), (yyvsp[0].string).value, - (yyvsp[0].string).length, 0); - } -#line 3239 "yyscript.c" /* yacc.c:1646 */ - break; - - case 220: -#line 1071 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), (yyvsp[0].string).value, - (yyvsp[0].string).length, 1); - } -#line 3248 "yyscript.c" /* yacc.c:1646 */ - break; - - case 221: -#line 1077 "yyscript.y" /* yacc.c:1646 */ - { version_script_push_lang (closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3254 "yyscript.c" /* yacc.c:1646 */ - break; - - case 222: -#line 1079 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = (yyvsp[-2].versyms); - version_script_pop_lang(closure); - } -#line 3263 "yyscript.c" /* yacc.c:1646 */ - break; - - case 223: -#line 1087 "yyscript.y" /* yacc.c:1646 */ - { version_script_push_lang (closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } -#line 3269 "yyscript.c" /* yacc.c:1646 */ - break; - - case 224: -#line 1089 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_merge_expressions ((yyvsp[-8].versyms), (yyvsp[-2].versyms)); - version_script_pop_lang(closure); - } -#line 3278 "yyscript.c" /* yacc.c:1646 */ - break; - - case 225: -#line 1094 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, NULL, "extern", - sizeof("extern") - 1, 1); - } -#line 3287 "yyscript.c" /* yacc.c:1646 */ - break; - - case 226: -#line 1099 "yyscript.y" /* yacc.c:1646 */ - { - (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), "extern", - sizeof("extern") - 1, 1); - } -#line 3296 "yyscript.c" /* yacc.c:1646 */ - break; - - case 227: -#line 1109 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string) = (yyvsp[0].string); } -#line 3302 "yyscript.c" /* yacc.c:1646 */ - break; - - case 228: -#line 1111 "yyscript.y" /* yacc.c:1646 */ - { (yyval.string) = (yyvsp[0].string); } -#line 3308 "yyscript.c" /* yacc.c:1646 */ - break; - - -#line 3312 "yyscript.c" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (closure, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (closure, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, closure); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, closure); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (closure, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, closure); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, closure); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 1133 "yyscript.y" /* yacc.c:1906 */ - diff --git a/external/gpl3/binutils/files/yyscript.h b/external/gpl3/binutils/files/yyscript.h deleted file mode 100644 index 945d59da7..000000000 --- a/external/gpl3/binutils/files/yyscript.h +++ /dev/null @@ -1,295 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_YY_YYSCRIPT_H_INCLUDED -# define YY_YY_YYSCRIPT_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - PLUSEQ = 258, - MINUSEQ = 259, - MULTEQ = 260, - DIVEQ = 261, - LSHIFTEQ = 262, - RSHIFTEQ = 263, - ANDEQ = 264, - OREQ = 265, - OROR = 266, - ANDAND = 267, - EQ = 268, - NE = 269, - LE = 270, - GE = 271, - LSHIFT = 272, - RSHIFT = 273, - UNARY = 274, - STRING = 275, - QUOTED_STRING = 276, - INTEGER = 277, - ABSOLUTE = 278, - ADDR = 279, - ALIGN_K = 280, - ALIGNOF = 281, - ASSERT_K = 282, - AS_NEEDED = 283, - AT = 284, - BIND = 285, - BLOCK = 286, - BYTE = 287, - CONSTANT = 288, - CONSTRUCTORS = 289, - COPY = 290, - CREATE_OBJECT_SYMBOLS = 291, - DATA_SEGMENT_ALIGN = 292, - DATA_SEGMENT_END = 293, - DATA_SEGMENT_RELRO_END = 294, - DEFINED = 295, - DSECT = 296, - ENTRY = 297, - EXCLUDE_FILE = 298, - EXTERN = 299, - FILL = 300, - FLOAT = 301, - FORCE_COMMON_ALLOCATION = 302, - GLOBAL = 303, - GROUP = 304, - HLL = 305, - INCLUDE = 306, - INHIBIT_COMMON_ALLOCATION = 307, - INFO = 308, - INPUT = 309, - KEEP = 310, - LEN = 311, - LENGTH = 312, - LOADADDR = 313, - LOCAL = 314, - LONG = 315, - MAP = 316, - MAX_K = 317, - MEMORY = 318, - MIN_K = 319, - NEXT = 320, - NOCROSSREFS = 321, - NOFLOAT = 322, - NOLOAD = 323, - ONLY_IF_RO = 324, - ONLY_IF_RW = 325, - ORG = 326, - ORIGIN = 327, - OUTPUT = 328, - OUTPUT_ARCH = 329, - OUTPUT_FORMAT = 330, - OVERLAY = 331, - PHDRS = 332, - PROVIDE = 333, - PROVIDE_HIDDEN = 334, - QUAD = 335, - SEARCH_DIR = 336, - SECTIONS = 337, - SEGMENT_START = 338, - SHORT = 339, - SIZEOF = 340, - SIZEOF_HEADERS = 341, - SORT_BY_ALIGNMENT = 342, - SORT_BY_NAME = 343, - SPECIAL = 344, - SQUAD = 345, - STARTUP = 346, - SUBALIGN = 347, - SYSLIB = 348, - TARGET_K = 349, - TRUNCATE = 350, - VERSIONK = 351, - OPTION = 352, - PARSING_LINKER_SCRIPT = 353, - PARSING_VERSION_SCRIPT = 354, - PARSING_DEFSYM = 355, - PARSING_DYNAMIC_LIST = 356 - }; -#endif -/* Tokens. */ -#define PLUSEQ 258 -#define MINUSEQ 259 -#define MULTEQ 260 -#define DIVEQ 261 -#define LSHIFTEQ 262 -#define RSHIFTEQ 263 -#define ANDEQ 264 -#define OREQ 265 -#define OROR 266 -#define ANDAND 267 -#define EQ 268 -#define NE 269 -#define LE 270 -#define GE 271 -#define LSHIFT 272 -#define RSHIFT 273 -#define UNARY 274 -#define STRING 275 -#define QUOTED_STRING 276 -#define INTEGER 277 -#define ABSOLUTE 278 -#define ADDR 279 -#define ALIGN_K 280 -#define ALIGNOF 281 -#define ASSERT_K 282 -#define AS_NEEDED 283 -#define AT 284 -#define BIND 285 -#define BLOCK 286 -#define BYTE 287 -#define CONSTANT 288 -#define CONSTRUCTORS 289 -#define COPY 290 -#define CREATE_OBJECT_SYMBOLS 291 -#define DATA_SEGMENT_ALIGN 292 -#define DATA_SEGMENT_END 293 -#define DATA_SEGMENT_RELRO_END 294 -#define DEFINED 295 -#define DSECT 296 -#define ENTRY 297 -#define EXCLUDE_FILE 298 -#define EXTERN 299 -#define FILL 300 -#define FLOAT 301 -#define FORCE_COMMON_ALLOCATION 302 -#define GLOBAL 303 -#define GROUP 304 -#define HLL 305 -#define INCLUDE 306 -#define INHIBIT_COMMON_ALLOCATION 307 -#define INFO 308 -#define INPUT 309 -#define KEEP 310 -#define LEN 311 -#define LENGTH 312 -#define LOADADDR 313 -#define LOCAL 314 -#define LONG 315 -#define MAP 316 -#define MAX_K 317 -#define MEMORY 318 -#define MIN_K 319 -#define NEXT 320 -#define NOCROSSREFS 321 -#define NOFLOAT 322 -#define NOLOAD 323 -#define ONLY_IF_RO 324 -#define ONLY_IF_RW 325 -#define ORG 326 -#define ORIGIN 327 -#define OUTPUT 328 -#define OUTPUT_ARCH 329 -#define OUTPUT_FORMAT 330 -#define OVERLAY 331 -#define PHDRS 332 -#define PROVIDE 333 -#define PROVIDE_HIDDEN 334 -#define QUAD 335 -#define SEARCH_DIR 336 -#define SECTIONS 337 -#define SEGMENT_START 338 -#define SHORT 339 -#define SIZEOF 340 -#define SIZEOF_HEADERS 341 -#define SORT_BY_ALIGNMENT 342 -#define SORT_BY_NAME 343 -#define SPECIAL 344 -#define SQUAD 345 -#define STARTUP 346 -#define SUBALIGN 347 -#define SYSLIB 348 -#define TARGET_K 349 -#define TRUNCATE 350 -#define VERSIONK 351 -#define OPTION 352 -#define PARSING_LINKER_SCRIPT 353 -#define PARSING_VERSION_SCRIPT 354 -#define PARSING_DEFSYM 355 -#define PARSING_DYNAMIC_LIST 356 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; -union YYSTYPE -{ -#line 53 "yyscript.y" /* yacc.c:1909 */ - - /* A string. */ - struct Parser_string string; - /* A number. */ - uint64_t integer; - /* An expression. */ - Expression_ptr expr; - /* An output section header. */ - struct Parser_output_section_header output_section_header; - /* An output section trailer. */ - struct Parser_output_section_trailer output_section_trailer; - /* A section constraint. */ - enum Section_constraint constraint; - /* A complete input section specification. */ - struct Input_section_spec input_section_spec; - /* A list of wildcard specifications, with exclusions. */ - struct Wildcard_sections wildcard_sections; - /* A single wildcard specification. */ - struct Wildcard_section wildcard_section; - /* A list of strings. */ - String_list_ptr string_list; - /* Information for a program header. */ - struct Phdr_info phdr_info; - /* Used for version scripts and within VERSION {}. */ - struct Version_dependency_list* deplist; - struct Version_expression_list* versyms; - struct Version_tree* versnode; - enum Script_section_type section_type; - -#line 286 "yyscript.h" /* yacc.c:1909 */ -}; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -int yyparse (void* closure); - -#endif /* !YY_YY_YYSCRIPT_H_INCLUDED */ diff --git a/external/gpl3/binutils/lib/Makefile b/external/gpl3/binutils/lib/Makefile index 25878c1ab..b8357d305 100644 --- a/external/gpl3/binutils/lib/Makefile +++ b/external/gpl3/binutils/lib/Makefile @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:21:59 skrll Exp $ +# $NetBSD: Makefile,v 1.3 2020/04/04 01:34:28 christos Exp $ -SUBDIR+= libopcodes libbfd libiberty +SUBDIR+= libgnuctf libopcodes libbfd libiberty .include diff --git a/external/gpl3/binutils/lib/Makefile.inc b/external/gpl3/binutils/lib/Makefile.inc new file mode 100644 index 000000000..c5434b205 --- /dev/null +++ b/external/gpl3/binutils/lib/Makefile.inc @@ -0,0 +1,2 @@ +# $NetBSD: Makefile.inc,v 1.1 2016/01/26 19:37:47 christos Exp $ +.include "${.PARSEDIR}/../Makefile.inc" diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile index 616122a3e..f0e60ad9a 100644 --- a/external/gpl3/binutils/lib/libbfd/Makefile +++ b/external/gpl3/binutils/lib/libbfd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2015/03/28 07:03:23 matt Exp $ +# $NetBSD: Makefile,v 1.22 2020/04/04 00:46:53 christos Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -6,7 +6,7 @@ NOMAN= # defined NOPROFILE= # defined NOCLANGERROR= # defined -.include +.include # If the platform does not support shared libraries, we need to supply # *something* for BFD-using programs to link against. Also provide an @@ -21,41 +21,50 @@ LIB= bfd BFD_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[4-7]/arm/} DEFS_MK=${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk +# XXX: Fix me +BINDIR=/usr/bin +BINDIR=/usr/lib .if exists(${DEFS_MK}) .include "${DEFS_MK}" -DIST= ${NETBSDSRCDIR}/external/gpl3/binutils/dist - .if defined(__MINIX) # MINIX: make sure sources are fetched, even when tools not built earlier GNUHOSTDIST= ${DIST} .include "${.CURDIR}/../../../../../minix/Makefile.fetchgnu" .endif # defined(__MINIX) -SHLIB_MAJOR= 13 +SHLIB_MAJOR= 17 SHLIB_MINOR= 0 LIBDPLIBS+= z ${.CURDIR}/../../../../../lib/libz GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS} +GCPPFLAGS+= ${G_HAVEVECS} + CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \ -I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \ - -DDEBUGDIR=\"${DEBUGDIR}\" + -DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \ + -DBINDIR=\"${BINDIR}\" .if (${BFD_MACHINE_ARCH} == "vax") CPPFLAGS.elf.c += -O0 .endif +COPTS.pei-x86_64.c += -Wno-stack-protector +COPTS.elfxx-mips.c += -Wno-stack-protector + GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \ ${G_libbfd_la_DEPENDENCIES:M*.lo} SRCS= ${GSRCS:.lo=.c} DPSRCS+= elf32-target.h elf64-target.h targmatch.h \ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c \ + elf32-riscv.c elf64-riscv.c elf32-aarch64.c elf64-aarch64.c \ pex64igen.c CLEANFILES+= elf32-target.h elf64-target.h targmatch.h \ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c \ + elf32-riscv.c elf64-riscv.c elf32-aarch64.c elf64-aarch64.c \ pex64igen.c TEXINFO= bfd.texinfo @@ -100,6 +109,14 @@ elf64-riscv.c: elfnn-riscv.c ${_MKTARGET_CREATE} ${TOOL_SED} -e s/NN/64/g < $> > $@ +elf32-aarch64.c: elfnn-aarch64.c + ${_MKTARGET_CREATE} + ${TOOL_SED} -e s/NN/32/g < $> > $@ + +elf64-aarch64.c: elfnn-aarch64.c + ${_MKTARGET_CREATE} + ${TOOL_SED} -e s/NN/64/g < $> > $@ + peigen.c: peXXigen.c ${_MKTARGET_CREATE} ${TOOL_SED} -e s/XX/pe/g < $> > $@ diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h index d0cf7b3d1..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h index 59a75dab2..8a5b3199d 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for clang version 3.5 (trunk 199312) */ +/* generated for aarch64--netbsd-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h index ca6b8db14..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h index f81272436..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/aarch64/defs.mk index 0f4322916..ddd25d446 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/aarch64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-aarch64.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf64-gen.lo elf32-gen.lo cpu-aarch64.lo cpu-arm.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-aarch64.lo elf32.lo elf32-arm.lo elf-nacl.lo elf-vxworks.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-aarch64.lo cpu-arm.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_littleaarch64_vec -DHAVE_bfd_elf64_bigaarch64_vec -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_littleaarch64_vec -DSELECT_VECS='&bfd_elf64_littleaarch64_vec,&bfd_elf64_bigaarch64_vec,&bfd_elf32_littlearm_vec,&bfd_elf32_bigarm_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_aarch64_arch,&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=aarch64_elf64_le_vec -DSELECT_VECS='&aarch64_elf64_le_vec,&aarch64_elf64_be_vec,&aarch64_elf32_le_vec,&aarch64_elf32_be_vec,&arm_elf32_le_vec,&arm_elf32_be_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_aarch64_arch,&bfd_arm_arch' +G_HAVEVECS=-DHAVE_aarch64_elf64_le_vec -DHAVE_aarch64_elf64_be_vec -DHAVE_aarch64_elf32_le_vec -DHAVE_aarch64_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_be_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd.h new file mode 100644 index 000000000..ef0fdff8b --- /dev/null +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd.h @@ -0,0 +1,7862 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* 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". + Run "make headers" in your build bfd/ to regenerate. */ + +/* Main header file for the bfd library -- portable access to object files. + + Copyright (C) 1990-2020 Free Software Foundation, Inc. + + Contributed by Cygnus Support. + + 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. */ + +#ifndef __BFD_H_SEEN__ +#define __BFD_H_SEEN__ + +/* PR 14072: Ensure that config.h is included first. */ +#if !defined PACKAGE && !defined PACKAGE_VERSION +#error config.h must be included before this header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ansidecl.h" +#include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include +#include + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#ifndef SABER +/* This hack is to avoid a problem with some strict ANSI C preprocessors. + The problem is, "32_" is not a valid preprocessing token, and we don't + want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will + cause the inner CONCAT2 macros to be evaluated first, producing + still-valid pp-tokens. Then the final concatenation can be done. */ +#undef CONCAT4 +#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d)) +#endif +#endif + +/* This is a utility macro to handle the situation where the code + wants to place a constant string into the code, followed by a + comma and then the length of the string. Doing this by hand + is error prone, so using this macro is safer. */ +#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1) +/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro + to create the arguments to another macro, since the preprocessor + will mis-count the number of arguments to the outer macro (by not + evaluating STRING_COMMA_LEN and so missing the comma). This is a + problem for example when trying to use STRING_COMMA_LEN to build + the arguments to the strncmp() macro. Hence this alternative + definition of strncmp is provided here. + + Note - these macros do NOT work if STR2 is not a constant string. */ +#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) + /* strcpy() can have a similar problem, but since we know we are + copying a constant string, we can use memcpy which will be faster + since there is no need to check for a NUL byte inside STR. We + can also save time if we do not need to copy the terminating NUL. */ +#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1) +#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) + + +#define BFD_SUPPORTS_PLUGINS 1 + +/* The word size used by BFD on the host. This may be 64 with a 32 + bit target if the host is 64 bit, or if other 64 bit targets have + been selected with --enable-targets, or if --enable-64-bit-bfd. */ +#define BFD_ARCH_SIZE 64 + +/* The word size of the default bfd target. */ +#define BFD_DEFAULT_TARGET_SIZE 64 + +#define BFD_HOST_64BIT_LONG 1 +#define BFD_HOST_64BIT_LONG_LONG 0 +#if 1 +#define BFD_HOST_64_BIT long +#define BFD_HOST_U_64_BIT unsigned long +typedef BFD_HOST_64_BIT bfd_int64_t; +typedef BFD_HOST_U_64_BIT bfd_uint64_t; +#endif + +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + +#if BFD_ARCH_SIZE >= 64 +#define BFD64 +#endif + +#ifndef INLINE +#if __GNUC__ >= 2 +#define INLINE __inline__ +#else +#define INLINE +#endif +#endif + +/* Declaring a type wide enough to hold a host long and a host pointer. */ +#define BFD_HOSTPTR_T unsigned long +typedef BFD_HOSTPTR_T bfd_hostptr_t; + +/* Forward declaration. */ +typedef struct bfd bfd; + +/* Boolean type used in bfd. Too many systems define their own + versions of "boolean" for us to safely typedef a "boolean" of + our own. Using an enum for "bfd_boolean" has its own set of + problems, with strange looking casts required to avoid warnings + on some older compilers. Thus we just use an int. + + General rule: Functions which are bfd_boolean return TRUE on + success and FALSE on failure (unless they're a predicate). */ + +typedef int bfd_boolean; +#undef FALSE +#undef TRUE +#define FALSE 0 +#define TRUE 1 + +#ifdef BFD64 + +#ifndef BFD_HOST_64_BIT + #error No 64 bit integer type available +#endif /* ! defined (BFD_HOST_64_BIT) */ + +typedef BFD_HOST_U_64_BIT bfd_vma; +typedef BFD_HOST_64_BIT bfd_signed_vma; +typedef BFD_HOST_U_64_BIT bfd_size_type; +typedef BFD_HOST_U_64_BIT symvalue; + +#if BFD_HOST_64BIT_LONG +#define BFD_VMA_FMT "l" +#elif defined (__MSVCRT__) +#define BFD_VMA_FMT "I64" +#else +#define BFD_VMA_FMT "ll" +#endif + +#ifndef fprintf_vma +#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x) +#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x) +#endif + +#else /* not BFD64 */ + +/* Represent a target address. Also used as a generic unsigned type + which is guaranteed to be big enough to hold any arithmetic types + we need to deal with. */ +typedef unsigned long bfd_vma; + +/* A generic signed type which is guaranteed to be big enough to hold any + arithmetic types we need to deal with. Can be assumed to be compatible + with bfd_vma in the same way that signed and unsigned ints are compatible + (as parameters, in assignment, etc). */ +typedef long bfd_signed_vma; + +typedef unsigned long symvalue; +typedef unsigned long bfd_size_type; + +/* Print a bfd_vma x on stream s. */ +#define BFD_VMA_FMT "l" +#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x) +#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x) + +#endif /* not BFD64 */ + +#define HALF_BFD_SIZE_TYPE \ + (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2)) + +#ifndef BFD_HOST_64_BIT +/* Fall back on a 32 bit type. The idea is to make these types always + available for function return types, but in the case that + BFD_HOST_64_BIT is undefined such a function should abort or + otherwise signal an error. */ +typedef bfd_signed_vma bfd_int64_t; +typedef bfd_vma bfd_uint64_t; +#endif + +/* An offset into a file. BFD always uses the largest possible offset + based on the build time availability of fseek, fseeko, or fseeko64. */ +typedef BFD_HOST_64_BIT file_ptr; +typedef unsigned BFD_HOST_64_BIT ufile_ptr; + +extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); +extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); + +#define printf_vma(x) fprintf_vma(stdout,x) +#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. */ +}; + +/* 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. */ +typedef struct bfd_section *sec_ptr; + +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) + +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 bfd_boolean 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 bfd_boolean 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 *, bfd_boolean create, + bfd_boolean 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 *, + bfd_boolean (*) (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); + +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + +/* 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 bfd_boolean bfd_cache_close + (bfd *abfd); +/* NB: This declaration should match the autogenerated one in libbfd.h. */ + +extern bfd_boolean bfd_cache_close_all (void); + +extern bfd_boolean bfd_record_phdr + (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, + bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); + +/* Byte swapping routines. */ + +bfd_uint64_t bfd_getb64 (const void *); +bfd_uint64_t bfd_getl64 (const void *); +bfd_int64_t bfd_getb_signed_64 (const void *); +bfd_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 (bfd_uint64_t, void *); +void bfd_putl64 (bfd_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. */ + +bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); +void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); + + +/* 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 bfd_boolean bfd_get_file_window + (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* 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; +/* 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_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); + +bfd_boolean bfd_close (bfd *abfd); + +bfd_boolean bfd_close_all_done (bfd *); + +bfd *bfd_create (const char *filename, bfd *templ); + +bfd_boolean bfd_make_writable (bfd *abfd); + +bfd_boolean bfd_make_readable (bfd *abfd); + +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); + +bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + +/* Extracted from libbfd.c. */ + +/* Byte swapping macros for user section data. */ + +#define bfd_put_8(abfd, val, ptr) \ + ((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) +#define bfd_put_signed_8 \ + bfd_put_8 +#define bfd_get_8(abfd, ptr) \ + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) +#define bfd_get_signed_8(abfd, ptr) \ + ((((bfd_signed_vma) *(const unsigned char *) (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)) + + +/* 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 + + +/* Extracted from bfdio.c. */ +long bfd_get_mtime (bfd *abfd); + +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); + +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); + +/* Extracted from bfdwin.c. */ +/* Extracted from section.c. */ + +typedef struct bfd_section +{ + /* The name of the section; the name isn't a copy, the pointer is + the same as that passed to bfd_make_section. */ + const char *name; + + /* A unique sequence number. */ + unsigned int id; + + /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ + unsigned int index; + + /* The next section in the list belonging to the BFD, or NULL. */ + struct bfd_section *next; + + /* The previous section in the list belonging to the BFD, or NULL. */ + struct bfd_section *prev; + + /* The field flags contains attributes of the section. Some + flags are read in from the object file, and some are + synthesized from other information. */ + flagword flags; + +#define SEC_NO_FLAGS 0x0 + + /* Tells the OS to allocate space for this section when loading. + This is clear for a section containing debug information only. */ +#define SEC_ALLOC 0x1 + + /* Tells the OS to load the section from the file when loading. + This is clear for a .bss section. */ +#define SEC_LOAD 0x2 + + /* The section contains data still to be relocated, so there is + some relocation information too. */ +#define SEC_RELOC 0x4 + + /* A signal to the OS that the section contains read only data. */ +#define SEC_READONLY 0x8 + + /* The section contains code only. */ +#define SEC_CODE 0x10 + + /* The section contains data only. */ +#define SEC_DATA 0x20 + + /* The section will reside in ROM. */ +#define SEC_ROM 0x40 + + /* The section contains constructor information. This section + type is used by the linker to create lists of constructors and + destructors used by <>. When a back end sees a symbol + which should be used in a constructor list, it creates a new + section for the type of name (e.g., <<__CTOR_LIST__>>), attaches + the symbol to it, and builds a relocation. To build the lists + of constructors, all the linker has to do is catenate all the + sections called <<__CTOR_LIST__>> and relocate the data + contained within - exactly the operations it would peform on + standard data. */ +#define SEC_CONSTRUCTOR 0x80 + + /* The section has contents - a data section could be + <> | <>; a debug section could be + <> */ +#define SEC_HAS_CONTENTS 0x100 + + /* An instruction to the linker to not output the section + even if it has information which would normally be written. */ +#define SEC_NEVER_LOAD 0x200 + + /* The section contains thread local data. */ +#define SEC_THREAD_LOCAL 0x400 + + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 + + /* The section contains common symbols (symbols may be defined + multiple times, the value of a symbol is the amount of + space it requires, and the largest symbol value is the one + used). Most targets have exactly one of these (which we + translate to bfd_com_section_ptr), but ECOFF has two. */ +#define SEC_IS_COMMON 0x1000 + + /* The section contains only debugging information. For + example, this is set for ELF .debug and .stab sections. + strip tests this flag to see if a section can be + discarded. */ +#define SEC_DEBUGGING 0x2000 + + /* The contents of this section are held in memory pointed to + by the contents field. This is checked by bfd_get_section_contents, + and the data is retrieved from memory if appropriate. */ +#define SEC_IN_MEMORY 0x4000 + + /* The contents of this section are to be excluded by the + linker for executable and shared objects unless those + objects are to be further relocated. */ +#define SEC_EXCLUDE 0x8000 + + /* The contents of this section are to be sorted based on the sum of + the symbol and addend values specified by the associated relocation + entries. Entries without associated relocation entries will be + appended to the end of the section in an unspecified order. */ +#define SEC_SORT_ENTRIES 0x10000 + + /* When linking, duplicate sections of the same name should be + discarded, rather than being combined into a single section as + is usually done. This is similar to how common symbols are + handled. See SEC_LINK_DUPLICATES below. */ +#define SEC_LINK_ONCE 0x20000 + + /* If SEC_LINK_ONCE is set, this bitfield describes how the linker + should handle duplicate sections. */ +#define SEC_LINK_DUPLICATES 0xc0000 + + /* This value for SEC_LINK_DUPLICATES means that duplicate + sections with the same name should simply be discarded. */ +#define SEC_LINK_DUPLICATES_DISCARD 0x0 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if there are any duplicate sections, although + it should still only link one copy. */ +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections are a different size. */ +#define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000 + + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections contain different + contents. */ +#define SEC_LINK_DUPLICATES_SAME_CONTENTS \ + (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE) + + /* This section was created by the linker as part of dynamic + relocation or other arcane processing. It is skipped when + going through the first-pass output, trusting that someone + else up the line will take care of it later. */ +#define SEC_LINKER_CREATED 0x100000 + + /* This section should not be subject to garbage collection. + Also set to inform the linker that this section should not be + listed in the link map as discarded. */ +#define SEC_KEEP 0x200000 + + /* This section contains "short" data, and should be placed + "near" the GP. */ +#define SEC_SMALL_DATA 0x400000 + + /* Attempt to merge identical entities in the section. + Entity size is given in the entsize field. */ +#define SEC_MERGE 0x800000 + + /* If given with SEC_MERGE, entities to merge are zero terminated + strings where entsize specifies character size instead of fixed + size entries. */ +#define SEC_STRINGS 0x1000000 + + /* This section contains data about section groups. */ +#define SEC_GROUP 0x2000000 + + /* The section is a COFF shared library section. This flag is + only for the linker. If this type of section appears in + the input file, the linker must copy it to the output file + without changing the vma or size. FIXME: Although this + was originally intended to be general, it really is COFF + specific (and the flag was renamed to indicate this). It + might be cleaner to have some more general mechanism to + allow the back end to control what the linker does with + sections. */ +#define SEC_COFF_SHARED_LIBRARY 0x4000000 + + /* This input section should be copied to output in reverse order + as an array of pointers. This is for ELF linker internal use + only. */ +#define SEC_ELF_REVERSE_COPY 0x4000000 + + /* This section contains data which may be shared with other + executables or shared objects. This is for COFF only. */ +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 + + /* When a section with this flag is being linked, then if the size of + the input section is less than a page, it should not cross a page + boundary. If the size of the input section is one page or more, + it should be aligned on a page boundary. This is for TI + TMS320C54X only. */ +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 + + /* Indicate that section has the no read flag set. This happens + when memory read flag isn't set. */ +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 + + /* End of section flags. */ + + /* Some internal packed boolean fields. */ + + /* See the vma field. */ + unsigned int user_set_vma : 1; + + /* A mark flag used by some of the linker backends. */ + unsigned int linker_mark : 1; + + /* Another mark flag used by some of the linker backends. Set for + output sections that have an input section. */ + unsigned int linker_has_input : 1; + + /* Mark flag used by some linker backends for garbage collection. */ + unsigned int gc_mark : 1; + + /* Section compression status. */ + unsigned int compress_status : 2; +#define COMPRESS_SECTION_NONE 0 +#define COMPRESS_SECTION_DONE 1 +#define DECOMPRESS_SECTION_SIZED 2 + + /* The following flags are used by the ELF linker. */ + + /* Mark sections which have been allocated to segments. */ + unsigned int segment_mark : 1; + + /* Type of sec_info information. */ + unsigned int sec_info_type:3; +#define SEC_INFO_TYPE_NONE 0 +#define SEC_INFO_TYPE_STABS 1 +#define SEC_INFO_TYPE_MERGE 2 +#define SEC_INFO_TYPE_EH_FRAME 3 +#define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 + + /* Nonzero if this section uses RELA relocations, rather than REL. */ + unsigned int use_rela_p:1; + + /* Bits used by various backends. The generic code doesn't touch + these fields. */ + + unsigned int sec_flg0:1; + unsigned int sec_flg1:1; + unsigned int sec_flg2:1; + unsigned int sec_flg3:1; + unsigned int sec_flg4:1; + unsigned int sec_flg5:1; + + /* End of internal packed boolean fields. */ + + /* The virtual memory address of the section - where it will be + at run time. The symbols are relocated against this. The + user_set_vma flag is maintained by bfd; if it's not set, the + backend can assign addresses (for example, in <>, where + the default address for <<.data>> is dependent on the specific + target and various flags). */ + bfd_vma vma; + + /* The load address of the section - where it would be in a + rom image; really only used for writing section header + information. */ + bfd_vma lma; + + /* The size of the section in *octets*, as it will be output. + Contains a value even if the section has no contents (e.g., the + size of <<.bss>>). */ + bfd_size_type size; + + /* For input sections, the original size on disk of the section, in + octets. This field should be set for any section whose size is + changed by linker relaxation. It is required for sections where + the linker relaxation scheme doesn't cache altered section and + reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing + targets), and thus the original size needs to be kept to read the + section multiple times. For output sections, rawsize holds the + section size calculated on a previous linker relaxation pass. */ + bfd_size_type rawsize; + + /* The compressed size of the section in octets. */ + bfd_size_type compressed_size; + + /* Relaxation table. */ + struct relax_table *relax; + + /* Count of used relaxation table entries. */ + int relax_count; + + + /* If this section is going to be output, then this value is the + offset in *bytes* into the output section of the first byte in the + input section (byte ==> smallest addressable unit on the + target). In most cases, if this was going to start at the + 100th octet (8-bit quantity) in the output section, this value + would be 100. However, if the target byte size is 16 bits + (bfd_octets_per_byte is "2"), this value would be 50. */ + bfd_vma output_offset; + + /* The output section through which to map on output. */ + struct bfd_section *output_section; + + /* The alignment requirement of the section, as an exponent of 2 - + e.g., 3 aligns to 2^3 (or 8). */ + unsigned int alignment_power; + + /* If an input section, a pointer to a vector of relocation + records for the data in this section. */ + struct reloc_cache_entry *relocation; + + /* If an output section, a pointer to a vector of pointers to + relocation records for the data in this section. */ + struct reloc_cache_entry **orelocation; + + /* The number of relocation records in one of the above. */ + unsigned reloc_count; + + /* Information below is back end specific - and not always used + or updated. */ + + /* File position of section data. */ + file_ptr filepos; + + /* File position of relocation info. */ + file_ptr rel_filepos; + + /* File position of line data. */ + file_ptr line_filepos; + + /* Pointer to data for applications. */ + void *userdata; + + /* If the SEC_IN_MEMORY flag is set, this points to the actual + contents. */ + unsigned char *contents; + + /* Attached line number information. */ + alent *lineno; + + /* Number of line number records. */ + unsigned int lineno_count; + + /* Entity size for merging purposes. */ + unsigned int entsize; + + /* Points to the kept section if this section is a link-once section, + and is discarded. */ + struct bfd_section *kept_section; + + /* When a section is being output, this value changes as more + linenumbers are written out. */ + file_ptr moving_line_filepos; + + /* What the section number is in the target world. */ + int target_index; + + void *used_by_bfd; + + /* If this is a constructor section then here is a list of the + relocations created to relocate items within it. */ + struct relent_chain *constructor_chain; + + /* The BFD which owns the section. */ + bfd *owner; + + /* A symbol which points at this section only. */ + struct bfd_symbol *symbol; + struct bfd_symbol **symbol_ptr_ptr; + + /* Early in the link process, map_head and map_tail are used to build + a list of input sections attached to an output section. Later, + output sections use these fields for a list of bfd_link_order + structs. */ + union { + struct bfd_link_order *link_order; + struct bfd_section *s; + } map_head, map_tail; +} asection; + +/* Relax table contains information about instructions which can + be removed by relaxation -- replacing a long address with a + short address. */ +struct relax_table { + /* Address where bytes may be deleted. */ + bfd_vma addr; + + /* Number of bytes to be deleted. */ + int size; +}; + +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} + +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} + +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} + +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ + { NAME, IDX, 0, NULL, NULL, 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, relax, relax_count, */ \ + 0, 0, 0, 0, 0, 0, 0, \ + \ + /* output_offset, output_section, alignment_power, */ \ + 0, &SEC, 0, \ + \ + /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \ + NULL, NULL, 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 */ \ + { NULL }, { NULL } \ + } + +/* 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 + +void bfd_section_list_clear (bfd *); + +asection *bfd_get_section_by_name (bfd *abfd, const char *name); + +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); + +asection *bfd_get_linker_section (bfd *abfd, const char *name); + +asection *bfd_get_section_by_name_if + (bfd *abfd, + const char *name, + bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), + void *obj); + +char *bfd_get_unique_section_name + (bfd *abfd, const char *templat, int *count); + +asection *bfd_make_section_old_way (bfd *abfd, const char *name); + +asection *bfd_make_section_anyway_with_flags + (bfd *abfd, const char *name, flagword flags); + +asection *bfd_make_section_anyway (bfd *abfd, const char *name); + +asection *bfd_make_section_with_flags + (bfd *, const char *name, flagword flags); + +asection *bfd_make_section (bfd *, const char *name); + +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); + +void bfd_rename_section + (asection *sec, const char *newname); + +void bfd_map_over_sections + (bfd *abfd, + void (*func) (bfd *abfd, asection *sect, void *obj), + void *obj); + +asection *bfd_sections_find_if + (bfd *abfd, + bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), + void *obj); + +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); + +bfd_boolean bfd_set_section_contents + (bfd *abfd, asection *section, const void *data, + file_ptr offset, bfd_size_type count); + +bfd_boolean bfd_get_section_contents + (bfd *abfd, asection *section, void *location, file_ptr offset, + bfd_size_type count); + +bfd_boolean bfd_malloc_and_get_section + (bfd *abfd, asection *section, bfd_byte **buf); + +bfd_boolean bfd_copy_private_section_data + (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); + +#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) +bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); + +const char *bfd_generic_group_name (bfd *, const asection *sec); + +bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); + +/* 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_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_l1om, /* Intel L1OM. */ +#define bfd_mach_l1om (1 << 5) +#define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) + bfd_arch_k1om, /* Intel K1OM. */ +#define bfd_mach_k1om (1 << 6) +#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, + 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. */ +#define bfd_mach_hppa10 10 +#define bfd_mach_hppa11 11 +#define bfd_mach_hppa20 20 +#define bfd_mach_hppa20w 25 + bfd_arch_d10v, /* Mitsubishi D10V. */ +#define bfd_mach_d10v 1 +#define bfd_mach_d10v_ts2 2 +#define bfd_mach_d10v_ts3 3 + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ +#define bfd_mach_m6812_default 0 +#define bfd_mach_m6812 1 +#define bfd_mach_m6812s 2 + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ +#define bfd_mach_z8001 1 +#define bfd_mach_z8002 2 + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b +#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 + bfd_arch_arm, /* Advanced Risc Machines ARM. */ +#define bfd_mach_arm_unknown 0 +#define bfd_mach_arm_2 1 +#define bfd_mach_arm_2a 2 +#define bfd_mach_arm_3 3 +#define bfd_mach_arm_3M 4 +#define bfd_mach_arm_4 5 +#define bfd_mach_arm_4T 6 +#define bfd_mach_arm_5 7 +#define bfd_mach_arm_5T 8 +#define bfd_mach_arm_5TE 9 +#define bfd_mach_arm_XScale 10 +#define bfd_mach_arm_ep9312 11 +#define bfd_mach_arm_iWMMXt 12 +#define bfd_mach_arm_iWMMXt2 13 +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ +#define bfd_mach_tic3x 30 +#define bfd_mach_tic4x 40 + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ +#define bfd_mach_v850 1 +#define bfd_mach_v850e 'E' +#define bfd_mach_v850e1 '1' +#define bfd_mach_v850e2 0x4532 +#define bfd_mach_v850e2v3 0x45325633 +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ +#define bfd_mach_m32r 1 /* For backwards compatibility. */ +#define bfd_mach_m32rx 'x' +#define bfd_mach_m32r2 '2' + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 +#define bfd_mach_am33 330 +#define bfd_mach_am33_2 332 + bfd_arch_fr30, +#define bfd_mach_fr30 0x46523330 + bfd_arch_frv, +#define bfd_mach_frv 1 +#define bfd_mach_frvsimple 2 +#define bfd_mach_fr300 300 +#define bfd_mach_fr400 400 +#define bfd_mach_fr450 450 +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ +#define bfd_mach_fr500 500 +#define bfd_mach_fr550 550 + bfd_arch_moxie, /* The moxie processor. */ +#define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 + bfd_arch_mcore, + bfd_arch_mep, +#define bfd_mach_mep 1 +#define bfd_mach_mep_h1 0x6831 +#define bfd_mach_mep_c5 0x6335 + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ +#define bfd_mach_ia64_elf64 64 +#define bfd_mach_ia64_elf32 32 + bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ +#define bfd_mach_ip2022 1 +#define bfd_mach_ip2022ext 2 + bfd_arch_iq2000, /* Vitesse IQ2000. */ +#define bfd_mach_iq2000 1 +#define bfd_mach_iq10 2 + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ +#define bfd_mach_epiphany16 1 +#define bfd_mach_epiphany32 2 + bfd_arch_mt, +#define bfd_mach_ms1 1 +#define bfd_mach_mrisc2 2 +#define bfd_mach_ms2 3 + bfd_arch_pj, + bfd_arch_avr, /* Atmel AVR microcontrollers. */ +#define bfd_mach_avr1 1 +#define bfd_mach_avr2 2 +#define bfd_mach_avr25 25 +#define bfd_mach_avr3 3 +#define bfd_mach_avr31 31 +#define bfd_mach_avr35 35 +#define bfd_mach_avr4 4 +#define bfd_mach_avr5 5 +#define bfd_mach_avr51 51 +#define bfd_mach_avr6 6 +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ +#define bfd_mach_bfin 1 + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ +#define bfd_mach_cr16 1 + bfd_arch_crx, /* National Semiconductor CRX. */ +#define bfd_mach_crx 1 + bfd_arch_cris, /* Axis CRIS. */ +#define bfd_mach_cris_v0_v10 255 +#define bfd_mach_cris_v32 32 +#define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 + bfd_arch_rl78, +#define bfd_mach_rl78 0x75 + bfd_arch_rx, /* Renesas RX. */ +#define bfd_mach_rx 0x75 +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ +#define bfd_mach_s390_31 31 +#define bfd_mach_s390_64 64 + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 + bfd_arch_mmix, /* Donald Knuth's educational processor. */ + bfd_arch_xstormy16, +#define bfd_mach_xstormy16 1 + bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_xc16x 1 +#define bfd_mach_xc16xl 2 +#define bfd_mach_xc16xs 3 + bfd_arch_xgate, /* Freescale XGATE. */ +#define bfd_mach_xgate 1 + bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ +#define bfd_mach_xtensa 1 + bfd_arch_z80, +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ +#define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 + bfd_arch_last + }; + +typedef struct bfd_arch_info +{ + int bits_per_word; + int bits_per_address; + int bits_per_byte; + enum bfd_architecture arch; + unsigned long mach; + const char *arch_name; + const char *printable_name; + unsigned int section_align_power; + /* TRUE if this is the default machine for the architecture. + The default arch should be the first entry for an arch so that + all the entries for that arch can be accessed via <>. */ + bfd_boolean the_default; + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); + + bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); + + /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If + IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is + TRUE, the buffer contains code. */ + void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian, + bfd_boolean code); + + const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; +} +bfd_arch_info_type; + +const char *bfd_printable_name (bfd *abfd); + +const bfd_arch_info_type *bfd_scan_arch (const char *string); + +const char **bfd_arch_list (void); + +const bfd_arch_info_type *bfd_arch_get_compatible + (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); + +void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); + +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); + +enum bfd_architecture bfd_get_arch (const bfd *abfd); + +unsigned long bfd_get_mach (const bfd *abfd); + +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); + +const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); + +const bfd_arch_info_type *bfd_lookup_arch + (enum bfd_architecture arch, unsigned long machine); + +const char *bfd_printable_arch_mach + (enum bfd_architecture arch, unsigned long machine); + +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); + +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, + + /* Unused. */ + 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 encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; + + /* 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; + + /* 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; + + /* 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; + + /* 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; +}; + +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } +#define EMPTY_HOWTO(C) \ + HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ + NULL, FALSE, 0, 0, FALSE) + +unsigned int bfd_get_reloc_size (reloc_howto_type *); + +typedef struct relent_chain +{ + arelent relent; + struct relent_chain *next; +} +arelent_chain; + +bfd_reloc_status_type bfd_check_overflow + (enum complain_overflow how, + unsigned int bitsize, + unsigned int rightshift, + unsigned int addrsize, + bfd_vma relocation); + +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + +bfd_reloc_status_type bfd_perform_relocation + (bfd *abfd, + arelent *reloc_entry, + void *data, + asection *input_section, + bfd *output_bfd, + char **error_message); + +bfd_reloc_status_type bfd_install_relocation + (bfd *abfd, + arelent *reloc_entry, + void *data, bfd_vma data_start, + asection *input_section, + char **error_message); + +enum bfd_reloc_code_real { + _dummy_first_bfd_reloc_code_real, + + +/* 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, + +/* 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, + +/* Section relative relocations. Some targets need this for DWARF2. */ + BFD_RELOC_32_SECREL, + +/* 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, + +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + +/* 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, + +/* 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, + +/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */ + BFD_RELOC_8_FFnn, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* I think these are specific to SPARC a.out (e.g., Sun 4). */ + BFD_RELOC_SPARC_BASE13, + BFD_RELOC_SPARC_BASE22, + +/* 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, + +/* SPARC little endian relocation */ + BFD_RELOC_SPARC_REV32, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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. + +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 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 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, + +/* 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, + +/* The LINKAGE relocation outputs a linkage pair in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_LINKAGE, + +/* The CODEADDR relocation outputs a STO_CA in the object file, +which is filled by the linker. */ + BFD_RELOC_ALPHA_CODEADDR, + +/* 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, + +/* 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, + +/* The NOP relocation outputs a NOP if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_NOP, + +/* The BSR relocation outputs a BSR if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_BSR, + +/* The LDA relocation outputs a LDA if the longword displacement +between two procedure entry points is < 2^16. */ + BFD_RELOC_ALPHA_LDA, + +/* 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, + +/* 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, + +/* The MIPS jump instruction. */ + BFD_RELOC_MIPS_JMP, + BFD_RELOC_MICROMIPS_JMP, + +/* The MIPS16 jump instruction. */ + BFD_RELOC_MIPS16_JMP, + +/* MIPS16 GP relative reloc. */ + BFD_RELOC_MIPS16_GPREL, + +/* High 16 bits of 32-bit value; simple reloc. */ + BFD_RELOC_HI16, + +/* 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, + +/* Low 16 bits. */ + BFD_RELOC_LO16, + +/* High 16 bits of 32-bit pc-relative value */ + BFD_RELOC_HI16_PCREL, + +/* High 16 bits of 32-bit pc-relative value, adjusted */ + BFD_RELOC_HI16_S_PCREL, + +/* Low 16 bits of pc-relative value */ + BFD_RELOC_LO16_PCREL, + +/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of +16-bit immediate fields */ + BFD_RELOC_MIPS16_GOT16, + BFD_RELOC_MIPS16_CALL16, + +/* MIPS16 high 16 bits of 32-bit value. */ + BFD_RELOC_MIPS16_HI16, + +/* 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, + +/* MIPS16 low 16 bits. */ + BFD_RELOC_MIPS16_LO16, + +/* 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, + +/* Relocation against a MIPS literal section. */ + BFD_RELOC_MIPS_LITERAL, + BFD_RELOC_MICROMIPS_LITERAL, + +/* microMIPS PC-relative relocations. */ + BFD_RELOC_MICROMIPS_7_PCREL_S1, + BFD_RELOC_MICROMIPS_10_PCREL_S1, + BFD_RELOC_MICROMIPS_16_PCREL_S1, + +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + +/* microMIPS versions of generic BFD relocs. */ + BFD_RELOC_MICROMIPS_GPREL16, + BFD_RELOC_MICROMIPS_HI16, + BFD_RELOC_MICROMIPS_HI16_S, + BFD_RELOC_MICROMIPS_LO16, + +/* 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_REL16, + 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, + + +/* MIPS ELF relocations (VxWorks and PLT extensions). */ + BFD_RELOC_MIPS_COPY, + BFD_RELOC_MIPS_JUMP_SLOT, + + +/* Moxie ELF relocations. */ + BFD_RELOC_MOXIE_10_PCREL, + + +/* 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, + + +/* 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, + + +/* This is a 24bit GOT-relative reloc for the mn10300. */ + BFD_RELOC_MN10300_GOTOFF24, + +/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes +in the instruction. */ + BFD_RELOC_MN10300_GOT32, + +/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes +in the instruction. */ + BFD_RELOC_MN10300_GOT24, + +/* 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_MN10300_COPY, + +/* Create GOT entry. */ + BFD_RELOC_MN10300_GLOB_DAT, + +/* Create PLT entry. */ + BFD_RELOC_MN10300_JMP_SLOT, + +/* Adjust by program base. */ + BFD_RELOC_MN10300_RELATIVE, + +/* 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, + +/* 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_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_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_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, + +/* PowerPC and PowerPC64 thread-local storage relocations. */ + BFD_RELOC_PPC_TLS, + BFD_RELOC_PPC_TLSGD, + BFD_RELOC_PPC_TLSLD, + 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_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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, + +/* IBM 370/390 relocations */ + BFD_RELOC_I370_D12, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */ + BFD_RELOC_ARM_PCREL_CALL, + +/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ + BFD_RELOC_ARM_PCREL_JUMP, + +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + +/* 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, + +/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */ + BFD_RELOC_ARM_OFFSET_IMM, + +/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */ + BFD_RELOC_ARM_THUMB_OFFSET, + +/* Pc-relative or absolute relocation depending on target. Used for +entries in .init_array sections. */ + BFD_RELOC_ARM_TARGET1, + +/* Read-only segment base relative address. */ + BFD_RELOC_ARM_ROSEGREL32, + +/* Data segment base relative address. */ + BFD_RELOC_ARM_SBREL32, + +/* 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, + +/* 31-bit PC relative address. */ + BFD_RELOC_ARM_PREL31, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Annotation of BX instructions. */ + BFD_RELOC_ARM_V4BX, + +/* ARM support for STT_GNU_IFUNC. */ + BFD_RELOC_ARM_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* ADI Blackfin 16 bit immediate absolute reloc. */ + BFD_RELOC_BFIN_16_IMM, + +/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */ + BFD_RELOC_BFIN_16_HIGH, + +/* ADI Blackfin 'a' part of LSETUP. */ + BFD_RELOC_BFIN_4_PCREL, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_5_PCREL, + +/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */ + BFD_RELOC_BFIN_16_LOW, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_10_PCREL, + +/* ADI Blackfin 'b' part of LSETUP. */ + BFD_RELOC_BFIN_11_PCREL, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_12_PCREL_JUMP, + +/* ADI Blackfin Short jump, pcrel. */ + BFD_RELOC_BFIN_12_PCREL_JUMP_S, + +/* ADI Blackfin Call.x not implemented. */ + BFD_RELOC_BFIN_24_PCREL_CALL_X, + +/* ADI Blackfin Long Jump pcrel. */ + BFD_RELOC_BFIN_24_PCREL_JUMP_L, + +/* 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, + +/* ADI Blackfin GOT relocation. */ + BFD_RELOC_BFIN_GOT, + +/* ADI Blackfin PLTPC relocation. */ + BFD_RELOC_BFIN_PLTPC, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PUSH, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_CONST, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADD, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_SUB, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MULT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_DIV, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MOD, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LSHIFT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_RSHIFT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_AND, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_OR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_XOR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LAND, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LOR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LEN, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_NEG, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_COMP, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PAGE, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_HWPAGE, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADDR, + +/* Mitsubishi D10V relocs. +This is a 10-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_10_PCREL_R, + +/* 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, + +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18, + +/* This is an 18-bit reloc with the right 2 bits +assumed to be 0. */ + BFD_RELOC_D10V_18_PCREL, + +/* Mitsubishi D30V relocs. +This is a 6-bit absolute reloc. */ + BFD_RELOC_D30V_6, + +/* This is a 6-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_9_PCREL, + +/* 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, + +/* This is a 12-bit absolute reloc with the +right 3 bitsassumed to be 0. */ + BFD_RELOC_D30V_15, + +/* This is a 12-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_15_PCREL, + +/* 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, + +/* This is an 18-bit absolute reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21, + +/* This is an 18-bit pc-relative reloc with +the right 3 bits assumed to be 0. */ + BFD_RELOC_D30V_21_PCREL, + +/* 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, + +/* This is a 32-bit absolute reloc. */ + BFD_RELOC_D30V_32, + +/* This is a 32-bit pc-relative reloc. */ + BFD_RELOC_D30V_32_PCREL, + +/* DLX relocs */ + BFD_RELOC_DLX_HI16_S, + +/* DLX relocs */ + BFD_RELOC_DLX_LO16, + +/* DLX relocs */ + BFD_RELOC_DLX_JMP26, + +/* Renesas M16C/M32C Relocations. */ + BFD_RELOC_M32C_HI8, + BFD_RELOC_M32C_RL_JUMP, + BFD_RELOC_M32C_RL_1ADDR, + BFD_RELOC_M32C_RL_2ADDR, + +/* Renesas M32R (formerly Mitsubishi M32R) relocs. +This is a 24 bit absolute address. */ + BFD_RELOC_M32R_24, + +/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_10_PCREL, + +/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_18_PCREL, + +/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */ + BFD_RELOC_M32R_26_PCREL, + +/* 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, + +/* This is a 16-bit reloc containing the lower 16 bits of an address. */ + BFD_RELOC_M32R_LO16, + +/* This is a 16-bit reloc containing the small data area offset for use in +add3, load, and store instructions. */ + BFD_RELOC_M32R_SDA16, + +/* 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, + +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + +/* This is a 9-bit reloc */ + BFD_RELOC_V850_9_PCREL, + +/* This is a 22-bit reloc */ + BFD_RELOC_V850_22_PCREL, + +/* This is a 16 bit offset from the short data area pointer. */ + BFD_RELOC_V850_SDA_16_16_OFFSET, + +/* 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, + +/* This is a 16 bit offset from the zero data area pointer. */ + BFD_RELOC_V850_ZDA_16_16_OFFSET, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 7 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_7_7_OFFSET, + +/* This is a 16 bit offset from the tiny data area pointer. */ + BFD_RELOC_V850_TDA_16_16_OFFSET, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 6 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_6_7_OFFSET, + +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_16_16_OFFSET, + +/* Used for relaxing indirect function calls. */ + BFD_RELOC_V850_LONGCALL, + +/* Used for relaxing indirect jumps. */ + BFD_RELOC_V850_LONGJUMP, + +/* Used to maintain alignment whilst relaxing. */ + BFD_RELOC_V850_ALIGN, + +/* 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 16-bit reloc. */ + BFD_RELOC_V850_16_PCREL, + +/* This is a 17-bit reloc. */ + BFD_RELOC_V850_17_PCREL, + +/* This is a 23-bit reloc. */ + BFD_RELOC_V850_23, + +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_PCREL, + +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_ABS, + +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_SPLIT_OFFSET, + +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_S1, + +/* Low 16 bits. 16 bit shifted by 1. */ + BFD_RELOC_V850_LO16_S1, + +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_15_16_OFFSET, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTPCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_16_GOT, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOT, + +/* DSO relocations. */ + BFD_RELOC_V850_22_PLT_PCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_32_PLT_PCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_COPY, + +/* DSO relocations. */ + BFD_RELOC_V850_GLOB_DAT, + +/* DSO relocations. */ + BFD_RELOC_V850_JMP_SLOT, + +/* DSO relocations. */ + BFD_RELOC_V850_RELATIVE, + +/* DSO relocations. */ + BFD_RELOC_V850_16_GOTOFF, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTOFF, + +/* start code. */ + BFD_RELOC_V850_CODE, + +/* start data in text. */ + BFD_RELOC_V850_DATA, + +/* 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, + +/* 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, + +/* 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, + +/* This is an extended address 23-bit reloc for the tms320c54x. */ + BFD_RELOC_TIC54X_23, + +/* 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, + +/* 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, + +/* This is a 48 bit reloc for the FR30 that stores 32 bits. */ + BFD_RELOC_FR30_48, + +/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into +two sections. */ + BFD_RELOC_FR30_20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a relocation for a relative address as in a GETA instruction or +a branch. */ + BFD_RELOC_MMIX_ADDR19, + +/* This is a relocation for a relative address as in a JMP instruction. */ + BFD_RELOC_MMIX_ADDR27, + +/* 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, + +/* This is a relocation for an instruction field that may be a general +register. */ + BFD_RELOC_MMIX_REG, + +/* 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, + +/* This relocation is an assertion that the expression is not allocated as +a global register. It does not modify contents. */ + BFD_RELOC_MMIX_LOCAL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 32 bit reloc for the AVR that stores 23 bit value +into 22 bits. */ + BFD_RELOC_AVR_CALL, + +/* 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, + +/* This is a 6 bit reloc for the AVR that stores offset for ldd/std +instructions */ + BFD_RELOC_AVR_6, + +/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw +instructions */ + BFD_RELOC_AVR_6_ADIW, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Direct 12 bit. */ + BFD_RELOC_390_12, + +/* 12 bit GOT offset. */ + BFD_RELOC_390_GOT12, + +/* 32 bit PC relative PLT address. */ + BFD_RELOC_390_PLT32, + +/* Copy symbol at runtime. */ + BFD_RELOC_390_COPY, + +/* Create GOT entry. */ + BFD_RELOC_390_GLOB_DAT, + +/* Create PLT entry. */ + BFD_RELOC_390_JMP_SLOT, + +/* Adjust by program base. */ + BFD_RELOC_390_RELATIVE, + +/* 32 bit PC relative offset to GOT. */ + BFD_RELOC_390_GOTPC, + +/* 16 bit GOT offset. */ + BFD_RELOC_390_GOT16, + +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + +/* PC relative 16 bit shifted by 1. */ + BFD_RELOC_390_PC16DBL, + +/* 16 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT16DBL, + +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + +/* PC relative 32 bit shifted by 1. */ + BFD_RELOC_390_PC32DBL, + +/* 32 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT32DBL, + +/* 32 bit PC rel. GOT shifted by 1. */ + BFD_RELOC_390_GOTPCDBL, + +/* 64 bit GOT offset. */ + BFD_RELOC_390_GOT64, + +/* 64 bit PC relative PLT address. */ + BFD_RELOC_390_PLT64, + +/* 32 bit rel. offset to GOT entry. */ + BFD_RELOC_390_GOTENT, + +/* 64 bit offset to GOT. */ + BFD_RELOC_390_GOTOFF64, + +/* 12-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT12, + +/* 16-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT16, + +/* 32-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT32, + +/* 64-bit offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLT64, + +/* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */ + BFD_RELOC_390_GOTPLTENT, + +/* 16-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF16, + +/* 32-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF32, + +/* 64-bit rel. offset from the GOT to a PLT entry. */ + BFD_RELOC_390_PLTOFF64, + +/* 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, + +/* Long displacement extension. */ + BFD_RELOC_390_20, + BFD_RELOC_390_GOT20, + BFD_RELOC_390_GOTPLT20, + BFD_RELOC_390_TLS_GOTIE20, + +/* STT_GNU_IFUNC relocation. */ + BFD_RELOC_390_IRELATIVE, + +/* Score relocations +Low 16 bit for load/store */ + BFD_RELOC_SCORE_GPREL15, + +/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_DUMMY2, + BFD_RELOC_SCORE_JMP, + +/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BRANCH, + +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM30, + +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM32, + +/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_JMP, + +/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_BRANCH, + +/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BCMP, + +/* Undocumented Score relocs */ + BFD_RELOC_SCORE_GOT15, + BFD_RELOC_SCORE_GOT_LO16, + BFD_RELOC_SCORE_CALL15, + BFD_RELOC_SCORE_DUMMY_HI16, + +/* Scenix IP2K - 9-bit register number / data address */ + BFD_RELOC_IP2K_FR9, + +/* Scenix IP2K - 4-bit register/data bank number */ + BFD_RELOC_IP2K_BANK, + +/* Scenix IP2K - low 13 bits of instruction word address */ + BFD_RELOC_IP2K_ADDR16CJP, + +/* Scenix IP2K - high 3 bits of instruction word address */ + BFD_RELOC_IP2K_PAGE3, + +/* Scenix IP2K - ext/low/high 8 bits of data address */ + BFD_RELOC_IP2K_LO8DATA, + BFD_RELOC_IP2K_HI8DATA, + BFD_RELOC_IP2K_EX8DATA, + +/* Scenix IP2K - low/high 8 bits of instruction word address */ + BFD_RELOC_IP2K_LO8INSN, + BFD_RELOC_IP2K_HI8INSN, + +/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */ + BFD_RELOC_IP2K_PC_SKIP, + +/* Scenix IP2K - 16 bit word address in text section. */ + BFD_RELOC_IP2K_TEXT, + +/* Scenix IP2K - 7-bit sp or dp offset */ + BFD_RELOC_IP2K_FR_OFFSET, + +/* Scenix VPE4K coprocessor - data/insn-space addressing */ + BFD_RELOC_VPE4KMATH_DATA, + BFD_RELOC_VPE4KMATH_INSN, + +/* 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. + +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. + +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, + +/* 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, + +/* Motorola 68HC11 reloc. +This is the 8 bit high part of an absolute address. */ + BFD_RELOC_M68HC11_HI8, + +/* Motorola 68HC11 reloc. +This is the 8 bit low part of an absolute address. */ + BFD_RELOC_M68HC11_LO8, + +/* Motorola 68HC11 reloc. +This is the 3 bit of a value. */ + BFD_RELOC_M68HC11_3B, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Motorola 68HC12 reloc. +This is the 5 bits of a value. */ + BFD_RELOC_M68HC12_5B, + +/* Freescale XGATE reloc. +This reloc marks the beginning of a bra/jal instruction. */ + BFD_RELOC_XGATE_RL_JUMP, + +/* 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, + +/* 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, + +/* Freescale XGATE reloc. */ + BFD_RELOC_XGATE_GPAGE, + +/* Freescale XGATE reloc. */ + BFD_RELOC_XGATE_24, + +/* Freescale XGATE reloc. +This is a 9-bit pc-relative reloc. */ + BFD_RELOC_XGATE_PCREL_9, + +/* Freescale XGATE reloc. +This is a 10-bit pc-relative reloc. */ + BFD_RELOC_XGATE_PCREL_10, + +/* 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, + +/* 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, + +/* Freescale XGATE reloc. +This is a 3-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM3, + +/* Freescale XGATE reloc. +This is a 4-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM4, + +/* Freescale XGATE reloc. +This is a 5-bit pc-relative reloc. */ + BFD_RELOC_XGATE_IMM5, + +/* Motorola 68HC12 reloc. +This is the 9 bits of a value. */ + BFD_RELOC_M68HC12_9B, + +/* Motorola 68HC12 reloc. +This is the 16 bits of a value. */ + BFD_RELOC_M68HC12_16B, + +/* Motorola 68HC12/XGATE reloc. +This is a PCREL9 branch. */ + BFD_RELOC_M68HC12_9_PCREL, + +/* Motorola 68HC12/XGATE reloc. +This is a PCREL10 branch. */ + BFD_RELOC_M68HC12_10_PCREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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_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, + +/* 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, + +/* Sony Xstormy16 Relocations. */ + BFD_RELOC_XSTORMY16_REL_12, + BFD_RELOC_XSTORMY16_12, + BFD_RELOC_XSTORMY16_24, + BFD_RELOC_XSTORMY16_FPTR16, + +/* Self-describing complex relocations. */ + BFD_RELOC_RELC, + + +/* Infineon Relocations. */ + BFD_RELOC_XC16X_PAG, + BFD_RELOC_XC16X_POF, + BFD_RELOC_XC16X_SEG, + BFD_RELOC_XC16X_SOF, + +/* Relocations used by VAX ELF. */ + BFD_RELOC_VAX_GLOB_DAT, + BFD_RELOC_VAX_JMP_SLOT, + BFD_RELOC_VAX_RELATIVE, + +/* Morpho MT - 16 bit immediate relocation. */ + BFD_RELOC_MT_PC16, + +/* Morpho MT - Hi 16 bits of an address. */ + BFD_RELOC_MT_HI16, + +/* Morpho MT - Low 16 bits of an address. */ + BFD_RELOC_MT_LO16, + +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTINHERIT, + +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTENTRY, + +/* Morpho MT - 8 bit immediate relocation. */ + BFD_RELOC_MT_PCINSN8, + +/* 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, + +/* IQ2000 Relocations. */ + BFD_RELOC_IQ2000_OFFSET_16, + BFD_RELOC_IQ2000_OFFSET_21, + BFD_RELOC_IQ2000_UHI16, + +/* 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, + +/* Xtensa relocations for ELF shared objects. */ + BFD_RELOC_XTENSA_GLOB_DAT, + BFD_RELOC_XTENSA_JMP_SLOT, + BFD_RELOC_XTENSA_RELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 8 bit signed offset in (ix+d) or (iy+d). */ + BFD_RELOC_Z80_DISP8, + +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + +/* DJNZ offset. */ + BFD_RELOC_Z8K_DISP7, + +/* CALR offset. */ + BFD_RELOC_Z8K_CALLR, + +/* 4 bit value. */ + BFD_RELOC_Z8K_IMM4L, + +/* 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, + +/* Difference between two section addreses. Must be followed by a +BFD_RELOC_MACH_O_PAIR. */ + BFD_RELOC_MACH_O_SECTDIFF, + +/* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */ + BFD_RELOC_MACH_O_LOCAL_SECTDIFF, + +/* Pair of relocation. Contains the first symbol. */ + BFD_RELOC_MACH_O_PAIR, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + +/* 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, + +/* Used when referencing a GOT entry. */ + BFD_RELOC_MACH_O_X86_64_GOT, + +/* 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, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_1, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_2, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_4, + +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 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 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 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 for the microblaze to handle +expressions of the form "Symbol Op Symbol" */ + BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, + +/* 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 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 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 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 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 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, + +/* 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, + +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, + +/* 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, + +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, + +/* 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, + +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, + +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_COPY, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_GLOB_DAT, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_JUMP_SLOT, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + +/* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ + BFD_RELOC_EPIPHANY_SIMM8, + +/* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */ + BFD_RELOC_EPIPHANY_SIMM24, + +/* Adapteva EPIPHANY - 16 most-significant bits of absolute address */ + BFD_RELOC_EPIPHANY_HIGH, + +/* Adapteva EPIPHANY - 16 least-significant bits of absolute address */ + BFD_RELOC_EPIPHANY_LOW, + +/* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */ + BFD_RELOC_EPIPHANY_SIMM11, + +/* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */ + BFD_RELOC_EPIPHANY_IMM11, + +/* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ + BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, + BFD_RELOC_UNUSED }; + +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); + +const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); + +/* Extracted from syms.c. */ + +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. + + 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. */ + + /* 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) + + 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; + +#define bfd_get_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + +bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); + +bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); + +#define bfd_is_local_label_name(abfd, name) \ + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + +bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); + +#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)) + +bfd_boolean 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,ptr,size) \ + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + +int bfd_decode_symclass (asymbol *symbol); + +bfd_boolean bfd_is_undefined_symclass (int symclass); + +void bfd_symbol_info (asymbol *symbol, symbol_info *ret); + +bfd_boolean 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 bfd.c. */ + +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. */ + const char *filename; + + /* A pointer to the target jump table. */ + const struct bfd_target *xvec; + + /* The IOSTREAM, and corresponding IO vector that provide access + to the file backing the BFD. */ + void *iostream; + const struct bfd_iovec *iovec; + + /* The caching routines use these to maintain a + least-recently-used list of BFDs. */ + struct bfd *lru_prev, *lru_next; + + /* 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; + + /* File modified time, if mtime_set is TRUE. */ + long mtime; + + /* A unique identifier of the BFD */ + unsigned int id; + + /* The format which belongs to the BFD. (object, core, etc.) */ + ENUM_BITFIELD (bfd_format) format : 3; + + /* The direction with which the BFD was opened. */ + ENUM_BITFIELD (bfd_direction) direction : 2; + + /* Format_specific flags. */ + flagword flags; + + /* 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). */ + +#define BFD_NO_FLAGS 0x0 + + /* BFD contains relocation entries. */ +#define HAS_RELOC 0x1 + + /* BFD is directly executable. */ +#define EXEC_P 0x2 + + /* BFD has line number information (basically used for F_LNNO in a + COFF header). */ +#define HAS_LINENO 0x4 + + /* BFD has debugging information. */ +#define HAS_DEBUG 0x08 + + /* BFD has symbols. */ +#define HAS_SYMS 0x10 + + /* BFD has local symbols (basically used for F_LSYMS in a COFF + header). */ +#define HAS_LOCALS 0x20 + + /* BFD is a dynamic object. */ +#define DYNAMIC 0x40 + + /* 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 + + /* 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 + + /* 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 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 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 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 + + /* Decompress sections in this BFD. */ +#define BFD_DECOMPRESS 0x8000 + + /* BFD is a dummy, for plugins. */ +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 + + /* 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) + + /* 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) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; + + /* Currently my_archive is tested before adding origin to + anything. I believe that this can become always an add of + origin, with origin set to 0 for non archive files. */ + 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; + + /* Pointer to linked list of sections. */ + struct bfd_section *sections; + + /* The last section on the section list. */ + struct bfd_section *section_last; + + /* The number of sections. */ + unsigned int section_count; + + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + + /* Stuff only useful for object files: + The start address. */ + bfd_vma start_address; + + /* Symbol table for output BFD (with symcount entries). + Also used by the linker to cache input BFD symbols. */ + struct bfd_symbol **outsymbols; + + /* Used for input and output. */ + unsigned int symcount; + + /* Used for slurped dynamic symbol tables. */ + unsigned int dynsymcount; + + /* Pointer to structure which contains architecture information. */ + const struct bfd_arch_info *arch_info; + + /* 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. */ + + 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 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; + + /* 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; + + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + +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; + +bfd_error_type bfd_get_error (void); + +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); + +const char *bfd_errmsg (bfd_error_type error_tag); + +void bfd_perror (const char *message); + + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; + +bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); + +void bfd_set_error_program_name (const char *); + + +typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, + const char *bfd_version, + const char *bfd_file, + int bfd_line); + +bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); + +long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); + +long bfd_canonicalize_reloc + (bfd *abfd, asection *sec, arelent **loc, asymbol **syms); + +void bfd_set_reloc + (bfd *abfd, asection *sec, arelent **rel, unsigned int count); + +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) +bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); + +int bfd_get_arch_size (bfd *abfd); + +int bfd_get_sign_extend_vma (bfd *abfd); + +bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); + +unsigned int bfd_get_gp_size (bfd *abfd); + +void bfd_set_gp_size (bfd *abfd, unsigned int i); + +bfd_vma bfd_scan_vma (const char *string, const char **end, int base); + +bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); + +#define bfd_copy_private_header_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) +bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); + +#define bfd_copy_private_bfd_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) +bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); + +#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)) + +#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)) + +#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, _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)) + +#define bfd_discard_group(abfd, sec) \ + BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) + +#define bfd_link_hash_table_create(abfd) \ + BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) + +#define bfd_link_add_symbols(abfd, info) \ + BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) + +#define bfd_link_just_syms(abfd, sec, info) \ + BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) + +#define bfd_final_link(abfd, info) \ + BFD_SEND (abfd, _bfd_final_link, (abfd, info)) + +#define bfd_free_cached_info(abfd) \ + BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) + +#define bfd_get_dynamic_symtab_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) + +#define bfd_print_private_bfd_data(abfd, file)\ + BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) + +#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ + BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) + +#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ + BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ + dyncount, dynsyms, ret)) + +#define bfd_get_dynamic_reloc_upper_bound(abfd) \ + BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) + +#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 *, + bfd_boolean, asymbol **); + +bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); + +bfd_vma bfd_emul_get_maxpagesize (const char *); + +void bfd_emul_set_maxpagesize (const char *, bfd_vma); + +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); + +void bfd_emul_set_commonpagesize (const char *, bfd_vma); + +char *bfd_demangle (bfd *, const char *, int); + +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + +/* Extracted from archive.c. */ +symindex bfd_get_next_mapent + (bfd *abfd, symindex previous, carsym **sym); + +bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); + +bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); + +/* Extracted from corefile.c. */ +const char *bfd_core_file_failing_command (bfd *abfd); + +int bfd_core_file_failing_signal (bfd *abfd); + +int bfd_core_file_pid (bfd *abfd); + +bfd_boolean core_file_matches_executable_p + (bfd *core_bfd, bfd *exec_bfd); + +bfd_boolean generic_core_file_matches_executable_p + (bfd *core_bfd, bfd *exec_bfd); + +/* Extracted from targets.c. */ +#define BFD_SEND(bfd, message, arglist) \ + ((*((bfd)->xvec->message)) arglist) + +#ifdef DEBUG_BFD_SEND +#undef BFD_SEND +#define BFD_SEND(bfd, message, arglist) \ + (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ + ((*((bfd)->xvec->message)) arglist) : \ + (bfd_assert (__FILE__,__LINE__), NULL)) +#endif +#define BFD_SEND_FMT(bfd, message, arglist) \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) + +#ifdef DEBUG_BFD_SEND +#undef BFD_SEND_FMT +#define BFD_SEND_FMT(bfd, message, arglist) \ + (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ + (bfd_assert (__FILE__,__LINE__), NULL)) +#endif + +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 struct bfd_target +{ + /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ + const char *name; + + /* The "flavour" of a back end is a general indication about + the contents of a file. */ + enum bfd_flavour flavour; + + /* The order of bytes within the data area of a file. */ + enum bfd_endian byteorder; + + /* The order of bytes within the header parts of a file. */ + enum bfd_endian header_byteorder; + + /* A mask of all the flags which an executable may have set - + from the set <>, <>, ...<>. */ + flagword object_flags; + + /* A mask of all the flags which a section may have set - from + the set <>, <>, ...<>. */ + flagword section_flags; + + /* The character normally found at the front of a symbol. + (if any), perhaps `_'. */ + char symbol_leading_char; + + /* The pad character for file names within an archive header. */ + char ar_pad_char; + + /* The maximum number of characters in an archive header. */ + unsigned char ar_max_namelen; + + /* How well this target matches, used to select between various + possible targets when more than one target matches. */ + unsigned char match_priority; + + /* Entries for byte swapping for data. These are different from the + other entry points, since they don't take a BFD as the first argument. + Certain other handlers could do the same. */ + bfd_uint64_t (*bfd_getx64) (const void *); + bfd_int64_t (*bfd_getx_signed_64) (const void *); + void (*bfd_putx64) (bfd_uint64_t, void *); + bfd_vma (*bfd_getx32) (const void *); + bfd_signed_vma (*bfd_getx_signed_32) (const void *); + void (*bfd_putx32) (bfd_vma, void *); + bfd_vma (*bfd_getx16) (const void *); + bfd_signed_vma (*bfd_getx_signed_16) (const void *); + void (*bfd_putx16) (bfd_vma, void *); + + /* Byte swapping for the headers. */ + bfd_uint64_t (*bfd_h_getx64) (const void *); + bfd_int64_t (*bfd_h_getx_signed_64) (const void *); + void (*bfd_h_putx64) (bfd_uint64_t, void *); + bfd_vma (*bfd_h_getx32) (const void *); + bfd_signed_vma (*bfd_h_getx_signed_32) (const void *); + void (*bfd_h_putx32) (bfd_vma, void *); + bfd_vma (*bfd_h_getx16) (const void *); + bfd_signed_vma (*bfd_h_getx_signed_16) (const void *); + void (*bfd_h_putx16) (bfd_vma, void *); + + /* Format dependent routines: these are vectors of entry points + within the target vector structure, one for each format to check. */ + + /* Check the format of a file being read. Return a <> or zero. */ + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); + + /* Set the format of a file being written. */ + bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); + + /* Write cached information into a file being written, at <>. */ + bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); + + + /* Generic entry points. */ +#define BFD_JUMP_TABLE_GENERIC(NAME) \ + NAME##_close_and_cleanup, \ + NAME##_bfd_free_cached_info, \ + NAME##_new_section_hook, \ + NAME##_get_section_contents, \ + NAME##_get_section_contents_in_window + + /* Called when the BFD is being closed to do any necessary cleanup. */ + bfd_boolean (*_close_and_cleanup) (bfd *); + /* Ask the BFD to free all cached information. */ + bfd_boolean (*_bfd_free_cached_info) (bfd *); + /* Called when a new section is created. */ + bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); + /* Read the contents of a section. */ + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); + + /* Entry points to copy private data. */ +#define BFD_JUMP_TABLE_COPY(NAME) \ + NAME##_bfd_copy_private_bfd_data, \ + NAME##_bfd_merge_private_bfd_data, \ + _bfd_generic_init_private_section_data, \ + NAME##_bfd_copy_private_section_data, \ + NAME##_bfd_copy_private_symbol_data, \ + NAME##_bfd_copy_private_header_data, \ + NAME##_bfd_set_private_flags, \ + NAME##_bfd_print_private_bfd_data + + /* Called to copy BFD general private data from one object file + to another. */ + bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); + /* Called to merge BFD general private data from one object file + to a common output file when linking. */ + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); + /* Called to initialize BFD private section data from one object file + to another. */ +#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); + /* Called to copy BFD private section data from one object file + to another. */ + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); + /* Called to copy BFD private symbol data from one symbol + to another. */ + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); + /* Called to copy BFD private header data from one object file + to another. */ + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); + /* Called to set private backend flags. */ + bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); + + /* Called to print private BFD data. */ + bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); + + /* Core file entry points. */ +#define BFD_JUMP_TABLE_CORE(NAME) \ + NAME##_core_file_failing_command, \ + NAME##_core_file_failing_signal, \ + NAME##_core_file_matches_executable_p, \ + NAME##_core_file_pid + + char * (*_core_file_failing_command) (bfd *); + int (*_core_file_failing_signal) (bfd *); + bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); + int (*_core_file_pid) (bfd *); + + /* Archive entry points. */ +#define BFD_JUMP_TABLE_ARCHIVE(NAME) \ + NAME##_slurp_armap, \ + NAME##_slurp_extended_name_table, \ + NAME##_construct_extended_name_table, \ + NAME##_truncate_arname, \ + NAME##_write_armap, \ + NAME##_read_ar_hdr, \ + NAME##_write_ar_hdr, \ + NAME##_openr_next_archived_file, \ + NAME##_get_elt_at_index, \ + NAME##_generic_stat_arch_elt, \ + NAME##_update_armap_timestamp + + bfd_boolean (*_bfd_slurp_armap) (bfd *); + bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); + void (*_bfd_truncate_arname) (bfd *, const char *, char *); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); + void * (*_bfd_read_ar_hdr_fn) (bfd *); + bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); + bfd * (*openr_next_archived_file) (bfd *, bfd *); +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) + bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); + int (*_bfd_stat_arch_elt) (bfd *, struct stat *); + bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); + + /* Entry points used for symbols. */ +#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ + NAME##_get_symtab_upper_bound, \ + NAME##_canonicalize_symtab, \ + NAME##_make_empty_symbol, \ + NAME##_print_symbol, \ + NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ + NAME##_bfd_is_local_label_name, \ + NAME##_bfd_is_target_special_symbol, \ + NAME##_get_lineno, \ + NAME##_find_nearest_line, \ + NAME##_find_line, \ + NAME##_find_inliner_info, \ + NAME##_bfd_make_debug_symbol, \ + NAME##_read_minisymbols, \ + NAME##_minisymbol_to_symbol + + long (*_bfd_get_symtab_upper_bound) (bfd *); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); + struct bfd_symbol * + (*_bfd_make_empty_symbol) (bfd *); + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#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 *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) + bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); + bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); + alent * (*_get_lineno) (bfd *, struct bfd_symbol *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); + bfd_boolean (*_bfd_find_inliner_info) + (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); +#define bfd_read_minisymbols(b, d, m, s) \ + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); +#define bfd_minisymbol_to_symbol(b, d, m, f) \ + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); + + /* Routines for relocs. */ +#define BFD_JUMP_TABLE_RELOCS(NAME) \ + NAME##_get_reloc_upper_bound, \ + NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ + NAME##_bfd_reloc_type_lookup, \ + NAME##_bfd_reloc_name_lookup + + long (*_get_reloc_upper_bound) (bfd *, sec_ptr); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); + /* See documentation on reloc types. */ + reloc_howto_type * + (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); + reloc_howto_type * + (*reloc_name_lookup) (bfd *, const char *); + + /* Routines used when writing an object file. */ +#define BFD_JUMP_TABLE_WRITE(NAME) \ + NAME##_set_arch_mach, \ + NAME##_set_section_contents + + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); + + /* Routines used by the linker. */ +#define BFD_JUMP_TABLE_LINK(NAME) \ + NAME##_sizeof_headers, \ + NAME##_bfd_get_relocated_section_contents, \ + NAME##_bfd_relax_section, \ + NAME##_bfd_link_hash_table_create, \ + NAME##_bfd_link_add_symbols, \ + NAME##_bfd_link_just_syms, \ + NAME##_bfd_copy_link_hash_symbol_type, \ + NAME##_bfd_final_link, \ + NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ + NAME##_bfd_gc_sections, \ + NAME##_bfd_lookup_section_flags, \ + NAME##_bfd_merge_sections, \ + NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ + NAME##_bfd_discard_group, \ + NAME##_section_already_linked, \ + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop + + int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); + + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); + + /* Create a hash table for the linker. Different backends store + different information in this table. */ + struct bfd_link_hash_table * + (*_bfd_link_hash_table_create) (bfd *); + + /* Add symbols from this object file into the hash table. */ + bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); + + /* Indicate that we are only retrieving symbol values from this section. */ + void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); + + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ +#define bfd_copy_link_hash_symbol_type(b, t, f) \ + BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) + void (*_bfd_copy_link_hash_symbol_type) (bfd *, + struct bfd_link_hash_entry *, + struct bfd_link_hash_entry *); + + /* Do a link based on the link_order structures attached to each + section of the BFD. */ + bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); + + /* Should this section be split up into smaller pieces during linking. */ + bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + + /* Remove sections that are not referenced from the output. */ + bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); + + /* Sets the bitmask of allowed and disallowed section flags. */ + bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, + struct flag_info *, asection *); + + /* Attempt to merge SEC_MERGE sections. */ + bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); + + /* Is this section a member of a group? */ + bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + + /* Discard members of a group. */ + bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); + + /* Check if SEC has been already linked during a reloceatable or + final link. */ + bfd_boolean (*_section_already_linked) (bfd *, asection *, + struct bfd_link_info *); + + /* Define a common symbol. */ + bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *); + + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + + /* Routines to handle dynamic symbols and relocs. */ +#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ + NAME##_get_dynamic_symtab_upper_bound, \ + NAME##_canonicalize_dynamic_symtab, \ + NAME##_get_synthetic_symtab, \ + NAME##_get_dynamic_reloc_upper_bound, \ + NAME##_canonicalize_dynamic_reloc + + /* Get the amount of memory required to hold the dynamic symbols. */ + long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); + /* Read in the dynamic symbols. */ + 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 **); + /* 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 **); + + /* Opposite endian version of this target. */ + const struct bfd_target *alternative_target; + + /* Data for use by back-end routines, which isn't + generic enough to belong in this structure. */ + const void *backend_data; + +} bfd_target; + +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + +bfd_boolean bfd_set_default_target (const char *name); + +const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); + +const bfd_target *bfd_get_target_info (const char *target_name, + bfd *abfd, + bfd_boolean *is_bigendian, + int *underscoring, + const char **def_target_arch); +const char ** bfd_target_list (void); + +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); + +/* Extracted from format.c. */ +bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); + +bfd_boolean bfd_check_format_matches + (bfd *abfd, bfd_format format, char ***matching); + +bfd_boolean 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) + +bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); + +#define bfd_link_split_section(abfd, sec) \ + BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) + +bfd_boolean bfd_section_already_linked (bfd *abfd, + asection *sec, + struct bfd_link_info *info); + +#define bfd_section_already_linked(abfd, sec, info) \ + BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) + +bfd_boolean bfd_generic_define_common_symbol + (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, bfd_boolean *hide); + +bfd_boolean bfd_hide_sym_by_version + (struct bfd_elf_version_tree *verdefs, const char *sym_name); + +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ +bfd_boolean bfd_get_full_section_contents + (bfd *abfd, asection *section, bfd_byte **ptr); + +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + +bfd_boolean bfd_is_section_compressed + (bfd *abfd, asection *section); + +bfd_boolean bfd_init_section_decompress_status + (bfd *abfd, asection *section); + +bfd_boolean bfd_init_section_compress_status + (bfd *abfd, asection *section); + +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h new file mode 100644 index 000000000..eb208f55a --- /dev/null +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h @@ -0,0 +1,51 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* generated for aarch64_be--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */ + +#ifndef GCC_GENERATED_STDINT_H +#define GCC_GENERATED_STDINT_H 1 + +#include +#include +/* glibc uses these symbols as guards to prevent redefinitions. */ +#ifdef __int8_t_defined +#define _INT8_T +#define _INT16_T +#define _INT32_T +#endif +#ifdef __uint32_t_defined +#define _UINT32_T +#endif + + +/* Some systems have guard macros to prevent redefinitions, define them. */ +#ifndef _INT8_T +#define _INT8_T +#endif +#ifndef _INT16_T +#define _INT16_T +#endif +#ifndef _INT32_T +#define _INT32_T +#endif +#ifndef _UINT8_T +#define _UINT8_T +#endif +#ifndef _UINT16_T +#define _UINT16_T +#endif +#ifndef _UINT32_T +#define _UINT32_T +#endif + +/* system headers have good uint64_t and int64_t */ +#ifndef _INT64_T +#define _INT64_T +#endif +#ifndef _UINT64_T +#define _UINT64_T +#endif + +#endif /* GCC_GENERATED_STDINT_H */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfdver.h new file mode 100644 index 000000000..35cba00d4 --- /dev/null +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfdver.h @@ -0,0 +1,26 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" +#define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/config.h b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/config.h new file mode 100644 index 000000000..588e281a2 --- /dev/null +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/config.h @@ -0,0 +1,423 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Name of host specific core header file to include in elf.c. */ +/* #undef CORE_HEADER */ + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the declaration of `basename', and to 0 if you + don't. */ +#define HAVE_DECL_BASENAME 0 + +/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 + +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. + */ +#define HAVE_DECL_FSEEKO 1 + +/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you + don't. */ +#define HAVE_DECL_FSEEKO64 0 + +/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. + */ +#define HAVE_DECL_FTELLO 1 + +/* Define to 1 if you have the declaration of `ftello64', and to 0 if you + don't. */ +#define HAVE_DECL_FTELLO64 0 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdopen' function. */ +#define HAVE_FDOPEN 1 + +/* Define to 1 if you have the `fileno' function. */ +#define HAVE_FILENO 1 + +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + +/* Define to 1 if you have the `fopen64' function. */ +/* #undef HAVE_FOPEN64 */ + +/* Define to 1 if you have the `fseeko' function. */ +#define HAVE_FSEEKO 1 + +/* Define to 1 if you have the `fseeko64' function. */ +/* #undef HAVE_FSEEKO64 */ + +/* Define to 1 if you have the `ftello' function. */ +#define HAVE_FTELLO 1 + +/* Define to 1 if you have the `ftello64' function. */ +/* #undef HAVE_FTELLO64 */ + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + +/* Define if has lwpstatus_t. */ +/* #undef HAVE_LWPSTATUS_T */ + +/* Define if has lwpstatus_t.pr_context. */ +/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */ + +/* Define if has lwpstatus_t.pr_fpreg. */ +/* #undef HAVE_LWPSTATUS_T_PR_FPREG */ + +/* Define if has lwpstatus_t.pr_reg. */ +/* #undef HAVE_LWPSTATUS_T_PR_REG */ + +/* Define if has lwpxstatus_t. */ +/* #undef HAVE_LWPXSTATUS_T */ + +/* Define to 1 if you have the `madvise' function. */ +#define HAVE_MADVISE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define if has prpsinfo32_t. */ +/* #undef HAVE_PRPSINFO32_T */ + +/* Define if has prpsinfo32_t.pr_pid. */ +/* #undef HAVE_PRPSINFO32_T_PR_PID */ + +/* Define if has prpsinfo_t. */ +/* #undef HAVE_PRPSINFO_T */ + +/* Define if has prpsinfo_t.pr_pid. */ +/* #undef HAVE_PRPSINFO_T_PR_PID */ + +/* Define if has prstatus32_t. */ +/* #undef HAVE_PRSTATUS32_T */ + +/* Define if has prstatus32_t.pr_who. */ +/* #undef HAVE_PRSTATUS32_T_PR_WHO */ + +/* Define if has prstatus_t. */ +/* #undef HAVE_PRSTATUS_T */ + +/* Define if has prstatus_t.pr_who. */ +/* #undef HAVE_PRSTATUS_T_PR_WHO */ + +/* Define if has psinfo32_t. */ +/* #undef HAVE_PSINFO32_T */ + +/* Define if has psinfo32_t.pr_pid. */ +/* #undef HAVE_PSINFO32_T_PR_PID */ + +/* Define if has psinfo_t. */ +/* #undef HAVE_PSINFO_T */ + +/* Define if has psinfo_t.pr_pid. */ +/* #undef HAVE_PSINFO_T_PR_PID */ + +/* Define if has pstatus32_t. */ +/* #undef HAVE_PSTATUS32_T */ + +/* Define if has pstatus_t. */ +/* #undef HAVE_PSTATUS_T */ + +/* Define if has pxstatus_t. */ +/* #undef HAVE_PXSTATUS_T */ + +/* Define to 1 if you have the `setitimer' function. */ +#define HAVE_SETITIMER 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* Define if struct core_dumpx has member c_impl */ +/* #undef HAVE_ST_C_IMPL */ + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PROCFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define if has win32_pstatus_t. */ +/* #undef HAVE_WIN32_PSTATUS_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "bfd" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bfd" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "bfd 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bfd" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Name of host specific header file to include in trad-core.c. */ +/* #undef TRAD_HEADER */ + +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Define if we should use leading underscore on 64 bit mingw targets */ +/* #undef USE_MINGW64_LEADING_UNDERSCORES */ + +/* Use mmap if it's available? */ +/* #undef USE_MMAP */ + +/* Define if we should default to creating read-only plt entries */ +/* #undef USE_SECUREPLT */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..31ccca3c4 --- /dev/null +++ b/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/defs.mk @@ -0,0 +1,10 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libbfd_la_DEPENDENCIES=elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-aarch64.lo elf32.lo elf32-arm.lo elf-nacl.lo elf-vxworks.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-aarch64.lo cpu-arm.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 +G_DEFS=-DHAVE_CONFIG_H +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=aarch64_elf64_be_vec -DSELECT_VECS='&aarch64_elf64_be_vec,&aarch64_elf64_le_vec,&aarch64_elf32_le_vec,&aarch64_elf32_be_vec,&arm_elf32_be_vec,&arm_elf32_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_aarch64_arch,&bfd_arm_arch' +G_HAVEVECS=-DHAVE_aarch64_elf64_be_vec -DHAVE_aarch64_elf64_le_vec -DHAVE_aarch64_elf32_le_vec -DHAVE_aarch64_elf32_be_vec -DHAVE_arm_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h index eca2773c6..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h index 42091c49e..6a35ac193 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for alpha--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for alpha--netbsd-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/alpha/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h b/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h index ce31e69d8..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/alpha/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/alpha/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/alpha/defs.mk index c39857d8b..f75ac3e2e 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/alpha/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/alpha/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-alpha.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo coff-alpha.lo ecoff.lo ecofflink.lo elf64-gen.lo elf32-gen.lo elf32.lo cpu-alpha.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-alpha.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo coff-alpha.lo ecoff.lo ecofflink.lo coffgen.lo elf64-gen.lo elf32-gen.lo elf32.lo plugin.lo cpu-alpha.lo netbsd-core.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_alpha_vec -DHAVE_ecoffalpha_little_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_alpha_vec -DSELECT_VECS='&bfd_elf64_alpha_vec,&ecoffalpha_little_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_alpha_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=alpha_elf64_vec -DSELECT_VECS='&alpha_elf64_vec,&alpha_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_alpha_arch' +G_HAVEVECS=-DHAVE_alpha_elf64_vec -DHAVE_alpha_ecoff_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/arm/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/arm/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/arm/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/arm/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/arm/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/arm/bfd_stdint.h index 139c90a39..2c13f2e28 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/arm/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/arm/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for arm--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for arm--netbsdelf-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/arm/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/arm/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/arm/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/arm/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/arm/config.h b/external/gpl3/binutils/lib/libbfd/arch/arm/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/arm/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/arm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/arm/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/arm/defs.mk index 2b158e406..3ddf69580 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/arm/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/arm/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_littlearm_vec -DSELECT_VECS='&bfd_elf32_littlearm_vec,&bfd_elf32_bigarm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_le_vec -DSELECT_VECS='&arm_elf32_le_vec,&arm_elf32_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd_stdint.h index ca525c084..ac6a06d9e 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for armeb--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for armeb--netbsdelf-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/armeb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/armeb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/armeb/config.h b/external/gpl3/binutils/lib/libbfd/arch/armeb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/armeb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/armeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/armeb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/armeb/defs.mk index 03b8fe2cd..2e3ce993a 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/armeb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/armeb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf32_littlearm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_bigarm_vec -DSELECT_VECS='&bfd_elf32_bigarm_vec,&bfd_elf32_littlearm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_be_vec -DSELECT_VECS='&arm_elf32_be_vec,&arm_elf32_le_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd.h index 85ecdcb1e..c30c7f943 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", @@ -11,9 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2015 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -73,7 +71,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +82,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -285,7 +283,7 @@ alent; /* Object and core file sections. */ #define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) typedef struct bfd_section *sec_ptr; @@ -305,13 +303,13 @@ typedef struct bfd_section *sec_ptr; #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) +#define bfd_get_section_limit_octets(bfd, sec) \ + ((bfd)->direction != write_direction && (sec)->rawsize != 0 \ + ? (sec)->rawsize : (sec)->size) + /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) + (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd)) /* Return TRUE if input section SEC has been discarded. */ #define discarded_section(sec) \ @@ -450,6 +448,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -530,8 +538,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) - extern bfd_boolean bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ @@ -659,6 +665,8 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); +extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *, + const char *, bfd_vma); extern bfd_boolean bfd_elf_size_dynamic_sections (bfd *, const char *, const char *, const char *, const char *, const char *, const char * const *, struct bfd_link_info *, struct bfd_section **); @@ -674,7 +682,7 @@ extern int bfd_elf_get_dyn_lib_class (bfd *); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info +extern int bfd_elf_discard_info (bfd *, struct bfd_link_info *); extern unsigned int _bfd_elf_default_action_discarded (struct bfd_section *); @@ -696,19 +704,21 @@ extern int bfd_get_elf_phdrs (bfd *abfd, void *phdrs); /* 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. + 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. */ + 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_vma *loadbasep, + (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)); @@ -820,12 +830,6 @@ struct internal_syment; union internal_auxent; #endif -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - extern bfd_boolean bfd_coff_set_symbol_class (bfd *, struct bfd_symbol *, unsigned int); @@ -856,6 +860,23 @@ extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan extern void bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *, struct bfd_link_info *); +/* ARM STM STM32L4XX erratum workaround support. */ +typedef enum +{ + BFD_ARM_STM32L4XX_FIX_NONE, + BFD_ARM_STM32L4XX_FIX_DEFAULT, + BFD_ARM_STM32L4XX_FIX_ALL +} bfd_arm_stm32l4xx_fix; + +extern void bfd_elf32_arm_set_stm32l4xx_fix + (bfd *, struct bfd_link_info *); + +extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan + (bfd *, struct bfd_link_info *); + +extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations + (bfd *, struct bfd_link_info *); + /* ARM Interworking support. Called from linker. */ extern bfd_boolean bfd_arm_allocate_interworking_sections (struct bfd_link_info *); @@ -885,7 +906,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation void bfd_elf32_arm_set_target_relocs (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); + bfd_arm_stm32l4xx_fix, int, int, int, int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -893,15 +914,19 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); -/* ELF ARM mapping symbol support */ +/* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); +extern bfd_boolean bfd_is_arm_special_symbol_name + (const char *, int); + +extern void bfd_elf32_arm_set_byteswap_code + (struct bfd_link_info *, int); + +extern void bfd_elf32_arm_use_long_plt (void); /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines @@ -920,7 +945,8 @@ extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); extern bfd_boolean elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); + struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int), + void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); @@ -942,8 +968,14 @@ extern unsigned int _bfd_elf_ppc_at_tprel_transform extern void bfd_elf64_aarch64_init_maps (bfd *); -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); +extern void bfd_elf32_aarch64_init_maps + (bfd *); + +extern void bfd_elf64_aarch64_set_options + (bfd *, struct bfd_link_info *, int, int, int, int, int); + +extern void bfd_elf32_aarch64_set_options + (bfd *, struct bfd_link_info *, int, int, int, int, int); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -953,7 +985,7 @@ void bfd_elf64_aarch64_set_options extern bfd_boolean bfd_is_aarch64_special_symbol_name (const char * name, int type); -/* AArch64 stub generation support. Called from the linker. */ +/* AArch64 stub generation support for ELF64. Called from the linker. */ extern int elf64_aarch64_setup_section_lists (bfd *, struct bfd_link_info *); extern void elf64_aarch64_next_input_section @@ -964,7 +996,19 @@ extern bfd_boolean elf64_aarch64_size_stubs void (*) (void)); extern bfd_boolean elf64_aarch64_build_stubs (struct bfd_link_info *); - +/* AArch64 stub generation support for ELF32. Called from the linker. */ +extern int elf32_aarch64_setup_section_lists + (bfd *, struct bfd_link_info *); +extern void elf32_aarch64_next_input_section + (struct bfd_link_info *, struct bfd_section *); +extern bfd_boolean elf32_aarch64_size_stubs + (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, + struct bfd_section * (*) (const char *, struct bfd_section *), + void (*) (void)); +extern bfd_boolean elf32_aarch64_build_stubs + (struct bfd_link_info *); + + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page (struct bfd_section *, int); @@ -983,30 +1027,17 @@ extern void bfd_elf32_ia64_after_parse extern void bfd_elf64_ia64_after_parse (int); -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); +/* V850 Note manipulation routines. */ +extern bfd_boolean v850_elf_create_sections + (struct bfd_link_info *); +extern bfd_boolean v850_elf_set_note + (bfd *, unsigned int, unsigned int); /* Extracted from init.c. */ void bfd_init (void); /* 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); @@ -1015,7 +1046,7 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,8 +1082,16 @@ 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); @@ -1183,6 +1222,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +1230,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1369,6 +1409,10 @@ typedef struct bfd_section executables or shared objects. This is for COFF only. */ #define SEC_COFF_SHARED 0x8000000 + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 + /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, @@ -1376,11 +1420,18 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ #define SEC_TIC54X_CLINK 0x20000000 + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ #define SEC_COFF_NOREAD 0x40000000 @@ -1420,6 +1471,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1564,20 +1617,46 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +/* 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 bfd_boolean +bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +{ + ptr->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +{ + ptr->vma = ptr->lma = val; + ptr->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +{ + ptr->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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,13 +1664,13 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) @@ -1735,7 +1814,7 @@ void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,6 +1839,8 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); +int bfd_get_next_section_id (void); + bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags); @@ -1856,7 +1937,9 @@ enum bfd_architecture #define bfd_mach_i960_jx 7 #define bfd_mach_i960_hx 8 - bfd_arch_or32, /* OpenRISC 32 */ + bfd_arch_or1k, /* OpenRISC 1000 */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 bfd_arch_sparc, /* SPARC */ #define bfd_mach_sparc 1 @@ -1878,7 +1961,7 @@ enum bfd_architecture #define bfd_mach_sparc_64bit_p(mach) \ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb) bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 +#define bfd_mach_spu 256 bfd_arch_mips, /* MIPS Rxxxx */ #define bfd_mach_mips3000 3000 #define bfd_mach_mips3900 3900 @@ -1894,6 +1977,7 @@ enum bfd_architecture #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 @@ -1911,11 +1995,18 @@ enum bfd_architecture #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_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) @@ -1932,6 +2023,14 @@ enum bfd_architecture bfd_arch_k1om, /* Intel K1OM */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ @@ -1978,6 +2077,9 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 + bfd_arch_riscv, /* RISC-V */ +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rs6000, /* IBM RS/6000 */ #define bfd_mach_rs6k 6000 #define bfd_mach_rs6k_rs1 6001 @@ -2046,6 +2148,12 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 + bfd_arch_nds32, /* Andes NDS32 */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 bfd_arch_ns32k, /* National Semiconductors ns32000 */ bfd_arch_w65, /* WDC 65816 */ bfd_arch_tic30, /* Texas Instruments TMS320C30 */ @@ -2056,16 +2164,20 @@ enum bfd_architecture bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ bfd_arch_tic80, /* TI TMS320c80 (MVP) */ bfd_arch_v850, /* NEC V850 */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI) */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5') */ bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 bfd_arch_m32c, /* Renesas M16C/M32C. */ #define bfd_mach_m16c 0x75 #define bfd_mach_m32c 0x78 @@ -2091,11 +2203,15 @@ enum bfd_architecture #define bfd_mach_fr550 550 bfd_arch_moxie, /* The moxie processor */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor */ +#define bfd_mach_ft32 1 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 + bfd_arch_metag, +#define bfd_mach_metag 1 bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 @@ -2124,6 +2240,7 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 +#define bfd_mach_avrtiny 100 #define bfd_mach_avrxmega1 101 #define bfd_mach_avrxmega2 102 #define bfd_mach_avrxmega3 103 @@ -2150,10 +2267,9 @@ enum bfd_architecture bfd_arch_s390, /* IBM s390 */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ + bfd_arch_score, /* Sunplus score */ #define bfd_mach_score3 3 #define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 @@ -2165,7 +2281,12 @@ enum bfd_architecture #define bfd_mach_msp14 14 #define bfd_mach_msp15 15 #define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 #define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 #define bfd_mach_msp31 31 #define bfd_mach_msp32 32 #define bfd_mach_msp33 33 @@ -2173,6 +2294,10 @@ enum bfd_architecture #define bfd_mach_msp42 42 #define bfd_mach_msp43 43 #define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 @@ -2196,6 +2321,13 @@ enum bfd_architecture #define bfd_mach_tilegx32 2 bfd_arch_aarch64, /* AArch64 */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium */ +#define bfd_mach_visium 1 bfd_arch_last }; @@ -2261,6 +2393,7 @@ 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. */ @@ -2310,6 +2443,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,6 +2462,7 @@ enum complain_overflow unsigned number. */ complain_overflow_unsigned }; +struct bfd_symbol; /* Forward declaration. */ struct reloc_howto_struct { @@ -2521,6 +2656,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2851,6 +2990,12 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +3058,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +3070,13 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* FT32 ELF relocations. */ + BFD_RELOC_FT32_10, + BFD_RELOC_FT32_20, + BFD_RELOC_FT32_17, + BFD_RELOC_FT32_18, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +3201,7 @@ instruction. */ 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, @@ -3077,6 +3231,10 @@ instruction. */ 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, @@ -3152,6 +3310,7 @@ instruction. */ BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D, + BFD_RELOC_PPC_REL16DX_HA, BFD_RELOC_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +3334,10 @@ instruction. */ 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_ADDR64_LOCAL, + BFD_RELOC_PPC64_ENTRY, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3219,6 +3382,10 @@ instruction. */ BFD_RELOC_PPC64_DTPREL16_HIGHERA, BFD_RELOC_PPC64_DTPREL16_HIGHEST, BFD_RELOC_PPC64_DTPREL16_HIGHESTA, + BFD_RELOC_PPC64_TPREL16_HIGH, + BFD_RELOC_PPC64_TPREL16_HIGHA, + BFD_RELOC_PPC64_DTPREL16_HIGH, + BFD_RELOC_PPC64_DTPREL16_HIGHA, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3484,16 +3651,73 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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_SECTFOFF_S9, + BFD_RELOC_AC_SECTFOFF_S9_1, + BFD_RELOC_AC_SECTFOFF_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_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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3964,205 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* For TLS. */ + BFD_RELOC_NDS32_TPOFF, + BFD_RELOC_NDS32_TLS_LE_HI20, + BFD_RELOC_NDS32_TLS_LE_LO12, + BFD_RELOC_NDS32_TLS_LE_ADD, + BFD_RELOC_NDS32_TLS_LE_LS, + BFD_RELOC_NDS32_GOTTPOFF, + BFD_RELOC_NDS32_TLS_IE_HI20, + BFD_RELOC_NDS32_TLS_IE_LO12S2, + BFD_RELOC_NDS32_TLS_TPOFF, + BFD_RELOC_NDS32_TLS_LE_20, + BFD_RELOC_NDS32_TLS_LE_15S0, + BFD_RELOC_NDS32_TLS_LE_15S1, + BFD_RELOC_NDS32_TLS_LE_15S2, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4419,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4558,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4620,28 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4675,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4734,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4807,9 +5306,66 @@ a matching LO8XG part. */ BFD_RELOC_860_HIGOT, BFD_RELOC_860_HIGOTOFF, -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* OpenRISC 1000 Relocations. */ + BFD_RELOC_OR1K_REL_26, + BFD_RELOC_OR1K_GOTPC_HI16, + BFD_RELOC_OR1K_GOTPC_LO16, + BFD_RELOC_OR1K_GOT16, + BFD_RELOC_OR1K_PLT26, + BFD_RELOC_OR1K_GOTOFF_HI16, + BFD_RELOC_OR1K_GOTOFF_LO16, + 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_LDM_HI16, + BFD_RELOC_OR1K_TLS_LDM_LO16, + BFD_RELOC_OR1K_TLS_LDO_HI16, + BFD_RELOC_OR1K_TLS_LDO_LO16, + BFD_RELOC_OR1K_TLS_IE_HI16, + BFD_RELOC_OR1K_TLS_IE_LO16, + BFD_RELOC_OR1K_TLS_LE_HI16, + BFD_RELOC_OR1K_TLS_LE_LO16, + BFD_RELOC_OR1K_TLS_TPOFF, + BFD_RELOC_OR1K_TLS_DTPOFF, + BFD_RELOC_OR1K_TLS_DTPMOD, + +/* 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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5373,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5422,75 @@ a matching LO8XG part. */ 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -5019,52 +5645,52 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5698,109 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5811,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5855,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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_GOTPAGE. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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_GOTPAGE. Valid in ILP32 ABI only. */ + BFD_RELOC_AARCH64_LD32_GOT_LO12_NC, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5901,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5933,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +6021,100 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6255,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6281,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5484,7 +6328,17 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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_RELOC_UNUSED }; + 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); @@ -5682,6 +6536,7 @@ bfd_boolean bfd_copy_private_symbol_data (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6545,21 @@ enum bfd_direction both_direction = 3 }; +enum bfd_plugin_format + { + bfd_plugin_uknown = 0, + bfd_plugin_yes = 1, + bfd_plugin_no = 2 + }; + +struct bfd_build_id + { + bfd_size_type size; + bfd_byte data[1]; + }; + struct bfd { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5717,17 +6582,17 @@ struct bfd /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ - flagword flags; + flagword flags : 18; /* 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 @@ -5786,40 +6651,86 @@ struct bfd struct. */ #define BFD_IN_MEMORY 0x800 - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 - /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \ + | BFD_COMPRESS_GABI) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6756,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,12 +6785,12 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 @@ -5928,40 +6843,19 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* For input BFDs, the build ID, if the object has one. */ + const struct bfd_build_id *build_id; }; +/* See note beside bfd_set_section_userdata. */ +static inline bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6869,7 @@ typedef enum bfd_error 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, @@ -5996,6 +6891,7 @@ const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); + typedef void (*bfd_error_handler_type) (const char *, ...); bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); @@ -6004,6 +6900,7 @@ void bfd_set_error_program_name (const char *); bfd_error_handler_type bfd_get_error_handler (void); + typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, const char *bfd_file, @@ -6059,12 +6956,12 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ line, disc) \ - BFD_SEND (abfd, _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, \ @@ -6113,9 +7010,6 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,24 +7047,6 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); @@ -6181,6 +7057,22 @@ void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,6 +7118,7 @@ bfd_boolean generic_core_file_matches_executable_p 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, @@ -6443,12 +7336,12 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ @@ -6465,14 +7358,14 @@ typedef struct bfd_target void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *); #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) + (bfd *, struct bfd_symbol *, bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, + (bfd *, struct bfd_symbol **, struct bfd_section *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, struct bfd_symbol *, @@ -6526,7 +7419,6 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ @@ -6553,16 +7445,14 @@ typedef struct bfd_target struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) void (*_bfd_copy_link_hash_symbol_type) @@ -6648,6 +7538,8 @@ const bfd_target *bfd_search_for_target (int (*search_func) (const bfd_target *, void *), void *); +const char *bfd_flavour_name (enum bfd_flavour flavour); + /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6690,13 +7582,17 @@ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); /* Extracted from compress.c. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7602,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd_stdint.h index a389b3c1f..7c068d02f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ -/* generated for m5407--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for m5407--netbsdelf-gcc (NetBSD nb1 20160606) 5.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfdver.h index 01f42b546..faa28bdec 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/coldfire/bfdver.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +#define BFD_VERSION_DATE 20160629 +#define BFD_VERSION 226010000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.26.1" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/coldfire/config.h b/external/gpl3/binutils/lib/libbfd/arch/coldfire/config.h index 0927064f9..254f14abb 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/coldfire/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/coldfire/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -22,6 +22,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +73,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -117,6 +129,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 @@ -239,6 +254,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +272,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,19 +295,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ @@ -359,7 +380,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/coldfire/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/coldfire/defs.mk index 06b815fbb..065ef56e2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/coldfire/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/coldfire/defs.mk @@ -1,9 +1,9 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo m68knetbsd.lo aout32.lo m68k4knetbsd.lo hp300bsd.lo sunos.lo elf32-gen.lo cpu-m68k.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo m68knetbsd.lo aout32.lo m68k4knetbsd.lo hp300bsd.lo sunos.lo elf32-gen.lo plugin.lo cpu-m68k.lo cpu-plugin.lo ofiles +G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_m68k_vec -DHAVE_m68knetbsd_vec -DHAVE_m68k4knetbsd_vec -DHAVE_hp300bsd_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_m68k_vec -DSELECT_VECS='&bfd_elf32_m68k_vec,&m68knetbsd_vec,&m68k4knetbsd_vec,&hp300bsd_vec,&sunos_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch' +G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_m68k_elf32_vec -DHAVE_m68k_aout_nbsd_vec -DHAVE_m68k_aout_4knbsd_vec -DHAVE_m68k_aout_hp300bsd_vec -DHAVE_sparc_aout_sunos_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -I./../intl +G_TDEFAULTS=-DDEFAULT_VECTOR=m68k_elf32_vec -DSELECT_VECS='&m68k_elf32_vec,&m68k_aout_nbsd_vec,&m68k_aout_4knbsd_vec,&m68k_aout_hp300bsd_vec,&sparc_aout_sunos_be_vec,&elf32_le_vec,&elf32_be_vec,&plugin_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch,&bfd_plugin_arch' diff --git a/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earm/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/earm/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/earm/bfd_stdint.h index bc3113d41..58ac1e9ca 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earm/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earm/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for arm-elf32-minix-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for arm-elf32-minix-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/earm/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/earm/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earm/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earm/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/earm/config.h b/external/gpl3/binutils/lib/libbfd/arch/earm/config.h index d2d9ab16b..83e7fb074 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earm/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -24,6 +28,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -71,10 +79,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -98,6 +114,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -119,12 +138,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -242,9 +273,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -260,15 +297,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -280,25 +320,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -327,6 +367,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -339,9 +382,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -365,7 +405,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/earm/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/earm/defs.mk index 2b158e406..3ddf69580 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earm/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/earm/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_littlearm_vec -DSELECT_VECS='&bfd_elf32_littlearm_vec,&bfd_elf32_bigarm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_le_vec -DSELECT_VECS='&arm_elf32_le_vec,&arm_elf32_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd_stdint.h index 1ad6417f6..46e71ba89 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for armeb--netbsdelf-eabi-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for armeb--netbsdelf-eabi-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmeb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h b/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmeb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/earmeb/defs.mk index 03b8fe2cd..2e3ce993a 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmeb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/earmeb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf32_littlearm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_bigarm_vec -DSELECT_VECS='&bfd_elf32_bigarm_vec,&bfd_elf32_littlearm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_be_vec -DSELECT_VECS='&arm_elf32_be_vec,&arm_elf32_le_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd_stdint.h index a2f544f92..8a4b45496 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for arm--netbsdelf-eabihf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for arm--netbsdelf-eabihf-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhf/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhf/config.h b/external/gpl3/binutils/lib/libbfd/arch/earmhf/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhf/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhf/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhf/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/earmhf/defs.mk index 2b158e406..3ddf69580 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhf/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhf/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_littlearm_vec -DSELECT_VECS='&bfd_elf32_littlearm_vec,&bfd_elf32_bigarm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_le_vec -DSELECT_VECS='&arm_elf32_le_vec,&arm_elf32_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd_stdint.h index ef8bf0251..f0db3a319 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for armeb--netbsdelf-eabihf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for armeb--netbsdelf-eabihf-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/config.h b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/defs.mk index 03b8fe2cd..2e3ce993a 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/earmhfeb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo armnetbsd.lo aout32.lo coff-arm.lo cofflink.lo elf32-gen.lo cpu-arm.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-arm.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_bigarm_vec -DHAVE_bfd_elf32_littlearm_vec -DHAVE_armnetbsd_vec -DHAVE_armcoff_little_vec -DHAVE_armcoff_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_bigarm_vec -DSELECT_VECS='&bfd_elf32_bigarm_vec,&bfd_elf32_littlearm_vec,&armnetbsd_vec,&armcoff_little_vec,&armcoff_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=arm_elf32_be_vec -DSELECT_VECS='&arm_elf32_be_vec,&arm_elf32_le_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_arm_arch' +G_HAVEVECS=-DHAVE_arm_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h index 987303858..5370c8e79 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for hppa--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for hppa--netbsd-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/hppa/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/hppa/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/hppa/config.h b/external/gpl3/binutils/lib/libbfd/arch/hppa/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/hppa/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/hppa/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/hppa/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/hppa/defs.mk index 09825eedc..2a2c0986b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/hppa/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/hppa/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-hppa.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-gen.lo cpu-hppa.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-hppa.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-hppa.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_hppa_nbsd_vec -DHAVE_bfd_elf32_hppa_vec -DHAVE_bfd_elf32_hppa_linux_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_hppa_nbsd_vec -DSELECT_VECS='&bfd_elf32_hppa_nbsd_vec,&bfd_elf32_hppa_vec,&bfd_elf32_hppa_linux_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_hppa_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=hppa_elf32_nbsd_vec -DSELECT_VECS='&hppa_elf32_nbsd_vec,&hppa_elf32_vec,&hppa_elf32_linux_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_hppa_arch' +G_HAVEVECS=-DHAVE_hppa_elf32_nbsd_vec -DHAVE_hppa_elf32_vec -DHAVE_hppa_elf32_linux_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h index 85ecdcb1e..8057d5204 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h index 82a492fe7..78f516572 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for i486--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for i486--netbsdelf-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h index 01f42b546..75bff1507 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/i386/config.h b/external/gpl3/binutils/lib/libbfd/arch/i386/config.h index d2d9ab16b..41563982c 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/i386/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/i386/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -24,6 +28,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -71,10 +79,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -98,6 +114,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -119,12 +138,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -242,9 +273,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -260,15 +297,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -280,25 +320,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -327,6 +367,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -339,9 +382,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -365,7 +405,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk index fa207517b..af7444703 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-gen.lo cpu-i386.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo coffgen.lo plugin.lo cpu-i386.lo elf32-gen.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_i386_minix_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_i386_minix_vec -DSELECT_VECS='&bfd_elf32_i386_minix_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=i386_elf32_minix_vec -DSELECT_VECS='&i386_elf32_minix_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch' +G_HAVEVECS=-DHAVE_i386_elf32_minix_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd.h index 3a5dbd5b3..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h index 6e8f86433..80c2527ca 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for ia64--netbsd-gcc (NetBSD nb1 20120916) 4.8.3 20140302 (prerelease) */ +/* generated for ia64--netbsd-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfdver.h index bf38bb3fe..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/ia64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/ia64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/ia64/config.h b/external/gpl3/binutils/lib/libbfd/arch/ia64/config.h index 2ce225a19..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/ia64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/ia64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/ia64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/ia64/defs.mk index 46673b3e8..0ae70f03f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/ia64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/ia64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-ia64.lo elfxx-ia64.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo pei-ia64.lo pepigen.lo cofflink.lo elf64-gen.lo elf32-gen.lo elf32.lo cpu-ia64.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-ia64.lo elfxx-ia64.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo pei-ia64.lo pepigen.lo cofflink.lo coffgen.lo elf64-gen.lo elf32-gen.lo elf32.lo plugin.lo cpu-ia64.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_ia64_little_vec -DHAVE_bfd_elf64_ia64_big_vec -DHAVE_bfd_pei_ia64_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_ia64_little_vec -DSELECT_VECS='&bfd_elf64_ia64_little_vec,&bfd_elf64_ia64_big_vec,&bfd_pei_ia64_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_ia64_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=ia64_elf64_le_vec -DSELECT_VECS='&ia64_elf64_le_vec,&ia64_elf64_be_vec,&ia64_pei_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_ia64_arch' +G_HAVEVECS=-DHAVE_ia64_elf64_le_vec -DHAVE_ia64_elf64_be_vec -DHAVE_ia64_pei_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h index 2670fdcce..283ac6661 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for m68010--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for m68010--netbsdelf-gcc (NetBSD nb3 20190319) 7.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68000/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68000/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68000/config.h b/external/gpl3/binutils/lib/libbfd/arch/m68000/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68000/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68000/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68000/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/m68000/defs.mk index e75f14c02..61b16c230 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68000/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/m68000/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo m68knetbsd.lo aout32.lo m68k4knetbsd.lo hp300bsd.lo sunos.lo elf32-gen.lo cpu-m68k.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-m68k.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_m68k_vec -DHAVE_m68knetbsd_vec -DHAVE_m68k4knetbsd_vec -DHAVE_hp300bsd_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_m68k_vec -DSELECT_VECS='&bfd_elf32_m68k_vec,&m68knetbsd_vec,&m68k4knetbsd_vec,&hp300bsd_vec,&sunos_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=m68k_elf32_vec -DSELECT_VECS='&m68k_elf32_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch' +G_HAVEVECS=-DHAVE_m68k_elf32_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd_stdint.h index a6347e38e..2da607a0a 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for m68k--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for m68k--netbsdelf-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68k/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h b/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/m68k/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/m68k/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/m68k/defs.mk index e75f14c02..61b16c230 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/m68k/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/m68k/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo m68knetbsd.lo aout32.lo m68k4knetbsd.lo hp300bsd.lo sunos.lo elf32-gen.lo cpu-m68k.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-m68k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-m68k.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_m68k_vec -DHAVE_m68knetbsd_vec -DHAVE_m68k4knetbsd_vec -DHAVE_hp300bsd_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_m68k_vec -DSELECT_VECS='&bfd_elf32_m68k_vec,&m68knetbsd_vec,&m68k4knetbsd_vec,&hp300bsd_vec,&sunos_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=m68k_elf32_vec -DSELECT_VECS='&m68k_elf32_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_m68k_arch' +G_HAVEVECS=-DHAVE_m68k_elf32_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h index a0f1885c6..8b0d38d1e 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd_stdint.h index 79e27ba41..4a3c8cc30 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for mips64--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for mips64--netbsd-gcc (NetBSD nb3 20190319) 7.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk index 70129d123..4a1856957 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64eb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo elf32-mips.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elf32-mips.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_ntradbigmips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_bfd_elf32_ntradlittlemips_vec -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_ntradbigmips_vec -DSELECT_VECS='&bfd_elf32_ntradbigmips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&bfd_elf32_ntradlittlemips_vec,&bfd_elf32_tradlittlemips_vec,&bfd_elf32_tradbigmips_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_ntrad_be_vec -DSELECT_VECS='&mips_elf32_ntrad_be_vec,&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,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_HAVEVECS=-DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h index a0f1885c6..8b0d38d1e 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd_stdint.h index 1157ceb23..0db73d4f1 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for mips64el--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for mips64el--netbsd-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h b/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk index f7c140c38..fde02e775 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/mips64el/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo elf32-mips.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elf32-mips.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_ntradlittlemips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_bfd_elf32_ntradbigmips_vec -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_ntradlittlemips_vec -DSELECT_VECS='&bfd_elf32_ntradlittlemips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&bfd_elf32_ntradbigmips_vec,&bfd_elf32_tradlittlemips_vec,&bfd_elf32_tradbigmips_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_ntrad_le_vec -DSELECT_VECS='&mips_elf32_ntrad_le_vec,&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,&mips_ecoff_le_vec,&mips_ecoff_be_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_HAVEVECS=-DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_ecoff_le_vec -DHAVE_mips_ecoff_be_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h index 80726a6a6..b4d0be9c4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd_stdint.h index 87e7997c8..2b51966a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for mipseb--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for mipseb--netbsd-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h b/external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipseb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk index e527c3ab1..9be4455b3 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/mipseb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elfn32-mips.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_ecoff_big_vec -DHAVE_ecoff_little_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_tradbigmips_vec -DSELECT_VECS='&bfd_elf32_tradbigmips_vec,&bfd_elf32_tradlittlemips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&ecoff_big_vec,&ecoff_little_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_trad_be_vec -DSELECT_VECS='&mips_elf32_trad_be_vec,&mips_elf32_trad_le_vec,&mips_elf32_ntrad_be_vec,&mips_elf32_ntrad_le_vec,&mips_elf64_trad_le_vec,&mips_elf64_trad_be_vec,&mips_ecoff_be_vec,&mips_ecoff_le_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_HAVEVECS=-DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_ecoff_be_vec -DHAVE_mips_ecoff_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h index 80726a6a6..b4d0be9c4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd_stdint.h index 57be7b0c1..5241b455f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for mipsel--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for mipsel--netbsd-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h b/external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/mipsel/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk index 38b3ad5ac..17e0b6b37 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/mipsel/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo ecofflink.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo cpu-mips.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo ecofflink.lo coffgen.lo elfn32-mips.lo elf64-mips.lo elf64.lo coff-mips.lo ecoff.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-mips.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_tradlittlemips_vec -DHAVE_bfd_elf32_tradbigmips_vec -DHAVE_bfd_elf64_tradbigmips_vec -DHAVE_bfd_elf64_tradlittlemips_vec -DHAVE_ecoff_little_vec -DHAVE_ecoff_big_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_tradlittlemips_vec -DSELECT_VECS='&bfd_elf32_tradlittlemips_vec,&bfd_elf32_tradbigmips_vec,&bfd_elf64_tradbigmips_vec,&bfd_elf64_tradlittlemips_vec,&ecoff_little_vec,&ecoff_big_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=mips_elf32_trad_le_vec -DSELECT_VECS='&mips_elf32_trad_le_vec,&mips_elf32_trad_be_vec,&mips_elf32_ntrad_le_vec,&mips_elf32_ntrad_be_vec,&mips_elf64_trad_be_vec,&mips_elf64_trad_le_vec,&mips_ecoff_le_vec,&mips_ecoff_be_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_mips_arch' +G_HAVEVECS=-DHAVE_mips_elf32_trad_le_vec -DHAVE_mips_elf32_trad_be_vec -DHAVE_mips_elf32_ntrad_le_vec -DHAVE_mips_elf32_ntrad_be_vec -DHAVE_mips_elf64_trad_be_vec -DHAVE_mips_elf64_trad_le_vec -DHAVE_mips_ecoff_le_vec -DHAVE_mips_ecoff_be_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd.h index 24ae23620..c30c7f943 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd.h @@ -11,9 +11,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2015 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -73,7 +71,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +82,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -285,7 +283,7 @@ alent; /* Object and core file sections. */ #define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) typedef struct bfd_section *sec_ptr; @@ -305,13 +303,13 @@ typedef struct bfd_section *sec_ptr; #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) +#define bfd_get_section_limit_octets(bfd, sec) \ + ((bfd)->direction != write_direction && (sec)->rawsize != 0 \ + ? (sec)->rawsize : (sec)->size) + /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) + (bfd_get_section_limit_octets(bfd, sec) / bfd_octets_per_byte (bfd)) /* Return TRUE if input section SEC has been discarded. */ #define discarded_section(sec) \ @@ -450,6 +448,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -530,8 +538,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) - extern bfd_boolean bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ @@ -659,6 +665,8 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); +extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *, + const char *, bfd_vma); extern bfd_boolean bfd_elf_size_dynamic_sections (bfd *, const char *, const char *, const char *, const char *, const char *, const char * const *, struct bfd_link_info *, struct bfd_section **); @@ -674,7 +682,7 @@ extern int bfd_elf_get_dyn_lib_class (bfd *); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info +extern int bfd_elf_discard_info (bfd *, struct bfd_link_info *); extern unsigned int _bfd_elf_default_action_discarded (struct bfd_section *); @@ -696,19 +704,21 @@ extern int bfd_get_elf_phdrs (bfd *abfd, void *phdrs); /* 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. + 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. */ + 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_vma *loadbasep, + (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)); @@ -820,12 +830,6 @@ struct internal_syment; union internal_auxent; #endif -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - extern bfd_boolean bfd_coff_set_symbol_class (bfd *, struct bfd_symbol *, unsigned int); @@ -856,6 +860,23 @@ extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan extern void bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *, struct bfd_link_info *); +/* ARM STM STM32L4XX erratum workaround support. */ +typedef enum +{ + BFD_ARM_STM32L4XX_FIX_NONE, + BFD_ARM_STM32L4XX_FIX_DEFAULT, + BFD_ARM_STM32L4XX_FIX_ALL +} bfd_arm_stm32l4xx_fix; + +extern void bfd_elf32_arm_set_stm32l4xx_fix + (bfd *, struct bfd_link_info *); + +extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan + (bfd *, struct bfd_link_info *); + +extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations + (bfd *, struct bfd_link_info *); + /* ARM Interworking support. Called from linker. */ extern bfd_boolean bfd_arm_allocate_interworking_sections (struct bfd_link_info *); @@ -885,7 +906,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation void bfd_elf32_arm_set_target_relocs (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); + bfd_arm_stm32l4xx_fix, int, int, int, int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -893,15 +914,19 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); -/* ELF ARM mapping symbol support */ +/* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); +extern bfd_boolean bfd_is_arm_special_symbol_name + (const char *, int); + +extern void bfd_elf32_arm_set_byteswap_code + (struct bfd_link_info *, int); + +extern void bfd_elf32_arm_use_long_plt (void); /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines @@ -920,7 +945,8 @@ extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); extern bfd_boolean elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); + struct bfd_section * (*) (const char *, struct bfd_section *, unsigned int), + void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); @@ -942,8 +968,14 @@ extern unsigned int _bfd_elf_ppc_at_tprel_transform extern void bfd_elf64_aarch64_init_maps (bfd *); -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); +extern void bfd_elf32_aarch64_init_maps + (bfd *); + +extern void bfd_elf64_aarch64_set_options + (bfd *, struct bfd_link_info *, int, int, int, int, int); + +extern void bfd_elf32_aarch64_set_options + (bfd *, struct bfd_link_info *, int, int, int, int, int); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -953,7 +985,7 @@ void bfd_elf64_aarch64_set_options extern bfd_boolean bfd_is_aarch64_special_symbol_name (const char * name, int type); -/* AArch64 stub generation support. Called from the linker. */ +/* AArch64 stub generation support for ELF64. Called from the linker. */ extern int elf64_aarch64_setup_section_lists (bfd *, struct bfd_link_info *); extern void elf64_aarch64_next_input_section @@ -964,7 +996,19 @@ extern bfd_boolean elf64_aarch64_size_stubs void (*) (void)); extern bfd_boolean elf64_aarch64_build_stubs (struct bfd_link_info *); - +/* AArch64 stub generation support for ELF32. Called from the linker. */ +extern int elf32_aarch64_setup_section_lists + (bfd *, struct bfd_link_info *); +extern void elf32_aarch64_next_input_section + (struct bfd_link_info *, struct bfd_section *); +extern bfd_boolean elf32_aarch64_size_stubs + (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, + struct bfd_section * (*) (const char *, struct bfd_section *), + void (*) (void)); +extern bfd_boolean elf32_aarch64_build_stubs + (struct bfd_link_info *); + + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page (struct bfd_section *, int); @@ -983,30 +1027,17 @@ extern void bfd_elf32_ia64_after_parse extern void bfd_elf64_ia64_after_parse (int); -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); +/* V850 Note manipulation routines. */ +extern bfd_boolean v850_elf_create_sections + (struct bfd_link_info *); +extern bfd_boolean v850_elf_set_note + (bfd *, unsigned int, unsigned int); /* Extracted from init.c. */ void bfd_init (void); /* 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); @@ -1015,7 +1046,7 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,8 +1082,16 @@ 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); @@ -1183,6 +1222,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +1230,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1369,6 +1409,10 @@ typedef struct bfd_section executables or shared objects. This is for COFF only. */ #define SEC_COFF_SHARED 0x8000000 + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 + /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, @@ -1376,11 +1420,18 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_BLOCK 0x10000000 + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ #define SEC_TIC54X_CLINK 0x20000000 + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ #define SEC_COFF_NOREAD 0x40000000 @@ -1420,6 +1471,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1564,20 +1617,46 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +/* 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 bfd_boolean +bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +{ + ptr->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +{ + ptr->vma = ptr->lma = val; + ptr->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +{ + ptr->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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,13 +1664,13 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) @@ -1735,7 +1814,7 @@ void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,6 +1839,8 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); +int bfd_get_next_section_id (void); + bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags); @@ -1857,8 +1938,8 @@ enum bfd_architecture #define bfd_mach_i960_hx 8 bfd_arch_or1k, /* OpenRISC 1000 */ -#define bfd_mach_or1k 1 -#define bfd_mach_or1knd 2 +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 bfd_arch_sparc, /* SPARC */ #define bfd_mach_sparc 1 @@ -1880,7 +1961,7 @@ enum bfd_architecture #define bfd_mach_sparc_64bit_p(mach) \ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb) bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 +#define bfd_mach_spu 256 bfd_arch_mips, /* MIPS Rxxxx */ #define bfd_mach_mips3000 3000 #define bfd_mach_mips3900 3900 @@ -1896,6 +1977,7 @@ enum bfd_architecture #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 @@ -1913,11 +1995,18 @@ enum bfd_architecture #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_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) @@ -1934,6 +2023,14 @@ enum bfd_architecture bfd_arch_k1om, /* Intel K1OM */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ @@ -1980,6 +2077,9 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 + bfd_arch_riscv, /* RISC-V */ +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rs6000, /* IBM RS/6000 */ #define bfd_mach_rs6k 6000 #define bfd_mach_rs6k_rs1 6001 @@ -2048,6 +2148,12 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 + bfd_arch_nds32, /* Andes NDS32 */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 bfd_arch_ns32k, /* National Semiconductors ns32000 */ bfd_arch_w65, /* WDC 65816 */ bfd_arch_tic30, /* Texas Instruments TMS320C30 */ @@ -2058,16 +2164,20 @@ enum bfd_architecture bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ bfd_arch_tic80, /* TI TMS320c80 (MVP) */ bfd_arch_v850, /* NEC V850 */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI) */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5') */ bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 bfd_arch_m32c, /* Renesas M16C/M32C. */ #define bfd_mach_m16c 0x75 #define bfd_mach_m32c 0x78 @@ -2093,11 +2203,15 @@ enum bfd_architecture #define bfd_mach_fr550 550 bfd_arch_moxie, /* The moxie processor */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor */ +#define bfd_mach_ft32 1 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 + bfd_arch_metag, +#define bfd_mach_metag 1 bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 @@ -2126,6 +2240,7 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 +#define bfd_mach_avrtiny 100 #define bfd_mach_avrxmega1 101 #define bfd_mach_avrxmega2 102 #define bfd_mach_avrxmega3 103 @@ -2152,10 +2267,9 @@ enum bfd_architecture bfd_arch_s390, /* IBM s390 */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ + bfd_arch_score, /* Sunplus score */ #define bfd_mach_score3 3 #define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 @@ -2167,7 +2281,12 @@ enum bfd_architecture #define bfd_mach_msp14 14 #define bfd_mach_msp15 15 #define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 #define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 #define bfd_mach_msp31 31 #define bfd_mach_msp32 32 #define bfd_mach_msp33 33 @@ -2175,6 +2294,10 @@ enum bfd_architecture #define bfd_mach_msp42 42 #define bfd_mach_msp43 43 #define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 @@ -2198,6 +2321,13 @@ enum bfd_architecture #define bfd_mach_tilegx32 2 bfd_arch_aarch64, /* AArch64 */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium */ +#define bfd_mach_visium 1 bfd_arch_last }; @@ -2263,6 +2393,7 @@ 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. */ @@ -2312,6 +2443,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2330,6 +2462,7 @@ enum complain_overflow unsigned number. */ complain_overflow_unsigned }; +struct bfd_symbol; /* Forward declaration. */ struct reloc_howto_struct { @@ -2523,6 +2656,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2853,6 +2990,12 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2915,6 +3058,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2926,6 +3070,13 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* FT32 ELF relocations. */ + BFD_RELOC_FT32_10, + BFD_RELOC_FT32_20, + BFD_RELOC_FT32_17, + BFD_RELOC_FT32_18, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3050,6 +3201,7 @@ instruction. */ 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, @@ -3079,6 +3231,10 @@ instruction. */ 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, @@ -3154,6 +3310,7 @@ instruction. */ BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D, + BFD_RELOC_PPC_REL16DX_HA, BFD_RELOC_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3177,6 +3334,10 @@ instruction. */ 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_ADDR64_LOCAL, + BFD_RELOC_PPC64_ENTRY, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3221,6 +3382,10 @@ instruction. */ BFD_RELOC_PPC64_DTPREL16_HIGHERA, BFD_RELOC_PPC64_DTPREL16_HIGHEST, BFD_RELOC_PPC64_DTPREL16_HIGHESTA, + BFD_RELOC_PPC64_TPREL16_HIGH, + BFD_RELOC_PPC64_TPREL16_HIGHA, + BFD_RELOC_PPC64_DTPREL16_HIGH, + BFD_RELOC_PPC64_DTPREL16_HIGHA, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3486,16 +3651,73 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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_SECTFOFF_S9, + BFD_RELOC_AC_SECTFOFF_S9_1, + BFD_RELOC_AC_SECTFOFF_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_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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3742,6 +3964,205 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* For TLS. */ + BFD_RELOC_NDS32_TPOFF, + BFD_RELOC_NDS32_TLS_LE_HI20, + BFD_RELOC_NDS32_TLS_LE_LO12, + BFD_RELOC_NDS32_TLS_LE_ADD, + BFD_RELOC_NDS32_TLS_LE_LS, + BFD_RELOC_NDS32_GOTTPOFF, + BFD_RELOC_NDS32_TLS_IE_HI20, + BFD_RELOC_NDS32_TLS_IE_LO12S2, + BFD_RELOC_NDS32_TLS_TPOFF, + BFD_RELOC_NDS32_TLS_LE_20, + BFD_RELOC_NDS32_TLS_LE_15S0, + BFD_RELOC_NDS32_TLS_LE_15S1, + BFD_RELOC_NDS32_TLS_LE_15S2, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3998,6 +4419,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4097,7 +4558,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4159,6 +4620,28 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4192,6 +4675,8 @@ in .byte hlo8(symbol) */ 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, @@ -4249,12 +4734,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4835,12 +5332,48 @@ a matching LO8XG part. */ BFD_RELOC_OR1K_TLS_DTPOFF, BFD_RELOC_OR1K_TLS_DTPMOD, +/* 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, + /* 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, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4889,6 +5422,75 @@ a matching LO8XG part. */ 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -5043,52 +5645,52 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5096,14 +5698,109 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5114,45 +5811,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5170,86 +5855,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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_GOTPAGE. Valid in LP64 ABI only. */ + BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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_GOTPAGE. Valid in ILP32 ABI only. */ + BFD_RELOC_AARCH64_LD32_GOT_LO12_NC, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5257,14 +5901,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5272,6 +5933,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5281,34 +6021,100 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5449,10 +6255,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5467,6 +6281,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5508,7 +6328,17 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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_RELOC_UNUSED }; + 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); @@ -5706,6 +6536,7 @@ bfd_boolean bfd_copy_private_symbol_data (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5714,11 +6545,21 @@ enum bfd_direction both_direction = 3 }; +enum bfd_plugin_format + { + bfd_plugin_uknown = 0, + bfd_plugin_yes = 1, + bfd_plugin_no = 2 + }; + +struct bfd_build_id + { + bfd_size_type size; + bfd_byte data[1]; + }; + struct bfd { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5741,17 +6582,17 @@ struct bfd /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ - flagword flags; + flagword flags : 18; /* 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 @@ -5810,40 +6651,86 @@ struct bfd struct. */ #define BFD_IN_MEMORY 0x800 - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 - /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \ + | BFD_COMPRESS_GABI) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5869,17 +6756,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5894,12 +6785,12 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 @@ -5952,40 +6843,19 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* For input BFDs, the build ID, if the object has one. */ + const struct bfd_build_id *build_id; }; +/* See note beside bfd_set_section_userdata. */ +static inline bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5999,6 +6869,7 @@ typedef enum bfd_error 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, @@ -6020,6 +6891,7 @@ const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); + typedef void (*bfd_error_handler_type) (const char *, ...); bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); @@ -6028,6 +6900,7 @@ void bfd_set_error_program_name (const char *); bfd_error_handler_type bfd_get_error_handler (void); + typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, const char *bfd_file, @@ -6083,12 +6956,12 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ line, disc) \ - BFD_SEND (abfd, _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, \ @@ -6137,9 +7010,6 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6177,24 +7047,6 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); @@ -6205,6 +7057,22 @@ void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6250,6 +7118,7 @@ bfd_boolean generic_core_file_matches_executable_p 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, @@ -6467,12 +7336,12 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ @@ -6489,14 +7358,14 @@ typedef struct bfd_target void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *); #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) + (bfd *, struct bfd_symbol *, bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, + (bfd *, struct bfd_symbol **, struct bfd_section *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, struct bfd_symbol *, @@ -6550,7 +7419,6 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ @@ -6577,16 +7445,14 @@ typedef struct bfd_target struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) void (*_bfd_copy_link_hash_symbol_type) @@ -6672,6 +7538,8 @@ const bfd_target *bfd_search_for_target (int (*search_func) (const bfd_target *, void *), void *); +const char *bfd_flavour_name (enum bfd_flavour flavour); + /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6714,13 +7582,17 @@ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); /* Extracted from compress.c. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6730,6 +7602,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd_stdint.h index 6d653ee0f..04c89ad74 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfd_stdint.h @@ -2,7 +2,7 @@ /* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ -/* generated for or1k--netbsd-gcc (NetBSD nb1 20140527) 4.8.3 */ +/* generated for or1k--netbsd-gcc (NetBSD nb3 20151015) 4.8.5 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfdver.h index bf38bb3fe..faa28bdec 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/or1k/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/or1k/bfdver.h @@ -2,7 +2,7 @@ /* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +#define BFD_VERSION_DATE 20160629 +#define BFD_VERSION 226010000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.26.1" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/or1k/config.h b/external/gpl3/binutils/lib/libbfd/arch/or1k/config.h index bbc4a209f..254f14abb 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/or1k/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/or1k/config.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -22,6 +22,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +73,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -117,6 +129,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 @@ -239,6 +254,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +272,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,19 +295,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ @@ -359,7 +380,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/or1k/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/or1k/defs.mk index 70de436cf..f08beadf5 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/or1k/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/or1k/defs.mk @@ -2,8 +2,8 @@ # Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-or1k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-gen.lo cpu-or1k.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-or1k.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-or1k.lo cpu-plugin.lo ofiles +G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_or1k_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_or1k_big_vec -DSELECT_VECS='&bfd_elf32_or1k_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_or1k_arch' +G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_or1k_elf32_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -I./../intl +G_TDEFAULTS=-DDEFAULT_VECTOR=or1k_elf32_vec -DSELECT_VECS='&or1k_elf32_vec,&elf32_le_vec,&elf32_be_vec,&plugin_vec' -DSELECT_ARCHITECTURES='&bfd_or1k_arch,&bfd_plugin_arch' diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h index df69b98bc..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,62 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or1k, /* OpenRISC 1000 */ -#define bfd_mach_or1k 1 -#define bfd_mach_or1knd 2 - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1872,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1896,6 +1549,7 @@ enum bfd_architecture #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 @@ -1908,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1928,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1980,62 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_riscv, /* RISC-V */ -#define bfd_mach_riscv32 132 -#define bfd_mach_riscv64 164 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2051,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2091,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2110,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2129,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2218,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2230,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2244,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2260,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2289,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2315,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2333,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2394,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2460,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2490,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2526,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2580,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2856,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2918,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2929,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3053,6 +2810,7 @@ instruction. */ 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, @@ -3082,6 +2840,10 @@ instruction. */ 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, @@ -3157,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3180,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3214,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3253,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3299,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3361,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3378,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3489,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3745,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -4001,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4100,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4162,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4195,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4252,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4625,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4778,107 +4981,54 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - /* 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_GOT16, + BFD_RELOC_OR1K_GOT_PG21, + BFD_RELOC_OR1K_GOT_LO13, BFD_RELOC_OR1K_PLT26, - BFD_RELOC_OR1K_GOTOFF_HI16, - BFD_RELOC_OR1K_GOTOFF_LO16, + 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, -/* 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, - /* 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, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4927,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -5024,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -5054,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5066,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5081,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5134,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5152,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5208,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5295,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5310,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5319,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5487,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5505,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5526,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5546,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5580,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5680,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5700,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5723,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5740,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5752,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5772,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5798,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5907,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5932,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5990,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -6037,6 +6987,7 @@ typedef enum bfd_error 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, @@ -6045,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -6052,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6073,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6083,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6100,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6169,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6215,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6288,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6325,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6387,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6411,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6432,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6485,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6505,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6588,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6637,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6651,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6663,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6674,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6695,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6706,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6721,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6740,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6747,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6768,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd_stdint.h index 3bb355e69..2ec66bdc9 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for powerpc--netbsd-gcc (NetBSD nb2 20150115) 4.8.5 */ +/* generated for powerpc--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/powerpc/defs.mk index 92edf9310..d1cf19f2c 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-ppc.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo coff-rs6000.lo xcofflink.lo ppcboot.lo elf32-gen.lo cpu-rs6000.lo cpu-powerpc.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-ppc.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo coff-rs6000.lo xcofflink.lo coffgen.lo ppcboot.lo elf32-gen.lo plugin.lo cpu-rs6000.lo cpu-powerpc.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_powerpc_vec -DHAVE_rs6000coff_vec -DHAVE_bfd_elf32_powerpcle_vec -DHAVE_ppcboot_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_powerpc_vec -DSELECT_VECS='&bfd_elf32_powerpc_vec,&rs6000coff_vec,&bfd_elf32_powerpcle_vec,&ppcboot_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_rs6000_arch,&bfd_powerpc_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=powerpc_elf32_vec -DSELECT_VECS='&powerpc_elf32_vec,&rs6000_xcoff_vec,&powerpc_elf32_le_vec,&powerpc_boot_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_rs6000_arch,&bfd_powerpc_arch' +G_HAVEVECS=-DHAVE_powerpc_elf32_vec -DHAVE_rs6000_xcoff_vec -DHAVE_powerpc_elf32_le_vec -DHAVE_powerpc_boot_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h index 8681cea83..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd_stdint.h index d38c7244f..822b7d3d6 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for powerpc64--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for powerpc64--netbsd-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h index 0fc281eba..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h index 4cf83f644..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/defs.mk index 3e49c67ef..6297e2418 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/powerpc64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/powerpc64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-ppc.lo elf64-gen.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-ppc.lo elf-vxworks.lo elf32.lo coff-rs6000.lo xcofflink.lo coff64-rs6000.lo aix5ppc-core.lo elf32-gen.lo cpu-rs6000.lo cpu-powerpc.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-ppc.lo elf64-gen.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-ppc.lo elf-vxworks.lo elf32.lo coff-rs6000.lo xcofflink.lo coffgen.lo coff64-rs6000.lo aix5ppc-core.lo elf32-gen.lo plugin.lo cpu-rs6000.lo cpu-powerpc.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_powerpc_vec -DHAVE_bfd_elf64_powerpcle_vec -DHAVE_bfd_elf32_powerpc_vec -DHAVE_bfd_elf32_powerpcle_vec -DHAVE_rs6000coff_vec -DHAVE_rs6000coff64_vec -DHAVE_aix5coff64_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_powerpc_vec -DSELECT_VECS='&bfd_elf64_powerpc_vec,&bfd_elf64_powerpcle_vec,&bfd_elf32_powerpc_vec,&bfd_elf32_powerpcle_vec,&rs6000coff_vec,&rs6000coff64_vec,&aix5coff64_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_rs6000_arch,&bfd_powerpc_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=powerpc_elf64_vec -DSELECT_VECS='&powerpc_elf64_vec,&powerpc_elf64_le_vec,&powerpc_elf32_vec,&powerpc_elf32_le_vec,&rs6000_xcoff_vec,&rs6000_xcoff64_vec,&rs6000_xcoff64_aix_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_rs6000_arch,&bfd_powerpc_arch' +G_HAVEVECS=-DHAVE_powerpc_elf64_vec -DHAVE_powerpc_elf64_le_vec -DHAVE_powerpc_elf32_vec -DHAVE_powerpc_elf32_le_vec -DHAVE_rs6000_xcoff_vec -DHAVE_rs6000_xcoff64_vec -DHAVE_rs6000_xcoff64_aix_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd.h index 76d774782..b4d0be9c4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -92,7 +93,7 @@ extern "C" { #define BFD_ARCH_SIZE 64 /* The word size of the default bfd target. */ -#define BFD_DEFAULT_TARGET_SIZE 64 +#define BFD_DEFAULT_TARGET_SIZE 32 #define BFD_HOST_64BIT_LONG 0 #define BFD_HOST_64BIT_LONG_LONG 1 @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,62 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or1k, /* OpenRISC 1000 */ -#define bfd_mach_or1k 1 -#define bfd_mach_or1knd 2 - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1872,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1896,6 +1549,7 @@ enum bfd_architecture #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 @@ -1908,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1928,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1980,62 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_riscv, /* RISC-V */ -#define bfd_mach_riscv32 132 -#define bfd_mach_riscv64 164 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2051,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2091,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2110,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2129,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2218,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2230,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2244,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2260,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2289,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2315,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2333,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2394,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2460,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2490,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2526,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2580,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2856,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2918,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2929,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3053,6 +2810,7 @@ instruction. */ 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, @@ -3082,6 +2840,10 @@ instruction. */ 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, @@ -3157,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3180,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3214,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3253,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3299,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3361,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3378,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3489,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3745,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -4001,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4100,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4162,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4195,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4252,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4625,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4778,107 +4981,54 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - /* 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_GOT16, + BFD_RELOC_OR1K_GOT_PG21, + BFD_RELOC_OR1K_GOT_LO13, BFD_RELOC_OR1K_PLT26, - BFD_RELOC_OR1K_GOTOFF_HI16, - BFD_RELOC_OR1K_GOTOFF_LO16, + 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, -/* 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, - /* 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, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4927,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -5024,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -5054,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5066,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5081,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5134,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5152,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5208,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5295,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5310,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5319,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5487,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5505,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5526,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5546,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5580,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5680,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5700,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5723,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5740,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5752,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5772,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5798,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5907,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5932,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5990,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -6037,6 +6987,7 @@ typedef enum bfd_error 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, @@ -6045,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -6052,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6073,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6083,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6100,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6169,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6215,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6288,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6325,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6387,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6411,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6432,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6485,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6505,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6588,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6637,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6651,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6663,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6674,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6695,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6706,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6721,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6740,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6747,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6768,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd_stdint.h index c825afc87..72109b6b7 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for riscv32--netbsd-gcc (NetBSD nb2 20150115) 4.8.4 */ +/* generated for riscv32--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfdver.h index bf38bb3fe..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv32/config.h b/external/gpl3/binutils/lib/libbfd/arch/riscv32/config.h index bbc4a209f..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv32/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv32/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv32/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/riscv32/defs.mk index 6835b72be..7325db38f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv32/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv32/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-riscv.lo elf64-gen.lo elf32-gen.lo cpu-riscv.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-riscv.lo elfxx-riscv.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf64-riscv.lo elf64.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-riscv.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_riscv_vec -DHAVE_bfd_elf32_riscv_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_riscv_vec -DSELECT_VECS='&bfd_elf64_riscv_vec,&bfd_elf32_riscv_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_riscv_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=riscv_elf32_vec -DSELECT_VECS='&riscv_elf32_vec,&riscv_elf64_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_riscv_arch' +G_HAVEVECS=-DHAVE_riscv_elf32_vec -DHAVE_riscv_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd.h index 7550fb9e7..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,62 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or1k, /* OpenRISC 1000 */ -#define bfd_mach_or1k 1 -#define bfd_mach_or1knd 2 - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1872,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1896,6 +1549,7 @@ enum bfd_architecture #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 @@ -1908,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1928,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1980,62 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_riscv, /* RISC-V */ -#define bfd_mach_riscv32 132 -#define bfd_mach_riscv64 164 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2051,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2091,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2110,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2129,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2218,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2230,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2244,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2260,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2289,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2315,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2333,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2394,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2460,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2490,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2526,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2580,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2856,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2918,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2929,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3053,6 +2810,7 @@ instruction. */ 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, @@ -3082,6 +2840,10 @@ instruction. */ 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, @@ -3157,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3180,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3214,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3253,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3299,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3361,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3378,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3489,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3745,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -4001,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4100,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4162,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4195,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4252,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4625,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4778,107 +4981,54 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - /* 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_GOT16, + BFD_RELOC_OR1K_GOT_PG21, + BFD_RELOC_OR1K_GOT_LO13, BFD_RELOC_OR1K_PLT26, - BFD_RELOC_OR1K_GOTOFF_HI16, - BFD_RELOC_OR1K_GOTOFF_LO16, + 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, -/* 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, - /* 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, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4927,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -5024,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -5054,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5066,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5081,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5134,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5152,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5208,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5295,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5310,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5319,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5487,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5505,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5526,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5546,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5580,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5680,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5700,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5723,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5740,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5752,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5772,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5798,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5907,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5932,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5990,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -6037,6 +6987,7 @@ typedef enum bfd_error 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, @@ -6045,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -6052,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6073,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6083,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6100,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6169,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6215,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6288,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6325,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6387,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6411,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6432,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6485,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6505,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6588,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6637,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6651,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6663,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6674,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6695,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6706,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6721,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6740,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6747,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6768,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd_stdint.h index 9b24ee73c..a01c5001f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for riscv64--netbsd-gcc (NetBSD nb2 20150115) 4.8.4 */ +/* generated for riscv64--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfdver.h index bf38bb3fe..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv64/config.h b/external/gpl3/binutils/lib/libbfd/arch/riscv64/config.h index 2ce225a19..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/riscv64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/riscv64/defs.mk index 6835b72be..38a764a7d 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/riscv64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/riscv64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-riscv.lo elf64-gen.lo elf32-gen.lo cpu-riscv.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-riscv.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-riscv.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_riscv_vec -DHAVE_bfd_elf32_riscv_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_riscv_vec -DSELECT_VECS='&bfd_elf64_riscv_vec,&bfd_elf32_riscv_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_riscv_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=riscv_elf64_vec -DSELECT_VECS='&riscv_elf64_vec,&riscv_elf32_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_riscv_arch' +G_HAVEVECS=-DHAVE_riscv_elf64_vec -DHAVE_riscv_elf32_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h index 80726a6a6..b4d0be9c4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd_stdint.h index a14540867..6a9f6b816 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for sh--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for sh--netbsdelf-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/config.h b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/defs.mk index 72b327663..1c8d85bb1 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3eb/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3eb/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-sh.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo coff-sh.lo cofflink.lo elf32-sh64.lo elf32-sh64-com.lo elf64-sh64.lo elf64.lo elf64-gen.lo elf32-gen.lo cpu-sh.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-sh.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo coff-sh.lo cofflink.lo coffgen.lo elf32-gen.lo plugin.lo cpu-sh.lo netbsd-core.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_shnbsd_vec -DHAVE_bfd_elf32_shlnbsd_vec -DHAVE_shcoff_vec -DHAVE_shlcoff_vec -DHAVE_bfd_elf32_sh64lnbsd_vec -DHAVE_bfd_elf32_sh64nbsd_vec -DHAVE_bfd_elf64_sh64lnbsd_vec -DHAVE_bfd_elf64_sh64nbsd_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_shnbsd_vec -DSELECT_VECS='&bfd_elf32_shnbsd_vec,&bfd_elf32_shlnbsd_vec,&shcoff_vec,&shlcoff_vec,&bfd_elf32_sh64lnbsd_vec,&bfd_elf32_sh64nbsd_vec,&bfd_elf64_sh64lnbsd_vec,&bfd_elf64_sh64nbsd_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_sh_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=sh_elf32_nbsd_vec -DSELECT_VECS='&sh_elf32_nbsd_vec,&sh_elf32_nbsd_le_vec,&sh_coff_vec,&sh_coff_le_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_sh_arch' +G_HAVEVECS=-DHAVE_sh_elf32_nbsd_vec -DHAVE_sh_elf32_nbsd_le_vec -DHAVE_sh_coff_vec -DHAVE_sh_coff_le_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h index 80726a6a6..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,12 +85,12 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ -#define BFD_ARCH_SIZE 64 +#define BFD_ARCH_SIZE 32 /* The word size of the default bfd target. */ #define BFD_DEFAULT_TARGET_SIZE 32 @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd_stdint.h index 52f7f8881..a7c545e0a 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for shle--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for shle--netbsdelf-gcc (NetBSD nb4 20181109) 6.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3el/config.h b/external/gpl3/binutils/lib/libbfd/arch/sh3el/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3el/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/sh3el/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/sh3el/defs.mk index 8099ced70..acd91f9a9 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sh3el/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/sh3el/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-sh.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo coff-sh.lo cofflink.lo elf32-sh64.lo elf32-sh64-com.lo elf64-sh64.lo elf64.lo elf64-gen.lo elf32-gen.lo cpu-sh.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-sh.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo coff-sh.lo cofflink.lo coffgen.lo elf32-gen.lo plugin.lo cpu-sh.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_shlnbsd_vec -DHAVE_bfd_elf32_shnbsd_vec -DHAVE_shcoff_vec -DHAVE_shlcoff_vec -DHAVE_bfd_elf32_sh64lnbsd_vec -DHAVE_bfd_elf32_sh64nbsd_vec -DHAVE_bfd_elf64_sh64lnbsd_vec -DHAVE_bfd_elf64_sh64nbsd_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_shlnbsd_vec -DSELECT_VECS='&bfd_elf32_shlnbsd_vec,&bfd_elf32_shnbsd_vec,&shcoff_vec,&shlcoff_vec,&bfd_elf32_sh64lnbsd_vec,&bfd_elf32_sh64nbsd_vec,&bfd_elf64_sh64lnbsd_vec,&bfd_elf64_sh64nbsd_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_sh_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=sh_elf32_nbsd_le_vec -DSELECT_VECS='&sh_elf32_nbsd_le_vec,&sh_elf32_nbsd_vec,&sh_coff_vec,&sh_coff_le_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_sh_arch' +G_HAVEVECS=-DHAVE_sh_elf32_nbsd_le_vec -DHAVE_sh_elf32_nbsd_vec -DHAVE_sh_coff_vec -DHAVE_sh_coff_le_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h index 83bcf8873..b4d0be9c4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd_stdint.h index 30bb1a5a4..3ac6840a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for sparc--netbsdelf-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for sparc--netbsdelf-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h b/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/sparc/defs.mk index ec04caf4a..5f2cf3dc2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo sparcnetbsd.lo aout32.lo sunos.lo elf32-gen.lo cpu-sparc.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-gen.lo plugin.lo cpu-sparc.lo netbsd-core.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_sparc_vec -DHAVE_sparcnetbsd_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_sparc_vec -DSELECT_VECS='&bfd_elf32_sparc_vec,&sparcnetbsd_vec,&sunos_big_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_sparc_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=sparc_elf32_vec -DSELECT_VECS='&sparc_elf32_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_sparc_arch' +G_HAVEVECS=-DHAVE_sparc_elf32_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h index eca2773c6..ef0fdff8b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd_stdint.h index b6684933a..a75d2fb93 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for sparc64--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for sparc64--netbsd-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h b/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h index ce31e69d8..588e281a2 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/sparc64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/sparc64/defs.mk index a07ae62ca..dfab2c8b5 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/sparc64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/sparc64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-sparc.lo elf32.lo sunos.lo aout32.lo elf64-gen.lo elf32-gen.lo cpu-sparc.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-sparc.lo elf32.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-sparc.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_sparc_vec -DHAVE_bfd_elf32_sparc_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_sparc_vec -DSELECT_VECS='&bfd_elf64_sparc_vec,&bfd_elf32_sparc_vec,&sunos_big_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_sparc_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=sparc_elf64_vec -DSELECT_VECS='&sparc_elf64_vec,&sparc_elf32_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_sparc_arch' +G_HAVEVECS=-DHAVE_sparc_elf64_vec -DHAVE_sparc_elf32_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h index 85ecdcb1e..51a7b3b9f 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/vax/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/vax/bfd_stdint.h index 7f6867a51..7bf8f344e 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/vax/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/vax/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for vax--netbsdelf-gcc (GCC) 4.1.3 20080704 (prerelease) (NetBSD nb3 20111107) */ +/* generated for vax--netbsdelf-gcc (NetBSD nb1 20190930) 8.3.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/vax/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/vax/bfdver.h index 01f42b546..35cba00d4 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/vax/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/vax/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/vax/config.h b/external/gpl3/binutils/lib/libbfd/arch/vax/config.h index 0927064f9..c3ecc5353 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/vax/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/vax/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 4 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk index 05052069d..f178f5945 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo cpu-vax.lo netbsd-core.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf32_vax_vec -DHAVE_vaxnetbsd_vec -DHAVE_vax1knetbsd_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf32_vax_vec -DSELECT_VECS='&bfd_elf32_vax_vec,&vaxnetbsd_vec,&vax1knetbsd_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_vax_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=vax_elf32_vec -DSELECT_VECS='&vax_elf32_vec,&vax_aout_nbsd_vec,&vax_aout_1knbsd_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_vax_arch' +G_HAVEVECS=-DHAVE_vax_elf32_vec -DHAVE_vax_aout_nbsd_vec -DHAVE_vax_aout_1knbsd_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd.h b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd.h index eca2773c6..b42940b08 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd.h +++ b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd.h @@ -1,19 +1,17 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* 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", +/* 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". Run "make headers" in your build bfd/ to regenerate. */ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -47,6 +45,9 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" +#include "diagnostics.h" +#include #include #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -73,7 +74,7 @@ extern "C" { problem for example when trying to use STRING_COMMA_LEN to build the arguments to the strncmp() macro. Hence this alternative definition of strncmp is provided here. - + Note - these macros do NOT work if STR2 is not a constant string. */ #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) /* strcpy() can have a similar problem, but since we know we are @@ -84,7 +85,7 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) -#define BFD_SUPPORTS_PLUGINS 0 +#define BFD_SUPPORTS_PLUGINS 1 /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -103,6 +104,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t; typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif +#ifdef HAVE_INTTYPES_H +# include +#else +# if BFD_HOST_64BIT_LONG +# define BFD_PRI64 "l" +# elif defined (__MSVCRT__) +# define BFD_PRI64 "I64" +# else +# define BFD_PRI64 "ll" +# endif +# undef PRId64 +# define PRId64 BFD_PRI64 "d" +# undef PRIu64 +# define PRIu64 BFD_PRI64 "u" +# undef PRIx64 +# define PRIx64 BFD_PRI64 "x" +#endif + #if BFD_ARCH_SIZE >= 64 #define BFD64 #endif @@ -116,7 +135,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif /* Declaring a type wide enough to hold a host long and a host pointer. */ -#define BFD_HOSTPTR_T unsigned long +#define BFD_HOSTPTR_T unsigned long typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ @@ -227,39 +246,20 @@ bfd_format; /* A count of carsyms (canonical archive symbols). */ typedef unsigned long symindex; -/* How to perform a relocation. */ -typedef const struct reloc_howto_struct reloc_howto_type; - #define BFD_NO_MORE_SYMBOLS ((symindex) ~0) -/* General purpose part of a symbol X; - target specific parts are in libcoff.h, libaout.h, etc. */ - -#define bfd_get_section(x) ((x)->section) -#define bfd_get_output_section(x) ((x)->section->output_section) -#define bfd_set_section(x,y) ((x)->section) = (y) -#define bfd_asymbol_base(x) ((x)->section->vma) -#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value) -#define bfd_asymbol_name(x) ((x)->name) -/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/ -#define bfd_asymbol_bfd(x) ((x)->the_bfd) -#define bfd_asymbol_flavour(x) \ - (((x)->flags & BSF_SYNTHETIC) != 0 \ - ? bfd_target_unknown_flavour \ - : bfd_asymbol_bfd (x)->xvec->flavour) - /* A canonical archive symbol. */ /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + 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. */ +struct orl /* Output ranlib. */ { char **name; /* Symbol name. */ union @@ -269,7 +269,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -277,48 +277,25 @@ typedef struct lineno_cache_entry union { struct bfd_symbol *sym; /* Function name. */ - bfd_vma offset; /* Offset into section. */ + bfd_vma offset; /* Offset into section. */ } u; } alent; /* Object and core file sections. */ - -#define align_power(addr, align) \ - (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) - typedef struct bfd_section *sec_ptr; -#define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) -#define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) -#define bfd_get_section_lma(bfd, ptr) ((void) bfd, (ptr)->lma) -#define bfd_get_section_alignment(bfd, ptr) ((void) bfd, \ - (ptr)->alignment_power) -#define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) ((ptr)->size) -#define bfd_get_section_size(ptr) ((ptr)->size) -#define bfd_section_vma(bfd, ptr) ((ptr)->vma) -#define bfd_section_lma(bfd, ptr) ((ptr)->lma) -#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) -#define bfd_get_section_flags(bfd, ptr) ((void) bfd, (ptr)->flags) -#define bfd_get_section_userdata(bfd, ptr) ((void) bfd, (ptr)->userdata) +#define align_power(addr, align) \ + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) - -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) -/* Find the address one past the end of SEC. */ -#define bfd_get_section_limit(bfd, sec) \ - (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ - ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) - -/* Return TRUE if input section SEC has been discarded. */ -#define discarded_section(sec) \ - (!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) +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((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 { @@ -333,11 +310,11 @@ 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. */ + 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. */ @@ -375,7 +352,7 @@ struct bfd_hash_table 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 *, + /* 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. */ @@ -450,6 +427,16 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); +/* Types of compressed DWARF debug sections. We currently support + zlib. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG = 1 << 0, + COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2 +}; + /* This structure is used to keep track of stabs in sections information while linking. */ @@ -480,57 +467,20 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ + (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \ + (_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) \ - (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ + (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #endif -extern void warn_deprecated (const char *, const char *, int, const char *); - -/* Cast from const char * to char * so that caller can assign to - a char * without a warning. */ -#define bfd_get_filename(abfd) ((char *) (abfd)->filename) -#define bfd_get_cacheable(abfd) ((abfd)->cacheable) -#define bfd_get_format(abfd) ((abfd)->format) -#define bfd_get_target(abfd) ((abfd)->xvec->name) -#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) -#define bfd_family_coff(abfd) \ - (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ - bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) -#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) -#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) -#define bfd_header_big_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG) -#define bfd_header_little_endian(abfd) \ - ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE) -#define bfd_get_file_flags(abfd) ((abfd)->flags) -#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) -#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) -#define bfd_has_map(abfd) ((abfd)->has_armap) -#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive) - -#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types) -#define bfd_usrdata(abfd) ((abfd)->usrdata) - -#define bfd_get_start_address(abfd) ((abfd)->start_address) -#define bfd_get_symcount(abfd) ((abfd)->symcount) -#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols) -#define bfd_count_sections(abfd) ((abfd)->section_count) - -#define bfd_get_dynamic_symcount(abfd) ((abfd)->dynsymcount) - -#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) - -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern bfd_boolean bfd_cache_close (bfd *abfd); @@ -560,6 +510,8 @@ void bfd_putb64 (bfd_uint64_t, void *); void bfd_putl64 (bfd_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 *); @@ -568,195 +520,6 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); -#if defined(__STDC__) || defined(ALMOST_STDC) -struct ecoff_debug_info; -struct ecoff_debug_swap; -struct ecoff_extr; -struct bfd_symbol; -struct bfd_link_info; -struct bfd_link_hash_entry; -struct bfd_section_already_linked; -struct bfd_elf_version_tree; -#endif - -extern bfd_boolean bfd_section_already_linked_table_init (void); -extern void bfd_section_already_linked_table_free (void); -extern bfd_boolean _bfd_handle_already_linked - (struct bfd_section *, struct bfd_section_already_linked *, - struct bfd_link_info *); - -/* Externally visible ECOFF routines. */ - -extern bfd_vma bfd_ecoff_get_gp_value - (bfd * abfd); -extern bfd_boolean bfd_ecoff_set_gp_value - (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks - (bfd *abfd, unsigned long gprmask, unsigned long fprmask, - unsigned long *cprmask); -extern void *bfd_ecoff_debug_init - (bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern void bfd_ecoff_debug_free - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct ecoff_debug_info *input_debug, - const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other - (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, - const struct ecoff_debug_swap *output_swap, bfd *input_bfd, - struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), - void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, const char *name, - struct ecoff_extr *esym); -extern bfd_size_type bfd_ecoff_debug_size - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug - (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug - (void *handle, bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, - struct bfd_link_info *info, file_ptr where); - -/* Externally visible ELF routines. */ - -struct bfd_link_needed_list -{ - struct bfd_link_needed_list *next; - bfd *by; - const char *name; -}; - -enum dynamic_lib_link_class { - DYN_NORMAL = 0, - DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2, - DYN_NO_ADD_NEEDED = 4, - DYN_NO_NEEDED = 8 -}; - -enum notice_asneeded_action { - notice_as_needed, - notice_not_needed, - notice_needed -}; - -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern struct bfd_link_needed_list *bfd_elf_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list - (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char *, const char *, - const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr - (bfd *, struct bfd_link_info *); -extern void bfd_elf_set_dt_needed_name - (bfd *, const char *); -extern const char *bfd_elf_get_dt_soname - (bfd *); -extern void bfd_elf_set_dyn_lib_class - (bfd *, enum dynamic_lib_link_class); -extern int bfd_elf_get_dyn_lib_class - (bfd *); -extern struct bfd_link_needed_list *bfd_elf_get_runpath_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_discard_info - (bfd *, struct bfd_link_info *); -extern unsigned int _bfd_elf_default_action_discarded - (struct bfd_section *); - -/* Return an upper bound on the number of bytes required to store a - copy of ABFD's program header table entries. Return -1 if an error - occurs; bfd_get_error will return an appropriate code. */ -extern long bfd_get_elf_phdr_upper_bound - (bfd *abfd); - -/* Copy ABFD's program header table entries to *PHDRS. The entries - will be stored as an array of Elf_Internal_Phdr structures, as - defined in include/elf/internal.h. To find out how large the - buffer needs to be, call bfd_get_elf_phdr_upper_bound. - - Return the number of program header table entries read, or -1 if an - error occurs; bfd_get_error will return an appropriate code. */ -extern int bfd_get_elf_phdrs - (bfd *abfd, void *phdrs); - -/* 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. */ -extern bfd *bfd_elf_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); - -extern struct bfd_section *_bfd_elf_tls_setup - (bfd *, struct bfd_link_info *); - -extern struct bfd_section * -_bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma); - -extern void _bfd_fix_excluded_sec_syms - (bfd *, struct bfd_link_info *); - -extern unsigned bfd_m68k_mach_to_features (int); - -extern int bfd_m68k_features_to_mach (unsigned); - -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int); - -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, - char **); - -/* SunOS shared library support routines for the linker. */ - -extern struct bfd_link_needed_list *bfd_sunos_get_needed_list - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sunos_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, - struct bfd_section **, struct bfd_section **); - -/* Linux shared library support routines for the linker. */ - -extern bfd_boolean bfd_i386linux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_m68klinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_sparclinux_size_dynamic_sections - (bfd *, struct bfd_link_info *); /* mmap hacks */ @@ -784,229 +547,43 @@ extern void bfd_free_window (bfd_window *); extern bfd_boolean bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); + +/* Externally visible ELF routines. */ -/* XCOFF support routines for the linker. */ +/* 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. -extern bfd_boolean bfd_xcoff_split_import_path - (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path - (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, - const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol - (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment - (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections - (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); - -/* XCOFF support routines for ar. */ -extern bfd_boolean bfd_xcoff_ar_archive_set_magic - (bfd *, char *); - -/* Externally visible COFF routines. */ - -#if defined(__STDC__) || defined(ALMOST_STDC) -struct internal_syment; -union internal_auxent; -#endif - -extern bfd_boolean bfd_coff_get_syment - (bfd *, struct bfd_symbol *, struct internal_syment *); - -extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct bfd_symbol *, int, union internal_auxent *); - -extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct bfd_symbol *, unsigned int); - -extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - -/* ARM VFP11 erratum workaround support. */ -typedef enum -{ - BFD_ARM_VFP11_FIX_DEFAULT, - BFD_ARM_VFP11_FIX_NONE, - BFD_ARM_VFP11_FIX_SCALAR, - BFD_ARM_VFP11_FIX_VECTOR -} bfd_arm_vfp11_fix; - -extern void bfd_elf32_arm_init_maps - (bfd *); - -extern void bfd_elf32_arm_set_vfp11_fix - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_set_cortex_a8_fix - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan - (bfd *, struct bfd_link_info *); - -extern void bfd_elf32_arm_vfp11_fix_veneer_locations - (bfd *, struct bfd_link_info *); - -/* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* PE ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_pe_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_arm_pe_process_before_allocation - (bfd *, struct bfd_link_info *, int); - -extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -/* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections - (struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *); - -void bfd_elf32_arm_set_target_relocs - (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int, int, int); - -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking - (bfd *, struct bfd_link_info *); - -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd - (bfd *, struct bfd_link_info *); - -/* ELF ARM mapping symbol support */ -#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); - -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); - -/* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines - (bfd *, bfd *); - -extern bfd_boolean bfd_arm_update_notes - (bfd *, const char *); - -extern unsigned int bfd_arm_get_mach_from_notes - (bfd *, const char *); - -/* ARM stub generation support. Called from the linker. */ -extern int elf32_arm_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf32_arm_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs - (struct bfd_link_info *); - -/* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); - -/* PowerPC @tls opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tls_transform - (unsigned int, unsigned int); -/* PowerPC @tprel opcode transform/validate. */ -extern unsigned int _bfd_elf_ppc_at_tprel_transform - (unsigned int, unsigned int); - -extern void bfd_elf64_aarch64_init_maps - (bfd *); - -void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int); - -/* ELF AArch64 mapping symbol support. */ -#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) -#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name - (const char * name, int type); - -/* AArch64 stub generation support. Called from the linker. */ -extern int elf64_aarch64_setup_section_lists - (bfd *, struct bfd_link_info *); -extern void elf64_aarch64_next_input_section - (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, - struct bfd_section * (*) (const char *, struct bfd_section *), - void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs - (struct bfd_link_info *); - -/* TI COFF load page support. */ -extern void bfd_ticoff_set_section_load_page - (struct bfd_section *, int); - -extern int bfd_ticoff_get_section_load_page - (struct bfd_section *); - -/* H8/300 functions. */ -extern bfd_vma bfd_h8300_pad_address - (bfd *, bfd_vma); - -/* IA64 Itanium code generation. Called from linker. */ -extern void bfd_elf32_ia64_after_parse - (int); - -extern void bfd_elf64_ia64_after_parse - (int); - -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct coff_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - -extern struct coff_comdat_info *bfd_coff_get_comdat_section - (bfd *, struct bfd_section *); + 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; /* Extracted from init.c. */ -void bfd_init (void); +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); @@ -1015,7 +592,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +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, @@ -1051,14 +629,26 @@ 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); bfd_boolean 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); + +void bfd_set_filename (bfd *abfd, char *filename); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ @@ -1068,9 +658,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) @@ -1081,6 +671,20 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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 \ @@ -1100,7 +704,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section BFD_SEND (abfd, bfd_getx_signed_64, (ptr)) #define bfd_get(bits, abfd, ptr) \ - ((bits) == 8 ? (bfd_vma) bfd_get_8 (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) \ @@ -1108,9 +712,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #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) \ + : (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)) @@ -1175,7 +779,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -file_ptr bfd_get_size (bfd *abfd); +ufile_ptr bfd_get_size (bfd *abfd); + +ufile_ptr bfd_get_file_size (bfd *abfd); void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, int prot, int flags, file_ptr offset, @@ -1183,6 +789,7 @@ void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ + typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1190,10 +797,10 @@ typedef struct bfd_section const char *name; /* A unique sequence number. */ - int id; + unsigned int id; /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */ - int index; + unsigned int index; /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; @@ -1206,31 +813,31 @@ typedef struct bfd_section synthesized from other information. */ flagword flags; -#define SEC_NO_FLAGS 0x000 +#define SEC_NO_FLAGS 0x0 /* Tells the OS to allocate space for this section when loading. This is clear for a section containing debug information only. */ -#define SEC_ALLOC 0x001 +#define SEC_ALLOC 0x1 /* Tells the OS to load the section from the file when loading. This is clear for a .bss section. */ -#define SEC_LOAD 0x002 +#define SEC_LOAD 0x2 /* The section contains data still to be relocated, so there is some relocation information too. */ -#define SEC_RELOC 0x004 +#define SEC_RELOC 0x4 /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x008 +#define SEC_READONLY 0x8 /* The section contains code only. */ -#define SEC_CODE 0x010 +#define SEC_CODE 0x10 /* The section contains data only. */ -#define SEC_DATA 0x020 +#define SEC_DATA 0x20 /* The section will reside in ROM. */ -#define SEC_ROM 0x040 +#define SEC_ROM 0x40 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1242,75 +849,72 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x080 +#define SEC_CONSTRUCTOR 0x80 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x100 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x200 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x400 +#define SEC_THREAD_LOCAL 0x400 - /* The section has GOT references. This flag is only for the - linker, and is currently only used by the elf32-hppa back end. - It will be set if global offset table references were detected - in this section, which indicate to the linker that the section - contains PIC code, and must be handled specially when doing a - static link. */ -#define SEC_HAS_GOT_REF 0x800 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x1000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x2000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x4000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x8000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x10000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x20000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0xc0000 +#define SEC_LINK_DUPLICATES 0xc0000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ -#define SEC_LINK_DUPLICATES_DISCARD 0x0 +#define SEC_LINK_DUPLICATES_DISCARD 0x0 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ @@ -1326,28 +930,28 @@ typedef struct bfd_section relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x100000 +#define SEC_LINKER_CREATED 0x100000 /* This section should not be subject to garbage collection. Also set to inform the linker that this section should not be listed in the link map as discarded. */ -#define SEC_KEEP 0x200000 +#define SEC_KEEP 0x200000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x400000 +#define SEC_SMALL_DATA 0x400000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x800000 +#define SEC_MERGE 0x800000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x1000000 +#define SEC_STRINGS 0x1000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x2000000 +#define SEC_GROUP 0x2000000 /* The section is a COFF shared library section. This flag is only for the linker. If this type of section appears in @@ -1358,32 +962,51 @@ typedef struct bfd_section might be cleaner to have some more general mechanism to allow the back end to control what the linker does with sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x4000000 +#define SEC_COFF_SHARED_LIBRARY 0x4000000 /* This input section should be copied to output in reverse order as an array of pointers. This is for ELF linker internal use only. */ -#define SEC_ELF_REVERSE_COPY 0x4000000 +#define SEC_ELF_REVERSE_COPY 0x4000000 /* This section contains data which may be shared with other executables or shared objects. This is for COFF only. */ -#define SEC_COFF_SHARED 0x8000000 +#define SEC_COFF_SHARED 0x8000000 + + /* This section should be compressed. This is for ELF linker + internal use only. */ +#define SEC_ELF_COMPRESS 0x8000000 /* When a section with this flag is being linked, then if the size of the input section is less than a page, it should not cross a page boundary. If the size of the input section is one page or more, it should be aligned on a page boundary. This is for TI TMS320C54X only. */ -#define SEC_TIC54X_BLOCK 0x10000000 +#define SEC_TIC54X_BLOCK 0x10000000 + + /* This section should be renamed. This is for ELF linker + internal use only. */ +#define SEC_ELF_RENAME 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. */ -#define SEC_TIC54X_CLINK 0x20000000 +#define SEC_TIC54X_CLINK 0x20000000 + + /* This section contains vliw code. This is for Toshiba MeP only. */ +#define SEC_MEP_VLIW 0x20000000 + + /* All symbols, sizes and relocations in this section are octets + instead of bytes. Required for DWARF debug sections as DWARF + information is organized in octets, not bytes. */ +#define SEC_ELF_OCTETS 0x40000000 /* Indicate that section has the no read flag set. This happens when memory read flag isn't set. */ -#define SEC_COFF_NOREAD 0x40000000 +#define SEC_COFF_NOREAD 0x40000000 + + /* Indicate that section has the purecode flag set. */ +#define SEC_ELF_PURECODE 0x80000000 /* End of section flags. */ @@ -1420,6 +1043,8 @@ typedef struct bfd_section #define SEC_INFO_TYPE_MERGE 2 #define SEC_INFO_TYPE_EH_FRAME 3 #define SEC_INFO_TYPE_JUST_SYMS 4 +#define SEC_INFO_TYPE_TARGET 5 +#define SEC_INFO_TYPE_EH_FRAME_ENTRY 6 /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; @@ -1449,7 +1074,7 @@ typedef struct bfd_section information. */ bfd_vma lma; - /* The size of the section in octets, as it will be output. + /* The size of the section in *octets*, as it will be output. Contains a value even if the section has no contents (e.g., the size of <<.bss>>). */ bfd_size_type size; @@ -1564,20 +1189,100 @@ typedef struct bfd_section } asection; /* Relax table contains information about instructions which can - be removed by relaxation -- replacing a long address with a + be removed by relaxation -- replacing a long address with a short address. */ struct relax_table { /* Address where bytes may be deleted. */ bfd_vma addr; - + /* Number of bytes to be deleted. */ int size; }; +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 bfd_boolean +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 bfd_boolean +bfd_set_section_userdata (asection *sec, void *val) +{ + sec->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (asection *sec, bfd_vma val) +{ + sec->vma = sec->lma = val; + sec->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_lma (asection *sec, bfd_vma val) +{ + sec->lma = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (asection *sec, unsigned int val) +{ + 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 std_section[4]; +extern asection _bfd_std_section[4]; #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" @@ -1585,117 +1290,51 @@ extern asection std_section[4]; #define BFD_IND_SECTION_NAME "*IND*" /* Pointer to the common section. */ -#define bfd_com_section_ptr (&std_section[0]) +#define bfd_com_section_ptr (&_bfd_std_section[0]) /* Pointer to the undefined section. */ -#define bfd_und_section_ptr (&std_section[1]) +#define bfd_und_section_ptr (&_bfd_std_section[1]) /* Pointer to the absolute section. */ -#define bfd_abs_section_ptr (&std_section[2]) +#define bfd_abs_section_ptr (&_bfd_std_section[2]) /* Pointer to the indirect section. */ -#define bfd_ind_section_ptr (&std_section[3]) +#define bfd_ind_section_ptr (&_bfd_std_section[3]) -#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +static inline bfd_boolean +bfd_is_und_section (const asection *sec) +{ + return sec == bfd_und_section_ptr; +} -#define bfd_is_const_section(SEC) \ - ( ((SEC) == bfd_abs_section_ptr) \ - || ((SEC) == bfd_und_section_ptr) \ - || ((SEC) == bfd_com_section_ptr) \ - || ((SEC) == bfd_ind_section_ptr)) +static inline bfd_boolean +bfd_is_abs_section (const asection *sec) +{ + return sec == bfd_abs_section_ptr; +} -/* Macros 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. */ -#define bfd_section_list_remove(ABFD, S) \ - do \ - { \ - asection *_s = 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; \ - } \ - while (0) -#define bfd_section_list_append(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->next = NULL; \ - if (_abfd->section_last) \ - { \ - _s->prev = _abfd->section_last; \ - _abfd->section_last->next = _s; \ - } \ - else \ - { \ - _s->prev = NULL; \ - _abfd->sections = _s; \ - } \ - _abfd->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_prepend(ABFD, S) \ - do \ - { \ - asection *_s = S; \ - bfd *_abfd = ABFD; \ - _s->prev = NULL; \ - if (_abfd->sections) \ - { \ - _s->next = _abfd->sections; \ - _abfd->sections->prev = _s; \ - } \ - else \ - { \ - _s->next = NULL; \ - _abfd->section_last = _s; \ - } \ - _abfd->sections = _s; \ - } \ - while (0) -#define bfd_section_list_insert_after(ABFD, A, S) \ - do \ - { \ - asection *_a = A; \ - asection *_s = S; \ - asection *_next = _a->next; \ - _s->next = _next; \ - _s->prev = _a; \ - _a->next = _s; \ - if (_next) \ - _next->prev = _s; \ - else \ - (ABFD)->section_last = _s; \ - } \ - while (0) -#define bfd_section_list_insert_before(ABFD, B, S) \ - do \ - { \ - asection *_b = B; \ - asection *_s = S; \ - asection *_prev = _b->prev; \ - _s->prev = _prev; \ - _s->next = _b; \ - _b->prev = _s; \ - if (_prev) \ - _prev->next = _s; \ - else \ - (ABFD)->sections = _s; \ - } \ - while (0) -#define bfd_section_removed_from_list(ABFD, S) \ - ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) +static inline bfd_boolean +bfd_is_ind_section (const asection *sec) +{ + return sec == bfd_ind_section_ptr; +} -#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ +static inline bfd_boolean +bfd_is_const_section (const asection *sec) +{ + return sec >= bfd_abs_section_ptr && sec <= bfd_ind_section_ptr; +} + +/* Return TRUE if input section SEC has been discarded. */ +static inline bfd_boolean +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, id, index, next, prev, flags, user_set_vma, */ \ - { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ \ /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \ 0, 0, 1, 0, \ @@ -1731,11 +1370,23 @@ extern asection std_section[4]; { NULL }, { NULL } \ } +/* 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 + void bfd_section_list_clear (bfd *); asection *bfd_get_section_by_name (bfd *abfd, const char *name); -asection *bfd_get_next_section_by_name (asection *sec); +asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec); asection *bfd_get_linker_section (bfd *abfd, const char *name); @@ -1760,11 +1411,10 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags - (bfd *abfd, asection *sec, flagword flags); +bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section - (bfd *abfd, asection *sec, const char *newname); + (asection *sec, const char *newname); void bfd_map_over_sections (bfd *abfd, @@ -1776,8 +1426,7 @@ asection *bfd_sections_find_if bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size - (bfd *abfd, asection *sec, bfd_size_type val); +bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section, const void *data, @@ -1794,10 +1443,12 @@ bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ - BFD_SEND (obfd, _bfd_copy_private_section_data, \ - (ibfd, isection, obfd, osection)) + BFD_SEND (obfd, _bfd_copy_private_section_data, \ + (ibfd, isection, obfd, osection)) bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +const char *bfd_generic_group_name (bfd *, const asection *sec); + bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ @@ -1805,60 +1456,45 @@ 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_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that - only accepts a subset of the instructions - available to machines with higher numbers. - The exception is the "ca", which is - incompatible with all other machines except - "core". */ + 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. */ -#define bfd_mach_i960_core 1 -#define bfd_mach_i960_ka_sa 2 -#define bfd_mach_i960_kb_sb 3 -#define bfd_mach_i960_mc 4 -#define bfd_mach_i960_xa 5 -#define bfd_mach_i960_ca 6 -#define bfd_mach_i960_jx 7 -#define bfd_mach_i960_hx 8 + bfd_arch_or1k, /* OpenRISC 1000. */ +#define bfd_mach_or1k 1 +#define bfd_mach_or1knd 2 - bfd_arch_or32, /* OpenRISC 32 */ - - bfd_arch_sparc, /* SPARC */ + 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 @@ -1870,16 +1506,35 @@ enum bfd_architecture #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_v9b \ + ((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) - bfd_arch_spu, /* PowerPC SPU */ -#define bfd_mach_spu 256 - bfd_arch_mips, /* MIPS Rxxxx */ + ((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 @@ -1894,6 +1549,7 @@ enum bfd_architecture #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 @@ -1906,18 +1562,28 @@ enum bfd_architecture #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 #define bfd_mach_mips_loongson_2f 3002 -#define bfd_mach_mips_loongson_3a 3003 -#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ +#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_xlr 887682 /* decimal 'XLR' */ +#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 */ + 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) @@ -1926,32 +1592,35 @@ enum bfd_architecture #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_l1om, /* Intel L1OM */ + bfd_arch_l1om, /* Intel L1OM. */ #define bfd_mach_l1om (1 << 5) #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax) - bfd_arch_k1om, /* Intel K1OM */ + bfd_arch_k1om, /* Intel K1OM. */ #define bfd_mach_k1om (1 << 6) #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax) - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - 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 */ +#define bfd_mach_i386_nacl (1 << 7) +#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl) +#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl) +#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl) + 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_plugin, - bfd_arch_powerpc, /* PowerPC */ + bfd_arch_powerpc, /* PowerPC. */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 @@ -1978,59 +1647,59 @@ enum bfd_architecture #define bfd_mach_ppc_e6500 5007 #define bfd_mach_ppc_titan 83 #define bfd_mach_ppc_vle 84 - bfd_arch_rs6000, /* IBM RS/6000 */ + 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 */ + bfd_arch_hppa, /* HP PA RISC. */ #define bfd_mach_hppa10 10 #define bfd_mach_hppa11 11 #define bfd_mach_hppa20 20 #define bfd_mach_hppa20w 25 - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_d10v, /* Mitsubishi D10V. */ #define bfd_mach_d10v 1 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_dlx, /* DLX */ - bfd_arch_m68hc11, /* Motorola 68HC11 */ - bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_d30v, /* Mitsubishi D30V. */ + bfd_arch_dlx, /* DLX. */ + bfd_arch_m68hc11, /* Motorola 68HC11. */ + bfd_arch_m68hc12, /* Motorola 68HC12. */ #define bfd_mach_m6812_default 0 #define bfd_mach_m6812 1 #define bfd_mach_m6812s 2 - bfd_arch_m9s12x, /* Freescale S12X */ - bfd_arch_m9s12xg, /* Freescale XGATE */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_m9s12x, /* Freescale S12X. */ + bfd_arch_m9s12xg, /* Freescale XGATE. */ + bfd_arch_s12z, /* Freescale S12Z. */ +#define bfd_mach_s12z_default 0 + bfd_arch_z8k, /* Zilog Z8000. */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */ - bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */ -#define bfd_mach_sh 1 -#define bfd_mach_sh2 0x20 -#define bfd_mach_sh_dsp 0x2d -#define bfd_mach_sh2a 0x2a -#define bfd_mach_sh2a_nofpu 0x2b + bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */ +#define bfd_mach_sh 1 +#define bfd_mach_sh2 0x20 +#define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 -#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 -#define bfd_mach_sh2a_or_sh4 0x2a3 -#define bfd_mach_sh2a_or_sh3e 0x2a4 -#define bfd_mach_sh2e 0x2e -#define bfd_mach_sh3 0x30 -#define bfd_mach_sh3_nommu 0x31 -#define bfd_mach_sh3_dsp 0x3d -#define bfd_mach_sh3e 0x3e -#define bfd_mach_sh4 0x40 -#define bfd_mach_sh4_nofpu 0x41 -#define bfd_mach_sh4_nommu_nofpu 0x42 -#define bfd_mach_sh4a 0x4a -#define bfd_mach_sh4a_nofpu 0x4b -#define bfd_mach_sh4al_dsp 0x4d -#define bfd_mach_sh5 0x50 - bfd_arch_alpha, /* Dec Alpha */ -#define bfd_mach_alpha_ev4 0x10 -#define bfd_mach_alpha_ev5 0x20 -#define bfd_mach_alpha_ev6 0x30 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 +#define bfd_mach_sh2e 0x2e +#define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 +#define bfd_mach_sh3_dsp 0x3d +#define bfd_mach_sh3e 0x3e +#define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4_nommu_nofpu 0x42 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d + bfd_arch_alpha, /* Dec Alpha. */ +#define bfd_mach_alpha_ev4 0x10 +#define bfd_mach_alpha_ev5 0x20 +#define bfd_mach_alpha_ev6 0x30 bfd_arch_arm, /* Advanced Risc Machines ARM. */ #define bfd_mach_arm_unknown 0 #define bfd_mach_arm_2 1 @@ -2046,36 +1715,58 @@ enum bfd_architecture #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 #define bfd_mach_arm_iWMMXt2 13 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */ +#define bfd_mach_arm_5TEJ 14 +#define bfd_mach_arm_6 15 +#define bfd_mach_arm_6KZ 16 +#define bfd_mach_arm_6T2 17 +#define bfd_mach_arm_6K 18 +#define bfd_mach_arm_7 19 +#define bfd_mach_arm_6M 20 +#define bfd_mach_arm_6SM 21 +#define bfd_mach_arm_7EM 22 +#define bfd_mach_arm_8 23 +#define bfd_mach_arm_8R 24 +#define bfd_mach_arm_8M_BASE 25 +#define bfd_mach_arm_8M_MAIN 26 +#define bfd_mach_arm_8_1M_MAIN 27 + bfd_arch_nds32, /* Andes NDS32. */ +#define bfd_mach_n1 1 +#define bfd_mach_n1h 2 +#define bfd_mach_n1h_v2 3 +#define bfd_mach_n1h_v3 4 +#define bfd_mach_n1h_v3m 5 + bfd_arch_ns32k, /* National Semiconductors ns32000. */ + bfd_arch_tic30, /* Texas Instruments TMS320C30. */ + bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */ #define bfd_mach_tic3x 30 #define bfd_mach_tic4x 40 - bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ - bfd_arch_tic6x, /* Texas Instruments TMS320C6X */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */ + bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */ + bfd_arch_v850, /* NEC V850. */ + bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */ #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' #define bfd_mach_v850e2 0x4532 #define bfd_mach_v850e2v3 0x45325633 - bfd_arch_arc, /* ARC Cores */ -#define bfd_mach_arc_5 5 -#define bfd_mach_arc_6 6 -#define bfd_mach_arc_7 7 -#define bfd_mach_arc_8 8 - bfd_arch_m32c, /* Renesas M16C/M32C. */ -#define bfd_mach_m16c 0x75 -#define bfd_mach_m32c 0x78 - bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ +#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */ + bfd_arch_arc, /* ARC Cores. */ +#define bfd_mach_arc_a4 0 +#define bfd_mach_arc_a5 1 +#define bfd_mach_arc_arc600 2 +#define bfd_mach_arc_arc601 4 +#define bfd_mach_arc_arc700 3 +#define bfd_mach_arc_arcv2 5 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 + bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' #define bfd_mach_m32r2 '2' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ -#define bfd_mach_mn10300 300 + bfd_arch_mn10200, /* Matsushita MN10200. */ + bfd_arch_mn10300, /* Matsushita MN10300. */ +#define bfd_mach_mn10300 300 #define bfd_mach_am33 330 #define bfd_mach_am33_2 332 bfd_arch_fr30, @@ -2086,17 +1777,22 @@ enum bfd_architecture #define bfd_mach_fr300 300 #define bfd_mach_fr400 400 #define bfd_mach_fr450 450 -#define bfd_mach_frvtomcat 499 /* fr500 prototype */ +#define bfd_mach_frvtomcat 499 /* fr500 prototype. */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 - bfd_arch_moxie, /* The moxie processor */ + bfd_arch_moxie, /* The moxie processor. */ #define bfd_mach_moxie 1 + bfd_arch_ft32, /* The ft32 processor. */ +#define bfd_mach_ft32 1 +#define bfd_mach_ft32b 2 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 #define bfd_mach_mep_c5 0x6335 - bfd_arch_ia64, /* HP/Intel ia64 */ + bfd_arch_metag, +#define bfd_mach_metag 1 + bfd_arch_ia64, /* HP/Intel ia64. */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */ @@ -2105,7 +1801,9 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 - bfd_arch_epiphany, /* Adapteva EPIPHANY */ + bfd_arch_bpf, /* Linux eBPF. */ +#define bfd_mach_bpf 1 + bfd_arch_epiphany, /* Adapteva EPIPHANY. */ #define bfd_mach_epiphany16 1 #define bfd_mach_epiphany32 2 bfd_arch_mt, @@ -2124,78 +1822,117 @@ enum bfd_architecture #define bfd_mach_avr5 5 #define bfd_mach_avr51 51 #define bfd_mach_avr6 6 -#define bfd_mach_avrxmega1 101 -#define bfd_mach_avrxmega2 102 -#define bfd_mach_avrxmega3 103 -#define bfd_mach_avrxmega4 104 -#define bfd_mach_avrxmega5 105 -#define bfd_mach_avrxmega6 106 -#define bfd_mach_avrxmega7 107 - bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_avrtiny 100 +#define bfd_mach_avrxmega1 101 +#define bfd_mach_avrxmega2 102 +#define bfd_mach_avrxmega3 103 +#define bfd_mach_avrxmega4 104 +#define bfd_mach_avrxmega5 105 +#define bfd_mach_avrxmega6 106 +#define bfd_mach_avrxmega7 107 + bfd_arch_bfin, /* ADI Blackfin. */ #define bfd_mach_bfin 1 - bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ #define bfd_mach_cr16 1 - bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ -#define bfd_mach_cr16c 1 bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 - bfd_arch_cris, /* Axis CRIS */ + bfd_arch_cris, /* Axis CRIS. */ #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_riscv, +#define bfd_mach_riscv32 132 +#define bfd_mach_riscv64 164 bfd_arch_rl78, -#define bfd_mach_rl78 0x75 +#define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 - bfd_arch_s390, /* IBM s390 */ +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 + bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 - bfd_arch_score, /* Sunplus score */ -#define bfd_mach_score3 3 -#define bfd_mach_score7 7 - bfd_arch_openrisc, /* OpenRISC */ + bfd_arch_score, /* Sunplus score. */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, #define bfd_mach_xstormy16 1 bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */ -#define bfd_mach_msp11 11 -#define bfd_mach_msp110 110 -#define bfd_mach_msp12 12 -#define bfd_mach_msp13 13 -#define bfd_mach_msp14 14 -#define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 -#define bfd_mach_msp21 21 -#define bfd_mach_msp31 31 -#define bfd_mach_msp32 32 -#define bfd_mach_msp33 33 -#define bfd_mach_msp41 41 -#define bfd_mach_msp42 42 -#define bfd_mach_msp43 43 -#define bfd_mach_msp44 44 - bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_msp11 11 +#define bfd_mach_msp110 110 +#define bfd_mach_msp12 12 +#define bfd_mach_msp13 13 +#define bfd_mach_msp14 14 +#define bfd_mach_msp15 15 +#define bfd_mach_msp16 16 +#define bfd_mach_msp20 20 +#define bfd_mach_msp21 21 +#define bfd_mach_msp22 22 +#define bfd_mach_msp23 23 +#define bfd_mach_msp24 24 +#define bfd_mach_msp26 26 +#define bfd_mach_msp31 31 +#define bfd_mach_msp32 32 +#define bfd_mach_msp33 33 +#define bfd_mach_msp41 41 +#define bfd_mach_msp42 42 +#define bfd_mach_msp43 43 +#define bfd_mach_msp44 44 +#define bfd_mach_msp430x 45 +#define bfd_mach_msp46 46 +#define bfd_mach_msp47 47 +#define bfd_mach_msp54 54 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ #define bfd_mach_xc16x 1 #define bfd_mach_xc16xl 2 #define bfd_mach_xc16xs 3 - bfd_arch_xgate, /* Freescale XGATE */ + bfd_arch_xgate, /* Freescale XGATE. */ #define bfd_mach_xgate 1 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_z80, -#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ -#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ -#define bfd_mach_z80full 7 /* All undocumented instructions. */ -#define bfd_mach_r800 11 /* R800: successor with multiplication. */ - bfd_arch_lm32, /* Lattice Mico32 */ -#define bfd_mach_lm32 1 - bfd_arch_microblaze,/* Xilinx MicroBlaze. */ - bfd_arch_tilepro, /* Tilera TILEPro */ - bfd_arch_tilegx, /* Tilera TILE-Gx */ -#define bfd_mach_tilepro 1 -#define bfd_mach_tilegx 1 -#define bfd_mach_tilegx32 2 - bfd_arch_aarch64, /* AArch64 */ +#define bfd_mach_gbz80 0 /* GameBoy Z80 (reduced instruction set) */ +#define bfd_mach_z80strict 1 /* Z80 without undocumented opcodes. */ +#define bfd_mach_z180 2 /* Z180: successor with additional instructions, but without halves of ix and iy */ +#define bfd_mach_z80 3 /* Z80 with ixl, ixh, iyl, and iyh. */ +#define bfd_mach_ez80_z80 4 /* eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode */ +#define bfd_mach_ez80_adl 5 /* eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode */ +#define bfd_mach_z80full 7 /* Z80 with all undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32. */ +#define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ + bfd_arch_tilepro, /* Tilera TILEPro. */ + bfd_arch_tilegx, /* Tilera TILE-Gx. */ +#define bfd_mach_tilepro 1 +#define bfd_mach_tilegx 1 +#define bfd_mach_tilegx32 2 + bfd_arch_aarch64, /* AArch64. */ #define bfd_mach_aarch64 0 +#define bfd_mach_aarch64_ilp32 32 + bfd_arch_nios2, /* Nios II. */ +#define bfd_mach_nios2 0 +#define bfd_mach_nios2r1 1 +#define bfd_mach_nios2r2 2 + bfd_arch_visium, /* Visium. */ +#define bfd_mach_visium 1 + bfd_arch_wasm32, /* WebAssembly. */ +#define bfd_mach_wasm32 1 + bfd_arch_pru, /* PRU. */ +#define bfd_mach_pru 0 + bfd_arch_nfp, /* Netronome Flow Processor */ +#define bfd_mach_nfp3200 0x3200 +#define bfd_mach_nfp6000 0x6000 + bfd_arch_csky, /* C-SKY. */ +#define bfd_mach_ck_unknown 0 +#define bfd_mach_ck510 1 +#define bfd_mach_ck610 2 +#define bfd_mach_ck801 3 +#define bfd_mach_ck802 4 +#define bfd_mach_ck803 5 +#define bfd_mach_ck807 6 +#define bfd_mach_ck810 7 bfd_arch_last }; @@ -2213,8 +1950,8 @@ typedef struct bfd_arch_info The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ bfd_boolean the_default; - const struct bfd_arch_info * (*compatible) - (const struct bfd_arch_info *a, const struct bfd_arch_info *b); + const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, + const struct bfd_arch_info *); bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); @@ -2225,6 +1962,16 @@ typedef struct bfd_arch_info bfd_boolean code); const struct bfd_arch_info *next; + + /* On some architectures the offset for a relocation can point into + the middle of an instruction. This field specifies the maximum + offset such a relocation can have (in octets). This affects the + behaviour of the disassembler, since a value greater than zero + means that it may need to disassemble an instruction twice, once + to get its length and then a second time to display it. If the + value is negative then this has to be done for every single + instruction, regardless of the offset of the reloc. */ + signed int max_reloc_offset_into_insn; } bfd_arch_info_type; @@ -2239,13 +1986,16 @@ const bfd_arch_info_type *bfd_arch_get_compatible void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -enum bfd_architecture bfd_get_arch (bfd *abfd); +bfd_boolean bfd_default_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); -unsigned long bfd_get_mach (bfd *abfd); +enum bfd_architecture bfd_get_arch (const bfd *abfd); -unsigned int bfd_arch_bits_per_byte (bfd *abfd); +unsigned long bfd_get_mach (const bfd *abfd); -unsigned int bfd_arch_bits_per_address (bfd *abfd); +unsigned int bfd_arch_bits_per_byte (const bfd *abfd); + +unsigned int bfd_arch_bits_per_address (const bfd *abfd); const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd); @@ -2255,16 +2005,19 @@ const bfd_arch_info_type *bfd_lookup_arch const char *bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine); -unsigned int bfd_octets_per_byte (bfd *abfd); +unsigned int bfd_octets_per_byte (const bfd *abfd, + const asection *sec); 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. */ - bfd_reloc_ok, + /* 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, @@ -2284,14 +2037,14 @@ typedef enum bfd_reloc_status /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently - generated only when linking i960 coff files with i960 b.out - symbols. If this type is returned, the error_message argument - to bfd_perform_relocation will be set. */ + /* 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 { @@ -2310,6 +2063,7 @@ typedef struct reloc_cache_entry } arelent; + enum complain_overflow { /* Do not complain on overflow. */ @@ -2328,51 +2082,39 @@ enum complain_overflow 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 - external idea of what a reloc number is stored - in this field. For example, a PC relative word relocation - in a coff environment has the type 023 - because that's - what the outside world calls a R_PCRWORD reloc. */ + /* 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 value the final relocation is shifted right by. This drops - unwanted data from the relocation. */ - unsigned int rightshift; + /* The encoded size of the item to be relocated. This is *not* a + power-of-two measure. Use bfd_get_reloc_size to find the size + of the item in bytes. */ + unsigned int size:3; - /* The size of the item to be relocated. This is *not* a - power-of-two measure. To get the number of bytes operated - on by a type of relocation, use bfd_get_reloc_size. */ - int size; + /* The number of bits in the field to be relocated. This is used + when doing overflow checking. */ + unsigned int bitsize:7; - /* The number of bits in the item to be relocated. This is used - when doing overflow checking. */ - unsigned int bitsize; + /* The value the final relocation is shifted right by. This drops + unwanted data from the relocation. */ + unsigned int rightshift:6; - /* The relocation is relative to the field being relocated. */ - bfd_boolean pc_relative; - - /* The bit position of the reloc value in the destination. - The relocated value is left shifted by this amount. */ - unsigned int bitpos; + /* 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 complain_overflow complain_on_overflow; + ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; - /* 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 (e.g., i960 callj - instructions). */ - bfd_reloc_status_type (*special_function) - (bfd *, arelent *, struct bfd_symbol *, void *, asection *, - bfd *, char **); + /* The relocation value should be negated before applying. */ + unsigned int negate:1; - /* The textual name of the relocation type. */ - char *name; + /* The relocation is relative to the item being relocated. */ + unsigned int pc_relative:1; /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the @@ -2389,56 +2131,49 @@ struct reloc_howto_struct 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. */ - bfd_boolean partial_inplace; - - /* 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 be zero. Non-zero values for ELF USE_RELA targets are - bogus as in those cases the value in the dst_mask part of the - section contents should be treated as garbage. */ - bfd_vma src_mask; - - /* dst_mask selects which parts of the instruction (or data) are - replaced with a relocated value. */ - bfd_vma dst_mask; + unsigned int partial_inplace:1; /* 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., m88k bcs); this flag signals the fact. */ - bfd_boolean pcrel_offset; + empty (e.g., ELF); this flag signals the fact. */ + unsigned int pcrel_offset: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 + 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; + + /* dst_mask selects which parts of the instruction (or data) are + replaced with a relocated value. */ + bfd_vma dst_mask; + + /* 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 **); + + /* The textual name of the relocation type. */ + const char *name; }; -#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } -#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ - HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ - NAME, FALSE, 0, 0, IN) - +#define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ + inplace, src_mask, dst_mask, pcrel_off) \ + { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ + size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ NULL, FALSE, 0, 0, FALSE) -#define HOWTO_PREPARE(relocation, symbol) \ - { \ - if (symbol != NULL) \ - { \ - if (bfd_is_com_section (symbol->section)) \ - { \ - relocation = 0; \ - } \ - else \ - { \ - relocation = symbol->value; \ - } \ - } \ - } - unsigned int bfd_get_reloc_size (reloc_howto_type *); typedef struct relent_chain @@ -2455,6 +2190,12 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); +bfd_boolean bfd_reloc_offset_in_range + (reloc_howto_type *howto, + bfd *abfd, + asection *section, + bfd_size_type offset); + bfd_reloc_status_type bfd_perform_relocation (bfd *abfd, arelent *reloc_entry, @@ -2485,9 +2226,7 @@ enum bfd_reloc_code_real { /* 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. - -The 24-bit relocation is used in some Intel 960 configurations. */ +the section containing the relocation. It depends on the specific target. */ BFD_RELOC_64_PCREL, BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, @@ -2521,6 +2260,10 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_8_PLTOFF, +/* Size relocations. */ + BFD_RELOC_SIZE32, + BFD_RELOC_SIZE64, + /* Relocations used by 68K ELF. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, @@ -2575,9 +2318,6 @@ decided relatively late. */ BFD_RELOC_GPREL16, BFD_RELOC_GPREL32, -/* Reloc types used for i960/b.out. */ - BFD_RELOC_I960_CALLJ, - /* SPARC ELF relocations. There is probably some overlap with other relocation types already defined. */ BFD_RELOC_NONE, @@ -2851,6 +2591,15 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_10_PCREL_S1, BFD_RELOC_MICROMIPS_16_PCREL_S1, +/* MIPS16 PC-relative relocation. */ + BFD_RELOC_MIPS16_16_PCREL_S1, + +/* 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, + /* microMIPS versions of generic BFD relocs. */ BFD_RELOC_MICROMIPS_GPREL16, BFD_RELOC_MICROMIPS_HI16, @@ -2913,6 +2662,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MICROMIPS_TLS_TPREL_HI16, BFD_RELOC_MIPS_TLS_TPREL_LO16, BFD_RELOC_MICROMIPS_TLS_TPREL_LO16, + BFD_RELOC_MIPS_EH, /* MIPS ELF relocations (VxWorks and PLT extensions). */ @@ -2924,6 +2674,18 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MOXIE_10_PCREL, +/* 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, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -3048,6 +2810,7 @@ instruction. */ 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, @@ -3077,6 +2840,10 @@ instruction. */ 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, @@ -3152,6 +2919,8 @@ instruction. */ 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_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, BFD_RELOC_PPC64_HIGHEST, @@ -3175,6 +2944,34 @@ instruction. */ 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_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, /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, @@ -3209,16 +3006,27 @@ instruction. */ BFD_RELOC_PPC_GOT_DTPREL16_HA, 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_TLSGD34, + BFD_RELOC_PPC64_GOT_TLSLD34, + BFD_RELOC_PPC64_GOT_TPREL34, + BFD_RELOC_PPC64_GOT_DTPREL34, + BFD_RELOC_PPC64_TLS_PCREL, /* IBM 370/390 relocations */ BFD_RELOC_I370_D12, @@ -3248,6 +3056,24 @@ field in the instruction. */ /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ BFD_RELOC_ARM_PCREL_JUMP, +/* ARM 5-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_THUMB_PCREL_BRANCH5, + +/* ARM 6-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_THUMB_PCREL_BFCSEL, + +/* ARM 17-bit pc-relative branch for Branch Future instructions. */ + BFD_RELOC_ARM_THUMB_BF17, + +/* ARM 13-bit pc-relative branch for BFCSEL instruction. */ + BFD_RELOC_ARM_THUMB_BF13, + +/* ARM 19-bit pc-relative branch for Branch Future Link instruction. */ + BFD_RELOC_ARM_THUMB_BF19, + +/* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */ + BFD_RELOC_ARM_THUMB_LOOP12, + /* 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 @@ -3294,6 +3120,15 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_THUMB_MOVW_PCREL, BFD_RELOC_ARM_THUMB_MOVT_PCREL, +/* 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, + /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_GLOB_DAT, @@ -3356,6 +3191,12 @@ pc-relative or some form of GOT-indirect relocation. */ /* ARM support for STT_GNU_IFUNC. */ BFD_RELOC_ARM_IRELATIVE, +/* 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, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -3373,6 +3214,7 @@ pc-relative or some form of GOT-indirect relocation. */ 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, @@ -3484,16 +3326,76 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_SH_GOTOFFFUNCDESC20, BFD_RELOC_SH_FUNCDESC, -/* ARC Cores relocs. -ARC 22 bit pc-relative branch. The lowest two bits must be zero and are -not stored in the instruction. The high 20 bits are installed in bits 26 -through 7 of the instruction. */ - BFD_RELOC_ARC_B22_PCREL, - -/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not -stored in the instruction. The high 24 bits are installed in bits 23 -through 0. */ - BFD_RELOC_ARC_B26, +/* 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, /* ADI Blackfin 16 bit immediate absolute reloc. */ BFD_RELOC_BFIN_16_IMM, @@ -3740,6 +3642,223 @@ add3, load, and store instructions. */ BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO, +/* NDS32 relocs. +This is a 20 bit absolute address. */ + BFD_RELOC_NDS32_20, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_9_PCREL, + +/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_WORD_9_PCREL, + +/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_15_PCREL, + +/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_17_PCREL, + +/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_25_PCREL, + +/* This is a 20-bit reloc containing the high 20 bits of an address +used with the lower 12 bits */ + BFD_RELOC_NDS32_HI20, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* This is a 16-bit reloc containing the small data area 16-bit signed offset +and shift left by 3 */ + BFD_RELOC_NDS32_SDA16S3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* for PIC */ + BFD_RELOC_NDS32_PLTREL_HI20, + BFD_RELOC_NDS32_PLTREL_LO12, + BFD_RELOC_NDS32_PLT_GOTREL_HI20, + BFD_RELOC_NDS32_PLT_GOTREL_LO12, + +/* for floating point */ + BFD_RELOC_NDS32_SDA12S2_DP, + BFD_RELOC_NDS32_SDA12S2_SP, + BFD_RELOC_NDS32_LO12S2_DP, + BFD_RELOC_NDS32_LO12S2_SP, + +/* for dwarf2 debug_line. */ + BFD_RELOC_NDS32_DWARF2_OP1, + BFD_RELOC_NDS32_DWARF2_OP2, + BFD_RELOC_NDS32_DWARF2_LEB, + +/* for eliminate 16-bit instructions */ + BFD_RELOC_NDS32_UPDATE_TA, + +/* 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, + +/* NDS32 relocs. +This is a 5 bit absolute address. */ + BFD_RELOC_NDS32_5, + +/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */ + BFD_RELOC_NDS32_10_UPCREL, + +/* If fp were omitted, fp can used as another gp. */ + BFD_RELOC_NDS32_SDA_FP7U2_RELA, + +/* 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, + +/* This is a 25 bit absolute address. */ + BFD_RELOC_NDS32_25_ABS, + +/* For ex9 and ifc using. */ + BFD_RELOC_NDS32_DATA, + BFD_RELOC_NDS32_TRAN, + BFD_RELOC_NDS32_17IFC_PCREL, + BFD_RELOC_NDS32_10IFCU_PCREL, + +/* 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, + /* This is a 9-bit reloc */ BFD_RELOC_V850_9_PCREL, @@ -3996,6 +4115,46 @@ short offset into 11 bits. */ BFD_RELOC_MEP_GNU_VTENTRY, +/* 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, + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -4095,7 +4254,7 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */ command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, -/* This is a 16 bit reloc for the AVR that stores 8 bit value +/* 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. */ @@ -4157,6 +4316,78 @@ in .byte hi8(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, + +/* 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, + +/* 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, + /* Renesas RL78 Relocations. */ BFD_RELOC_RL78_NEG8, BFD_RELOC_RL78_NEG16, @@ -4190,6 +4421,8 @@ in .byte hlo8(symbol) */ 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, @@ -4247,12 +4480,24 @@ in .byte hlo8(symbol) */ /* 16 bit GOT offset. */ BFD_RELOC_390_GOT16, +/* PC relative 12 bit shifted by 1. */ + BFD_RELOC_390_PC12DBL, + +/* 12 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT12DBL, + /* PC relative 16 bit shifted by 1. */ BFD_RELOC_390_PC16DBL, /* 16 bit PC rel. PLT shifted by 1. */ BFD_RELOC_390_PLT16DBL, +/* PC relative 24 bit shifted by 1. */ + BFD_RELOC_390_PC24DBL, + +/* 24 bit PC rel. PLT shifted by 1. */ + BFD_RELOC_390_PLT24DBL, + /* PC relative 32 bit shifted by 1. */ BFD_RELOC_390_PC32DBL, @@ -4620,47 +4865,10 @@ This is the 8 bit high part of an absolute address and immediately follows a matching LO8XG part. */ BFD_RELOC_M68HC12_HI8XG, -/* NS CR16C Relocations. */ - BFD_RELOC_16C_NUM08, - BFD_RELOC_16C_NUM08_C, - BFD_RELOC_16C_NUM16, - BFD_RELOC_16C_NUM16_C, - BFD_RELOC_16C_NUM32, - BFD_RELOC_16C_NUM32_C, - BFD_RELOC_16C_DISP04, - BFD_RELOC_16C_DISP04_C, - BFD_RELOC_16C_DISP08, - BFD_RELOC_16C_DISP08_C, - BFD_RELOC_16C_DISP16, - BFD_RELOC_16C_DISP16_C, - BFD_RELOC_16C_DISP24, - BFD_RELOC_16C_DISP24_C, - BFD_RELOC_16C_DISP24a, - BFD_RELOC_16C_DISP24a_C, - BFD_RELOC_16C_REG04, - BFD_RELOC_16C_REG04_C, - BFD_RELOC_16C_REG04a, - BFD_RELOC_16C_REG04a_C, - BFD_RELOC_16C_REG14, - BFD_RELOC_16C_REG14_C, - BFD_RELOC_16C_REG16, - BFD_RELOC_16C_REG16_C, - BFD_RELOC_16C_REG20, - BFD_RELOC_16C_REG20_C, - BFD_RELOC_16C_ABS20, - BFD_RELOC_16C_ABS20_C, - BFD_RELOC_16C_ABS24, - BFD_RELOC_16C_ABS24_C, - BFD_RELOC_16C_IMM04, - BFD_RELOC_16C_IMM04_C, - BFD_RELOC_16C_IMM16, - BFD_RELOC_16C_IMM16_C, - BFD_RELOC_16C_IMM20, - BFD_RELOC_16C_IMM20_C, - BFD_RELOC_16C_IMM24, - BFD_RELOC_16C_IMM24_C, - BFD_RELOC_16C_IMM32, - BFD_RELOC_16C_IMM32_C, +/* 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, /* NS CR16 Relocations. */ BFD_RELOC_CR16_NUM8, @@ -4773,43 +4981,46 @@ a matching LO8XG part. */ BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_IE, -/* Intel i860 Relocations. */ - BFD_RELOC_860_COPY, - BFD_RELOC_860_GLOB_DAT, - BFD_RELOC_860_JUMP_SLOT, - BFD_RELOC_860_RELATIVE, - BFD_RELOC_860_PC26, - BFD_RELOC_860_PLT26, - BFD_RELOC_860_PC16, - BFD_RELOC_860_LOW0, - BFD_RELOC_860_SPLIT0, - BFD_RELOC_860_LOW1, - BFD_RELOC_860_SPLIT1, - BFD_RELOC_860_LOW2, - BFD_RELOC_860_SPLIT2, - BFD_RELOC_860_LOW3, - BFD_RELOC_860_LOGOT0, - BFD_RELOC_860_SPGOT0, - BFD_RELOC_860_LOGOT1, - BFD_RELOC_860_SPGOT1, - BFD_RELOC_860_LOGOTOFF0, - BFD_RELOC_860_SPGOTOFF0, - BFD_RELOC_860_LOGOTOFF1, - BFD_RELOC_860_SPGOTOFF1, - BFD_RELOC_860_LOGOTOFF2, - BFD_RELOC_860_LOGOTOFF3, - BFD_RELOC_860_LOPC, - BFD_RELOC_860_HIGHADJ, - BFD_RELOC_860_HAGOT, - BFD_RELOC_860_HAGOTOFF, - BFD_RELOC_860_HAPC, - BFD_RELOC_860_HIGH, - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - -/* OpenRISC Relocations. */ - BFD_RELOC_OPENRISC_ABS_26, - BFD_RELOC_OPENRISC_REL_26, +/* 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_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, /* H8 elf Relocations. */ BFD_RELOC_H8_DIR16A8, @@ -4817,6 +5028,7 @@ a matching LO8XG part. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + BFD_RELOC_H8_DISP32A16, /* Sony Xstormy16 Relocations. */ BFD_RELOC_XSTORMY16_REL_12, @@ -4865,6 +5077,110 @@ a matching LO8XG part. */ 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, + +/* 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, + +/* PRU LDI 16-bit unsigned data-memory relocation. */ + BFD_RELOC_PRU_U16, + +/* PRU LDI 16-bit unsigned instruction-memory relocation. */ + BFD_RELOC_PRU_U16_PMEMIMM, + +/* 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, + +/* PRU QBBx 10-bit signed PC-relative relocation. */ + BFD_RELOC_PRU_S10_PCREL, + +/* PRU 8-bit unsigned relocation used for the LOOP instruction. */ + BFD_RELOC_PRU_U8_PCREL, + +/* 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, + +/* 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, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -4962,6 +5278,24 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, +/* First 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE0, + +/* Second 8 bits of multibyte (32, 24 or 16 bit) value. */ + BFD_RELOC_Z80_BYTE1, + +/* Third 8 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_BYTE2, + +/* Fourth 8 bits of multibyte (32 bit) value. */ + BFD_RELOC_Z80_BYTE3, + +/* Lowest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD0, + +/* Highest 16 bits of multibyte (32 or 24 bit) value. */ + BFD_RELOC_Z80_WORD1, + /* DJNZ offset. */ BFD_RELOC_Z8K_DISP7, @@ -4992,6 +5326,12 @@ BFD_RELOC_MACH_O_PAIR. */ /* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */ + BFD_RELOC_MACH_O_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_SUBTRACTOR64, + /* PCREL relocations. They are marked as branch to create PLT entry if required. */ BFD_RELOC_MACH_O_X86_64_BRANCH32, @@ -5004,12 +5344,6 @@ required. */ the linker could optimize the movq to a leaq if possible. */ BFD_RELOC_MACH_O_X86_64_GOT_LOAD, -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, - -/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ - BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, - /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_1, @@ -5019,52 +5353,67 @@ the linker could optimize the movq to a leaq if possible. */ /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ BFD_RELOC_MACH_O_X86_64_PCREL32_4, -/* This is a 32 bit reloc for the microblaze that stores the +/* 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, + +/* Relative offset within page of GOT slot. */ + BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, + +/* Address of a GOT entry. */ + BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, + +/* 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 32 bit pc-relative reloc for the microblaze that +/* 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 32 bit reloc for the microblaze that stores a +/* 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 32 bit reloc for the microblaze that stores a +/* 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 for the microblaze to handle +/* 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 64 bit reloc that stores the 32 bit pc relative -value in two words (with an imm instruction). No relocation is +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit pc relative +/* 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 is a 64 bit reloc that stores the 32 bit pc relative +/* 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 64 bit reloc that stores the 32 bit GOT relative +/* 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 is a 32 bit reloc that stores the 32 bit GOT relative +/* 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, @@ -5072,14 +5421,152 @@ value in a word. The relocation is relative offset from */ the dynamic object into the runtime process image. */ BFD_RELOC_MICROBLAZE_COPY, -/* 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, +/* Unused Reloc */ + BFD_RELOC_MICROBLAZE_64_TLS, -/* 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 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, + +/* 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, + +/* This is a 32 bit reloc that stores the Module ID to GOT(n). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPMOD, + +/* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */ + BFD_RELOC_MICROBLAZE_32_TLSDTPREL, + +/* This is a 32 bit reloc for storing TLS offset to two words (uses imm +instruction) */ + BFD_RELOC_MICROBLAZE_64_TLSDTPREL, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Deprecated AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NULL, + +/* AArch64 null relocation code. */ + BFD_RELOC_AARCH64_NONE, + +/* 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, + +/* 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, + +/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G0, + +/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of +an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G0_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G1, + +/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G1_NC, + +/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 +of an unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G2, + +/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 +of an address/value. No overflow checking. */ + BFD_RELOC_AARCH64_MOVW_G2_NC, + +/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 +of a signed or unsigned address/value. */ + BFD_RELOC_AARCH64_MOVW_G3, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* AArch64 MOVK instruction with most significant bits 16 to 31 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2, + +/* AArch64 MOVK instruction with most significant bits 32 to 47 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, + +/* AArch64 MOVK instruction with most significant bits 47 to 63 +of a signed value. */ + BFD_RELOC_AARCH64_MOVW_PREL_G3, + +/* 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, + +/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ + BFD_RELOC_AARCH64_ADR_LO21_PCREL, /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page offset, giving a 4KB aligned page base address. */ @@ -5090,45 +5577,33 @@ offset, giving a 4KB aligned page base address, but with no overflow checking. */ BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL, -/* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */ - BFD_RELOC_AARCH64_ADR_LO21_PCREL, +/* 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, + +/* 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, + +/* 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, /* 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, -/* 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, - -/* 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, - /* 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, -/* 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, - -/* 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_GOTPAGE. */ - BFD_RELOC_AARCH64_LD64_GOT_LO12_NC, - -/* 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, - -/* 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, +/* 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, /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ @@ -5146,86 +5621,45 @@ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */ BFD_RELOC_AARCH64_LDST128_LO12, -/* AArch64 MOV[NZK] instruction with most significant bits 0 to 15 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G0, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of -an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G0_NC, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 16 to 31 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G1, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 16 to 31 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G1_NC, +/* 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, -/* 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, +/* 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, -/* AArch64 MOV[NZK] instruction with most significant bits 32 to 47 -of an unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G2, +/* 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, -/* AArch64 MOV[NZK] instruction with less significant bits 32 to 47 -of an address/value. No overflow checking. */ - BFD_RELOC_AARCH64_MOVW_G2_NC, +/* Scaled 14 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14, -/* 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, - -/* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64 -of a signed or unsigned address/value. */ - BFD_RELOC_AARCH64_MOVW_G3, - -/* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLSDESC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_CALL, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LDR, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, - -/* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_OFF_G1, - -/* 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, +/* Scaled 15 bit byte offset to the page base of the global offset table. */ + BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15, /* 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 @@ -5233,14 +5667,31 @@ relative value. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21, +/* AArch64 TLS General Dynamic */ + BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, + +/* 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, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G1, + /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, + BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, /* AArch64 TLS INITIAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, + BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC, + +/* AArch64 TLS INITIAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19, /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, @@ -5248,6 +5699,85 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS INITIAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1, +/* bit[23:12] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, + +/* Unsigned 12 bit byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, + +/* 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, + +/* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP +instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21, + +/* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */ + BFD_RELOC_AARCH64_TLSLD_ADR_PREL21, + +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, + +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, + +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, + +/* bit[15:0] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, + +/* bit[31:16] of byte offset to module TLS base address. */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, + +/* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */ + BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, + +/* 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, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, + +/* AArch64 TLS LOCAL EXEC relocation. */ + BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, + +/* 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, @@ -5257,34 +5787,136 @@ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */ /* AArch64 TLS LOCAL EXEC relocation. */ BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0, +/* bit[11:1] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1, +/* bit[11:2] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC, +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, -/* AArch64 TLS LOCAL EXEC relocation. */ - BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2, +/* bit[11:3] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, + +/* bit[11:0] of byte offset to module TLS base address, encoded in ldst +instructions. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD_PREL19, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G1, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_LDR, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_ADD, + +/* AArch64 TLS DESC relocation. */ + BFD_RELOC_AARCH64_TLSDESC_CALL, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPMOD64, + BFD_RELOC_AARCH64_COPY, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_DTPREL64, + BFD_RELOC_AARCH64_GLOB_DAT, /* AArch64 TLS relocation. */ - BFD_RELOC_AARCH64_TLS_TPREL64, + BFD_RELOC_AARCH64_JUMP_SLOT, -/* 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, +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_RELATIVE, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPMOD, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_DTPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLS_TPREL, + +/* AArch64 TLS relocation. */ + BFD_RELOC_AARCH64_TLSDESC, + +/* AArch64 support for STT_GNU_IFUNC. */ + BFD_RELOC_AARCH64_IRELATIVE, + +/* 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, + +/* 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, + +/* 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, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC, + +/* 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, + +/* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */ + BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, + +/* 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, + +/* 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, + +/* 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, /* Tilera TILEPro Relocations. */ BFD_RELOC_TILEPRO_COPY, @@ -5425,10 +6057,18 @@ giving a 16 bit signed byte offset. */ 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, @@ -5443,6 +6083,12 @@ giving a 16 bit signed byte offset. */ 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, @@ -5464,6 +6110,13 @@ giving a 16 bit signed byte offset. */ BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, +/* Linux eBPF relocations. */ + BFD_RELOC_BPF_64, + BFD_RELOC_BPF_32, + BFD_RELOC_BPF_16, + BFD_RELOC_BPF_DISP16, + BFD_RELOC_BPF_DISP32, + /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */ BFD_RELOC_EPIPHANY_SIMM8, @@ -5484,7 +6137,99 @@ giving a 16 bit signed byte offset. */ /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */ BFD_RELOC_EPIPHANY_IMM8, + +/* 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, + +/* 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, + +/* 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, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; + 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); @@ -5518,97 +6263,98 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#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) +#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) +#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. */ +#define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or - <>. */ + <>, <> 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) +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION (1 << 3) +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP (1 << 5) -#define BSF_KEEP_G (1 << 6) +#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) +#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) +#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) +#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) +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR (1 << 11) +#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) +#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) +#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) +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC (1 << 15) +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT (1 << 16) +#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) +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL (1 << 18) +#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) +#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) +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC (1 << 21) +#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 @@ -5618,7 +6364,7 @@ typedef struct bfd_symbol /* 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) +#define BSF_GNU_UNIQUE (1 << 23) flagword flags; @@ -5638,22 +6384,22 @@ typedef struct bfd_symbol asymbol; #define bfd_get_symtab_upper_bound(abfd) \ - BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) + BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ - BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) + BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) bfd_boolean 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)) + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) #define bfd_canonicalize_symtab(abfd, location) \ - BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) + BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); @@ -5661,12 +6407,12 @@ bfd_boolean bfd_set_symtab 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)) + BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) asymbol *_bfd_generic_make_empty_symbol (bfd *); #define bfd_make_debug_symbol(abfd,ptr,size) \ - BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) + BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass (asymbol *symbol); @@ -5678,10 +6424,11 @@ bfd_boolean 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)) + BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ + (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ + enum bfd_direction { no_direction = 0, @@ -5690,11 +6437,21 @@ enum bfd_direction 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 { - /* A unique identifier of the BFD */ - unsigned int id; - /* The filename the application opened the BFD with. */ const char *filename; @@ -5710,21 +6467,22 @@ struct bfd least-recently-used list of BFDs. */ struct bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains - state information on the file here... */ + /* 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; /* File modified time, if mtime_set is TRUE. */ long mtime; - /* Reserved for an unimplemented file locking extension. */ - int ifd; + /* A unique identifier of the BFD */ + unsigned int id; /* The format which belongs to the BFD. (object, core, etc.) */ - bfd_format format; + ENUM_BITFIELD (bfd_format) format : 3; /* The direction with which the BFD was opened. */ - enum bfd_direction direction; + ENUM_BITFIELD (bfd_direction) direction : 2; /* Format_specific flags. */ flagword flags; @@ -5736,90 +6494,153 @@ struct bfd the object_flags values have mostly just been copied from backend to another, and are not necessarily correct). */ -#define BFD_NO_FLAGS 0x00 +#define BFD_NO_FLAGS 0x0 /* BFD contains relocation entries. */ -#define HAS_RELOC 0x01 +#define HAS_RELOC 0x1 /* BFD is directly executable. */ -#define EXEC_P 0x02 +#define EXEC_P 0x2 /* BFD has line number information (basically used for F_LNNO in a COFF header). */ -#define HAS_LINENO 0x04 +#define HAS_LINENO 0x4 /* BFD has debugging information. */ -#define HAS_DEBUG 0x08 +#define HAS_DEBUG 0x08 /* BFD has symbols. */ -#define HAS_SYMS 0x10 +#define HAS_SYMS 0x10 /* BFD has local symbols (basically used for F_LSYMS in a COFF header). */ -#define HAS_LOCALS 0x20 +#define HAS_LOCALS 0x20 /* BFD is a dynamic object. */ -#define DYNAMIC 0x40 +#define DYNAMIC 0x40 /* 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 +#define WP_TEXT 0x80 /* 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 +#define D_PAGED 0x100 /* 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 +#define BFD_IS_RELAXABLE 0x200 /* 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 +#define BFD_TRADITIONAL_FORMAT 0x400 /* 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 - - /* The sections in this BFD specify a memory page. */ -#define HAS_LOAD_PAGE 0x1000 +#define BFD_IN_MEMORY 0x800 /* This BFD has been created by the linker and doesn't correspond to any input file. */ -#define BFD_LINKER_CREATED 0x2000 - /* 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 0x4000 - +#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 0x4000 +#define BFD_DETERMINISTIC_OUTPUT 0x2000 /* Compress sections in this BFD. */ -#define BFD_COMPRESS 0x8000 +#define BFD_COMPRESS 0x4000 /* Decompress sections in this BFD. */ -#define BFD_DECOMPRESS 0x10000 +#define BFD_DECOMPRESS 0x8000 /* BFD is a dummy, for plugins. */ -#define BFD_PLUGIN 0x20000 +#define BFD_PLUGIN 0x10000 + + /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */ +#define BFD_COMPRESS_GABI 0x20000 + + /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this + BFD. */ +#define BFD_CONVERT_ELF_COMMON 0x40000 + + /* Use the ELF STT_COMMON type in this BFD. */ +#define BFD_USE_ELF_STT_COMMON 0x80000 + + /* Put pathnames into archives (non-POSIX). */ +#define BFD_ARCHIVE_FULL_PATH 0x100000 /* Flags bits to be saved in bfd_preserve_save. */ #define BFD_FLAGS_SAVED \ - (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN) + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \ + | BFD_USE_ELF_STT_COMMON) /* 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_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \ + | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON) + + /* Is the file descriptor being cached? That is, can it be closed as + needed, and re-opened when accessed later? */ + unsigned int cacheable : 1; + + /* 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; + + /* ... and here: (``once'' means at least once). */ + unsigned int opened_once : 1; + + /* Set if we have a locally maintained mtime value, rather than + getting it from the file each time. */ + unsigned int mtime_set : 1; + + /* Flag set if symbols from this BFD should not be exported. */ + unsigned int no_export : 1; + + /* Remember when output has begun, to stop strange things + from happening. */ + unsigned int output_has_begun : 1; + + /* Have archive map. */ + unsigned int has_armap : 1; + + /* Set if this is a thin archive. */ + unsigned int is_thin_archive : 1; + + /* Set if this archive should not cache element positions. */ + unsigned int no_element_cache : 1; + + /* 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; + + /* Set if this is the linker output BFD. */ + unsigned int is_linker_output : 1; + + /* Set if this is the linker input BFD. */ + unsigned int is_linker_input : 1; + + /* If this is an input for a compiler plug-in library. */ + ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; + + /* Set if this is a plugin output file. */ + unsigned int lto_output : 1; + + /* Set if this is a slim LTO object not loaded with a compiler plugin. */ + unsigned int lto_slim_object : 1; + + /* Set to dummy BFD created when claimed by a compiler plug-in + library. */ + bfd *plugin_dummy_bfd; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of @@ -5845,17 +6666,21 @@ struct bfd /* The number of sections. */ unsigned int section_count; + /* A field used by _bfd_generic_link_add_archive_symbols. This will + be used only for archive elements. */ + int archive_pass; + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output. */ - unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; + /* Used for input and output. */ + unsigned int symcount; + /* Used for slurped dynamic symbol tables. */ unsigned int dynsymcount; @@ -5870,33 +6695,27 @@ struct bfd struct bfd *nested_archives; /* List of nested archive in a flattened thin archive. */ - /* A chain of BFD structures involved in a link. */ - struct bfd *link_next; - - /* A field used by _bfd_generic_link_add_archive_symbols. This will - be used only for archive elements. */ - int archive_pass; + 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 _oasys_data *oasys_obj_data; - struct _oasys_ar_data *oasys_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 ieee_data_struct *ieee_data; - struct ieee_ar_data_struct *ieee_ar_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 nlm_obj_tdata *nlm_obj_data; - struct bout_data_struct *bout_data; struct mmo_data_struct *mmo_data; struct sun_core_struct *sun_core_data; struct sco5_core_struct *sco5_core_data; @@ -5928,40 +6747,233 @@ struct bfd of objalloc.h. */ void *memory; - /* Is the file descriptor being cached? That is, can it be closed as - needed, and re-opened when accessed later? */ - unsigned int cacheable : 1; - - /* 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; - - /* ... and here: (``once'' means at least once). */ - unsigned int opened_once : 1; - - /* Set if we have a locally maintained mtime value, rather than - getting it from the file each time. */ - unsigned int mtime_set : 1; - - /* Flag set if symbols from this BFD should not be exported. */ - unsigned int no_export : 1; - - /* Remember when output has begun, to stop strange things - from happening. */ - unsigned int output_has_begun : 1; - - /* Have archive map. */ - unsigned int has_armap : 1; - - /* Set if this is a thin archive. */ - unsigned int is_thin_archive : 1; - - /* 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; + /* 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; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_has_map (const bfd *abfd) +{ + return abfd->has_armap; +} + +static inline bfd_boolean +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 bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + +static inline void +bfd_set_thin_archive (bfd *abfd, bfd_boolean 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)); +} + +/* 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 bfd_boolean +bfd_section_removed_from_list (const bfd *abfd, const asection *s) +{ + return s->next ? s->next->prev != s : abfd->section_last != s; +} + + typedef enum bfd_error { bfd_error_no_error = 0, @@ -5975,6 +6987,7 @@ typedef enum bfd_error 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, @@ -5983,6 +6996,7 @@ typedef enum bfd_error 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 } @@ -5990,19 +7004,23 @@ bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag, ...); +void bfd_set_error (bfd_error_type error_tag); + +void bfd_set_input_error (bfd *input, bfd_error_type error_tag); const char *bfd_errmsg (bfd_error_type error_tag); void bfd_perror (const char *message); -typedef void (*bfd_error_handler_type) (const char *, ...); + +typedef void (*bfd_error_handler_type) (const char *, va_list); + +void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1; bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); void bfd_set_error_program_name (const char *); -bfd_error_handler_type bfd_get_error_handler (void); typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, const char *bfd_version, @@ -6011,8 +7029,6 @@ typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); -bfd_assert_handler_type bfd_get_assert_handler (void); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -6021,6 +7037,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -6038,33 +7056,28 @@ bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_header_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ - (ibfd, obfd)) -bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); - -#define bfd_merge_private_bfd_data(ibfd, obfd) \ - BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ - (ibfd, obfd)) + BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ + (ibfd, obfd)) bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ - BFD_SEND (abfd, _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)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ - (abfd, sec, syms, off, file, func, line)) + (abfd, syms, sec, off, file, func, line, NULL)) #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ - line, disc) \ - BFD_SEND (abfd, _bfd_find_nearest_line_discriminator, \ - (abfd, sec, syms, off, file, func, line, disc)) + 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, \ @@ -6107,15 +7120,15 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #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)) + #define bfd_discard_group(abfd, sec) \ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec)) #define bfd_link_hash_table_create(abfd) \ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) -#define bfd_link_hash_table_free(abfd, hash) \ - BFD_SEND (abfd, _bfd_link_hash_table_free, (hash)) - #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) @@ -6153,34 +7166,33 @@ extern bfd_byte *bfd_get_relocated_section_contents bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); -struct bfd_preserve -{ - void *marker; - void *tdata; - flagword flags; - const struct bfd_arch_info *arch_info; - struct bfd_section *sections; - struct bfd_section *section_last; - unsigned int section_count; - struct bfd_hash_table section_htab; -}; - -bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *); - -void bfd_preserve_restore (bfd *, struct bfd_preserve *); - -void bfd_preserve_finish (bfd *, struct bfd_preserve *); - bfd_vma bfd_emul_get_maxpagesize (const char *); void bfd_emul_set_maxpagesize (const char *, bfd_vma); -bfd_vma bfd_emul_get_commonpagesize (const char *); +bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); void bfd_emul_set_commonpagesize (const char *, bfd_vma); char *bfd_demangle (bfd *, const char *, int); +void bfd_update_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec); + +bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, + bfd_size_type *uncompressed_size, + unsigned int *uncompressed_alignment_power); + +int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +bfd_size_type bfd_convert_section_size + (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); + +bfd_boolean bfd_convert_section_contents + (bfd *ibfd, asection *isec, bfd *obfd, + bfd_byte **ptr, bfd_size_type *ptr_size); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -6226,15 +7238,13 @@ bfd_boolean generic_core_file_matches_executable_p 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_ieee_flavour, - bfd_target_nlm_flavour, - bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_verilog_flavour, @@ -6263,7 +7273,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ @@ -6325,7 +7335,8 @@ typedef struct bfd_target within the target vector structure, one for each format to check. */ /* Check the format of a file being read. Return a <> or zero. */ - const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *); + const struct bfd_target * + (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); @@ -6349,10 +7360,11 @@ typedef struct bfd_target /* Called when a new section is created. */ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) - (bfd *, sec_ptr, void *, file_ptr, bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) - (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, + bfd_window *, file_ptr, + bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -6370,25 +7382,26 @@ typedef struct bfd_target bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ - BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); + BFD_SEND (obfd, _bfd_init_private_section_data, \ + (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) - (bfd *, sec_ptr, bfd *, sec_ptr); + bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, + sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) - (bfd *, asymbol *, bfd *, asymbol *); + bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, + asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) - (bfd *, bfd *); + bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); @@ -6423,15 +7436,17 @@ typedef struct bfd_target bfd_boolean (*_bfd_slurp_armap) (bfd *); bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) - (bfd *, char **, bfd_size_type *, const char **); + bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) - (bfd *, unsigned int, struct orl *, unsigned int, int); + bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, + unsigned int, int); void * (*_bfd_read_ar_hdr_fn) (bfd *); bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd * (*openr_next_archived_file) (bfd *, bfd *); -#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) +#define bfd_get_elt_at_index(b,i) \ + BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); int (*_bfd_stat_arch_elt) (bfd *, struct stat *); bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); @@ -6443,82 +7458,85 @@ typedef struct bfd_target NAME##_make_empty_symbol, \ NAME##_print_symbol, \ NAME##_get_symbol_info, \ + NAME##_get_symbol_version_string, \ NAME##_bfd_is_local_label_name, \ NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ - _bfd_generic_find_nearest_line_discriminator, \ - _bfd_generic_find_line, \ + NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) - (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type); -#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 *); -#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); +#define bfd_print_symbol(b,p,s,e) \ + BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, + symbol_info *); +#define bfd_get_symbol_info(b,p,e) \ + BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) + const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bfd_boolean *); +#define bfd_get_symbol_version_string(b,s,h) \ + BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,h)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *); - bfd_boolean (*_bfd_find_nearest_line_discriminator) - (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, - const char **, const char **, unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) - (bfd *, struct bfd_symbol **, struct bfd_symbol *, - const char **, unsigned int *); + bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); bfd_boolean (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) - (bfd *, void *, unsigned long size); + asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ - BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) - (bfd *, bfd_boolean, void **, unsigned int *); + BFD_SEND (b, _read_minisymbols, (b, d, m, s)) + long (*_read_minisymbols) (bfd *, bfd_boolean, void **, + unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ - BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) + asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, + asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) - (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * (*reloc_name_lookup) (bfd *, const char *); - /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) - (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) - (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); + bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + unsigned long); + bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -6526,47 +7544,51 @@ typedef struct bfd_target NAME##_bfd_get_relocated_section_contents, \ NAME##_bfd_relax_section, \ NAME##_bfd_link_hash_table_create, \ - NAME##_bfd_link_hash_table_free, \ NAME##_bfd_link_add_symbols, \ NAME##_bfd_link_just_syms, \ NAME##_bfd_copy_link_hash_symbol_type, \ NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ + NAME##_bfd_link_check_relocs, \ NAME##_bfd_gc_sections, \ NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ + NAME##_bfd_group_name, \ NAME##_bfd_discard_group, \ NAME##_section_already_linked, \ - NAME##_bfd_define_common_symbol + NAME##_bfd_define_common_symbol, \ + NAME##_bfd_link_hide_symbol, \ + NAME##_bfd_define_start_stop int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) - (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, struct bfd_symbol **); + bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bfd_boolean, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); + bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bfd_boolean *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * (*_bfd_link_hash_table_create) (bfd *); - /* Release the memory associated with the linker hash table. */ - void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *); - /* Add symbols from this object file into the hash table. */ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); - /* Copy the symbol type of a linker hash table entry. */ + /* Copy the symbol type and other attributes for a linker script + assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ - BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) - (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); + 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 *); /* Do a link based on the link_order structures attached to each section of the BFD. */ @@ -6575,13 +7597,15 @@ typedef struct bfd_target /* Should this section be split up into smaller pieces during linking. */ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + /* Check the relocations in the bfd for validity. */ + bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, - asection *); + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6589,6 +7613,9 @@ typedef struct bfd_target /* Is this section a member of a group? */ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + /* The group name, if section is a member of a group. */ + const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); + /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); @@ -6601,6 +7628,15 @@ typedef struct bfd_target bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); + /* Hide a symbol. */ + void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, + 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 *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -6612,20 +7648,19 @@ typedef struct bfd_target /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) - (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) - (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) - (bfd *, arelent **, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ - const struct bfd_target * alternative_target; + const struct bfd_target *alternative_target; /* Data for use by back-end routines, which isn't generic enough to belong in this structure. */ @@ -6633,6 +7668,74 @@ typedef struct bfd_target } bfd_target; +static inline const char * +bfd_get_target (const bfd *abfd) +{ + return abfd->xvec->name; +} + +static inline enum bfd_flavour +bfd_get_flavour (const bfd *abfd) +{ + return abfd->xvec->flavour; +} + +static inline flagword +bfd_applicable_file_flags (const bfd *abfd) +{ + return abfd->xvec->object_flags; +} + +static inline bfd_boolean +bfd_family_coff (const bfd *abfd) +{ + return (bfd_get_flavour (abfd) == bfd_target_coff_flavour + || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); +} + +static inline bfd_boolean +bfd_big_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_BIG; +} +static inline bfd_boolean +bfd_little_endian (const bfd *abfd) +{ + return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; +} + +static inline bfd_boolean +bfd_header_big_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; +} + +static inline bfd_boolean +bfd_header_little_endian (const bfd *abfd) +{ + return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; +} + +static inline flagword +bfd_applicable_section_flags (const bfd *abfd) +{ + return abfd->xvec->section_flags; +} + +static inline char +bfd_get_symbol_leading_char (const bfd *abfd) +{ + return abfd->xvec->symbol_leading_char; +} + +static inline enum bfd_flavour +bfd_asymbol_flavour (const asymbol *sy) +{ + if ((sy->flags & BSF_SYNTHETIC) != 0) + return bfd_target_unknown_flavour; + return sy->the_bfd->xvec->flavour; +} + bfd_boolean bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); @@ -6644,9 +7747,11 @@ const bfd_target *bfd_get_target_info (const char *target_name, const char **def_target_arch); const char ** bfd_target_list (void); -const bfd_target *bfd_search_for_target - (int (*search_func) (const bfd_target *, void *), - void *); +const bfd_target *bfd_iterate_over_targets + (int (*func) (const bfd_target *, void *), + void *data); + +const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); @@ -6659,6 +7764,17 @@ bfd_boolean 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) + bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ @@ -6678,6 +7794,20 @@ bfd_boolean bfd_generic_define_common_symbol #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, bfd_boolean *hide); @@ -6685,18 +7815,35 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); +bfd_boolean bfd_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean _bfd_generic_link_check_relocs + (bfd *abfd, struct bfd_link_info *info); + +bfd_boolean 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. */ -bfd_boolean bfd_compress_section_contents - (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer, - bfd_size_type uncompressed_size); - bfd_boolean bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); +void bfd_cache_section_contents + (asection *sec, void *contents); + +bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, + bfd_size_type *uncompressed_size_p, + unsigned int *uncompressed_alignment_power_p); + bfd_boolean bfd_is_section_compressed (bfd *abfd, asection *section); @@ -6706,6 +7853,9 @@ bfd_boolean bfd_init_section_decompress_status bfd_boolean bfd_init_section_compress_status (bfd *abfd, asection *section); +bfd_boolean bfd_compress_section + (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); + #ifdef __cplusplus } #endif diff --git a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd_stdint.h b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd_stdint.h index c94fc2d86..a56ed21fc 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd_stdint.h +++ b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd_stdint.h @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for x86_64--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */ +/* generated for x86_64--netbsd-gcc (NetBSD nb1 20200311) 8.4.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 diff --git a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfdver.h b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfdver.h index 01f42b546..75bff1507 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfdver.h +++ b/external/gpl3/binutils/lib/libbfd/arch/x86_64/bfdver.h @@ -1,8 +1,26 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#define BFD_VERSION_DATE 20130325 -#define BFD_VERSION 223020000 -#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.23.2" +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ +#define BFD_VERSION_DATE 20200201 +#define BFD_VERSION 234000000 +#define BFD_VERSION_STRING "(NetBSD Binutils nb1) " "2.34" #define REPORT_BUGS_TO "" diff --git a/external/gpl3/binutils/lib/libbfd/arch/x86_64/config.h b/external/gpl3/binutils/lib/libbfd/arch/x86_64/config.h index ce31e69d8..4d0674f0b 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/x86_64/config.h +++ b/external/gpl3/binutils/lib/libbfd/arch/x86_64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -15,6 +15,10 @@ /* Name of host specific core header file to include in elf.c. */ /* #undef CORE_HEADER */ +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -22,6 +26,10 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `basename', and to 0 if you don't. */ #define HAVE_DECL_BASENAME 0 @@ -69,10 +77,18 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #define HAVE_DECL_VSNPRINTF 1 @@ -96,6 +112,9 @@ /* Define to 1 if you have the `fileno' function. */ #define HAVE_FILENO 1 +/* Define to 1 if you have the `fls' function. */ +/* #undef HAVE_FLS */ + /* Define to 1 if you have the `fopen64' function. */ /* #undef HAVE_FOPEN64 */ @@ -117,12 +136,24 @@ /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 +/* Define if your compiler supports hidden visibility. */ +#define HAVE_HIDDEN 1 + /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if the system has the type `long double'. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if has lwpstatus_t. */ /* #undef HAVE_LWPSTATUS_T */ @@ -236,9 +267,15 @@ */ /* #undef HAVE_SYS_NDIR_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PROCFS_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -254,15 +291,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + /* Define if has win32_pstatus_t. */ /* #undef HAVE_WIN32_PSTATUS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -274,25 +314,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "bfd" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "bfd 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "bfd" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ +#define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 @@ -321,6 +361,9 @@ /* Name of host specific header file to include in trad-core.c. */ /* #undef TRAD_HEADER */ +/* Define if 64-bit archives should always be used. */ +/* #undef USE_64_BIT_ARCHIVE */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -333,9 +376,6 @@ /* Define if we should default to creating read-only plt entries */ /* #undef USE_SECUREPLT */ -/* Define if we may generate symbols with ELF's STT_COMMON type */ -/* #undef USE_STT_COMMON */ - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 @@ -359,7 +399,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/lib/libbfd/arch/x86_64/defs.mk b/external/gpl3/binutils/lib/libbfd/arch/x86_64/defs.mk index 0081bc840..dc846f5ad 100644 --- a/external/gpl3/binutils/lib/libbfd/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/lib/libbfd/arch/x86_64/defs.mk @@ -1,9 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo elf32-i386.lo elf-vxworks.lo elf32.lo i386netbsd.lo aout32.lo coff-i386.lo cofflink.lo pei-i386.lo peigen.lo pei-x86_64.lo pex64igen.lo elf64-gen.lo elf32-gen.lo cpu-i386.lo cpu-l1om.lo cpu-k1om.lo netbsd-core.lo archive64.lo ofiles -G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo verilog.lo +G_libbfd_la_DEPENDENCIES=elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf64.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo elf32-i386.lo elf32.lo coff-i386.lo cofflink.lo coffgen.lo pei-i386.lo peigen.lo i386bsd.lo aout32.lo i386netbsd.lo pei-x86_64.lo pex64igen.lo elf64-gen.lo elf32-gen.lo plugin.lo cpu-i386.lo cpu-iamcu.lo cpu-l1om.lo cpu-k1om.lo netbsd-core.lo archive64.lo ofiles +G_libbfd_la_OBJECTS=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 G_DEFS=-DHAVE_CONFIG_H -G_INCLUDES=-DNETBSD_CORE -I. -I${GNUHOSTDIST}/bfd -I${GNUHOSTDIST}/bfd/../include -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_i386netbsd_vec -DHAVE_i386coff_vec -DHAVE_i386pei_vec -DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_k1om_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -I./../intl -G_TDEFAULTS=-DDEFAULT_VECTOR=bfd_elf64_x86_64_vec -DSELECT_VECS='&bfd_elf64_x86_64_vec,&bfd_elf32_i386_vec,&i386netbsd_vec,&i386coff_vec,&i386pei_vec,&x86_64pei_vec,&bfd_elf64_l1om_vec,&bfd_elf64_k1om_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch,&bfd_l1om_arch,&bfd_k1om_arch' +G_INCLUDES= +G_TDEFAULTS=-DDEFAULT_VECTOR=x86_64_elf64_vec -DSELECT_VECS='&x86_64_elf64_vec,&i386_elf32_vec,&iamcu_elf32_vec,&i386_coff_vec,&i386_pei_vec,&i386_aout_bsd_vec,&i386_aout_nbsd_vec,&x86_64_pei_vec,&l1om_elf64_vec,&k1om_elf64_vec,&elf64_le_vec,&elf64_be_vec,&elf32_le_vec,&elf32_be_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch,&bfd_iamcu_arch,&bfd_l1om_arch,&bfd_k1om_arch' +G_HAVEVECS=-DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_i386_coff_vec -DHAVE_i386_pei_vec -DHAVE_i386_aout_bsd_vec -DHAVE_i386_aout_nbsd_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec diff --git a/external/gpl3/binutils/lib/libgnuctf/Makefile b/external/gpl3/binutils/lib/libgnuctf/Makefile new file mode 100644 index 000000000..00b791015 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/Makefile @@ -0,0 +1,47 @@ +# $NetBSD: Makefile,v 1.1 2020/04/04 01:34:30 christos Exp $ + +NOLINKLIB= # defined +NOLINT= # defined +NOMAN= # defined +NOPROFILE= # defined +NOCLANGERROR= # defined + +.include + +LIB= gnuctf + +BFD_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[4-7]/arm/} + +.if exists(${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk) +.include "${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk" + +.if defined(__MINIX) +# MINIX: make sure sources are fetched, even when tools not built earlier +GNUHOSTDIST= ${DIST} +.include "${.CURDIR}/../../../../../minix/Makefile.fetchgnu" +.endif # defined(__MINIX) + +SHLIB_MAJOR= 0 +SHLIB_MINOR= 0 + +GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS} +CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} \ + -I${.CURDIR}/../libbfd/arch/${BFD_MACHINE_ARCH} \ + -I${DIST}/include -I. -I${DIST}/libctf \ + -I${DIST}/bfd ${GCPPFLAGS:M-D*} \ + ${GCPPFLAGS:M-I*:N-I.*} + +SRCS= ${G_libctf_la_SOURCES} + +.PATH: ${DIST}/libctf + +.include + +.if defined(__MINIX) #&& ${USETOOLS} != "yes" +# Trigger the fetch phase, even when not building tools +${SRCS} realdepend realall realinstall: ${fetch_done} +.endif # defined(__MINIX) + +.else +.include # do nothing +.endif diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/aarch64eb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/alpha/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/alpha/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/alpha/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/alpha/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/alpha/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/alpha/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/arm/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/arm/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/arm/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/arm/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/arm/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/arm/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/armeb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/armeb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/armeb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/armeb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/armeb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/armeb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earm/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/earm/config.h new file mode 100644 index 000000000..b370457e5 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earm/config.h @@ -0,0 +1,164 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +#if !defined(__minix) +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 +#endif /* !defined(__minix) */ + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earm/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/earm/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earm/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmeb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmhf/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/earmhfeb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/hppa/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/hppa/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/hppa/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/hppa/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/hppa/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/hppa/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/i386/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/i386/config.h new file mode 100644 index 000000000..605d0ca85 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/i386/config.h @@ -0,0 +1,164 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +#if !defined(__minix) +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 +#endif /* !defined(__minix) */ + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/i386/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/i386/defs.mk new file mode 100644 index 000000000..8adaefbb6 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/i386/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/ia64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/ia64/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/ia64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/ia64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/ia64/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/ia64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/m68000/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/m68000/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/m68000/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/m68000/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/m68000/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/m68000/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/m68k/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/m68k/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/m68k/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/m68k/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/m68k/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/m68k/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mips64eb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mips64el/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mipseb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/mipsel/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/powerpc64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/riscv32/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/riscv64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sh3eb/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sh3el/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/config.h new file mode 100644 index 000000000..a230d1a0a --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/sparc64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/vax/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/vax/config.h new file mode 100644 index 000000000..55d958b07 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/vax/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/vax/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/vax/defs.mk new file mode 100644 index 000000000..d0de71f9f --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/vax/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/config.h b/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/config.h new file mode 100644 index 000000000..b5a862f20 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/config.h @@ -0,0 +1,162 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether libbfd was configured for an ELF target. */ +/* #undef HAVE_BFD_ELF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Whether the platform has a definition of O_CLOEXEC. */ +#define HAVE_O_CLOEXEC 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `qsort_r' function. */ +/* #undef HAVE_QSORT_R */ + +/* Whether a qsort_r exists with a void *arg as its last arg. */ +/* #undef HAVE_QSORT_R_ARG_LAST */ + +/* Whether a qsort_r exists with the compar function as its last arg. */ +/* #undef HAVE_QSORT_R_COMPAR_LAST */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "libctf-library" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libctf library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libctf library 1.2.0-pre" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libctf-library" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.0-pre" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "1.2.0-pre" + +/* 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/defs.mk b/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/defs.mk new file mode 100644 index 000000000..8adaefbb6 --- /dev/null +++ b/external/gpl3/binutils/lib/libgnuctf/arch/x86_64/defs.mk @@ -0,0 +1,5 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_libctf_la_SOURCES=ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-link.c ctf-lookup.c ctf-open.c ctf-string.c ctf-subr.c ctf-types.c ctf-util.c ctf-qsort_r.c ctf-open-bfd.c diff --git a/external/gpl3/binutils/lib/libiberty/Makefile b/external/gpl3/binutils/lib/libiberty/Makefile index 23fcf9f3e..5391cd4f5 100644 --- a/external/gpl3/binutils/lib/libiberty/Makefile +++ b/external/gpl3/binutils/lib/libiberty/Makefile @@ -1,12 +1,13 @@ -# $NetBSD: Makefile,v 1.4 2013/08/06 05:35:57 matt Exp $ +# $NetBSD: Makefile,v 1.10 2016/11/04 15:31:45 christos Exp $ NOLINT= # defined NOPROFILE= # defined NOPIC= # defined NOLINKLIB= # defined NOCLANGERROR= # defined +NODEBUGLIB= # defined -.include +.include LIB= iberty @@ -19,8 +20,6 @@ COPTS.cp-demangle.c = -Wno-stack-protector COPTS.make-relative-prefix.c = -Wno-stack-protector COPTS.regex.c = -Wno-stack-protector -DIST= ${NETBSDSRCDIR}/external/gpl3/binutils/dist - .if defined(__MINIX) # MINIX: make sure sources are fetched, even when tools not built earlier GNUHOSTDIST= ${DIST} diff --git a/external/gpl3/binutils/lib/libiberty/arch/aarch64/config.h b/external/gpl3/binutils/lib/libiberty/arch/aarch64/config.h index ca7c59dcc..857296a29 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/aarch64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/aarch64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/aarch64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/aarch64/defs.mk index 0535a0669..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/aarch64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/aarch64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/config.h b/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/config.h new file mode 100644 index 000000000..0eacd6116 --- /dev/null +++ b/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/config.h @@ -0,0 +1,582 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the `basename' function. */ +#define HAVE_BASENAME 1 + +/* Define to 1 if you have the `bcmp' function. */ +#define HAVE_BCMP 1 + +/* Define to 1 if you have the `bcopy' function. */ +#define HAVE_BCOPY 1 + +/* Define to 1 if you have the `bsearch' function. */ +#define HAVE_BSEARCH 1 + +/* Define to 1 if you have the `bzero' function. */ +#define HAVE_BZERO 1 + +/* Define to 1 if you have the `calloc' function. */ +#define HAVE_CALLOC 1 + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the `clock' function. */ +#define HAVE_CLOCK 1 + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if + you don't. */ +#define HAVE_DECL_BASENAME 0 + +/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't. + */ +#define HAVE_DECL_CALLOC 1 + +/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't. + */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. + */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + +/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you + don't. */ +#define HAVE_DECL_STRVERSCMP 0 + +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 + +/* Define to 1 if you have the `dup3' function. */ +#define HAVE_DUP3 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `ffs' function. */ +#define HAVE_FFS 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `getsysinfo' function. */ +/* #undef HAVE_GETSYSINFO */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `index' function. */ +#define HAVE_INDEX 1 + +/* Define to 1 if you have the `insque' function. */ +#define HAVE_INSQUE 1 + +/* Define to 1 if the system has the type `intptr_t'. */ +#define HAVE_INTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the `memcmp' function. */ +#define HAVE_MEMCMP 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the `memmem' function. */ +#define HAVE_MEMMEM 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the `mkstemps' function. */ +#define HAVE_MKSTEMPS 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `on_exit' function. */ +/* #undef HAVE_ON_EXIT */ + +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PROCESS_H */ + +/* Define to 1 if you have the `psignal' function. */ +#define HAVE_PSIGNAL 1 + +/* Define to 1 if you have the `pstat_getdynamic' function. */ +/* #undef HAVE_PSTAT_GETDYNAMIC */ + +/* Define to 1 if you have the `pstat_getstatic' function. */ +/* #undef HAVE_PSTAT_GETSTATIC */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `rename' function. */ +#define HAVE_RENAME 1 + +/* Define to 1 if you have the `rindex' function. */ +#define HAVE_RINDEX 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setproctitle' function. */ +#define HAVE_SETPROCTITLE 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `spawnve' function. */ +/* #undef HAVE_SPAWNVE */ + +/* Define to 1 if you have the `spawnvpe' function. */ +/* #undef HAVE_SPAWNVPE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDIO_EXT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `stpncpy' function. */ +#define HAVE_STPNCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* Define to 1 if you have the `strverscmp' function. */ +/* #undef HAVE_STRVERSCMP */ + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the `sysctl' function. */ +#define HAVE_SYSCTL 1 + +/* Define to 1 if you have the `sysmp' function. */ +/* #undef HAVE_SYSMP */ + +/* Define if you have the sys_errlist variable. */ +#define HAVE_SYS_ERRLIST 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define if you have the sys_nerr variable. */ +#define HAVE_SYS_NERR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PRCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PSTAT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define if you have the sys_siglist variable. */ +#define HAVE_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSMP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSTEMCFG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TABLE_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the `table' function. */ +/* #undef HAVE_TABLE */ + +/* Define to 1 if you have the `times' function. */ +#define HAVE_TIMES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the `tmpnam' function. */ +#define HAVE_TMPNAM 1 + +/* Define if you have the \`uintptr_t' type. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#define HAVE_VASPRINTF 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vfprintf' function. */ +#define HAVE_VFPRINTF 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsprintf' function. */ +#define HAVE_VSPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* Define to 1 if you have the `_doprnt' function. */ +/* #undef HAVE__DOPRNT */ + +/* Define if you have the _system_configuration variable. */ +/* #undef HAVE__SYSTEM_CONFIGURATION */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define if canonicalize_file_name is not declared in system header files. */ +#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 + +/* Define if errno must be declared even when is included. */ +/* #undef NEED_DECLARATION_ERRNO */ + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* Define if you know the direction of stack growth for your system; otherwise + it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows + toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#define STACK_DIRECTION 0 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to an unsigned 64-bit type available in the compiler. */ +#define UNSIGNED_64BIT_TYPE uint64_t + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* 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 +# define WORDS_BIGENDIAN 1 +# 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 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the type of a signed integer type wide enough to hold a pointer, + if such a type exists, and if the system does not define it. */ +/* #undef intptr_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..eded0f77d --- /dev/null +++ b/external/gpl3/binutils/lib/libiberty/arch/aarch64eb/defs.mk @@ -0,0 +1,8 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_ALLOCA= +G_EXTRA_OFILES= +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/alpha/config.h b/external/gpl3/binutils/lib/libiberty/arch/alpha/config.h index ca7c59dcc..857296a29 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/alpha/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/alpha/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/alpha/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/alpha/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/alpha/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/alpha/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/arm/config.h b/external/gpl3/binutils/lib/libiberty/arch/arm/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/arm/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/arm/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/arm/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/arm/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/arm/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/arm/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/armeb/config.h b/external/gpl3/binutils/lib/libiberty/arch/armeb/config.h index ca7c59dcc..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/armeb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/armeb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -464,16 +530,31 @@ # endif #else # ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ +# define WORDS_BIGENDIAN 1 # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/armeb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/armeb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/armeb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/armeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/coldfire/config.h b/external/gpl3/binutils/lib/libiberty/arch/coldfire/config.h index cb7d1a23a..c9c39fb1c 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/coldfire/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/coldfire/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,22 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +157,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +188,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -267,6 +286,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +304,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +469,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +493,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -474,6 +533,16 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/coldfire/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/coldfire/defs.mk index 613d0e3a9..2ccd55609 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/coldfire/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/coldfire/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/earm/config.h b/external/gpl3/binutils/lib/libiberty/arch/earm/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earm/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/earm/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/earm/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/earm/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earm/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/earm/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h b/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/earmeb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/earmeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmhf/config.h b/external/gpl3/binutils/lib/libiberty/arch/earmhf/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmhf/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/earmhf/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmhf/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/earmhf/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmhf/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/earmhf/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/config.h b/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/earmhfeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/hppa/config.h b/external/gpl3/binutils/lib/libiberty/arch/hppa/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/hppa/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/hppa/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/hppa/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/hppa/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/hppa/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/hppa/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/i386/config.h b/external/gpl3/binutils/lib/libiberty/arch/i386/config.h index ca7c59dcc..26146a75e 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/i386/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/i386/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/i386/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/i386/defs.mk index 613d0e3a9..efb273d2f 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/i386/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/i386/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/ia64/config.h b/external/gpl3/binutils/lib/libiberty/arch/ia64/config.h index a21525f49..857296a29 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/ia64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/ia64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -205,7 +231,7 @@ #define HAVE_RINDEX 1 /* Define to 1 if you have the `sbrk' function. */ -/* #undef HAVE_SBRK */ +#define HAVE_SBRK 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -373,7 +408,7 @@ #define HAVE_VASPRINTF 1 /* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ +#define HAVE_VFORK 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ @@ -400,7 +435,7 @@ #define HAVE_WORKING_FORK 1 /* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ +#define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the `_doprnt' function. */ /* #undef HAVE__DOPRNT */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -498,4 +579,4 @@ /* #undef uintptr_t */ /* Define as `fork' if `vfork' does not work. */ -#define vfork fork +/* #undef vfork */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/ia64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/ia64/defs.mk index ec41f5f1c..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/ia64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/ia64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/m68000/config.h b/external/gpl3/binutils/lib/libiberty/arch/m68000/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/m68000/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/m68000/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/m68000/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/m68000/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/m68000/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/m68000/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/m68k/config.h b/external/gpl3/binutils/lib/libiberty/arch/m68k/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/m68k/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/m68k/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/m68k/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/m68k/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/m68k/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/m68k/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/mips64eb/config.h b/external/gpl3/binutils/lib/libiberty/arch/mips64eb/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mips64eb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/mips64eb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/mips64eb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/mips64eb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mips64eb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/mips64eb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/mips64el/config.h b/external/gpl3/binutils/lib/libiberty/arch/mips64el/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mips64el/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/mips64el/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/mips64el/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/mips64el/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mips64el/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/mips64el/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/mipseb/config.h b/external/gpl3/binutils/lib/libiberty/arch/mipseb/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mipseb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/mipseb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/mipseb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/mipseb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mipseb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/mipseb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/mipsel/config.h b/external/gpl3/binutils/lib/libiberty/arch/mipsel/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mipsel/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/mipsel/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/mipsel/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/mipsel/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/mipsel/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/mipsel/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/or1k/config.h b/external/gpl3/binutils/lib/libiberty/arch/or1k/config.h index cdf189d5a..c950bfd9f 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/or1k/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/or1k/config.h @@ -84,6 +84,22 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +157,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -267,6 +286,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +304,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +469,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +493,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -474,6 +533,16 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/or1k/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/or1k/defs.mk index 8d89bb4ca..259187f3a 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/or1k/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/or1k/defs.mk @@ -5,4 +5,4 @@ G_ALLOCA= G_EXTRA_OFILES= G_LIBOBJS=mempcpy.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/powerpc/config.h b/external/gpl3/binutils/lib/libiberty/arch/powerpc/config.h index 7568539a6..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/powerpc/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/powerpc/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/powerpc/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/powerpc/defs.mk index 824c708fc..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/powerpc/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/powerpc/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= G_LIBOBJS=mempcpy.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/powerpc64/config.h b/external/gpl3/binutils/lib/libiberty/arch/powerpc64/config.h index 45a33c644..94188758d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/powerpc64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/powerpc64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/powerpc64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/powerpc64/defs.mk index ea290a503..7f063ee32 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/powerpc64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/powerpc64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o vfork.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/riscv32/config.h b/external/gpl3/binutils/lib/libiberty/arch/riscv32/config.h index 809169659..24c712bc9 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/riscv32/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/riscv32/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/riscv32/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/riscv32/defs.mk index 8d89bb4ca..7f063ee32 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/riscv32/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/riscv32/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= G_LIBOBJS=mempcpy.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/riscv64/config.h b/external/gpl3/binutils/lib/libiberty/arch/riscv64/config.h index 809169659..767d9cb0a 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/riscv64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/riscv64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/riscv64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/riscv64/defs.mk index 8d89bb4ca..7f063ee32 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/riscv64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/riscv64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= G_LIBOBJS=mempcpy.o strverscmp.o vfork.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/sh3eb/config.h b/external/gpl3/binutils/lib/libiberty/arch/sh3eb/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sh3eb/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/sh3eb/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/sh3eb/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/sh3eb/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sh3eb/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/sh3eb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/sh3el/config.h b/external/gpl3/binutils/lib/libiberty/arch/sh3el/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sh3el/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/sh3el/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/sh3el/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/sh3el/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sh3el/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/sh3el/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/sparc/config.h b/external/gpl3/binutils/lib/libiberty/arch/sparc/config.h index cb7d1a23a..047f379b7 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sparc/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/sparc/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/sparc64/config.h b/external/gpl3/binutils/lib/libiberty/arch/sparc64/config.h index cb7d1a23a..0eacd6116 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sparc64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/sparc64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/sparc64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/sparc64/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/sparc64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/sparc64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/vax/config.h b/external/gpl3/binutils/lib/libiberty/arch/vax/config.h index ca7c59dcc..ccd6b8c56 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/vax/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/vax/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/vax/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/vax/defs.mk index 613d0e3a9..eded0f77d 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/vax/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/vax/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libiberty/arch/x86_64/config.h b/external/gpl3/binutils/lib/libiberty/arch/x86_64/config.h index ca7c59dcc..01e4b587f 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/x86_64/config.h +++ b/external/gpl3/binutils/lib/libiberty/arch/x86_64/config.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ @@ -84,6 +84,26 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ +#define HAVE_DECL_STRTOL 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOUL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #define HAVE_DECL_STRVERSCMP 0 @@ -141,6 +161,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define if you have the `long long' type. */ +#define HAVE_LONG_LONG 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_HAL_SYSINFO_H */ @@ -169,7 +192,7 @@ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkstemps' function. */ -/* #undef HAVE_MKSTEMPS */ +#define HAVE_MKSTEMPS 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 @@ -177,6 +200,9 @@ /* Define to 1 if you have the `on_exit' function. */ /* #undef HAVE_ON_EXIT */ +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ @@ -267,6 +293,9 @@ /* Define to 1 if you have the `strndup' function. */ #define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -282,9 +311,15 @@ /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + /* Define to 1 if you have the `strverscmp' function. */ /* #undef HAVE_STRVERSCMP */ @@ -441,6 +476,15 @@ /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -456,6 +500,28 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* 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 @@ -468,12 +534,27 @@ # 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 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/external/gpl3/binutils/lib/libiberty/arch/x86_64/defs.mk b/external/gpl3/binutils/lib/libiberty/arch/x86_64/defs.mk index 613d0e3a9..efb273d2f 100644 --- a/external/gpl3/binutils/lib/libiberty/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/lib/libiberty/arch/x86_64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o mkstemps.o strverscmp.o -G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o +G_LIBOBJS=mempcpy.o strverscmp.o +G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o diff --git a/external/gpl3/binutils/lib/libopcodes/Makefile b/external/gpl3/binutils/lib/libopcodes/Makefile index 63c5e561b..fc99fc2ab 100644 --- a/external/gpl3/binutils/lib/libopcodes/Makefile +++ b/external/gpl3/binutils/lib/libopcodes/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2013/09/29 14:20:35 christos Exp $ +# $NetBSD: Makefile,v 1.12 2020/04/04 00:46:54 christos Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -6,7 +6,7 @@ NOMAN= # defined NOPROFILE= # defined NOCLANGERROR= # defined -.include +.include LIB= opcodes @@ -15,15 +15,13 @@ BFD_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[4-7]/arm/} .if exists(${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk) .include "${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk" -DIST= ${NETBSDSRCDIR}/external/gpl3/binutils/dist - .if defined(__MINIX) # MINIX: make sure sources are fetched, even when tools not built earlier GNUHOSTDIST= ${DIST} .include "${.CURDIR}/../../../../../minix/Makefile.fetchgnu" .endif # defined(__MINIX) -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 10 SHLIB_MINOR= 0 GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS} diff --git a/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/config.h new file mode 100644 index 000000000..a8e838386 --- /dev/null +++ b/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/config.h @@ -0,0 +1,127 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if you have the declaration of `basename', and to 0 if you + don't. */ +#define HAVE_DECL_BASENAME 0 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "opcodes" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "opcodes" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "opcodes 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "opcodes" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.34" + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/defs.mk b/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..fadff7ed2 --- /dev/null +++ b/external/gpl3/binutils/lib/libopcodes/arch/aarch64eb/defs.mk @@ -0,0 +1,7 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# +G_archdefs=-DARCH_aarch64 -DARCH_arm +G_BFD_MACHINES=aarch64-asm.lo aarch64-dis.lo aarch64-opc.lo aarch64-asm-2.lo aarch64-dis-2.lo aarch64-opc-2.lo arm-dis.lo +G_libopcodes_la_SOURCES=dis-buf.c disassemble.c dis-init.c diff --git a/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h b/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/alpha/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/arm/config.h b/external/gpl3/binutils/lib/libopcodes/arch/arm/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/arm/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/arm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/armeb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/armeb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/armeb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/armeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/coldfire/config.h b/external/gpl3/binutils/lib/libopcodes/arch/coldfire/config.h index beb23fa93..05f11b70e 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/coldfire/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/coldfire/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/earm/config.h b/external/gpl3/binutils/lib/libopcodes/arch/earm/config.h index 157259f6a..a2a80e790 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/earm/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/earm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -38,6 +38,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -70,19 +73,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -113,7 +116,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/earmeb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/earmeb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/earmeb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/earmeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/earmhf/config.h b/external/gpl3/binutils/lib/libopcodes/arch/earmhf/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/earmhf/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/earmhf/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/earmhfeb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/earmhfeb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/earmhfeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/hppa/config.h b/external/gpl3/binutils/lib/libopcodes/arch/hppa/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/hppa/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/hppa/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/i386/config.h b/external/gpl3/binutils/lib/libopcodes/arch/i386/config.h index 157259f6a..4d61f3237 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/i386/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/i386/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -38,6 +38,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -70,19 +73,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -113,7 +116,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/i386/defs.mk b/external/gpl3/binutils/lib/libopcodes/arch/i386/defs.mk index ce0f85c9d..530f60275 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/i386/defs.mk +++ b/external/gpl3/binutils/lib/libopcodes/arch/i386/defs.mk @@ -1,7 +1,7 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.5 2006/02/02 20:06:04 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # -G_archdefs=-DARCH_i386 +G_archdefs=-DARCH_i386 -DARCH_iamcu G_BFD_MACHINES=i386-dis.lo i386-opc.lo G_libopcodes_la_SOURCES=dis-buf.c disassemble.c dis-init.c diff --git a/external/gpl3/binutils/lib/libopcodes/arch/ia64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/ia64/config.h index c556a5617..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/ia64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/ia64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/m68000/config.h b/external/gpl3/binutils/lib/libopcodes/arch/m68000/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/m68000/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/m68000/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h b/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/m68k/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/mips64eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h b/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/mips64el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/mipseb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h b/external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/mipsel/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/or1k/config.h b/external/gpl3/binutils/lib/libopcodes/arch/or1k/config.h index c556a5617..05f11b70e 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/or1k/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/or1k/config.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h b/external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/powerpc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h index 586c0847e..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/powerpc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/riscv32/config.h b/external/gpl3/binutils/lib/libopcodes/arch/riscv32/config.h index c556a5617..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/riscv32/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/riscv32/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/riscv64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/riscv64/config.h index c556a5617..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/riscv64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/riscv64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/sh3eb/config.h b/external/gpl3/binutils/lib/libopcodes/arch/sh3eb/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/sh3eb/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/sh3eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/sh3el/config.h b/external/gpl3/binutils/lib/libopcodes/arch/sh3el/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/sh3el/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/sh3el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h b/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/sparc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/vax/config.h b/external/gpl3/binutils/lib/libopcodes/arch/vax/config.h index beb23fa93..a8e838386 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/vax/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/vax/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/x86_64/config.h b/external/gpl3/binutils/lib/libopcodes/arch/x86_64/config.h index beb23fa93..7ef5f0163 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/x86_64/config.h +++ b/external/gpl3/binutils/lib/libopcodes/arch/x86_64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -36,6 +36,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -68,19 +71,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "opcodes" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "opcodes 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "opcodes" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -111,7 +114,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/external/gpl3/binutils/lib/libopcodes/arch/x86_64/defs.mk b/external/gpl3/binutils/lib/libopcodes/arch/x86_64/defs.mk index e9161af08..28071ab5e 100644 --- a/external/gpl3/binutils/lib/libopcodes/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/lib/libopcodes/arch/x86_64/defs.mk @@ -1,7 +1,7 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp # -G_archdefs=-DARCH_i386 -DARCH_l1om -DARCH_k1om +G_archdefs=-DARCH_i386 -DARCH_iamcu -DARCH_l1om -DARCH_k1om G_BFD_MACHINES=i386-dis.lo i386-opc.lo G_libopcodes_la_SOURCES=dis-buf.c disassemble.c dis-init.c diff --git a/external/gpl3/binutils/patches/0000-Base-NetBSD.patch b/external/gpl3/binutils/patches/0000-Base-NetBSD.patch new file mode 100644 index 000000000..d037730f6 --- /dev/null +++ b/external/gpl3/binutils/patches/0000-Base-NetBSD.patch @@ -0,0 +1,14319 @@ +diff -rNU3 a/bfd/aoutx.h b/bfd/aoutx.h +--- a/bfd/aoutx.h 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/aoutx.h 2021-03-30 17:47:59.502219000 -0300 +@@ -757,7 +757,7 @@ + break; + + case bfd_arch_arm: +- if (machine == 0) ++ if (machine == 0 || machine == 5) + arch_flags = M_ARM; + break; + +diff -rNU3 a/bfd/archive.c b/bfd/archive.c +--- a/bfd/archive.c 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/archive.c 2021-03-30 17:47:59.502219000 -0300 +@@ -162,6 +162,9 @@ + #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) + + #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) ++ ++static const char * normalize (bfd *, const char *); ++ + #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header) + + /* True iff NAME designated a BSD 4.4 extended name. */ +@@ -815,6 +818,16 @@ + { + filestart = last_file->proxy_origin; + if (! bfd_is_thin_archive (archive)) ++#if 0 ++/* OLD CODE */ ++ filestart += size; ++ /* Pad to an even boundary... ++ Note that last_file->origin can be odd in the case of ++ BSD-4.4-style element with a long odd size. */ ++ if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3)) ++ size += strlen(normalize(last_file, last_file->filename)); ++ filestart += size % 2; ++#endif + { + bfd_size_type size = arelt_size (last_file); + +@@ -2175,11 +2188,22 @@ + current = current->archive_next) + { + char buffer[DEFAULT_BUFFERSIZE]; +- bfd_size_type remaining = arelt_size (current); ++ bfd_size_type saved_size = arelt_size (current); ++ bfd_size_type remaining = saved_size; ++ struct ar_hdr *hdr = arch_hdr (current); + + /* Write ar header. */ + if (!_bfd_write_ar_hdr (arch, current)) +- return FALSE; ++ return FALSE; ++ /* Write filename if it is a 4.4BSD extended file, and add to size. */ ++ if (!strncmp (hdr->ar_name, "#1/", 3)) ++ { ++ const char *normal = normalize (current, current->filename); ++ unsigned int thislen = strlen (normal); ++ if (bfd_write (normal, 1, thislen, arch) != thislen) ++ return FALSE; ++ saved_size += thislen; ++ } + if (bfd_is_thin_archive (arch)) + continue; + if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) +@@ -2510,11 +2534,19 @@ + { + do + { ++#if 1 ++ bfd_size_type size = arelt_size (current); ++ if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3)) ++ size += strlen(normalize(current, current->filename)); ++ firstreal += size + sizeof (struct ar_hdr); ++ firstreal += size % 2; ++#else + struct areltdata *ared = arch_eltdata (current); + + firstreal += (ared->parsed_size + ared->extra_size + + sizeof (struct ar_hdr)); + firstreal += firstreal % 2; ++#endif + current = current->archive_next; + } + while (current != map[count].u.abfd); +diff -rNU3 a/bfd/archures.c b/bfd/archures.c +--- a/bfd/archures.c 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/archures.c 2021-03-30 17:47:59.502219000 -0300 +@@ -651,6 +651,7 @@ + extern const bfd_arch_info_type bfd_nfp_arch; + extern const bfd_arch_info_type bfd_nios2_arch; + extern const bfd_arch_info_type bfd_ns32k_arch; ++extern const bfd_arch_info_type bfd_openrisc_arch; + extern const bfd_arch_info_type bfd_or1k_arch; + extern const bfd_arch_info_type bfd_pdp11_arch; + extern const bfd_arch_info_type bfd_pj_arch; +@@ -741,6 +742,7 @@ + &bfd_nfp_arch, + &bfd_nios2_arch, + &bfd_ns32k_arch, ++ &bfd_openrisc_arch, + &bfd_or1k_arch, + &bfd_pdp11_arch, + &bfd_powerpc_arch, +diff -rNU3 a/bfd/coff-alpha.c b/bfd/coff-alpha.c +--- a/bfd/coff-alpha.c 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/coff-alpha.c 2021-03-30 17:47:59.512219000 -0300 +@@ -640,7 +640,9 @@ + case ALPHA_R_OP_STORE: + /* The STORE reloc needs the size and offset fields. We store + them in the addend. */ ++#if 0 + BFD_ASSERT (intern->r_offset <= 256); ++#endif + rptr->addend = (intern->r_offset << 8) + intern->r_size; + break; + +diff -rNU3 a/bfd/config.bfd b/bfd/config.bfd +--- a/bfd/config.bfd 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/config.bfd 2021-03-30 17:47:59.522219000 -0300 +@@ -179,6 +179,7 @@ + i[3-7]86) targ_archs=bfd_i386_arch ;; + ia16) targ_archs=bfd_i386_arch ;; + lm32) targ_archs=bfd_lm32_arch ;; ++m5200|m5407) targ_archs=bfd_m68k_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" ;; + m68*) targ_archs=bfd_m68k_arch ;; +@@ -252,12 +253,12 @@ + targ_selvecs=aarch64_elf64_be_cloudabi_vec + want64=true + ;; +- aarch64-*-linux*) ++ aarch64-*-linux* | aarch64-*-netbsd*) + 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" + want64=true + ;; +- aarch64_be-*-linux*) ++ aarch64_be-*-linux* | aarch64_be-*-netbsd*) + targ_defvec=aarch64_elf64_be_vec + targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec" + want64=true +@@ -348,11 +349,11 @@ + targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec" + targ_archs="$targ_archs bfd_i386_arch" + ;; +- armeb-*-netbsdelf*) ++ arm*eb-*-netbsdelf*) + targ_defvec=arm_elf32_be_vec + targ_selvecs="arm_elf32_le_vec" + ;; +- arm-*-netbsdelf*) ++ arm*-*-netbsdelf*) + targ_defvec=arm_elf32_le_vec + targ_selvecs="arm_elf32_be_vec" + ;; +@@ -621,8 +622,8 @@ + ;; + i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu) + targ_defvec=i386_elf32_vec +- targ_selvecs="iamcu_elf32_vec" +- targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec" ++ targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_pei_vec i386_aout_bsd_vec i386_aout_nbsd_vec" ++ targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec x86_64_pei_vec" + ;; + i[3-7]86-*-netbsdpe*) + targ_defvec=i386_pe_vec +@@ -685,7 +686,7 @@ + ;; + x86_64-*-netbsd* | x86_64-*-openbsd*) + targ_defvec=x86_64_elf64_vec +- targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec" ++ targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec i386_aout_bsd_vec i386_aout_nbsd_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec" + want64=true + ;; + x86_64-*-linux-*) +@@ -850,14 +851,6 @@ + ;; + + #ifdef BFD64 +- mips*el-*-netbsd*) +- targ_defvec=mips_elf32_trad_le_vec +- targ_selvecs="mips_elf32_trad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec" +- ;; +- mips*-*-netbsd*) +- targ_defvec=mips_elf32_trad_be_vec +- targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" +- ;; + mips*-*-irix6*) + targ_defvec=mips_elf32_n_be_vec + targ_selvecs="mips_elf32_n_le_vec mips_elf32_be_vec mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" +@@ -898,6 +891,22 @@ + targ_defvec=mips_elf32_be_vec + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" + ;; ++ mips64*el-*-netbsd*) ++ 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 mips_ecoff_le_vec mips_ecoff_be_vec" ++ ;; ++ mips64*-*-netbsd*) ++ 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 mips_ecoff_be_vec mips_ecoff_le_vec" ++ ;; ++ mips*el-*-netbsd*) ++ targ_defvec=mips_elf32_trad_le_vec ++ targ_selvecs="mips_elf32_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec mips_ecoff_le_vec mips_ecoff_be_vec" ++ ;; ++ mips*-*-netbsd*) ++ targ_defvec=mips_elf32_trad_be_vec ++ targ_selvecs="mips_elf32_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec mips_ecoff_be_vec mips_ecoff_le_vec" ++ ;; + mips64*-*-openbsd*) + targ_defvec=mips_elf64_trad_be_vec + targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec" +@@ -1029,7 +1038,7 @@ + targ_selvecs=nios2_elf32_be_vec + ;; + +- or1k-*-elf | or1k-*-linux* | or1k-*-rtems*) ++ or1k-*-elf | or1k-*-linux* | or1k-*-rtems* | or1k*-*-netbsd*) + targ_defvec=or1k_elf32_vec + ;; + +@@ -1189,6 +1198,14 @@ + targ_underscore=yes + ;; + ++#ifdef BFD64 ++ riscv*-*-*) ++ targ_defvec=riscv_elf64_vec ++ targ_selvecs="riscv_elf32_vec riscv_elf64_vec" ++ want64=true ++ ;; ++#endif ++ + rx-*-elf) + targ_defvec=rx_elf32_le_vec + targ_selvecs="rx_elf32_be_vec rx_elf32_le_vec rx_elf32_be_ns_vec" +@@ -1241,9 +1258,10 @@ + targ_defvec=sh_elf32_nbsd_le_vec + targ_selvecs="sh_elf32_nbsd_vec sh_coff_vec sh_coff_le_vec" + ;; +- sh*-*-netbsdelf*) ++ sh-*-netbsdelf*) + targ_defvec=sh_elf32_nbsd_vec + targ_selvecs="sh_elf32_nbsd_le_vec sh_coff_vec sh_coff_le_vec" ++ want64=true + ;; + + shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*) +@@ -1287,6 +1305,10 @@ + targ_underscore=yes + ;; + ++ sparc-*-netbsdelf*) ++ targ_defvec=sparc_elf32_vec ++ want64=true ++ ;; + sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) + targ_defvec=sparc_elf32_sol2_vec + ;; +diff -rNU3 a/bfd/configure b/bfd/configure +--- a/bfd/configure 2021-03-30 23:12:40.094559932 -0300 ++++ b/bfd/configure 2021-03-30 17:47:59.522219000 -0300 +@@ -12461,7 +12461,7 @@ + *) as_fn_error $? "bad value ${enableval} for secureplt option" "$LINENO" 5 ;; + esac + else +- use_secureplt=true ++ use_secureplt=false + fi + if test $use_secureplt = true; then + +@@ -12523,10 +12523,10 @@ + withval=$with_pkgversion; case "$withval" in + yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; + no) PKGVERSION= ;; +- *) PKGVERSION="($withval) " ;; ++ *) PKGVERSION="($withval)\ " ;; + esac + else +- PKGVERSION="(GNU Binutils) " ++ PKGVERSION="(GNU Binutils)\ " + + fi + +@@ -14752,6 +14752,7 @@ + i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;; + i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; + i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; ++ i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; + i386_coff_vec) tb="$tb coff-i386.lo $coff" ;; + i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;; + i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;; +@@ -15119,6 +15120,7 @@ + COREFILE=netbsd-core.lo + ;; + arm-*-riscix) COREFILE=trad-core.lo ;; ++ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;; + hppa*-*-hpux*) COREFILE=hpux-core.lo ;; + hppa*-*-hiux*) COREFILE=hpux-core.lo ;; + hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; +diff -rNU3 a/bfd/configure.ac b/bfd/configure.ac +--- a/bfd/configure.ac 2021-03-30 23:12:40.097893265 -0300 ++++ b/bfd/configure.ac 2021-03-30 17:47:59.522219000 -0300 +@@ -86,7 +86,7 @@ + yes) use_secureplt=true ;; + no) use_secureplt=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;; +-esac],[use_secureplt=true])dnl ++esac],[use_secureplt=false])dnl + if test $use_secureplt = true; then + AC_DEFINE(USE_SECUREPLT, 1, + [Define if we should default to creating read-only plt entries]) +@@ -488,6 +488,7 @@ + i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;; + i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; + i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; ++ i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; + i386_coff_vec) tb="$tb coff-i386.lo $coff" ;; + i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;; + i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;; +diff -rNU3 a/bfd/configure.host b/bfd/configure.host +--- a/bfd/configure.host 2021-03-30 23:12:40.097893265 -0300 ++++ b/bfd/configure.host 2021-03-30 17:47:59.532219000 -0300 +@@ -72,6 +72,10 @@ + mips*-*-sysv*) HDEFINES="-G 4" ;; + mips*-*-riscos*) HDEFINES="-G 4" ;; + ++sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; ++ ++x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; ++ + # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise + # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the + # default code page used by windres/windmc when not specified by a commandline +diff -rNU3 a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in +--- a/bfd/doc/Makefile.in 2021-03-30 23:12:40.097893265 -0300 ++++ b/bfd/doc/Makefile.in 2021-03-30 17:47:59.552219000 -0300 +@@ -538,6 +538,8 @@ + -rm -rf .libs _libs + + bfd.info: bfd.texi $(bfd_TEXINFOS) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_bfd.info: bfd.texinfo $(bfd_TEXINFOS) + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ +diff -rNU3 a/bfd/doc/reloc.texi b/bfd/doc/reloc.texi +--- a/bfd/doc/reloc.texi 2021-03-30 23:12:40.097893265 -0300 ++++ b/bfd/doc/reloc.texi 2021-03-30 17:47:59.558886000 -0300 +@@ -557,6 +557,12 @@ + @deffnx {} BFD_RELOC_68K_TLS_LE8 + Relocations used by 68K ELF. + @end deffn ++@deffn {} BFD_RELOC_VAX_GLOB_DAT ++@deffnx {} BFD_RELOC_VAX_GLOB_REF ++@deffnx {} BFD_RELOC_VAX_JMP_SLOT ++@deffnx {} BFD_RELOC_VAX_RELATIVE ++Relocations used by VAX ELF. ++@end deffn + @deffn {} BFD_RELOC_32_BASEREL + @deffnx {} BFD_RELOC_16_BASEREL + @deffnx {} BFD_RELOC_LO16_BASEREL +diff -rNU3 a/bfd/elf32-arm.c b/bfd/elf32-arm.c +--- a/bfd/elf32-arm.c 2021-03-30 23:12:40.111226599 -0300 ++++ b/bfd/elf32-arm.c 2021-03-30 17:47:59.578886000 -0300 +@@ -3488,6 +3488,7 @@ + #endif + } + ++#if !defined (__NetBSD__) || (__NetBSD_Version__ < 600000000) + static inline int + elf32_arm_popcount (unsigned int mask) + { +@@ -3506,6 +3507,7 @@ + return sum; + #endif + } ++#endif + + static void elf32_arm_add_dynreloc (bfd *output_bfd, struct bfd_link_info *info, + asection *sreloc, Elf_Internal_Rela *rel); +diff -rNU3 a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c +--- a/bfd/elf32-hppa.c 2021-03-30 23:12:40.111226599 -0300 ++++ b/bfd/elf32-hppa.c 2021-03-30 17:47:59.598886000 -0300 +@@ -2095,7 +2095,6 @@ + info->callbacks->minfo + (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"), + sec->owner, eh->root.root.string, sec); +- + /* Not an error, just cut short the traversal. */ + return FALSE; + } +diff -rNU3 a/bfd/elf32-i386.c b/bfd/elf32-i386.c +--- a/bfd/elf32-i386.c 2021-03-30 23:12:40.114559932 -0300 ++++ b/bfd/elf32-i386.c 2021-03-30 17:47:59.602219000 -0300 +@@ -534,9 +534,14 @@ + one of the last functions. */ + + /* The size in bytes of an entry in the lazy procedure linkage table. */ +- + #define LAZY_PLT_ENTRY_SIZE 16 + ++/* The name of the dynamic interpreter. This is put in the .interp ++ section. */ ++ ++#define ELF_DYNAMIC_INTERPRETER "/libexec/ld.elf_so" ++ ++ + /* The size in bytes of an entry in the non-lazy procedure linkage + table. */ + +diff -rNU3 a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c +--- a/bfd/elf32-m68k.c 2021-03-30 23:12:40.114559932 -0300 ++++ b/bfd/elf32-m68k.c 2021-03-30 17:47:59.608886000 -0300 +@@ -2486,7 +2486,7 @@ + if (ind->got_entry_key != 0) + { + BFD_ASSERT (dir->got_entry_key == 0); +- /* Assert that GOTs aren't partioned yet. */ ++ /* Assert that GOTs aren't partitioned yet. */ + BFD_ASSERT (ind->glist == NULL); + + dir->got_entry_key = ind->got_entry_key; +@@ -2743,7 +2743,13 @@ + && !(ELF32_R_TYPE (rel->r_info) == R_68K_PC8 + || ELF32_R_TYPE (rel->r_info) == R_68K_PC16 + || ELF32_R_TYPE (rel->r_info) == R_68K_PC32)) +- info->flags |= DF_TEXTREL; ++ { ++ if (info->warn_shared_textrel) ++ (*_bfd_error_handler) ++ (_("warning: dynamic relocation to `%s' in readonly section `%s'"), ++ h->root.root.string, sec->name); ++ info->flags |= DF_TEXTREL; ++ } + + sreloc->size += sizeof (Elf32_External_Rela); + +@@ -2905,6 +2911,7 @@ + /* Make sure we know what is going on here. */ + BFD_ASSERT (dynobj != NULL + && (h->needs_plt ++ || h->type == STT_GNU_IFUNC + || h->is_weakalias + || (h->def_dynamic + && h->ref_regular +@@ -2913,7 +2920,7 @@ + /* If this is a function, put it in the procedure linkage table. We + will fill in the contents of the procedure linkage table later, + when we know the address of the .got section. */ +- if (h->type == STT_FUNC ++ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) + || h->needs_plt) + { + if ((h->plt.refcount <= 0 +@@ -3234,6 +3241,10 @@ + s = s->next) + if ((s->section->flags & SEC_READONLY) != 0) + { ++ if (info->warn_shared_textrel) ++ (*_bfd_error_handler) ++ (_("warning: dynamic relocation to `%s' in readonly section `%s'"), ++ h->root.root.string, s->section->name); + info->flags |= DF_TEXTREL; + break; + } +diff -rNU3 a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c +--- a/bfd/elf32-ppc.c 2021-03-30 23:12:40.117893266 -0300 ++++ b/bfd/elf32-ppc.c 2021-03-30 17:47:59.625553000 -0300 +@@ -3017,7 +3017,7 @@ + sec->nomark_tls_get_addr = 1; + } + +- switch (r_type) ++ switch ((int)r_type) + { + case R_PPC_TLSGD: + case R_PPC_TLSLD: +@@ -5438,9 +5438,16 @@ + struct bfd_link_info *info = (struct bfd_link_info *) info_p; + + info->flags |= DF_TEXTREL; +- info->callbacks->minfo +- (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"), +- sec->owner, h->root.root.string, sec); ++ /* xgettext:c-format */ ++ info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' " ++ "in read-only section `%pA'\n"), ++ sec->owner, h->root.root.string, sec); ++ if ((info->warn_shared_textrel && bfd_link_pic (info)) ++ || info->error_textrel) ++ /* xgettext:c-format */ ++ info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' " ++ "in read-only section `%pA'\n"), ++ sec->owner, h->root.root.string, sec); + + /* Not an error, just cut short the traversal. */ + return FALSE; +diff -rNU3 a/bfd/elf32-sh.c b/bfd/elf32-sh.c +--- a/bfd/elf32-sh.c 2021-03-30 23:12:40.124559932 -0300 ++++ b/bfd/elf32-sh.c 2021-03-30 17:47:59.638886000 -0300 +@@ -2526,6 +2526,7 @@ + /* Make sure we know what is going on here. */ + BFD_ASSERT (htab->root.dynobj != NULL + && (h->needs_plt ++ || h->type == STT_GNU_IFUNC + || h->is_weakalias + || (h->def_dynamic + && h->ref_regular +@@ -2534,7 +2535,7 @@ + /* If this is a function, put it in the procedure linkage table. We + will fill in the contents of the procedure linkage table later, + when we know the address of the .got section. */ +- if (h->type == STT_FUNC ++ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) + || h->needs_plt) + { + if (h->plt.refcount <= 0 +diff -rNU3 a/bfd/elf32-vax.c b/bfd/elf32-vax.c +--- a/bfd/elf32-vax.c 2021-03-30 23:12:40.124559932 -0300 ++++ b/bfd/elf32-vax.c 2021-03-30 17:47:59.642219000 -0300 +@@ -497,6 +497,24 @@ + return TRUE; + } + ++/* Copy vax-specific data from one module to another */ ++static bfd_boolean ++elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd) ++{ ++ flagword in_flags; ++ ++ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour ++ || bfd_get_flavour (obfd) != bfd_target_elf_flavour) ++ return TRUE; ++ ++ in_flags = elf_elfheader (ibfd)->e_flags; ++ ++ elf_elfheader (obfd)->e_flags = in_flags; ++ elf_flags_init (obfd) = TRUE; ++ ++ return TRUE; ++} ++ + /* Merge backend specific data from an object file to the output + object file when linking. */ + static bfd_boolean +@@ -729,7 +747,13 @@ + return FALSE; + + if (sec->flags & SEC_READONLY) +- info->flags |= DF_TEXTREL; ++ { ++ if (info->warn_shared_textrel) ++ (*_bfd_error_handler) ++ (_("warning: dynamic relocation to `%s' in readonly section `%s'"), ++ h ? h->root.root.string : "?", sec->name); ++ info->flags |= DF_TEXTREL; ++ } + } + + sreloc->size += sizeof (Elf32_External_Rela); +@@ -834,6 +858,7 @@ + /* Make sure we know what is going on here. */ + BFD_ASSERT (dynobj != NULL + && (h->needs_plt ++ || h->type == STT_GNU_IFUNC + || h->is_weakalias + || (h->def_dynamic + && h->ref_regular +@@ -842,7 +867,7 @@ + /* If this is a function, put it in the procedure linkage table. We + will fill in the contents of the procedure linkage table later, + when we know the address of the .got section. */ +- if (h->type == STT_FUNC ++ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) + || h->needs_plt) + { + if (h->plt.refcount <= 0 +@@ -1244,8 +1269,12 @@ + } + + /* Allocate space in the .got and .rela.got sections. */ +- sgot->size += 4; +- srelgot->size += sizeof (Elf32_External_Rela); ++ if (bfd_link_pic (info) || WILL_CALL_FINISH_DYNAMIC_SYMBOL ( ++ elf_hash_table (info)->dynamic_sections_created, 0, h)) ++ { ++ sgot->size += 4; ++ srelgot->size += sizeof (Elf32_External_Rela); ++ } + } + + return TRUE; +@@ -1515,9 +1544,9 @@ + { + relocate = TRUE; + outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE); +- BFD_ASSERT (bfd_get_signed_32 (input_bfd, +- &contents[rel->r_offset]) == 0); +- outrel.r_addend = relocation + rel->r_addend; ++ outrel.r_addend = bfd_get_signed_32(input_bfd, ++ &contents[rel->r_offset]) ++ + relocation + rel->r_addend; + } + else + { +@@ -1556,6 +1585,9 @@ + } + } + ++ if (input_section->flags & SEC_CODE) ++ info->flags |= DF_TEXTREL; ++ + if ((input_section->flags & SEC_CODE) != 0 + || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32 + && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE +@@ -1905,12 +1937,15 @@ + #define TARGET_LITTLE_SYM vax_elf32_vec + #define TARGET_LITTLE_NAME "elf32-vax" + #define ELF_MACHINE_CODE EM_VAX +-#define ELF_MAXPAGESIZE 0x1000 ++#define ELF_MAXPAGESIZE 0x10000 + + #define elf_backend_create_dynamic_sections \ + _bfd_elf_create_dynamic_sections + #define bfd_elf32_bfd_link_hash_table_create \ + elf_vax_link_hash_table_create ++#define bfd_elf32_bfd_copy_private_bfd_data \ ++ elf32_vax_copy_private_bfd_data ++ + #define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link + + #define elf_backend_check_relocs elf_vax_check_relocs +diff -rNU3 a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c +--- a/bfd/elf64-alpha.c 2021-03-30 23:12:40.124559932 -0300 ++++ b/bfd/elf64-alpha.c 2021-03-30 17:47:59.648886000 -0300 +@@ -99,6 +99,11 @@ + #define PLT_ENTRY_SIZE \ + (elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE) + ++/* ld --traditional-format uses this older format instead. */ ++#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */ ++#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */ ++#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */ ++ + #define MAX_GOT_SIZE (64*1024) + + #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so" +@@ -4857,6 +4862,32 @@ + plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE) + / NEW_PLT_ENTRY_SIZE); + } ++ else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0) ++ { ++ long hi, lo; ++ ++ /* decompose the reloc offset for the plt for ldah+lda */ ++ hi = plt_index * sizeof(Elf64_External_Rela); ++ lo = ((hi & 0xffff) ^ 0x8000) - 0x8000; ++ hi = (hi - lo) >> 16; ++ ++ insn = INSN_ABO (INSN_LDAH, 28, 31, hi); ++ bfd_put_32 (output_bfd, insn, ++ splt->contents + gotent->plt_offset); ++ ++ insn = INSN_ABO (INSN_LDA, 28, 28, lo); ++ bfd_put_32 (output_bfd, insn, ++ splt->contents + gotent->plt_offset + 4); ++ ++ disp = -(gotent->plt_offset + 12); ++ insn = INSN_AD (INSN_BR, 31, disp); ++ ++ bfd_put_32 (output_bfd, insn, ++ splt->contents + gotent->plt_offset + 8); ++ ++ plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE) ++ / OLD_PLT_ENTRY_SIZE); ++ } + else + { + disp = -(gotent->plt_offset + 4); +diff -rNU3 a/bfd/elf64-mips.c b/bfd/elf64-mips.c +--- a/bfd/elf64-mips.c 2021-03-30 23:12:40.127893266 -0300 ++++ b/bfd/elf64-mips.c 2021-03-30 17:47:59.652219000 -0300 +@@ -111,6 +111,8 @@ + (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); + static bfd_boolean mips_elf64_object_p + (bfd *); ++static bfd_boolean mips_elf64_is_local_label_name ++ (bfd *, const char *); + static irix_compat_t elf64_mips_irix_compat + (bfd *); + static bfd_boolean elf64_mips_grok_prstatus +@@ -4531,7 +4533,18 @@ + bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); + return TRUE; + } ++ ++/* MIPS ELF local labels start with "$L". */ ++static bfd_boolean ++mips_elf64_is_local_label_name (bfd *abfd, const char *name) ++{ ++ if (name[0] == '$' && name[1] == 'L') ++ return TRUE; + ++ /* We accept the generic ELF local label syntax as well. */ ++ return _bfd_elf_is_local_label_name (abfd, name); ++} ++ + /* Depending on the target vector we generate some version of Irix + executables or "normal" MIPS ELF ABI executables. */ + static irix_compat_t +@@ -4800,9 +4813,8 @@ + #define elf_backend_write_section _bfd_mips_elf_write_section + #define elf_backend_sort_relocs_p _bfd_mips_elf_sort_relocs_p + +-/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit +- MIPS-specific function only applies to IRIX5, which had no 64-bit +- ABI. */ ++#define bfd_elf64_bfd_is_local_label_name \ ++ mips_elf64_is_local_label_name + #define bfd_elf64_bfd_is_target_special_symbol \ + _bfd_mips_elf_is_target_special_symbol + #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line +diff -rNU3 a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c +--- a/bfd/elf64-ppc.c 2021-03-30 23:12:40.131226599 -0300 ++++ b/bfd/elf64-ppc.c 2021-03-30 17:47:59.662219000 -0300 +@@ -9790,7 +9790,13 @@ + srel = htab->elf.irelplt; + srel->size += p->count * sizeof (Elf64_External_Rela); + if ((p->sec->output_section->flags & SEC_READONLY) != 0) +- info->flags |= DF_TEXTREL; ++ { ++ if (info->warn_shared_textrel) ++ (*_bfd_error_handler) ++ (_("warning: dynamic relocation in readonly section `%s'"), ++ p->sec->output_section->name); ++ info->flags |= DF_TEXTREL; ++ } + } + } + } +@@ -15228,6 +15234,11 @@ + can_plt_call = TRUE; + } + } ++ else ++ { ++ /* Tail calls don't need to worry about restoring TOC. */ ++ can_plt_call = TRUE; ++ } + } + + if (!can_plt_call && h != NULL) +@@ -15247,7 +15258,7 @@ + } + } + +- if (!can_plt_call) ++ if (!can_plt_call && h != NULL) + { + /* g++ as of 20130507 emits self-calls without a + following nop. This is arguably wrong since we +diff -rNU3 a/bfd/elf.c b/bfd/elf.c +--- a/bfd/elf.c 2021-03-30 23:12:40.104559932 -0300 ++++ b/bfd/elf.c 2021-03-30 17:47:59.575553000 -0300 +@@ -296,7 +296,8 @@ + /* Allocate and clear an extra byte at the end, to prevent crashes + in case the string table is not terminated. */ + if (shstrtabsize + 1 <= 1 +- || shstrtabsize > bfd_get_file_size (abfd) ++ || (bfd_get_file_size (abfd) > 0 /* not a character device */ ++ && shstrtabsize > bfd_get_file_size (abfd)) + || bfd_seek (abfd, offset, SEEK_SET) != 0 + || (shstrtab = (bfd_byte *) bfd_alloc (abfd, shstrtabsize + 1)) == NULL) + shstrtab = NULL; +@@ -4396,7 +4397,7 @@ + get_program_header_size (bfd *abfd, struct bfd_link_info *info) + { + size_t segs; +- asection *s; ++ asection *s, *s2; + const struct elf_backend_data *bed; + + /* Assume we will need exactly two PT_LOAD segments: one for text +@@ -4404,21 +4405,28 @@ + segs = 2; + + s = bfd_get_section_by_name (abfd, ".interp"); ++ s2 = bfd_get_section_by_name (abfd, ".dynamic"); + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size != 0) + { +- /* If we have a loadable interpreter section, we need a +- PT_INTERP segment. In this case, assume we also need a +- PT_PHDR segment, although that may not be true for all +- targets. */ +- segs += 2; ++ ++segs; + } + +- if (bfd_get_section_by_name (abfd, ".dynamic") != NULL) ++ if (s2 != NULL && (s2->flags & SEC_LOAD) != 0) + { + /* We need a PT_DYNAMIC segment. */ + ++segs; + } + ++ if ((s != NULL && (s->flags & SEC_LOAD) != 0) || ++ (s2 != NULL && (s2->flags & SEC_LOAD) != 0)) ++ { ++ /* ++ * If either a PT_INTERP or PT_DYNAMIC segment is created, ++ * also create a PT_PHDR segment. ++ */ ++ ++segs; ++ } ++ + if (info != NULL && info->relro) + { + /* We need a PT_GNU_RELRO segment. */ +@@ -4744,7 +4752,14 @@ + the program headers and a PT_INTERP segment for the .interp + section. */ + s = bfd_get_section_by_name (abfd, ".interp"); ++ if (s != NULL && (s->flags & SEC_LOAD) == 0) + if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size != 0) ++ s = NULL; ++ dynsec = bfd_get_section_by_name (abfd, ".dynamic"); ++ if (dynsec != NULL && (dynsec->flags & SEC_LOAD) == 0) ++ dynsec = NULL; ++ ++ if (s != NULL || dynsec != NULL) + { + amt = sizeof (struct elf_segment_map); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); +@@ -4758,7 +4773,10 @@ + phdr_in_segment = TRUE; + *pm = m; + pm = &m->next; ++ } + ++ if (s != NULL) ++ { + amt = sizeof (struct elf_segment_map); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); + if (m == NULL) +@@ -4780,10 +4798,6 @@ + hdr_index = 0; + writable = FALSE; + executable = FALSE; +- dynsec = bfd_get_section_by_name (abfd, ".dynamic"); +- if (dynsec != NULL +- && (dynsec->flags & SEC_LOAD) == 0) +- dynsec = NULL; + + if ((abfd->flags & D_PAGED) == 0) + phdr_in_segment = FALSE; +@@ -5934,7 +5948,11 @@ + _bfd_error_handler (_("%pB: error: PHDR segment not covered" + " by LOAD segment"), + abfd); +- return FALSE; ++ if (link_info == NULL) ++ return FALSE; ++ /* Arrange for the linker to exit with an error, deleting ++ the output file unless --noinhibit-exec is given. */ ++ link_info->callbacks->info ("%X"); + } + + /* Check that all sections are in a PT_LOAD segment. +@@ -10659,6 +10677,7 @@ + note); + } + ++ + static bfd_boolean + elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) + { +diff -rNU3 a/bfd/elflink.c b/bfd/elflink.c +--- a/bfd/elflink.c 2021-03-30 23:12:40.134559933 -0300 ++++ b/bfd/elflink.c 2021-03-30 17:47:59.665553000 -0300 +@@ -2913,6 +2913,8 @@ + if (h->is_weakalias) + { + struct elf_link_hash_entry *def = weakdef (h); ++ while (def->root.type == bfd_link_hash_indirect) ++ def = (struct elf_link_hash_entry *) def->root.u.i.link; + + /* If the real definition is defined by a regular object file, + don't do anything special. See the longer description in +@@ -11490,7 +11492,14 @@ + if (bed->s->arch_size == 32) + irel[0].r_info = ELF32_R_INFO (indx, howto->type); + else +- irel[0].r_info = ELF64_R_INFO (indx, howto->type); ++#ifdef BFD64 ++ { ++ bfd_uint64_t indx64 = indx; ++ irel[0].r_info = ELF64_R_INFO (indx64, howto->type); ++ } ++#else ++ BFD_FAIL(); ++#endif + + rel_hdr = reldata->hdr; + erel = rel_hdr->contents; +diff -rNU3 a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c +--- a/bfd/elfn32-mips.c 2021-03-30 23:12:40.134559933 -0300 ++++ b/bfd/elfn32-mips.c 2021-03-30 17:47:59.665553000 -0300 +@@ -78,6 +78,8 @@ + (bfd *, Elf_Internal_Note *); + static bfd_boolean elf32_mips_grok_psinfo + (bfd *, Elf_Internal_Note *); ++static bfd_boolean mips_elf_n32_is_local_label_name ++ (bfd *, const char *); + static bfd_boolean elf_n32_mips_grok_freebsd_prstatus + (bfd *, Elf_Internal_Note *); + static irix_compat_t elf_n32_mips_irix_compat +@@ -4018,6 +4020,17 @@ + } + } + ++/* MIPS ELF local labels start with "$L". */ ++static bfd_boolean ++mips_elf_n32_is_local_label_name (bfd *abfd, const char *name) ++{ ++ if (name[0] == '$' && name[1] == 'L') ++ return TRUE; ++ ++ /* We accept the generic ELF local label syntax as well. */ ++ return _bfd_elf_is_local_label_name (abfd, name); ++} ++ + /* Depending on the target vector we generate some version of Irix + executables or "normal" MIPS ELF ABI executables. */ + static irix_compat_t +@@ -4162,6 +4175,9 @@ + #define elf_backend_write_section _bfd_mips_elf_write_section + #define elf_backend_mips_irix_compat elf_n32_mips_irix_compat + #define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto ++ ++#define bfd_elf32_bfd_is_local_label_name \ ++ mips_elf_n32_is_local_label_name + #define bfd_elf32_bfd_is_target_special_symbol \ + _bfd_mips_elf_is_target_special_symbol + #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line +diff -rNU3 a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c +--- a/bfd/elfxx-mips.c 2021-03-30 23:12:40.144559933 -0300 ++++ b/bfd/elfxx-mips.c 2021-03-30 17:47:59.678886000 -0300 +@@ -9026,10 +9026,30 @@ + reloc types into the output file as R_MIPS_REL32 + relocs. Make room for this reloc in .rel(a).dyn. */ + mips_elf_allocate_dynamic_relocations (dynobj, info, 1); +- if (MIPS_ELF_READONLY_SECTION (sec)) +- /* We tell the dynamic linker that there are +- relocations against the text segment. */ +- info->flags |= DF_TEXTREL; ++ /* In the N32 and 64-bit ABIs there may be multiple ++ consecutive relocations for the same offset. If we have ++ a R_MIPS_GPREL32 followed by a R_MIPS_64 then that ++ relocation is complete and needs no futher adjustment. ++ ++ Silently ignore absolute relocations in the .eh_frame ++ section, they will be dropped latter. ++ */ ++ if ((rel == relocs ++ || rel[-1].r_offset != rel->r_offset ++ || r_type != R_MIPS_64 ++ || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32) ++ && MIPS_ELF_READONLY_SECTION (sec) ++ && !((r_type == R_MIPS_32 || r_type == R_MIPS_64) ++ && strcmp(sec->name, ".eh_frame") == 0)) ++ { ++ /* We tell the dynamic linker that there are ++ relocations against the text segment. */ ++ info->flags |= DF_TEXTREL; ++ info->callbacks->warning ++ (info, ++ _("relocation emitted against readonly section"), ++ NULL, abfd, sec, rel->r_offset); ++ } + } + else + { +@@ -9307,6 +9327,7 @@ + /* Make sure we know what is going on here. */ + BFD_ASSERT (dynobj != NULL + && (h->needs_plt ++ || h->type == STT_GNU_IFUNC + || h->is_weakalias + || (h->def_dynamic + && h->ref_regular +diff -rNU3 a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c +--- a/bfd/elfxx-sparc.c 2021-03-30 23:12:40.144559933 -0300 ++++ b/bfd/elfxx-sparc.c 2021-03-30 17:47:59.682219000 -0300 +@@ -3565,6 +3565,23 @@ + tls_type = _bfd_sparc_elf_hash_entry (h)->tls_type; + else if (local_got_offsets) + tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx]; ++ else if (h != NULL) ++ { ++ tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type; ++ if (!bfd_link_dll (info) ++ && h->dynindx == -1 ++ && tls_type == GOT_TLS_IE) ++ switch (SPARC_ELF_R_TYPE (rel->r_info)) ++ { ++ case R_SPARC_TLS_GD_HI22: ++ case R_SPARC_TLS_IE_HI22: ++ r_type = R_SPARC_TLS_LE_HIX22; ++ break; ++ default: ++ r_type = R_SPARC_TLS_LE_LOX10; ++ break; ++ } ++ } + else + tls_type = GOT_UNKNOWN; + if (tls_type == GOT_TLS_IE) +@@ -3746,6 +3763,8 @@ + tls_type = _bfd_sparc_elf_hash_entry (h)->tls_type; + else if (local_got_offsets) + tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx]; ++ else if (h != NULL) ++ tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type; + else + tls_type = GOT_UNKNOWN; + /* GD -> IE or LE */ +diff -rNU3 a/bfd/i386netbsd.c b/bfd/i386netbsd.c +--- a/bfd/i386netbsd.c 1969-12-31 21:00:00.000000000 -0300 ++++ b/bfd/i386netbsd.c 2021-03-30 17:47:59.688886000 -0300 +@@ -0,0 +1,38 @@ ++/* BFD back-end for NetBSD/386 a.out-ish binaries. ++ Copyright (C) 1990-2016 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. */ ++ ++#define BYTES_IN_WORD 4 ++#undef TARGET_IS_BIG_ENDIAN_P ++ ++#define TARGET_PAGE_SIZE 4096 ++#define SEGMENT_SIZE TARGET_PAGE_SIZE ++ ++#define DEFAULT_ARCH bfd_arch_i386 ++#define DEFAULT_MID M_386_NETBSD ++ ++/* Do not "beautify" the CONCAT* macro args. Traditional C will not ++ remove whitespace added here, and thus will fail to concatenate ++ the tokens. */ ++#define MY(OP) CONCAT2 (i386_aout_nbsd_,OP) ++ ++/* This needs to start with a.out so GDB knows it is an a.out variant. */ ++#define TARGETNAME "a.out-i386-netbsd" ++ ++#include "netbsd.h" +diff -rNU3 a/bfd/libbfd.h b/bfd/libbfd.h +--- a/bfd/libbfd.h 2021-03-30 23:12:40.144559933 -0300 ++++ b/bfd/libbfd.h 2021-03-30 17:47:59.688886000 -0300 +@@ -2721,6 +2721,7 @@ + "BFD_RELOC_XC16X_SEG", + "BFD_RELOC_XC16X_SOF", + "BFD_RELOC_VAX_GLOB_DAT", ++ "BFD_RELOC_VAX_GLOB_REF", + "BFD_RELOC_VAX_JMP_SLOT", + "BFD_RELOC_VAX_RELATIVE", + "BFD_RELOC_MT_PC16", +diff -rNU3 a/bfd/Makefile.am b/bfd/Makefile.am +--- a/bfd/Makefile.am 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/Makefile.am 2021-03-30 17:47:59.498886000 -0300 +@@ -363,6 +363,7 @@ + i386bsd.lo \ + i386lynx.lo \ + i386msdos.lo \ ++ i386netbsd.lo \ + mach-o.lo \ + mach-o-i386.lo \ + mach-o-arm.lo \ +@@ -499,6 +500,7 @@ + i386bsd.c \ + i386lynx.c \ + i386msdos.c \ ++ i386netbsd.c \ + mach-o.c \ + mach-o-i386.c \ + mach-o-arm.c \ +diff -rNU3 a/bfd/Makefile.in b/bfd/Makefile.in +--- a/bfd/Makefile.in 2021-03-30 23:12:40.087893265 -0300 ++++ b/bfd/Makefile.in 2021-03-30 17:47:59.498886000 -0300 +@@ -565,6 +565,7 @@ + cpu-nfp.lo \ + cpu-nios2.lo \ + cpu-ns32k.lo \ ++ cpu-openrisc.lo \ + cpu-or1k.lo \ + cpu-pdp11.lo \ + cpu-pj.lo \ +@@ -649,6 +650,7 @@ + cpu-nds32.c \ + cpu-nfp.c \ + cpu-ns32k.c \ ++ cpu-openrisc.c \ + cpu-nios2.c \ + cpu-or1k.c \ + cpu-pdp11.c \ +@@ -695,6 +697,7 @@ + coff-go32.lo \ + coff-i386.lo \ + coff-mips.lo \ ++ coff-or1k.lo \ + coff-rs6000.lo \ + coff-sh.lo \ + coff-stgo32.lo \ +@@ -758,6 +761,7 @@ + elf32-mt.lo \ + elf32-nds32.lo \ + elf32-nios2.lo \ ++ elf32-openrisc.lo \ + elf32-or1k.lo \ + elf32-pj.lo \ + elf32-ppc.lo \ +@@ -788,6 +792,7 @@ + i386bsd.lo \ + i386lynx.lo \ + i386msdos.lo \ ++ i386netbsd.lo \ + mach-o.lo \ + mach-o-i386.lo \ + mach-o-arm.lo \ +@@ -831,6 +836,7 @@ + coff-go32.c \ + coff-i386.c \ + coff-mips.c \ ++ coff-or1k.c \ + coff-rs6000.c \ + coff-sh.c \ + coff-stgo32.c \ +@@ -894,6 +900,7 @@ + elf32-mt.c \ + elf32-nds32.c \ + elf32-nios2.c \ ++ elf32-openrisc.c \ + elf32-or1k.c \ + elf32-pj.c \ + elf32-ppc.c \ +@@ -924,6 +931,7 @@ + i386bsd.c \ + i386lynx.c \ + i386msdos.c \ ++ i386netbsd.c \ + mach-o.c \ + mach-o-i386.c \ + mach-o-arm.c \ +@@ -1315,6 +1323,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-go32.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-i386.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-mips.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-or1k.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-rs6000.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sh.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-stgo32.Plo@am__quote@ +@@ -1379,6 +1388,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nfp.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nios2.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or1k.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pdp11.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pj.Plo@am__quote@ +@@ -1465,8 +1475,10 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-moxie.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or1k.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nds32.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nios2.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or1k.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ppc.Plo@am__quote@ +@@ -1527,6 +1539,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386bsd.Plo@am__quote@ + @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)/i386netbsd.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@ +diff -rNU3 a/bfd/reloc.c b/bfd/reloc.c +--- a/bfd/reloc.c 2021-03-30 23:12:40.144559933 -0300 ++++ b/bfd/reloc.c 2021-03-30 17:47:59.782219000 -0300 +@@ -1711,6 +1711,17 @@ + Relocations used by 68K ELF. + + ENUM ++ BFD_RELOC_VAX_GLOB_DAT ++ENUMX ++ BFD_RELOC_VAX_GLOB_REF ++ENUMX ++ BFD_RELOC_VAX_JMP_SLOT ++ENUMX ++ BFD_RELOC_VAX_RELATIVE ++ENUMDOC ++ Relocations used by VAX ELF. ++ ++ENUM + BFD_RELOC_32_BASEREL + ENUMX + BFD_RELOC_16_BASEREL +diff -rNU3 a/bfd/targets.c b/bfd/targets.c +--- a/bfd/targets.c 2021-03-30 23:12:40.151226599 -0300 ++++ b/bfd/targets.c 2021-03-30 17:47:59.782219000 -0300 +@@ -727,6 +727,7 @@ + extern const bfd_target i386_aout_vec; + extern const bfd_target i386_aout_bsd_vec; + extern const bfd_target i386_aout_lynx_vec; ++extern const bfd_target i386_aout_nbsd_vec; + extern const bfd_target i386_coff_vec; + extern const bfd_target i386_coff_go32_vec; + extern const bfd_target i386_coff_go32stubbed_vec; +diff -rNU3 a/binutils/bucomm.c b/binutils/bucomm.c +--- a/binutils/bucomm.c 2021-03-30 23:12:40.151226599 -0300 ++++ b/binutils/bucomm.c 2021-03-30 17:47:59.825553000 -0300 +@@ -619,7 +619,14 @@ + else if (S_ISDIR (statbuf.st_mode)) + non_fatal (_("Warning: '%s' is a directory"), file_name); + else if (! S_ISREG (statbuf.st_mode)) +- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ { ++ if (!S_ISCHR(statbuf.st_mode)) ++ { ++ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); ++ return 0; ++ } ++ return statbuf.st_size ? statbuf.st_size : 1; ++ } + else if (statbuf.st_size < 0) + non_fatal (_("Warning: '%s' has negative size, probably it is too large"), + file_name); +diff -rNU3 a/binutils/doc/addr2line.1 b/binutils/doc/addr2line.1 +--- a/binutils/doc/addr2line.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/addr2line.1 2021-03-30 17:47:59.835553000 -0300 +@@ -0,0 +1,349 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "ADDR2LINE 1" ++.TH ADDR2LINE 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++addr2line \- convert addresses into file names and line numbers ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++addr2line [\fB\-a\fR|\fB\-\-addresses\fR] ++ [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] ++ [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] ++ [\fB\-r\fR|\fB\-\-no\-recurse\-limit\fR] ++ [\fB\-R\fR|\fB\-\-recurse\-limit\fR] ++ [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR] ++ [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR] ++ [\fB\-i\fR|\fB\-\-inlines\fR] ++ [\fB\-p\fR|\fB\-\-pretty\-print\fR] ++ [\fB\-j\fR|\fB\-\-section=\fR\fIname\fR] ++ [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] ++ [addr addr ...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBaddr2line\fR translates addresses into file names and line numbers. ++Given an address in an executable or an offset in a section of a relocatable ++object, it uses the debugging information to figure out which file name and ++line number are associated with it. ++.PP ++The executable or relocatable object to use is specified with the \fB\-e\fR ++option. The default is the file \fIa.out\fR. The section in the relocatable ++object to use is specified with the \fB\-j\fR option. ++.PP ++\&\fBaddr2line\fR has two modes of operation. ++.PP ++In the first, hexadecimal addresses are specified on the command line, ++and \fBaddr2line\fR displays the file name and line number for each ++address. ++.PP ++In the second, \fBaddr2line\fR reads hexadecimal addresses from ++standard input, and prints the file name and line number for each ++address on standard output. In this mode, \fBaddr2line\fR may be used ++in a pipe to convert dynamically chosen addresses. ++.PP ++The format of the output is \fB\s-1FILENAME:LINENO\s0\fR. By default ++each input address generates one line of output. ++.PP ++Two options can generate additional lines before each ++\&\fB\s-1FILENAME:LINENO\s0\fR line (in that order). ++.PP ++If the \fB\-a\fR option is used then a line with the input address ++is displayed. ++.PP ++If the \fB\-f\fR option is used, then a line with the ++\&\fB\s-1FUNCTIONNAME\s0\fR is displayed. This is the name of the function ++containing the address. ++.PP ++One option can generate additional lines after the ++\&\fB\s-1FILENAME:LINENO\s0\fR line. ++.PP ++If the \fB\-i\fR option is used and the code at the given address is ++present there because of inlining by the compiler then additional ++lines are displayed afterwards. One or two extra lines (if the ++\&\fB\-f\fR option is used) are displayed for each inlined function. ++.PP ++Alternatively if the \fB\-p\fR option is used then each input ++address generates a single, long, output line containing the address, ++the function name, the file name and the line number. If the ++\&\fB\-i\fR option has also been used then any inlined functions will ++be displayed in the same manner, but on separate lines, and prefixed ++by the text \fB(inlined by)\fR. ++.PP ++If the file name or function name can not be determined, ++\&\fBaddr2line\fR will print two question marks in their place. If the ++line number can not be determined, \fBaddr2line\fR will print 0. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The long and short forms of options, shown here as alternatives, are ++equivalent. ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-addresses\fR" 4 ++.IX Item "--addresses" ++.PD ++Display the address before the function name, file and line number ++information. The address is printed with a \fB0x\fR prefix to easily ++identify it. ++.IP "\fB\-b\fR \fIbfdname\fR" 4 ++.IX Item "-b bfdname" ++.PD 0 ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++.PD ++Specify that the object-code format for the object files is ++\&\fIbfdname\fR. ++.IP "\fB\-C\fR" 4 ++.IX Item "-C" ++.PD 0 ++.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4 ++.IX Item "--demangle[=style]" ++.PD ++Decode (\fIdemangle\fR) low-level symbol names into user-level names. ++Besides removing any initial underscore prepended by the system, this ++makes \*(C+ function names readable. Different compilers have different ++mangling styles. The optional demangling style argument can be used to ++choose an appropriate demangling style for your compiler. ++.IP "\fB\-e\fR \fIfilename\fR" 4 ++.IX Item "-e filename" ++.PD 0 ++.IP "\fB\-\-exe=\fR\fIfilename\fR" 4 ++.IX Item "--exe=filename" ++.PD ++Specify the name of the executable for which addresses should be ++translated. The default file is \fIa.out\fR. ++.IP "\fB\-f\fR" 4 ++.IX Item "-f" ++.PD 0 ++.IP "\fB\-\-functions\fR" 4 ++.IX Item "--functions" ++.PD ++Display function names as well as file and line number information. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-basenames\fR" 4 ++.IX Item "--basenames" ++.PD ++Display only the base of each file name. ++.IP "\fB\-i\fR" 4 ++.IX Item "-i" ++.PD 0 ++.IP "\fB\-\-inlines\fR" 4 ++.IX Item "--inlines" ++.PD ++If the address belongs to a function that was inlined, the source ++information for all enclosing scopes back to the first non-inlined ++function will also be printed. For example, if \f(CW\*(C`main\*(C'\fR inlines ++\&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from ++\&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR ++will also be printed. ++.IP "\fB\-j\fR" 4 ++.IX Item "-j" ++.PD 0 ++.IP "\fB\-\-section\fR" 4 ++.IX Item "--section" ++.PD ++Read offsets relative to the specified section instead of absolute addresses. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-pretty\-print\fR" 4 ++.IX Item "--pretty-print" ++.PD ++Make the output more human friendly: each location are printed on one line. ++If option \fB\-i\fR is specified, lines for all enclosing scopes are ++prefixed with \fB(inlined by)\fR. ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++.PD 0 ++.IP "\fB\-R\fR" 4 ++.IX Item "-R" ++.IP "\fB\-\-recurse\-limit\fR" 4 ++.IX Item "--recurse-limit" ++.IP "\fB\-\-no\-recurse\-limit\fR" 4 ++.IX Item "--no-recurse-limit" ++.IP "\fB\-\-recursion\-limit\fR" 4 ++.IX Item "--recursion-limit" ++.IP "\fB\-\-no\-recursion\-limit\fR" 4 ++.IX Item "--no-recursion-limit" ++.PD ++Enables or disables a limit on the amount of recursion performed ++whilst demangling strings. Since the name mangling formats allow for ++an inifinite level of recursion it is possible to create strings whose ++decoding will exhaust the amount of stack space available on the host ++machine, triggering a memory fault. The limit tries to prevent this ++from happening by restricting recursion to 2048 levels of nesting. ++.Sp ++The default is for this limit to be enabled, but disabling it may be ++necessary in order to demangle truly complicated names. Note however ++that if the recursion limit is disabled then stack exhaustion is ++possible and any bug reports about such an event will be rejected. ++.Sp ++The \fB\-r\fR option is a synonym for the ++\&\fB\-\-no\-recurse\-limit\fR option. The \fB\-R\fR option is a ++synonym for the \fB\-\-recurse\-limit\fR option. ++.Sp ++Note this option is only effective if the \fB\-C\fR or ++\&\fB\-\-demangle\fR option has been enabled. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/ar.1 b/binutils/doc/ar.1 +--- a/binutils/doc/ar.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/ar.1 2021-03-30 17:47:59.835553000 -0300 +@@ -0,0 +1,523 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "AR 1" ++.TH AR 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++ar \- create, modify, and extract from archives ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++ar [\fB\-X32_64\fR] [\fB\-\fR]\fIp\fR[\fImod\fR] [\fB\-\-plugin\fR \fIname\fR] [\fB\-\-target\fR \fIbfdname\fR] [\fB\-\-output\fR \fIdirname\fR] [\fIrelpos\fR] [\fIcount\fR] \fIarchive\fR [\fImember\fR...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++The \s-1GNU\s0 \fBar\fR program creates, modifies, and extracts from ++archives. An \fIarchive\fR is a single file holding a collection of ++other files in a structure that makes it possible to retrieve ++the original individual files (called \fImembers\fR of the archive). ++.PP ++The original files' contents, mode (permissions), timestamp, owner, and ++group are preserved in the archive, and can be restored on ++extraction. ++.PP ++\&\s-1GNU\s0 \fBar\fR can maintain archives whose members have names of any ++length; however, depending on how \fBar\fR is configured on your ++system, a limit on member-name length may be imposed for compatibility ++with archive formats maintained with other tools. If it exists, the ++limit is often 15 characters (typical of formats related to a.out) or 16 ++characters (typical of formats related to coff). ++.PP ++\&\fBar\fR is considered a binary utility because archives of this sort ++are most often used as \fIlibraries\fR holding commonly needed ++subroutines. ++.PP ++\&\fBar\fR creates an index to the symbols defined in relocatable ++object modules in the archive when you specify the modifier \fBs\fR. ++Once created, this index is updated in the archive whenever \fBar\fR ++makes a change to its contents (save for the \fBq\fR update operation). ++An archive with such an index speeds up linking to the library, and ++allows routines in the library to call each other without regard to ++their placement in the archive. ++.PP ++You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index ++table. If an archive lacks the table, another form of \fBar\fR called ++\&\fBranlib\fR can be used to add just the table. ++.PP ++\&\s-1GNU\s0 \fBar\fR can optionally create a \fIthin\fR archive, ++which contains a symbol index and references to the original copies ++of the member files of the archive. This is useful for building ++libraries for use within a local build tree, where the relocatable ++objects are expected to remain available, and copying the contents of ++each object would only waste time and space. ++.PP ++An archive can either be \fIthin\fR or it can be normal. It cannot ++be both at the same time. Once an archive is created its format ++cannot be changed without first deleting it and then creating a new ++archive in its place. ++.PP ++Thin archives are also \fIflattened\fR, so that adding one thin ++archive to another thin archive does not nest it, as would happen with ++a normal archive. Instead the elements of the first archive are added ++individually to the second archive. ++.PP ++The paths to the elements of the archive are stored relative to the ++archive itself. ++.PP ++\&\s-1GNU\s0 \fBar\fR is designed to be compatible with two different ++facilities. You can control its activity using command-line options, ++like the different varieties of \fBar\fR on Unix systems; or, if you ++specify the single command-line option \fB\-M\fR, you can control it ++with a script supplied via standard input, like the \s-1MRI\s0 \*(L"librarian\*(R" ++program. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++\&\s-1GNU\s0 \fBar\fR allows you to mix the operation code \fIp\fR and modifier ++flags \fImod\fR in any order, within the first command-line argument. ++.PP ++If you wish, you may begin the first command-line argument with a ++dash. ++.PP ++The \fIp\fR keyletter specifies what operation to execute; it may be ++any of the following, but you must specify only one of them: ++.IP "\fBd\fR" 4 ++.IX Item "d" ++\&\fIDelete\fR modules from the archive. Specify the names of modules to ++be deleted as \fImember\fR...; the archive is untouched if you ++specify no files to delete. ++.Sp ++If you specify the \fBv\fR modifier, \fBar\fR lists each module ++as it is deleted. ++.IP "\fBm\fR" 4 ++.IX Item "m" ++Use this operation to \fImove\fR members in an archive. ++.Sp ++The ordering of members in an archive can make a difference in how ++programs are linked using the library, if a symbol is defined in more ++than one member. ++.Sp ++If no modifiers are used with \f(CW\*(C`m\*(C'\fR, any members you name in the ++\&\fImember\fR arguments are moved to the \fIend\fR of the archive; ++you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a ++specified place instead. ++.IP "\fBp\fR" 4 ++.IX Item "p" ++\&\fIPrint\fR the specified members of the archive, to the standard ++output file. If the \fBv\fR modifier is specified, show the member ++name before copying its contents to standard output. ++.Sp ++If you specify no \fImember\fR arguments, all the files in the archive are ++printed. ++.IP "\fBq\fR" 4 ++.IX Item "q" ++\&\fIQuick append\fR; Historically, add the files \fImember\fR... to the end of ++\&\fIarchive\fR, without checking for replacement. ++.Sp ++The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this ++operation; new members are always placed at the end of the archive. ++.Sp ++The modifier \fBv\fR makes \fBar\fR list each file as it is appended. ++.Sp ++Since the point of this operation is speed, implementations of ++\&\fBar\fR have the option of not updating the archive's symbol ++table if one exists. Too many different systems however assume that ++symbol tables are always up-to-date, so \s-1GNU\s0 \fBar\fR will ++rebuild the table even with a quick append. ++.Sp ++Note \- \s-1GNU\s0 \fBar\fR treats the command \fBqs\fR as a ++synonym for \fBr\fR \- replacing already existing files in the ++archive and appending new ones at the end. ++.IP "\fBr\fR" 4 ++.IX Item "r" ++Insert the files \fImember\fR... into \fIarchive\fR (with ++\&\fIreplacement\fR). This operation differs from \fBq\fR in that any ++previously existing members are deleted if their names match those being ++added. ++.Sp ++If one of the files named in \fImember\fR... does not exist, \fBar\fR ++displays an error message, and leaves undisturbed any existing members ++of the archive matching that name. ++.Sp ++By default, new members are added at the end of the file; but you may ++use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request ++placement relative to some existing member. ++.Sp ++The modifier \fBv\fR used with this operation elicits a line of ++output for each file inserted, along with one of the letters \fBa\fR or ++\&\fBr\fR to indicate whether the file was appended (no old member ++deleted) or replaced. ++.IP "\fBs\fR" 4 ++.IX Item "s" ++Add an index to the archive, or update it if it already exists. Note ++this command is an exception to the rule that there can only be one ++command letter, as it is possible to use it as either a command or a ++modifier. In either case it does the same thing. ++.IP "\fBt\fR" 4 ++.IX Item "t" ++Display a \fItable\fR listing the contents of \fIarchive\fR, or those ++of the files listed in \fImember\fR... that are present in the ++archive. Normally only the member name is shown, but if the modifier ++\&\fBO\fR is specified, then the corresponding offset of the member is also ++displayed. Finally, in order to see the modes (permissions), timestamp, ++owner, group, and size the \fBv\fR modifier should be included. ++.Sp ++If you do not specify a \fImember\fR, all files in the archive ++are listed. ++.Sp ++If there is more than one file with the same name (say, \fBfie\fR) in ++an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the ++first instance; to see them all, you must ask for a complete ++listing\-\-\-in our example, \fBar t b.a\fR. ++.IP "\fBx\fR" 4 ++.IX Item "x" ++\&\fIExtract\fR members (named \fImember\fR) from the archive. You can ++use the \fBv\fR modifier with this operation, to request that ++\&\fBar\fR list each name as it extracts it. ++.Sp ++If you do not specify a \fImember\fR, all files in the archive ++are extracted. ++.Sp ++Files cannot be extracted from a thin archive, and there are ++restrictions on extracting from archives created with \fBP\fR: The ++paths must not be absolute, may not contain \f(CW\*(C`..\*(C'\fR, and any ++subdirectories in the paths must exist. If it is desired to avoid ++these restrictions then used the \fB\-\-output\fR option to specify ++an output directory. ++.PP ++A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR ++keyletter, to specify variations on an operation's behavior: ++.IP "\fBa\fR" 4 ++.IX Item "a" ++Add new files \fIafter\fR an existing member of the ++archive. If you use the modifier \fBa\fR, the name of an existing archive ++member must be present as the \fIrelpos\fR argument, before the ++\&\fIarchive\fR specification. ++.IP "\fBb\fR" 4 ++.IX Item "b" ++Add new files \fIbefore\fR an existing member of the ++archive. If you use the modifier \fBb\fR, the name of an existing archive ++member must be present as the \fIrelpos\fR argument, before the ++\&\fIarchive\fR specification. (same as \fBi\fR). ++.IP "\fBc\fR" 4 ++.IX Item "c" ++\&\fICreate\fR the archive. The specified \fIarchive\fR is always ++created if it did not exist, when you request an update. But a warning is ++issued unless you specify in advance that you expect to create it, by ++using this modifier. ++.IP "\fBD\fR" 4 ++.IX Item "D" ++Operate in \fIdeterministic\fR mode. When adding files and the archive ++index use zero for UIDs, GIDs, timestamps, and use consistent file modes ++for all files. When this option is used, if \fBar\fR is used with ++identical options and identical input files, multiple runs will create ++identical output files regardless of the input files' owners, groups, ++file modes, or modification times. ++.Sp ++If \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by default. ++It can be disabled with the \fBU\fR modifier, below. ++.IP "\fBf\fR" 4 ++.IX Item "f" ++Truncate names in the archive. \s-1GNU\s0 \fBar\fR will normally permit file ++names of any length. This will cause it to create archives which are ++not compatible with the native \fBar\fR program on some systems. If ++this is a concern, the \fBf\fR modifier may be used to truncate file ++names when putting them in the archive. ++.IP "\fBi\fR" 4 ++.IX Item "i" ++Insert new files \fIbefore\fR an existing member of the ++archive. If you use the modifier \fBi\fR, the name of an existing archive ++member must be present as the \fIrelpos\fR argument, before the ++\&\fIarchive\fR specification. (same as \fBb\fR). ++.IP "\fBl\fR" 4 ++.IX Item "l" ++This modifier is accepted but not used. ++.IP "\fBN\fR" 4 ++.IX Item "N" ++Uses the \fIcount\fR parameter. This is used if there are multiple ++entries in the archive with the same name. Extract or delete instance ++\&\fIcount\fR of the given name from the archive. ++.IP "\fBo\fR" 4 ++.IX Item "o" ++Preserve the \fIoriginal\fR dates of members when extracting them. If ++you do not specify this modifier, files extracted from the archive ++are stamped with the time of extraction. ++.IP "\fBO\fR" 4 ++.IX Item "O" ++Display member offsets inside the archive. Use together with the \fBt\fR ++option. ++.IP "\fBP\fR" 4 ++.IX Item "P" ++Use the full path name when matching or storing names in the archive. ++Archives created with full path names are not \s-1POSIX\s0 compliant, and ++thus may not work with tools other than up to date \s-1GNU\s0 tools. ++Modifying such archives with \s-1GNU\s0 \fBar\fR without using ++\&\fBP\fR will remove the full path names unless the archive is a ++thin archive. Note that \fBP\fR may be useful when adding files to ++a thin archive since \fBr\fR without \fBP\fR ignores the path ++when choosing which element to replace. Thus ++.Sp ++.Vb 1 ++\& ar rcST archive.a subdir/file1 subdir/file2 file1 ++.Ve ++.Sp ++will result in the first \f(CW\*(C`subdir/file1\*(C'\fR being replaced with ++\&\f(CW\*(C`file1\*(C'\fR from the current directory. Adding \fBP\fR will ++prevent this replacement. ++.IP "\fBs\fR" 4 ++.IX Item "s" ++Write an object-file index into the archive, or update an existing one, ++even if no other change is made to the archive. You may use this modifier ++flag either with any operation, or alone. Running \fBar s\fR on an ++archive is equivalent to running \fBranlib\fR on it. ++.IP "\fBS\fR" 4 ++.IX Item "S" ++Do not generate an archive symbol table. This can speed up building a ++large library in several steps. The resulting archive can not be used ++with the linker. In order to build a symbol table, you must omit the ++\&\fBS\fR modifier on the last execution of \fBar\fR, or you must run ++\&\fBranlib\fR on the archive. ++.IP "\fBT\fR" 4 ++.IX Item "T" ++Make the specified \fIarchive\fR a \fIthin\fR archive. If it already ++exists and is a regular archive, the existing members must be present ++in the same directory as \fIarchive\fR. ++.IP "\fBu\fR" 4 ++.IX Item "u" ++Normally, \fBar r\fR... inserts all files ++listed into the archive. If you would like to insert \fIonly\fR those ++of the files you list that are newer than existing members of the same ++names, use this modifier. The \fBu\fR modifier is allowed only for the ++operation \fBr\fR (replace). In particular, the combination \fBqu\fR is ++not allowed, since checking the timestamps would lose any speed ++advantage from the operation \fBq\fR. ++.IP "\fBU\fR" 4 ++.IX Item "U" ++Do \fInot\fR operate in \fIdeterministic\fR mode. This is the inverse ++of the \fBD\fR modifier, above: added files and the archive index will ++get their actual \s-1UID, GID,\s0 timestamp, and file mode values. ++.Sp ++This is the default unless \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR. ++.IP "\fBv\fR" 4 ++.IX Item "v" ++This modifier requests the \fIverbose\fR version of an operation. Many ++operations display additional information, such as filenames processed, ++when the modifier \fBv\fR is appended. ++.IP "\fBV\fR" 4 ++.IX Item "V" ++This modifier shows the version number of \fBar\fR. ++.PP ++The \fBar\fR program also supports some command-line options which ++are neither modifiers nor actions, but which do change its behaviour ++in specific ways: ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Displays the list of command-line options supported by \fBar\fR ++and then exits. ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++Displays the version information of \fBar\fR and then exits. ++.IP "\fB\-X32_64\fR" 4 ++.IX Item "-X32_64" ++\&\fBar\fR ignores an initial option spelled \fB\-X32_64\fR, for ++compatibility with \s-1AIX.\s0 The behaviour produced by this option is the ++default for \s-1GNU\s0 \fBar\fR. \fBar\fR does not support any ++of the other \fB\-X\fR options; in particular, it does not support ++\&\fB\-X32\fR which is the default for \s-1AIX\s0 \fBar\fR. ++.IP "\fB\-\-plugin\fR \fIname\fR" 4 ++.IX Item "--plugin name" ++The optional command-line switch \fB\-\-plugin\fR \fIname\fR causes ++\&\fBar\fR to load the plugin called \fIname\fR which adds support ++for more file formats, including object files with link-time ++optimization information. ++.Sp ++This option is only available if the toolchain has been built with ++plugin support enabled. ++.Sp ++If \fB\-\-plugin\fR is not provided, but plugin support has been ++enabled then \fBar\fR iterates over the files in ++\&\fI${libdir}/bfd\-plugins\fR in alphabetic order and the first ++plugin that claims the object in question is used. ++.Sp ++Please note that this plugin search directory is \fInot\fR the one ++used by \fBld\fR's \fB\-plugin\fR option. In order to make ++\&\fBar\fR use the linker plugin it must be copied into the ++\&\fI${libdir}/bfd\-plugins\fR directory. For \s-1GCC\s0 based compilations ++the linker plugin is called \fIliblto_plugin.so.0.0.0\fR. For Clang ++based compilations it is called \fILLVMgold.so\fR. The \s-1GCC\s0 plugin ++is always backwards compatible with earlier versions, so it is ++sufficient to just copy the newest one. ++.IP "\fB\-\-target\fR \fItarget\fR" 4 ++.IX Item "--target target" ++The optional command-line switch \fB\-\-target\fR \fIbfdname\fR ++specifies that the archive members are in an object code format ++different from your system's default format. See ++.IP "\fB\-\-output\fR \fIdirname\fR" 4 ++.IX Item "--output dirname" ++The \fB\-\-output\fR option can be used to specify a path to a ++directory into which archive members should be extracted. If this ++option is not specified then the current directory will be used. ++.Sp ++Note \- although the presence of this option does imply a \fBx\fR ++extraction operation that option must still be included on the command ++line. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBnm\fR\|(1), \fBranlib\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/cxxfilt.man b/binutils/doc/cxxfilt.man +--- a/binutils/doc/cxxfilt.man 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/cxxfilt.man 2021-03-30 17:47:59.835553000 -0300 +@@ -0,0 +1,376 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "C++FILT 1" ++.TH C++FILT 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++cxxfilt \- demangle C++ and Java symbols ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++c++filt [\fB\-_\fR|\fB\-\-strip\-underscore\fR] ++ [\fB\-n\fR|\fB\-\-no\-strip\-underscore\fR] ++ [\fB\-p\fR|\fB\-\-no\-params\fR] ++ [\fB\-t\fR|\fB\-\-types\fR] ++ [\fB\-i\fR|\fB\-\-no\-verbose\fR] ++ [\fB\-r\fR|\fB\-\-no\-recurse\-limit\fR] ++ [\fB\-R\fR|\fB\-\-recurse\-limit\fR] ++ [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR] ++ [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++The \*(C+ and Java languages provide function overloading, which means ++that you can write many functions with the same name, providing that ++each function takes parameters of different types. In order to be ++able to distinguish these similarly named functions \*(C+ and Java ++encode them into a low-level assembler name which uniquely identifies ++each different version. This process is known as \fImangling\fR. The ++\&\fBc++filt\fR ++[1] ++program does the inverse mapping: it decodes (\fIdemangles\fR) low-level ++names into user-level names so that they can be read. ++.PP ++Every alphanumeric word (consisting of letters, digits, underscores, ++dollars, or periods) seen in the input is a potential mangled name. ++If the name decodes into a \*(C+ name, the \*(C+ name replaces the ++low-level name in the output, otherwise the original word is output. ++In this way you can pass an entire assembler source file, containing ++mangled names, through \fBc++filt\fR and see the same source file ++containing demangled names. ++.PP ++You can also use \fBc++filt\fR to decipher individual symbols by ++passing them on the command line: ++.PP ++.Vb 1 ++\& c++filt ++.Ve ++.PP ++If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol ++names from the standard input instead. All the results are printed on ++the standard output. The difference between reading names from the ++command line versus reading names from the standard input is that ++command-line arguments are expected to be just mangled names and no ++checking is performed to separate them from surrounding text. Thus ++for example: ++.PP ++.Vb 1 ++\& c++filt \-n _Z1fv ++.Ve ++.PP ++will work and demangle the name to \*(L"f()\*(R" whereas: ++.PP ++.Vb 1 ++\& c++filt \-n _Z1fv, ++.Ve ++.PP ++will not work. (Note the extra comma at the end of the mangled ++name which makes it invalid). This command however will work: ++.PP ++.Vb 1 ++\& echo _Z1fv, | c++filt \-n ++.Ve ++.PP ++and will display \*(L"f(),\*(R", i.e., the demangled name followed by a ++trailing comma. This behaviour is because when the names are read ++from the standard input it is expected that they might be part of an ++assembler source file where there might be extra, extraneous ++characters trailing after a mangled name. For example: ++.PP ++.Vb 1 ++\& .type _Z1fv, @function ++.Ve ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-_\fR" 4 ++.IX Item "-_" ++.PD 0 ++.IP "\fB\-\-strip\-underscore\fR" 4 ++.IX Item "--strip-underscore" ++.PD ++On some systems, both the C and \*(C+ compilers put an underscore in front ++of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level ++name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether ++\&\fBc++filt\fR removes the underscore by default is target dependent. ++.IP "\fB\-n\fR" 4 ++.IX Item "-n" ++.PD 0 ++.IP "\fB\-\-no\-strip\-underscore\fR" 4 ++.IX Item "--no-strip-underscore" ++.PD ++Do not remove the initial underscore. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-no\-params\fR" 4 ++.IX Item "--no-params" ++.PD ++When demangling the name of a function, do not display the types of ++the function's parameters. ++.IP "\fB\-t\fR" 4 ++.IX Item "-t" ++.PD 0 ++.IP "\fB\-\-types\fR" 4 ++.IX Item "--types" ++.PD ++Attempt to demangle types as well as function names. This is disabled ++by default since mangled types are normally only used internally in ++the compiler, and they can be confused with non-mangled names. For example, ++a function called \*(L"a\*(R" treated as a mangled type name would be ++demangled to \*(L"signed char\*(R". ++.IP "\fB\-i\fR" 4 ++.IX Item "-i" ++.PD 0 ++.IP "\fB\-\-no\-verbose\fR" 4 ++.IX Item "--no-verbose" ++.PD ++Do not include implementation details (if any) in the demangled ++output. ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++.PD 0 ++.IP "\fB\-R\fR" 4 ++.IX Item "-R" ++.IP "\fB\-\-recurse\-limit\fR" 4 ++.IX Item "--recurse-limit" ++.IP "\fB\-\-no\-recurse\-limit\fR" 4 ++.IX Item "--no-recurse-limit" ++.IP "\fB\-\-recursion\-limit\fR" 4 ++.IX Item "--recursion-limit" ++.IP "\fB\-\-no\-recursion\-limit\fR" 4 ++.IX Item "--no-recursion-limit" ++.PD ++Enables or disables a limit on the amount of recursion performed ++whilst demangling strings. Since the name mangling formats allow for ++an inifinite level of recursion it is possible to create strings whose ++decoding will exhaust the amount of stack space available on the host ++machine, triggering a memory fault. The limit tries to prevent this ++from happening by restricting recursion to 2048 levels of nesting. ++.Sp ++The default is for this limit to be enabled, but disabling it may be ++necessary in order to demangle truly complicated names. Note however ++that if the recursion limit is disabled then stack exhaustion is ++possible and any bug reports about such an event will be rejected. ++.Sp ++The \fB\-r\fR option is a synonym for the ++\&\fB\-\-no\-recurse\-limit\fR option. The \fB\-R\fR option is a ++synonym for the \fB\-\-recurse\-limit\fR option. ++.IP "\fB\-s\fR \fIformat\fR" 4 ++.IX Item "-s format" ++.PD 0 ++.IP "\fB\-\-format=\fR\fIformat\fR" 4 ++.IX Item "--format=format" ++.PD ++\&\fBc++filt\fR can decode various methods of mangling, used by ++different compilers. The argument to this option selects which ++method it uses: ++.RS 4 ++.ie n .IP """auto""" 4 ++.el .IP "\f(CWauto\fR" 4 ++.IX Item "auto" ++Automatic selection based on executable (the default method) ++.ie n .IP """gnu""" 4 ++.el .IP "\f(CWgnu\fR" 4 ++.IX Item "gnu" ++the one used by the \s-1GNU \*(C+\s0 compiler (g++) ++.ie n .IP """lucid""" 4 ++.el .IP "\f(CWlucid\fR" 4 ++.IX Item "lucid" ++the one used by the Lucid compiler (lcc) ++.ie n .IP """arm""" 4 ++.el .IP "\f(CWarm\fR" 4 ++.IX Item "arm" ++the one specified by the \*(C+ Annotated Reference Manual ++.ie n .IP """hp""" 4 ++.el .IP "\f(CWhp\fR" 4 ++.IX Item "hp" ++the one used by the \s-1HP\s0 compiler (aCC) ++.ie n .IP """edg""" 4 ++.el .IP "\f(CWedg\fR" 4 ++.IX Item "edg" ++the one used by the \s-1EDG\s0 compiler ++.ie n .IP """gnu\-v3""" 4 ++.el .IP "\f(CWgnu\-v3\fR" 4 ++.IX Item "gnu-v3" ++the one used by the \s-1GNU \*(C+\s0 compiler (g++) with the V3 \s-1ABI.\s0 ++.ie n .IP """java""" 4 ++.el .IP "\f(CWjava\fR" 4 ++.IX Item "java" ++the one used by the \s-1GNU\s0 Java compiler (gcj) ++.ie n .IP """gnat""" 4 ++.el .IP "\f(CWgnat\fR" 4 ++.IX Item "gnat" ++the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0). ++.RE ++.RS 4 ++.RE ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Print a summary of the options to \fBc++filt\fR and exit. ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++Print the version number of \fBc++filt\fR and exit. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "FOOTNOTES" ++.IX Header "FOOTNOTES" ++.IP "1." 4 ++MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on ++MS-DOS this program is named \fB\s-1CXXFILT\s0\fR. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/dlltool.1 b/binutils/doc/dlltool.1 +--- a/binutils/doc/dlltool.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/dlltool.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,542 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "DLLTOOL 1" ++.TH DLLTOOL 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++dlltool \- create files needed to build and use DLLs ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR] ++ [\fB\-b\fR|\fB\-\-base\-file\fR \fIbase-file-name\fR] ++ [\fB\-e\fR|\fB\-\-output\-exp\fR \fIexports-file-name\fR] ++ [\fB\-z\fR|\fB\-\-output\-def\fR \fIdef-file-name\fR] ++ [\fB\-l\fR|\fB\-\-output\-lib\fR \fIlibrary-file-name\fR] ++ [\fB\-y\fR|\fB\-\-output\-delaylib\fR \fIlibrary-file-name\fR] ++ [\fB\-\-export\-all\-symbols\fR] [\fB\-\-no\-export\-all\-symbols\fR] ++ [\fB\-\-exclude\-symbols\fR \fIlist\fR] ++ [\fB\-\-no\-default\-excludes\fR] ++ [\fB\-S\fR|\fB\-\-as\fR \fIpath-to-assembler\fR] [\fB\-f\fR|\fB\-\-as\-flags\fR \fIoptions\fR] ++ [\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR] ++ [\fB\-a\fR|\fB\-\-add\-indirect\fR] ++ [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-\-add\-stdcall\-underscore\fR] ++ [\fB\-k\fR|\fB\-\-kill\-at\fR] [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR] ++ [\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR] ++ [\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] ++ [\fB\-\-use\-nul\-prefixed\-import\-tables\fR] ++ [\fB\-I\fR|\fB\-\-identify\fR \fIlibrary-file-name\fR] [\fB\-\-identify\-strict\fR] ++ [\fB\-i\fR|\fB\-\-interwork\fR] ++ [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR] ++ [\fB\-v\fR|\fB\-\-verbose\fR] ++ [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] ++ [\fB\-\-no\-leading\-underscore\fR] [\fB\-\-leading\-underscore\fR] ++ [object\-file ...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBdlltool\fR reads its inputs, which can come from the \fB\-d\fR and ++\&\fB\-b\fR options as well as object files specified on the command ++line. It then processes these inputs and if the \fB\-e\fR option has ++been specified it creates a exports file. If the \fB\-l\fR option ++has been specified it creates a library file and if the \fB\-z\fR option ++has been specified it creates a def file. Any or all of the \fB\-e\fR, ++\&\fB\-l\fR and \fB\-z\fR options can be present in one invocation of ++dlltool. ++.PP ++When creating a \s-1DLL,\s0 along with the source for the \s-1DLL,\s0 it is necessary ++to have three other files. \fBdlltool\fR can help with the creation of ++these files. ++.PP ++The first file is a \fI.def\fR file which specifies which functions are ++exported from the \s-1DLL,\s0 which functions the \s-1DLL\s0 imports, and so on. This ++is a text file and can be created by hand, or \fBdlltool\fR can be used ++to create it using the \fB\-z\fR option. In this case \fBdlltool\fR ++will scan the object files specified on its command line looking for ++those functions which have been specially marked as being exported and ++put entries for them in the \fI.def\fR file it creates. ++.PP ++In order to mark a function as being exported from a \s-1DLL,\s0 it needs to ++have an \fB\-export:\fR entry in the \fB.drectve\fR ++section of the object file. This can be done in C by using the ++\&\fBasm()\fR operator: ++.PP ++.Vb 2 ++\& asm (".section .drectve"); ++\& asm (".ascii \e"\-export:my_func\e""); ++\& ++\& int my_func (void) { ... } ++.Ve ++.PP ++The second file needed for \s-1DLL\s0 creation is an exports file. This file ++is linked with the object files that make up the body of the \s-1DLL\s0 and it ++handles the interface between the \s-1DLL\s0 and the outside world. This is a ++binary file and it can be created by giving the \fB\-e\fR option to ++\&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file. ++.PP ++The third file needed for \s-1DLL\s0 creation is the library file that programs ++will link with in order to access the functions in the \s-1DLL\s0 (an `import ++library'). This file can be created by giving the \fB\-l\fR option to ++dlltool when it is creating or reading in a \fI.def\fR file. ++.PP ++If the \fB\-y\fR option is specified, dlltool generates a delay-import ++library that can be used instead of the normal import library to allow ++a program to link to the dll only as soon as an imported function is ++called for the first time. The resulting executable will need to be ++linked to the static delayimp library containing _\|\fB_delayLoadHelper2()\fR, ++which in turn will import LoadLibraryA and GetProcAddress from kernel32. ++.PP ++\&\fBdlltool\fR builds the library file by hand, but it builds the ++exports file by creating temporary files containing assembler statements ++and then assembling these. The \fB\-S\fR command-line option can be ++used to specify the path to the assembler that dlltool will use, ++and the \fB\-f\fR option can be used to pass specific flags to that ++assembler. The \fB\-n\fR can be used to prevent dlltool from deleting ++these temporary assembler files when it is done, and if \fB\-n\fR is ++specified twice then this will prevent dlltool from deleting the ++temporary object files it used to build the library. ++.PP ++Here is an example of creating a \s-1DLL\s0 from a source file \fBdll.c\fR and ++also creating a program (from an object file called \fBprogram.o\fR) ++that uses that \s-1DLL:\s0 ++.PP ++.Vb 4 ++\& gcc \-c dll.c ++\& dlltool \-e exports.o \-l dll.lib dll.o ++\& gcc dll.o exports.o \-o dll.dll ++\& gcc program.o dll.lib \-o program ++.Ve ++.PP ++\&\fBdlltool\fR may also be used to query an existing import library ++to determine the name of the \s-1DLL\s0 to which it is associated. See the ++description of the \fB\-I\fR or \fB\-\-identify\fR option. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The command-line options have the following meanings: ++.IP "\fB\-d\fR \fIfilename\fR" 4 ++.IX Item "-d filename" ++.PD 0 ++.IP "\fB\-\-input\-def\fR \fIfilename\fR" 4 ++.IX Item "--input-def filename" ++.PD ++Specifies the name of a \fI.def\fR file to be read in and processed. ++.IP "\fB\-b\fR \fIfilename\fR" 4 ++.IX Item "-b filename" ++.PD 0 ++.IP "\fB\-\-base\-file\fR \fIfilename\fR" 4 ++.IX Item "--base-file filename" ++.PD ++Specifies the name of a base file to be read in and processed. The ++contents of this file will be added to the relocation section in the ++exports file generated by dlltool. ++.IP "\fB\-e\fR \fIfilename\fR" 4 ++.IX Item "-e filename" ++.PD 0 ++.IP "\fB\-\-output\-exp\fR \fIfilename\fR" 4 ++.IX Item "--output-exp filename" ++.PD ++Specifies the name of the export file to be created by dlltool. ++.IP "\fB\-z\fR \fIfilename\fR" 4 ++.IX Item "-z filename" ++.PD 0 ++.IP "\fB\-\-output\-def\fR \fIfilename\fR" 4 ++.IX Item "--output-def filename" ++.PD ++Specifies the name of the \fI.def\fR file to be created by dlltool. ++.IP "\fB\-l\fR \fIfilename\fR" 4 ++.IX Item "-l filename" ++.PD 0 ++.IP "\fB\-\-output\-lib\fR \fIfilename\fR" 4 ++.IX Item "--output-lib filename" ++.PD ++Specifies the name of the library file to be created by dlltool. ++.IP "\fB\-y\fR \fIfilename\fR" 4 ++.IX Item "-y filename" ++.PD 0 ++.IP "\fB\-\-output\-delaylib\fR \fIfilename\fR" 4 ++.IX Item "--output-delaylib filename" ++.PD ++Specifies the name of the delay-import library file to be created by dlltool. ++.IP "\fB\-\-export\-all\-symbols\fR" 4 ++.IX Item "--export-all-symbols" ++Treat all global and weak defined symbols found in the input object ++files as symbols to be exported. There is a small list of symbols which ++are not exported by default; see the \fB\-\-no\-default\-excludes\fR ++option. You may add to the list of symbols to not export by using the ++\&\fB\-\-exclude\-symbols\fR option. ++.IP "\fB\-\-no\-export\-all\-symbols\fR" 4 ++.IX Item "--no-export-all-symbols" ++Only export symbols explicitly listed in an input \fI.def\fR file or in ++\&\fB.drectve\fR sections in the input object files. This is the default ++behaviour. The \fB.drectve\fR sections are created by \fBdllexport\fR ++attributes in the source code. ++.IP "\fB\-\-exclude\-symbols\fR \fIlist\fR" 4 ++.IX Item "--exclude-symbols list" ++Do not export the symbols in \fIlist\fR. This is a list of symbol names ++separated by comma or colon characters. The symbol names should not ++contain a leading underscore. This is only meaningful when ++\&\fB\-\-export\-all\-symbols\fR is used. ++.IP "\fB\-\-no\-default\-excludes\fR" 4 ++.IX Item "--no-default-excludes" ++When \fB\-\-export\-all\-symbols\fR is used, it will by default avoid ++exporting certain special symbols. The current list of symbols to avoid ++exporting is \fBDllMain@12\fR, \fBDllEntryPoint@0\fR, ++\&\fBimpure_ptr\fR. You may use the \fB\-\-no\-default\-excludes\fR option ++to go ahead and export these special symbols. This is only meaningful ++when \fB\-\-export\-all\-symbols\fR is used. ++.IP "\fB\-S\fR \fIpath\fR" 4 ++.IX Item "-S path" ++.PD 0 ++.IP "\fB\-\-as\fR \fIpath\fR" 4 ++.IX Item "--as path" ++.PD ++Specifies the path, including the filename, of the assembler to be used ++to create the exports file. ++.IP "\fB\-f\fR \fIoptions\fR" 4 ++.IX Item "-f options" ++.PD 0 ++.IP "\fB\-\-as\-flags\fR \fIoptions\fR" 4 ++.IX Item "--as-flags options" ++.PD ++Specifies any specific command-line options to be passed to the ++assembler when building the exports file. This option will work even if ++the \fB\-S\fR option is not used. This option only takes one argument, ++and if it occurs more than once on the command line, then later ++occurrences will override earlier occurrences. So if it is necessary to ++pass multiple options to the assembler they should be enclosed in ++double quotes. ++.IP "\fB\-D\fR \fIname\fR" 4 ++.IX Item "-D name" ++.PD 0 ++.IP "\fB\-\-dll\-name\fR \fIname\fR" 4 ++.IX Item "--dll-name name" ++.PD ++Specifies the name to be stored in the \fI.def\fR file as the name of ++the \s-1DLL\s0 when the \fB\-e\fR option is used. If this option is not ++present, then the filename given to the \fB\-e\fR option will be ++used as the name of the \s-1DLL.\s0 ++.IP "\fB\-m\fR \fImachine\fR" 4 ++.IX Item "-m machine" ++.PD 0 ++.IP "\fB\-machine\fR \fImachine\fR" 4 ++.IX Item "-machine machine" ++.PD ++Specifies the type of machine for which the library file should be ++built. \fBdlltool\fR has a built in default type, depending upon how ++it was created, but this option can be used to override that. This is ++normally only useful when creating DLLs for an \s-1ARM\s0 processor, when the ++contents of the \s-1DLL\s0 are actually encode using Thumb instructions. ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-add\-indirect\fR" 4 ++.IX Item "--add-indirect" ++.PD ++Specifies that when \fBdlltool\fR is creating the exports file it ++should add a section which allows the exported functions to be ++referenced without using the import library. Whatever the hell that ++means! ++.IP "\fB\-U\fR" 4 ++.IX Item "-U" ++.PD 0 ++.IP "\fB\-\-add\-underscore\fR" 4 ++.IX Item "--add-underscore" ++.PD ++Specifies that when \fBdlltool\fR is creating the exports file it ++should prepend an underscore to the names of \fIall\fR exported symbols. ++.IP "\fB\-\-no\-leading\-underscore\fR" 4 ++.IX Item "--no-leading-underscore" ++.PD 0 ++.IP "\fB\-\-leading\-underscore\fR" 4 ++.IX Item "--leading-underscore" ++.PD ++Specifies whether standard symbol should be forced to be prefixed, or ++not. ++.IP "\fB\-\-add\-stdcall\-underscore\fR" 4 ++.IX Item "--add-stdcall-underscore" ++Specifies that when \fBdlltool\fR is creating the exports file it ++should prepend an underscore to the names of exported \fIstdcall\fR ++functions. Variable names and non-stdcall function names are not modified. ++This option is useful when creating GNU-compatible import libs for third ++party DLLs that were built with MS-Windows tools. ++.IP "\fB\-k\fR" 4 ++.IX Item "-k" ++.PD 0 ++.IP "\fB\-\-kill\-at\fR" 4 ++.IX Item "--kill-at" ++.PD ++Specifies that \fB@\fR suffixes should be omitted from the names ++of stdcall functions that will be imported from the \s-1DLL.\s0 This is ++useful when creating an import library for a \s-1DLL\s0 which exports stdcall ++functions but without the usual \fB@\fR symbol name suffix. ++.Sp ++This does not change the naming of symbols provided by the import library ++to programs linked against it, but only the entries in the import table ++(ie the .idata section). ++.IP "\fB\-A\fR" 4 ++.IX Item "-A" ++.PD 0 ++.IP "\fB\-\-add\-stdcall\-alias\fR" 4 ++.IX Item "--add-stdcall-alias" ++.PD ++Specifies that when \fBdlltool\fR is creating the exports file it ++should add aliases for stdcall symbols without \fB@ \fR ++in addition to the symbols with \fB@ \fR. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR" 4 ++.IX Item "--ext-prefix-alias prefix" ++.PD ++Causes \fBdlltool\fR to create external aliases for all \s-1DLL\s0 ++imports with the specified prefix. The aliases are created for both ++external and import symbols with no leading underscore. ++.IP "\fB\-x\fR" 4 ++.IX Item "-x" ++.PD 0 ++.IP "\fB\-\-no\-idata4\fR" 4 ++.IX Item "--no-idata4" ++.PD ++Specifies that when \fBdlltool\fR is creating the exports and library ++files it should omit the \f(CW\*(C`.idata4\*(C'\fR section. This is for compatibility ++with certain operating systems. ++.IP "\fB\-\-use\-nul\-prefixed\-import\-tables\fR" 4 ++.IX Item "--use-nul-prefixed-import-tables" ++Specifies that when \fBdlltool\fR is creating the exports and library ++files it should prefix the \f(CW\*(C`.idata4\*(C'\fR and \f(CW\*(C`.idata5\*(C'\fR by zero an ++element. This emulates old gnu import library generation of ++\&\f(CW\*(C`dlltool\*(C'\fR. By default this option is turned off. ++.IP "\fB\-c\fR" 4 ++.IX Item "-c" ++.PD 0 ++.IP "\fB\-\-no\-idata5\fR" 4 ++.IX Item "--no-idata5" ++.PD ++Specifies that when \fBdlltool\fR is creating the exports and library ++files it should omit the \f(CW\*(C`.idata5\*(C'\fR section. This is for compatibility ++with certain operating systems. ++.IP "\fB\-I\fR \fIfilename\fR" 4 ++.IX Item "-I filename" ++.PD 0 ++.IP "\fB\-\-identify\fR \fIfilename\fR" 4 ++.IX Item "--identify filename" ++.PD ++Specifies that \fBdlltool\fR should inspect the import library ++indicated by \fIfilename\fR and report, on \f(CW\*(C`stdout\*(C'\fR, the name(s) ++of the associated \s-1DLL\s0(s). This can be performed in addition to any ++other operations indicated by the other options and arguments. ++\&\fBdlltool\fR fails if the import library does not exist or is not ++actually an import library. See also \fB\-\-identify\-strict\fR. ++.IP "\fB\-\-identify\-strict\fR" 4 ++.IX Item "--identify-strict" ++Modifies the behavior of the \fB\-\-identify\fR option, such ++that an error is reported if \fIfilename\fR is associated with ++more than one \s-1DLL.\s0 ++.IP "\fB\-i\fR" 4 ++.IX Item "-i" ++.PD 0 ++.IP "\fB\-\-interwork\fR" 4 ++.IX Item "--interwork" ++.PD ++Specifies that \fBdlltool\fR should mark the objects in the library ++file and exports file that it produces as supporting interworking ++between \s-1ARM\s0 and Thumb code. ++.IP "\fB\-n\fR" 4 ++.IX Item "-n" ++.PD 0 ++.IP "\fB\-\-nodelete\fR" 4 ++.IX Item "--nodelete" ++.PD ++Makes \fBdlltool\fR preserve the temporary assembler files it used to ++create the exports file. If this option is repeated then dlltool will ++also preserve the temporary object files it uses to create the library ++file. ++.IP "\fB\-t\fR \fIprefix\fR" 4 ++.IX Item "-t prefix" ++.PD 0 ++.IP "\fB\-\-temp\-prefix\fR \fIprefix\fR" 4 ++.IX Item "--temp-prefix prefix" ++.PD ++Makes \fBdlltool\fR use \fIprefix\fR when constructing the names of ++temporary assembler and object files. By default, the temp file prefix ++is generated from the pid. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-verbose\fR" 4 ++.IX Item "--verbose" ++.PD ++Make dlltool describe what it is doing. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Displays a list of command-line options and then exits. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Displays dlltool's version number and then exits. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++The Info pages for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/elfedit.1 b/binutils/doc/elfedit.1 +--- a/binutils/doc/elfedit.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/elfedit.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,260 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "ELFEDIT 1" ++.TH ELFEDIT 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++elfedit \- update ELF header and program property of ELF files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++elfedit [\fB\-\-input\-mach=\fR\fImachine\fR] ++ [\fB\-\-input\-type=\fR\fItype\fR] ++ [\fB\-\-input\-osabi=\fR\fIosabi\fR] ++ \fB\-\-output\-mach=\fR\fImachine\fR ++ \fB\-\-output\-type=\fR\fItype\fR ++ \fB\-\-output\-osabi=\fR\fIosabi\fR ++ \fB\-\-enable\-x86\-feature=\fR\fIfeature\fR ++ \fB\-\-disable\-x86\-feature=\fR\fIfeature\fR ++ [\fB\-v\fR|\fB\-\-version\fR] ++ [\fB\-h\fR|\fB\-\-help\fR] ++ \fIelffile\fR... ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBelfedit\fR updates the \s-1ELF\s0 header and program property of \s-1ELF\s0 ++files which have the matching \s-1ELF\s0 machine and file types. The options ++control how and which fields in the \s-1ELF\s0 header and program property ++should be updated. ++.PP ++\&\fIelffile\fR... are the \s-1ELF\s0 files to be updated. 32\-bit and ++64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The long and short forms of options, shown here as alternatives, are ++equivalent. At least one of the \fB\-\-output\-mach\fR, ++\&\fB\-\-output\-type\fR, \fB\-\-output\-osabi\fR, ++\&\fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR ++options must be given. ++.IP "\fB\-\-input\-mach=\fR\fImachine\fR" 4 ++.IX Item "--input-mach=machine" ++Set the matching input \s-1ELF\s0 machine type to \fImachine\fR. If ++\&\fB\-\-input\-mach\fR isn't specified, it will match any \s-1ELF\s0 ++machine types. ++.Sp ++The supported \s-1ELF\s0 machine types are, \fIi386\fR, \fI\s-1IAMCU\s0\fR, \fIL1OM\fR, ++\&\fIK1OM\fR and \fIx86\-64\fR. ++.IP "\fB\-\-output\-mach=\fR\fImachine\fR" 4 ++.IX Item "--output-mach=machine" ++Change the \s-1ELF\s0 machine type in the \s-1ELF\s0 header to \fImachine\fR. The ++supported \s-1ELF\s0 machine types are the same as \fB\-\-input\-mach\fR. ++.IP "\fB\-\-input\-type=\fR\fItype\fR" 4 ++.IX Item "--input-type=type" ++Set the matching input \s-1ELF\s0 file type to \fItype\fR. If ++\&\fB\-\-input\-type\fR isn't specified, it will match any \s-1ELF\s0 file types. ++.Sp ++The supported \s-1ELF\s0 file types are, \fIrel\fR, \fIexec\fR and \fIdyn\fR. ++.IP "\fB\-\-output\-type=\fR\fItype\fR" 4 ++.IX Item "--output-type=type" ++Change the \s-1ELF\s0 file type in the \s-1ELF\s0 header to \fItype\fR. The ++supported \s-1ELF\s0 types are the same as \fB\-\-input\-type\fR. ++.IP "\fB\-\-input\-osabi=\fR\fIosabi\fR" 4 ++.IX Item "--input-osabi=osabi" ++Set the matching input \s-1ELF\s0 file \s-1OSABI\s0 to \fIosabi\fR. If ++\&\fB\-\-input\-osabi\fR isn't specified, it will match any \s-1ELF\s0 OSABIs. ++.Sp ++The supported \s-1ELF\s0 OSABIs are, \fInone\fR, \fI\s-1HPUX\s0\fR, \fINetBSD\fR, ++\&\fI\s-1GNU\s0\fR, \fILinux\fR (alias for \fI\s-1GNU\s0\fR), ++\&\fISolaris\fR, \fI\s-1AIX\s0\fR, \fIIrix\fR, ++\&\fIFreeBSD\fR, \fI\s-1TRU64\s0\fR, \fIModesto\fR, \fIOpenBSD\fR, \fIOpenVMS\fR, ++\&\fI\s-1NSK\s0\fR, \fI\s-1AROS\s0\fR and \fIFenixOS\fR. ++.IP "\fB\-\-output\-osabi=\fR\fIosabi\fR" 4 ++.IX Item "--output-osabi=osabi" ++Change the \s-1ELF OSABI\s0 in the \s-1ELF\s0 header to \fIosabi\fR. The ++supported \s-1ELF OSABI\s0 are the same as \fB\-\-input\-osabi\fR. ++.IP "\fB\-\-enable\-x86\-feature=\fR\fIfeature\fR" 4 ++.IX Item "--enable-x86-feature=feature" ++Set the \fIfeature\fR bit in program property in \fIexec\fR or \fIdyn\fR ++\&\s-1ELF\s0 files with machine types of \fIi386\fR or \fIx86\-64\fR. The ++supported features are, \fIibt\fR and \fIshstk\fR. ++.IP "\fB\-\-disable\-x86\-feature=\fR\fIfeature\fR" 4 ++.IX Item "--disable-x86-feature=feature" ++Clear the \fIfeature\fR bit in program property in \fIexec\fR or ++\&\fIdyn\fR \s-1ELF\s0 files with machine types of \fIi386\fR or \fIx86\-64\fR. ++The supported features are the same as \fB\-\-enable\-x86\-feature\fR. ++.Sp ++Note: \fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR ++are available only on hosts with \fBmmap\fR support. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Display the version number of \fBelfedit\fR. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Display the command-line options understood by \fBelfedit\fR. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/Makefile.am b/binutils/doc/Makefile.am +--- a/binutils/doc/Makefile.am 2021-03-30 23:12:40.154559932 -0300 ++++ b/binutils/doc/Makefile.am 2021-03-30 17:47:59.835553000 -0300 +@@ -58,6 +58,8 @@ + + # Man page generation from texinfo + addr2line.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_addr2line.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod + -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -65,6 +67,8 @@ + rm -f addr2line.pod + + ar.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ar.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod + -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -72,6 +76,8 @@ + rm -f ar.pod + + dlltool.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_dlltool.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod + -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -79,6 +85,8 @@ + rm -f dlltool.pod + + nm.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_nm.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod + -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -86,6 +94,8 @@ + rm -f nm.pod + + objcopy.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_objcopy.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod + -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -93,6 +103,8 @@ + rm -f objcopy.pod + + objdump.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_objdump.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod + -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -100,6 +112,8 @@ + rm -f objdump.pod + + ranlib.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ranlib.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod + -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -107,6 +121,8 @@ + rm -f ranlib.pod + + readelf.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_readelf.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod + -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -114,6 +130,8 @@ + rm -f readelf.pod + + size.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_size.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod + -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -121,6 +139,8 @@ + rm -f size.pod + + strings.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_strings.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod + -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -128,6 +148,8 @@ + rm -f strings.pod + + strip.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_strip.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod + -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -142,6 +164,8 @@ + rm -f elfedit.pod + + windres.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_windres.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod + -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -149,6 +173,8 @@ + rm -f windres.pod + + windmc.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_windmc.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod + -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -156,6 +182,8 @@ + rm -f windmc.pod + + cxxfilt.man: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_cxxfilt.man: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod + -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +diff -rNU3 a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in +--- a/binutils/doc/Makefile.in 2021-03-30 23:12:40.154559932 -0300 ++++ b/binutils/doc/Makefile.in 2021-03-30 17:47:59.835553000 -0300 +@@ -370,6 +370,7 @@ + libexecdir = @libexecdir@ + localedir = @localedir@ + localstatedir = @localstatedir@ ++lt_ECHO = @lt_ECHO@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ +@@ -471,6 +472,8 @@ + -rm -rf .libs _libs + + binutils.info: binutils.texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_binutils.info: binutils.texi + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ +@@ -908,6 +911,8 @@ + + # Man page generation from texinfo + addr2line.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_addr2line.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod + -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -915,6 +920,8 @@ + rm -f addr2line.pod + + ar.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ar.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod + -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -922,6 +929,8 @@ + rm -f ar.pod + + dlltool.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_dlltool.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod + -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -929,6 +938,8 @@ + rm -f dlltool.pod + + nm.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_nm.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod + -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -936,6 +947,8 @@ + rm -f nm.pod + + objcopy.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_objcopy.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod + -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -943,6 +956,8 @@ + rm -f objcopy.pod + + objdump.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_objdump.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod + -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -950,6 +965,8 @@ + rm -f objdump.pod + + ranlib.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ranlib.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod + -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -957,6 +974,8 @@ + rm -f ranlib.pod + + readelf.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_readelf.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod + -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -964,6 +983,8 @@ + rm -f readelf.pod + + size.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_size.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod + -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -971,6 +992,8 @@ + rm -f size.pod + + strings.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_strings.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod + -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -978,6 +1001,8 @@ + rm -f strings.pod + + strip.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_strip.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod + -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -985,6 +1010,8 @@ + rm -f strip.pod + + elfedit.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_elfedit.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod + -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -992,6 +1019,8 @@ + rm -f elfedit.pod + + windres.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_windres.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod + -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -999,6 +1028,8 @@ + rm -f windres.pod + + windmc.1: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_windmc.1: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod + -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +@@ -1006,6 +1037,8 @@ + rm -f windmc.pod + + cxxfilt.man: $(binutils_TEXI) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_cxxfilt.man: + touch $@ + -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod + -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ +diff -rNU3 a/binutils/doc/nm.1 b/binutils/doc/nm.1 +--- a/binutils/doc/nm.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/nm.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,602 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "NM 1" ++.TH NM 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++nm \- list symbols from object files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++nm [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR] [\fB\-a\fR|\fB\-\-debug\-syms\fR] ++ [\fB\-B\fR|\fB\-\-format=bsd\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] ++ [\fB\-D\fR|\fB\-\-dynamic\fR] [\fB\-f\fR\fIformat\fR|\fB\-\-format=\fR\fIformat\fR] ++ [\fB\-g\fR|\fB\-\-extern\-only\fR] [\fB\-h\fR|\fB\-\-help\fR] ++ [\fB\-l\fR|\fB\-\-line\-numbers\fR] [\fB\-\-inlines\fR] ++ [\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] ++ [\fB\-P\fR|\fB\-\-portability\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR] ++ [\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-S\fR|\fB\-\-print\-size\fR] ++ [\fB\-s\fR|\fB\-\-print\-armap\fR] [\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] ++ [\fB\-u\fR|\fB\-\-undefined\-only\fR] [\fB\-V\fR|\fB\-\-version\fR] ++ [\fB\-X 32_64\fR] [\fB\-\-defined\-only\fR] [\fB\-\-no\-demangle\fR] ++ [\fB\-\-plugin\fR \fIname\fR] ++ [\fB\-\-no\-recurse\-limit\fR|\fB\-\-recurse\-limit\fR]] ++ [\fB\-\-size\-sort\fR] [\fB\-\-special\-syms\fR] ++ [\fB\-\-synthetic\fR] [\fB\-\-with\-symbol\-versions\fR] [\fB\-\-target=\fR\fIbfdname\fR] ++ [\fIobjfile\fR...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\s-1GNU\s0 \fBnm\fR lists the symbols from object files \fIobjfile\fR.... ++If no object files are listed as arguments, \fBnm\fR assumes the file ++\&\fIa.out\fR. ++.PP ++For each symbol, \fBnm\fR shows: ++.IP "\(bu" 4 ++The symbol value, in the radix selected by options (see below), or ++hexadecimal by default. ++.IP "\(bu" 4 ++The symbol type. At least the following types are used; others are, as ++well, depending on the object file format. If lowercase, the symbol is ++usually local; if uppercase, the symbol is global (external). There ++are however a few lowercase symbols that are shown for special global ++symbols (\f(CW\*(C`u\*(C'\fR, \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`w\*(C'\fR). ++.RS 4 ++.ie n .IP """A""" 4 ++.el .IP "\f(CWA\fR" 4 ++.IX Item "A" ++The symbol's value is absolute, and will not be changed by further ++linking. ++.ie n .IP """B""" 4 ++.el .IP "\f(CWB\fR" 4 ++.IX Item "B" ++.PD 0 ++.ie n .IP """b""" 4 ++.el .IP "\f(CWb\fR" 4 ++.IX Item "b" ++.PD ++The symbol is in the \s-1BSS\s0 data section. This section typically ++contains zero-initialized or uninitialized data, although the exact ++behavior is system dependent. ++.ie n .IP """C""" 4 ++.el .IP "\f(CWC\fR" 4 ++.IX Item "C" ++The symbol is common. Common symbols are uninitialized data. When ++linking, multiple common symbols may appear with the same name. If the ++symbol is defined anywhere, the common symbols are treated as undefined ++references. ++.ie n .IP """D""" 4 ++.el .IP "\f(CWD\fR" 4 ++.IX Item "D" ++.PD 0 ++.ie n .IP """d""" 4 ++.el .IP "\f(CWd\fR" 4 ++.IX Item "d" ++.PD ++The symbol is in the initialized data section. ++.ie n .IP """G""" 4 ++.el .IP "\f(CWG\fR" 4 ++.IX Item "G" ++.PD 0 ++.ie n .IP """g""" 4 ++.el .IP "\f(CWg\fR" 4 ++.IX Item "g" ++.PD ++The symbol is in an initialized data section for small objects. Some ++object file formats permit more efficient access to small data objects, ++such as a global int variable as opposed to a large global array. ++.ie n .IP """i""" 4 ++.el .IP "\f(CWi\fR" 4 ++.IX Item "i" ++For \s-1PE\s0 format files this indicates that the symbol is in a section ++specific to the implementation of DLLs. For \s-1ELF\s0 format files this ++indicates that the symbol is an indirect function. This is a \s-1GNU\s0 ++extension to the standard set of \s-1ELF\s0 symbol types. It indicates a ++symbol which if referenced by a relocation does not evaluate to its ++address, but instead must be invoked at runtime. The runtime ++execution will then return the value to be used in the relocation. ++.ie n .IP """I""" 4 ++.el .IP "\f(CWI\fR" 4 ++.IX Item "I" ++The symbol is an indirect reference to another symbol. ++.ie n .IP """N""" 4 ++.el .IP "\f(CWN\fR" 4 ++.IX Item "N" ++The symbol is a debugging symbol. ++.ie n .IP """n""" 4 ++.el .IP "\f(CWn\fR" 4 ++.IX Item "n" ++The symbol is in the read-only data section. ++.ie n .IP """p""" 4 ++.el .IP "\f(CWp\fR" 4 ++.IX Item "p" ++The symbol is in a stack unwind section. ++.ie n .IP """R""" 4 ++.el .IP "\f(CWR\fR" 4 ++.IX Item "R" ++.PD 0 ++.ie n .IP """r""" 4 ++.el .IP "\f(CWr\fR" 4 ++.IX Item "r" ++.PD ++The symbol is in a read only data section. ++.ie n .IP """S""" 4 ++.el .IP "\f(CWS\fR" 4 ++.IX Item "S" ++.PD 0 ++.ie n .IP """s""" 4 ++.el .IP "\f(CWs\fR" 4 ++.IX Item "s" ++.PD ++The symbol is in an uninitialized or zero-initialized data section ++for small objects. ++.ie n .IP """T""" 4 ++.el .IP "\f(CWT\fR" 4 ++.IX Item "T" ++.PD 0 ++.ie n .IP """t""" 4 ++.el .IP "\f(CWt\fR" 4 ++.IX Item "t" ++.PD ++The symbol is in the text (code) section. ++.ie n .IP """U""" 4 ++.el .IP "\f(CWU\fR" 4 ++.IX Item "U" ++The symbol is undefined. ++.ie n .IP """u""" 4 ++.el .IP "\f(CWu\fR" 4 ++.IX Item "u" ++The symbol is a unique global symbol. This is a \s-1GNU\s0 extension to the ++standard set of \s-1ELF\s0 symbol bindings. For such a symbol the dynamic linker ++will make sure that in the entire process there is just one symbol with ++this name and type in use. ++.ie n .IP """V""" 4 ++.el .IP "\f(CWV\fR" 4 ++.IX Item "V" ++.PD 0 ++.ie n .IP """v""" 4 ++.el .IP "\f(CWv\fR" 4 ++.IX Item "v" ++.PD ++The symbol is a weak object. When a weak defined symbol is linked with ++a normal defined symbol, the normal defined symbol is used with no error. ++When a weak undefined symbol is linked and the symbol is not defined, ++the value of the weak symbol becomes zero with no error. On some ++systems, uppercase indicates that a default value has been specified. ++.ie n .IP """W""" 4 ++.el .IP "\f(CWW\fR" 4 ++.IX Item "W" ++.PD 0 ++.ie n .IP """w""" 4 ++.el .IP "\f(CWw\fR" 4 ++.IX Item "w" ++.PD ++The symbol is a weak symbol that has not been specifically tagged as a ++weak object symbol. When a weak defined symbol is linked with a normal ++defined symbol, the normal defined symbol is used with no error. ++When a weak undefined symbol is linked and the symbol is not defined, ++the value of the symbol is determined in a system-specific manner without ++error. On some systems, uppercase indicates that a default value has been ++specified. ++.ie n .IP """\-""" 4 ++.el .IP "\f(CW\-\fR" 4 ++.IX Item "-" ++The symbol is a stabs symbol in an a.out object file. In this case, the ++next values printed are the stabs other field, the stabs desc field, and ++the stab type. Stabs symbols are used to hold debugging information. ++.ie n .IP """?""" 4 ++.el .IP "\f(CW?\fR" 4 ++.IX Item "?" ++The symbol type is unknown, or object file format specific. ++.RE ++.RS 4 ++.RE ++.IP "\(bu" 4 ++The symbol name. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The long and short forms of options, shown here as alternatives, are ++equivalent. ++.IP "\fB\-A\fR" 4 ++.IX Item "-A" ++.PD 0 ++.IP "\fB\-o\fR" 4 ++.IX Item "-o" ++.IP "\fB\-\-print\-file\-name\fR" 4 ++.IX Item "--print-file-name" ++.PD ++Precede each symbol by the name of the input file (or archive member) ++in which it was found, rather than identifying the input file once only, ++before all of its symbols. ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-debug\-syms\fR" 4 ++.IX Item "--debug-syms" ++.PD ++Display all symbols, even debugger-only symbols; normally these are not ++listed. ++.IP "\fB\-B\fR" 4 ++.IX Item "-B" ++The same as \fB\-\-format=bsd\fR (for compatibility with the \s-1MIPS\s0 \fBnm\fR). ++.IP "\fB\-C\fR" 4 ++.IX Item "-C" ++.PD 0 ++.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4 ++.IX Item "--demangle[=style]" ++.PD ++Decode (\fIdemangle\fR) low-level symbol names into user-level names. ++Besides removing any initial underscore prepended by the system, this ++makes \*(C+ function names readable. Different compilers have different ++mangling styles. The optional demangling style argument can be used to ++choose an appropriate demangling style for your compiler. ++.IP "\fB\-\-no\-demangle\fR" 4 ++.IX Item "--no-demangle" ++Do not demangle low-level symbol names. This is the default. ++.IP "\fB\-\-recurse\-limit\fR" 4 ++.IX Item "--recurse-limit" ++.PD 0 ++.IP "\fB\-\-no\-recurse\-limit\fR" 4 ++.IX Item "--no-recurse-limit" ++.IP "\fB\-\-recursion\-limit\fR" 4 ++.IX Item "--recursion-limit" ++.IP "\fB\-\-no\-recursion\-limit\fR" 4 ++.IX Item "--no-recursion-limit" ++.PD ++Enables or disables a limit on the amount of recursion performed ++whilst demangling strings. Since the name mangling formats allow for ++an inifinite level of recursion it is possible to create strings whose ++decoding will exhaust the amount of stack space available on the host ++machine, triggering a memory fault. The limit tries to prevent this ++from happening by restricting recursion to 2048 levels of nesting. ++.Sp ++The default is for this limit to be enabled, but disabling it may be ++necessary in order to demangle truly complicated names. Note however ++that if the recursion limit is disabled then stack exhaustion is ++possible and any bug reports about such an event will be rejected. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++.PD 0 ++.IP "\fB\-\-dynamic\fR" 4 ++.IX Item "--dynamic" ++.PD ++Display the dynamic symbols rather than the normal symbols. This is ++only meaningful for dynamic objects, such as certain types of shared ++libraries. ++.IP "\fB\-f\fR \fIformat\fR" 4 ++.IX Item "-f format" ++.PD 0 ++.IP "\fB\-\-format=\fR\fIformat\fR" 4 ++.IX Item "--format=format" ++.PD ++Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR, ++\&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR. ++Only the first character of \fIformat\fR is significant; it can be ++either upper or lower case. ++.IP "\fB\-g\fR" 4 ++.IX Item "-g" ++.PD 0 ++.IP "\fB\-\-extern\-only\fR" 4 ++.IX Item "--extern-only" ++.PD ++Display only external symbols. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Show a summary of the options to \fBnm\fR and exit. ++.IP "\fB\-l\fR" 4 ++.IX Item "-l" ++.PD 0 ++.IP "\fB\-\-line\-numbers\fR" 4 ++.IX Item "--line-numbers" ++.PD ++For each symbol, use debugging information to try to find a filename and ++line number. For a defined symbol, look for the line number of the ++address of the symbol. For an undefined symbol, look for the line ++number of a relocation entry which refers to the symbol. If line number ++information can be found, print it after the other symbol information. ++.IP "\fB\-\-inlines\fR" 4 ++.IX Item "--inlines" ++When option \fB\-l\fR is active, if the address belongs to a ++function that was inlined, then this option causes the source ++information for all enclosing scopes back to the first non-inlined ++function to be printed as well. For example, if \f(CW\*(C`main\*(C'\fR inlines ++\&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from ++\&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR ++will also be printed. ++.IP "\fB\-n\fR" 4 ++.IX Item "-n" ++.PD 0 ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.IP "\fB\-\-numeric\-sort\fR" 4 ++.IX Item "--numeric-sort" ++.PD ++Sort symbols numerically by their addresses, rather than alphabetically ++by their names. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-no\-sort\fR" 4 ++.IX Item "--no-sort" ++.PD ++Do not bother to sort the symbols in any order; print them in the order ++encountered. ++.IP "\fB\-P\fR" 4 ++.IX Item "-P" ++.PD 0 ++.IP "\fB\-\-portability\fR" 4 ++.IX Item "--portability" ++.PD ++Use the \s-1POSIX.2\s0 standard output format instead of the default format. ++Equivalent to \fB\-f posix\fR. ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++.PD 0 ++.IP "\fB\-\-reverse\-sort\fR" 4 ++.IX Item "--reverse-sort" ++.PD ++Reverse the order of the sort (whether numeric or alphabetic); let the ++last come first. ++.IP "\fB\-S\fR" 4 ++.IX Item "-S" ++.PD 0 ++.IP "\fB\-\-print\-size\fR" 4 ++.IX Item "--print-size" ++.PD ++Print both value and size of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output style. ++This option has no effect for object formats that do not record symbol ++sizes, unless \fB\-\-size\-sort\fR is also used in which case a ++calculated size is displayed. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-print\-armap\fR" 4 ++.IX Item "--print-armap" ++.PD ++When listing symbols from archive members, include the index: a mapping ++(stored in the archive by \fBar\fR or \fBranlib\fR) of which modules ++contain definitions for which names. ++.IP "\fB\-t\fR \fIradix\fR" 4 ++.IX Item "-t radix" ++.PD 0 ++.IP "\fB\-\-radix=\fR\fIradix\fR" 4 ++.IX Item "--radix=radix" ++.PD ++Use \fIradix\fR as the radix for printing the symbol values. It must be ++\&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal. ++.IP "\fB\-u\fR" 4 ++.IX Item "-u" ++.PD 0 ++.IP "\fB\-\-undefined\-only\fR" 4 ++.IX Item "--undefined-only" ++.PD ++Display only undefined symbols (those external to each object file). ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Show the version number of \fBnm\fR and exit. ++.IP "\fB\-X\fR" 4 ++.IX Item "-X" ++This option is ignored for compatibility with the \s-1AIX\s0 version of ++\&\fBnm\fR. It takes one parameter which must be the string ++\&\fB32_64\fR. The default mode of \s-1AIX\s0 \fBnm\fR corresponds ++to \fB\-X 32\fR, which is not supported by \s-1GNU\s0 \fBnm\fR. ++.IP "\fB\-\-defined\-only\fR" 4 ++.IX Item "--defined-only" ++Display only defined symbols for each object file. ++.IP "\fB\-\-plugin\fR \fIname\fR" 4 ++.IX Item "--plugin name" ++Load the plugin called \fIname\fR to add support for extra target ++types. This option is only available if the toolchain has been built ++with plugin support enabled. ++.Sp ++If \fB\-\-plugin\fR is not provided, but plugin support has been ++enabled then \fBnm\fR iterates over the files in ++\&\fI${libdir}/bfd\-plugins\fR in alphabetic order and the first ++plugin that claims the object in question is used. ++.Sp ++Please note that this plugin search directory is \fInot\fR the one ++used by \fBld\fR's \fB\-plugin\fR option. In order to make ++\&\fBnm\fR use the linker plugin it must be copied into the ++\&\fI${libdir}/bfd\-plugins\fR directory. For \s-1GCC\s0 based compilations ++the linker plugin is called \fIliblto_plugin.so.0.0.0\fR. For Clang ++based compilations it is called \fILLVMgold.so\fR. The \s-1GCC\s0 plugin ++is always backwards compatible with earlier versions, so it is ++sufficient to just copy the newest one. ++.IP "\fB\-\-size\-sort\fR" 4 ++.IX Item "--size-sort" ++Sort symbols by size. For \s-1ELF\s0 objects symbol sizes are read from the ++\&\s-1ELF,\s0 for other object types the symbol sizes are computed as the ++difference between the value of the symbol and the value of the symbol ++with the next higher value. If the \f(CW\*(C`bsd\*(C'\fR output format is used ++the size of the symbol is printed, rather than the value, and ++\&\fB\-S\fR must be used in order both size and value to be printed. ++.IP "\fB\-\-special\-syms\fR" 4 ++.IX Item "--special-syms" ++Display symbols which have a target-specific special meaning. These ++symbols are usually used by the target for some special processing and ++are not normally helpful when included in the normal symbol lists. ++For example for \s-1ARM\s0 targets this option would skip the mapping symbols ++used to mark transitions between \s-1ARM\s0 code, \s-1THUMB\s0 code and data. ++.IP "\fB\-\-synthetic\fR" 4 ++.IX Item "--synthetic" ++Include synthetic symbols in the output. These are special symbols ++created by the linker for various purposes. They are not shown by ++default since they are not part of the binary's original source code. ++.IP "\fB\-\-with\-symbol\-versions\fR" 4 ++.IX Item "--with-symbol-versions" ++Enables the display of symbol version information if any exists. The ++version string is displayed as a suffix to the symbol name, preceeded by ++an @ character. For example \fBfoo@VER_1\fR. If the version is ++the default version to be used when resolving unversioned references ++to the symbol then it is displayed as a suffix preceeded by two @ ++characters. For example \fBfoo@@VER_2\fR. ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++Specify an object code format other than your system's default format. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBar\fR\|(1), \fBobjdump\fR\|(1), \fBranlib\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/objcopy.1 b/binutils/doc/objcopy.1 +--- a/binutils/doc/objcopy.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/objcopy.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,1233 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "OBJCOPY 1" ++.TH OBJCOPY 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++objcopy \- copy and translate object files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] ++ [\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR] ++ [\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR] ++ [\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR] ++ [\fB\-S\fR|\fB\-\-strip\-all\fR] ++ [\fB\-g\fR|\fB\-\-strip\-debug\fR] ++ [\fB\-\-strip\-unneeded\fR] ++ [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-\-localize\-hidden\fR] ++ [\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-\-globalize\-symbols=\fR\fIfilename\fR] ++ [\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-w\fR|\fB\-\-wildcard\fR] ++ [\fB\-x\fR|\fB\-\-discard\-all\fR] ++ [\fB\-X\fR|\fB\-\-discard\-locals\fR] ++ [\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR] ++ [\fB\-i\fR [\fIbreadth\fR]|\fB\-\-interleave\fR[=\fIbreadth\fR]] ++ [\fB\-\-interleave\-width=\fR\fIwidth\fR] ++ [\fB\-j\fR \fIsectionpattern\fR|\fB\-\-only\-section=\fR\fIsectionpattern\fR] ++ [\fB\-R\fR \fIsectionpattern\fR|\fB\-\-remove\-section=\fR\fIsectionpattern\fR] ++ [\fB\-\-keep\-section=\fR\fIsectionpattern\fR] ++ [\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR] ++ [\fB\-p\fR|\fB\-\-preserve\-dates\fR] ++ [\fB\-D\fR|\fB\-\-enable\-deterministic\-archives\fR] ++ [\fB\-U\fR|\fB\-\-disable\-deterministic\-archives\fR] ++ [\fB\-\-debugging\fR] ++ [\fB\-\-gap\-fill=\fR\fIval\fR] ++ [\fB\-\-pad\-to=\fR\fIaddress\fR] ++ [\fB\-\-set\-start=\fR\fIval\fR] ++ [\fB\-\-adjust\-start=\fR\fIincr\fR] ++ [\fB\-\-change\-addresses=\fR\fIincr\fR] ++ [\fB\-\-change\-section\-address\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR] ++ [\fB\-\-change\-section\-lma\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR] ++ [\fB\-\-change\-section\-vma\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR] ++ [\fB\-\-change\-warnings\fR] [\fB\-\-no\-change\-warnings\fR] ++ [\fB\-\-set\-section\-flags\fR \fIsectionpattern\fR=\fIflags\fR] ++ [\fB\-\-set\-section\-alignment\fR \fIsectionpattern\fR=\fIalign\fR] ++ [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR] ++ [\fB\-\-dump\-section\fR \fIsectionname\fR=\fIfilename\fR] ++ [\fB\-\-update\-section\fR \fIsectionname\fR=\fIfilename\fR] ++ [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]] ++ [\fB\-\-long\-section\-names\fR {enable,disable,keep}] ++ [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR] ++ [\fB\-\-reverse\-bytes=\fR\fInum\fR] ++ [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR] ++ [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR] ++ [\fB\-\-redefine\-syms=\fR\fIfilename\fR] ++ [\fB\-\-weaken\fR] ++ [\fB\-\-keep\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-strip\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-localize\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-weaken\-symbols=\fR\fIfilename\fR] ++ [\fB\-\-add\-symbol\fR \fIname\fR=[\fIsection\fR:]\fIvalue\fR[,\fIflags\fR]] ++ [\fB\-\-alt\-machine\-code=\fR\fIindex\fR] ++ [\fB\-\-prefix\-symbols=\fR\fIstring\fR] ++ [\fB\-\-prefix\-sections=\fR\fIstring\fR] ++ [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR] ++ [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR] ++ [\fB\-\-keep\-file\-symbols\fR] ++ [\fB\-\-only\-keep\-debug\fR] ++ [\fB\-\-strip\-dwo\fR] ++ [\fB\-\-extract\-dwo\fR] ++ [\fB\-\-extract\-symbol\fR] ++ [\fB\-\-writable\-text\fR] ++ [\fB\-\-readonly\-text\fR] ++ [\fB\-\-pure\fR] ++ [\fB\-\-impure\fR] ++ [\fB\-\-file\-alignment=\fR\fInum\fR] ++ [\fB\-\-heap=\fR\fIsize\fR] ++ [\fB\-\-image\-base=\fR\fIaddress\fR] ++ [\fB\-\-section\-alignment=\fR\fInum\fR] ++ [\fB\-\-stack=\fR\fIsize\fR] ++ [\fB\-\-subsystem=\fR\fIwhich\fR:\fImajor\fR.\fIminor\fR] ++ [\fB\-\-compress\-debug\-sections\fR] ++ [\fB\-\-decompress\-debug\-sections\fR] ++ [\fB\-\-elf\-stt\-common=\fR\fIval\fR] ++ [\fB\-\-merge\-notes\fR] ++ [\fB\-\-no\-merge\-notes\fR] ++ [\fB\-\-verilog\-data\-width=\fR\fIval\fR] ++ [\fB\-v\fR|\fB\-\-verbose\fR] ++ [\fB\-V\fR|\fB\-\-version\fR] ++ [\fB\-\-help\fR] [\fB\-\-info\fR] ++ \fIinfile\fR [\fIoutfile\fR] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++The \s-1GNU\s0 \fBobjcopy\fR utility copies the contents of an object ++file to another. \fBobjcopy\fR uses the \s-1GNU BFD\s0 Library to ++read and write the object files. It can write the destination object ++file in a format different from that of the source object file. The ++exact behavior of \fBobjcopy\fR is controlled by command-line options. ++Note that \fBobjcopy\fR should be able to copy a fully linked file ++between any two formats. However, copying a relocatable object file ++between any two formats may not work as expected. ++.PP ++\&\fBobjcopy\fR creates temporary files to do its translations and ++deletes them afterward. \fBobjcopy\fR uses \s-1BFD\s0 to do all its ++translation work; it has access to all the formats described in \s-1BFD\s0 ++and thus is able to recognize most formats without being told ++explicitly. ++.PP ++\&\fBobjcopy\fR can be used to generate S\-records by using an output ++target of \fBsrec\fR (e.g., use \fB\-O srec\fR). ++.PP ++\&\fBobjcopy\fR can be used to generate a raw binary file by using an ++output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When ++\&\fBobjcopy\fR generates a raw binary file, it will essentially produce ++a memory dump of the contents of the input object file. All symbols and ++relocation information will be discarded. The memory dump will start at ++the load address of the lowest section copied into the output file. ++.PP ++When generating an S\-record or a raw binary file, it may be helpful to ++use \fB\-S\fR to remove sections containing debugging information. In ++some cases \fB\-R\fR will be useful to remove sections which contain ++information that is not needed by the binary file. ++.PP ++Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input ++files. If the input format has an endianness (some formats do not), ++\&\fBobjcopy\fR can only copy the inputs into file formats that have the ++same endianness or which have no endianness (e.g., \fBsrec\fR). ++(However, see the \fB\-\-reverse\-bytes\fR option.) ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fIinfile\fR" 4 ++.IX Item "infile" ++.PD 0 ++.IP "\fIoutfile\fR" 4 ++.IX Item "outfile" ++.PD ++The input and output files, respectively. ++If you do not specify \fIoutfile\fR, \fBobjcopy\fR creates a ++temporary file and destructively renames the result with ++the name of \fIinfile\fR. ++.IP "\fB\-I\fR \fIbfdname\fR" 4 ++.IX Item "-I bfdname" ++.PD 0 ++.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--input-target=bfdname" ++.PD ++Consider the source file's object format to be \fIbfdname\fR, rather than ++attempting to deduce it. ++.IP "\fB\-O\fR \fIbfdname\fR" 4 ++.IX Item "-O bfdname" ++.PD 0 ++.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--output-target=bfdname" ++.PD ++Write the output file using the object format \fIbfdname\fR. ++.IP "\fB\-F\fR \fIbfdname\fR" 4 ++.IX Item "-F bfdname" ++.PD 0 ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++.PD ++Use \fIbfdname\fR as the object format for both the input and the output ++file; i.e., simply transfer data from source to destination with no ++translation. ++.IP "\fB\-B\fR \fIbfdarch\fR" 4 ++.IX Item "-B bfdarch" ++.PD 0 ++.IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4 ++.IX Item "--binary-architecture=bfdarch" ++.PD ++Useful when transforming a architecture-less input file into an object file. ++In this case the output architecture can be set to \fIbfdarch\fR. This ++option will be ignored if the input file has a known \fIbfdarch\fR. You ++can access this binary data inside a program by referencing the special ++symbols that are created by the conversion process. These symbols are ++called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and ++_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into ++an object file and then access it in your code using these symbols. ++.IP "\fB\-j\fR \fIsectionpattern\fR" 4 ++.IX Item "-j sectionpattern" ++.PD 0 ++.IP "\fB\-\-only\-section=\fR\fIsectionpattern\fR" 4 ++.IX Item "--only-section=sectionpattern" ++.PD ++Copy only the indicated sections from the input file to the output file. ++This option may be given more than once. Note that using this option ++inappropriately may make the output file unusable. Wildcard ++characters are accepted in \fIsectionpattern\fR. ++.Sp ++If the first character of \fIsectionpattern\fR is the exclamation ++point (!) then matching sections will not be copied, even if earlier ++use of \fB\-\-only\-section\fR on the same command line would ++otherwise copy it. For example: ++.Sp ++.Vb 1 ++\& \-\-only\-section=.text.* \-\-only\-section=!.text.foo ++.Ve ++.Sp ++will copy all sectinos maching '.text.*' but not the section ++\&'.text.foo'. ++.IP "\fB\-R\fR \fIsectionpattern\fR" 4 ++.IX Item "-R sectionpattern" ++.PD 0 ++.IP "\fB\-\-remove\-section=\fR\fIsectionpattern\fR" 4 ++.IX Item "--remove-section=sectionpattern" ++.PD ++Remove any section matching \fIsectionpattern\fR from the output file. ++This option may be given more than once. Note that using this option ++inappropriately may make the output file unusable. Wildcard ++characters are accepted in \fIsectionpattern\fR. Using both the ++\&\fB\-j\fR and \fB\-R\fR options together results in undefined ++behaviour. ++.Sp ++If the first character of \fIsectionpattern\fR is the exclamation ++point (!) then matching sections will not be removed even if an ++earlier use of \fB\-\-remove\-section\fR on the same command line ++would otherwise remove it. For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-section=.text.* \-\-remove\-section=!.text.foo ++.Ve ++.Sp ++will remove all sections matching the pattern '.text.*', but will not ++remove the section '.text.foo'. ++.IP "\fB\-\-keep\-section=\fR\fIsectionpattern\fR" 4 ++.IX Item "--keep-section=sectionpattern" ++When removing sections from the output file, keep sections that match ++\&\fIsectionpattern\fR. ++.IP "\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR" 4 ++.IX Item "--remove-relocations=sectionpattern" ++Remove non-dynamic relocations from the output file for any section ++matching \fIsectionpattern\fR. This option may be given more than ++once. Note that using this option inappropriately may make the output ++file unusable, and attempting to remove a dynamic relocation section ++such as \fB.rela.plt\fR from an executable or shared library with ++\&\fB\-\-remove\-relocations=.plt\fR will not work. Wildcard characters ++are accepted in \fIsectionpattern\fR. ++For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-relocations=.text.* ++.Ve ++.Sp ++will remove the relocations for all sections matching the pattern ++\&'.text.*'. ++.Sp ++If the first character of \fIsectionpattern\fR is the exclamation ++point (!) then matching sections will not have their relocation ++removed even if an earlier use of \fB\-\-remove\-relocations\fR on the ++same command line would otherwise cause the relocations to be removed. ++For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-relocations=.text.* \-\-remove\-relocations=!.text.foo ++.Ve ++.Sp ++will remove all relocations for sections matching the pattern ++\&'.text.*', but will not remove relocations for the section ++\&'.text.foo'. ++.IP "\fB\-S\fR" 4 ++.IX Item "-S" ++.PD 0 ++.IP "\fB\-\-strip\-all\fR" 4 ++.IX Item "--strip-all" ++.PD ++Do not copy relocation and symbol information from the source file. ++.IP "\fB\-g\fR" 4 ++.IX Item "-g" ++.PD 0 ++.IP "\fB\-\-strip\-debug\fR" 4 ++.IX Item "--strip-debug" ++.PD ++Do not copy debugging symbols or sections from the source file. ++.IP "\fB\-\-strip\-unneeded\fR" 4 ++.IX Item "--strip-unneeded" ++Strip all symbols that are not needed for relocation processing. ++.IP "\fB\-K\fR \fIsymbolname\fR" 4 ++.IX Item "-K symbolname" ++.PD 0 ++.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--keep-symbol=symbolname" ++.PD ++When stripping symbols, keep symbol \fIsymbolname\fR even if it would ++normally be stripped. This option may be given more than once. ++.IP "\fB\-N\fR \fIsymbolname\fR" 4 ++.IX Item "-N symbolname" ++.PD 0 ++.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--strip-symbol=symbolname" ++.PD ++Do not copy symbol \fIsymbolname\fR from the source file. This option ++may be given more than once. ++.IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--strip-unneeded-symbol=symbolname" ++Do not copy symbol \fIsymbolname\fR from the source file unless it is needed ++by a relocation. This option may be given more than once. ++.IP "\fB\-G\fR \fIsymbolname\fR" 4 ++.IX Item "-G symbolname" ++.PD 0 ++.IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--keep-global-symbol=symbolname" ++.PD ++Keep only symbol \fIsymbolname\fR global. Make all other symbols local ++to the file, so that they are not visible externally. This option may ++be given more than once. Note: this option cannot be used in ++conjunction with the \fB\-\-globalize\-symbol\fR or ++\&\fB\-\-globalize\-symbols\fR options. ++.IP "\fB\-\-localize\-hidden\fR" 4 ++.IX Item "--localize-hidden" ++In an \s-1ELF\s0 object, mark all symbols that have hidden or internal visibility ++as local. This option applies on top of symbol-specific localization options ++such as \fB\-L\fR. ++.IP "\fB\-L\fR \fIsymbolname\fR" 4 ++.IX Item "-L symbolname" ++.PD 0 ++.IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--localize-symbol=symbolname" ++.PD ++Convert a global or weak symbol called \fIsymbolname\fR into a local ++symbol, so that it is not visible externally. This option may be ++given more than once. Note \- unique symbols are not converted. ++.IP "\fB\-W\fR \fIsymbolname\fR" 4 ++.IX Item "-W symbolname" ++.PD 0 ++.IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--weaken-symbol=symbolname" ++.PD ++Make symbol \fIsymbolname\fR weak. This option may be given more than once. ++.IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--globalize-symbol=symbolname" ++Give symbol \fIsymbolname\fR global scoping so that it is visible ++outside of the file in which it is defined. This option may be given ++more than once. Note: this option cannot be used in conjunction with ++the \fB\-G\fR or \fB\-\-keep\-global\-symbol\fR options. ++.IP "\fB\-w\fR" 4 ++.IX Item "-w" ++.PD 0 ++.IP "\fB\-\-wildcard\fR" 4 ++.IX Item "--wildcard" ++.PD ++Permit regular expressions in \fIsymbolname\fRs used in other command ++line options. The question mark (?), asterisk (*), backslash (\e) and ++square brackets ([]) operators can be used anywhere in the symbol ++name. If the first character of the symbol name is the exclamation ++point (!) then the sense of the switch is reversed for that symbol. ++For example: ++.Sp ++.Vb 1 ++\& \-w \-W !foo \-W fo* ++.Ve ++.Sp ++would cause objcopy to weaken all symbols that start with \*(L"fo\*(R" ++except for the symbol \*(L"foo\*(R". ++.IP "\fB\-x\fR" 4 ++.IX Item "-x" ++.PD 0 ++.IP "\fB\-\-discard\-all\fR" 4 ++.IX Item "--discard-all" ++.PD ++Do not copy non-global symbols from the source file. ++.IP "\fB\-X\fR" 4 ++.IX Item "-X" ++.PD 0 ++.IP "\fB\-\-discard\-locals\fR" 4 ++.IX Item "--discard-locals" ++.PD ++Do not copy compiler-generated local symbols. ++(These usually start with \fBL\fR or \fB.\fR.) ++.IP "\fB\-b\fR \fIbyte\fR" 4 ++.IX Item "-b byte" ++.PD 0 ++.IP "\fB\-\-byte=\fR\fIbyte\fR" 4 ++.IX Item "--byte=byte" ++.PD ++If interleaving has been enabled via the \fB\-\-interleave\fR option ++then start the range of bytes to keep at the \fIbyte\fRth byte. ++\&\fIbyte\fR can be in the range from 0 to \fIbreadth\fR\-1, where ++\&\fIbreadth\fR is the value given by the \fB\-\-interleave\fR option. ++.IP "\fB\-i [\fR\fIbreadth\fR\fB]\fR" 4 ++.IX Item "-i [breadth]" ++.PD 0 ++.IP "\fB\-\-interleave[=\fR\fIbreadth\fR\fB]\fR" 4 ++.IX Item "--interleave[=breadth]" ++.PD ++Only copy a range out of every \fIbreadth\fR bytes. (Header data is ++not affected). Select which byte in the range begins the copy with ++the \fB\-\-byte\fR option. Select the width of the range with the ++\&\fB\-\-interleave\-width\fR option. ++.Sp ++This option is useful for creating files to program \s-1ROM.\s0 It is ++typically used with an \f(CW\*(C`srec\*(C'\fR output target. Note that ++\&\fBobjcopy\fR will complain if you do not specify the ++\&\fB\-\-byte\fR option as well. ++.Sp ++The default interleave breadth is 4, so with \fB\-\-byte\fR set to 0, ++\&\fBobjcopy\fR would copy the first byte out of every four bytes ++from the input to the output. ++.IP "\fB\-\-interleave\-width=\fR\fIwidth\fR" 4 ++.IX Item "--interleave-width=width" ++When used with the \fB\-\-interleave\fR option, copy \fIwidth\fR ++bytes at a time. The start of the range of bytes to be copied is set ++by the \fB\-\-byte\fR option, and the extent of the range is set with ++the \fB\-\-interleave\fR option. ++.Sp ++The default value for this option is 1. The value of \fIwidth\fR plus ++the \fIbyte\fR value set by the \fB\-\-byte\fR option must not exceed ++the interleave breadth set by the \fB\-\-interleave\fR option. ++.Sp ++This option can be used to create images for two 16\-bit flashes interleaved ++in a 32\-bit bus by passing \fB\-b 0 \-i 4 \-\-interleave\-width=2\fR ++and \fB\-b 2 \-i 4 \-\-interleave\-width=2\fR to two \fBobjcopy\fR ++commands. If the input was '12345678' then the outputs would be ++\&'1256' and '3478' respectively. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-preserve\-dates\fR" 4 ++.IX Item "--preserve-dates" ++.PD ++Set the access and modification dates of the output file to be the same ++as those of the input file. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++.PD 0 ++.IP "\fB\-\-enable\-deterministic\-archives\fR" 4 ++.IX Item "--enable-deterministic-archives" ++.PD ++Operate in \fIdeterministic\fR mode. When copying archive members ++and writing the archive index, use zero for UIDs, GIDs, timestamps, ++and use consistent file modes for all files. ++.Sp ++If \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by default. ++It can be disabled with the \fB\-U\fR option, below. ++.IP "\fB\-U\fR" 4 ++.IX Item "-U" ++.PD 0 ++.IP "\fB\-\-disable\-deterministic\-archives\fR" 4 ++.IX Item "--disable-deterministic-archives" ++.PD ++Do \fInot\fR operate in \fIdeterministic\fR mode. This is the ++inverse of the \fB\-D\fR option, above: when copying archive members ++and writing the archive index, use their actual \s-1UID, GID,\s0 timestamp, ++and file mode values. ++.Sp ++This is the default unless \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR. ++.IP "\fB\-\-debugging\fR" 4 ++.IX Item "--debugging" ++Convert debugging information, if possible. This is not the default ++because only certain debugging formats are supported, and the ++conversion process can be time consuming. ++.IP "\fB\-\-gap\-fill\fR \fIval\fR" 4 ++.IX Item "--gap-fill val" ++Fill gaps between sections with \fIval\fR. This operation applies to ++the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing ++the size of the section with the lower address, and filling in the extra ++space created with \fIval\fR. ++.IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4 ++.IX Item "--pad-to address" ++Pad the output file up to the load address \fIaddress\fR. This is ++done by increasing the size of the last section. The extra space is ++filled in with the value specified by \fB\-\-gap\-fill\fR (default zero). ++.IP "\fB\-\-set\-start\fR \fIval\fR" 4 ++.IX Item "--set-start val" ++Set the start address of the new file to \fIval\fR. Not all object file ++formats support setting the start address. ++.IP "\fB\-\-change\-start\fR \fIincr\fR" 4 ++.IX Item "--change-start incr" ++.PD 0 ++.IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4 ++.IX Item "--adjust-start incr" ++.PD ++Change the start address by adding \fIincr\fR. Not all object file ++formats support setting the start address. ++.IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4 ++.IX Item "--change-addresses incr" ++.PD 0 ++.IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4 ++.IX Item "--adjust-vma incr" ++.PD ++Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start ++address, by adding \fIincr\fR. Some object file formats do not permit ++section addresses to be changed arbitrarily. Note that this does not ++relocate the sections; if the program expects sections to be loaded at a ++certain address, and this option is used to change the sections such ++that they are loaded at a different address, the program may fail. ++.IP "\fB\-\-change\-section\-address\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4 ++.IX Item "--change-section-address sectionpattern{=,+,-}val" ++.PD 0 ++.IP "\fB\-\-adjust\-section\-vma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4 ++.IX Item "--adjust-section-vma sectionpattern{=,+,-}val" ++.PD ++Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of any section ++matching \fIsectionpattern\fR. If \fB=\fR is used, the section ++address is set to \fIval\fR. Otherwise, \fIval\fR is added to or ++subtracted from the section address. See the comments under ++\&\fB\-\-change\-addresses\fR, above. If \fIsectionpattern\fR does not ++match any sections in the input file, a warning will be issued, unless ++\&\fB\-\-no\-change\-warnings\fR is used. ++.IP "\fB\-\-change\-section\-lma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4 ++.IX Item "--change-section-lma sectionpattern{=,+,-}val" ++Set or change the \s-1LMA\s0 address of any sections matching ++\&\fIsectionpattern\fR. The \s-1LMA\s0 address is the address where the ++section will be loaded into memory at program load time. Normally ++this is the same as the \s-1VMA\s0 address, which is the address of the ++section at program run time, but on some systems, especially those ++where a program is held in \s-1ROM,\s0 the two can be different. If \fB=\fR ++is used, the section address is set to \fIval\fR. Otherwise, ++\&\fIval\fR is added to or subtracted from the section address. See the ++comments under \fB\-\-change\-addresses\fR, above. If ++\&\fIsectionpattern\fR does not match any sections in the input file, a ++warning will be issued, unless \fB\-\-no\-change\-warnings\fR is used. ++.IP "\fB\-\-change\-section\-vma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4 ++.IX Item "--change-section-vma sectionpattern{=,+,-}val" ++Set or change the \s-1VMA\s0 address of any section matching ++\&\fIsectionpattern\fR. The \s-1VMA\s0 address is the address where the ++section will be located once the program has started executing. ++Normally this is the same as the \s-1LMA\s0 address, which is the address ++where the section will be loaded into memory, but on some systems, ++especially those where a program is held in \s-1ROM,\s0 the two can be ++different. If \fB=\fR is used, the section address is set to ++\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the ++section address. See the comments under \fB\-\-change\-addresses\fR, ++above. If \fIsectionpattern\fR does not match any sections in the ++input file, a warning will be issued, unless ++\&\fB\-\-no\-change\-warnings\fR is used. ++.IP "\fB\-\-change\-warnings\fR" 4 ++.IX Item "--change-warnings" ++.PD 0 ++.IP "\fB\-\-adjust\-warnings\fR" 4 ++.IX Item "--adjust-warnings" ++.PD ++If \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or ++\&\fB\-\-change\-section\-vma\fR is used, and the section pattern does not ++match any sections, issue a warning. This is the default. ++.IP "\fB\-\-no\-change\-warnings\fR" 4 ++.IX Item "--no-change-warnings" ++.PD 0 ++.IP "\fB\-\-no\-adjust\-warnings\fR" 4 ++.IX Item "--no-adjust-warnings" ++.PD ++Do not issue a warning if \fB\-\-change\-section\-address\fR or ++\&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, even ++if the section pattern does not match any sections. ++.IP "\fB\-\-set\-section\-flags\fR \fIsectionpattern\fR\fB=\fR\fIflags\fR" 4 ++.IX Item "--set-section-flags sectionpattern=flags" ++Set the flags for any sections matching \fIsectionpattern\fR. The ++\&\fIflags\fR argument is a comma separated string of flag names. The ++recognized names are \fBalloc\fR, \fBcontents\fR, \fBload\fR, ++\&\fBnoload\fR, \fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, ++\&\fBshare\fR, and \fBdebug\fR. You can set the \fBcontents\fR flag ++for a section which does not have contents, but it is not meaningful ++to clear the \fBcontents\fR flag of a section which does have ++contents\*(--just remove the section instead. Not all flags are ++meaningful for all object file formats. ++.IP "\fB\-\-set\-section\-alignment\fR \fIsectionpattern\fR\fB=\fR\fIalign\fR" 4 ++.IX Item "--set-section-alignment sectionpattern=align" ++Set the alignment for any sections matching \fIsectionpattern\fR. ++\&\fIalign\fR specifies the alignment in bytes and must be a power of ++two, i.e. 1, 2, 4, 8.... ++.IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4 ++.IX Item "--add-section sectionname=filename" ++Add a new section named \fIsectionname\fR while copying the file. The ++contents of the new section are taken from the file \fIfilename\fR. The ++size of the section will be the size of the file. This option only ++works on file formats which can support sections with arbitrary names. ++Note \- it may be necessary to use the \fB\-\-set\-section\-flags\fR ++option to set the attributes of the newly created section. ++.IP "\fB\-\-dump\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4 ++.IX Item "--dump-section sectionname=filename" ++Place the contents of section named \fIsectionname\fR into the file ++\&\fIfilename\fR, overwriting any contents that may have been there ++previously. This option is the inverse of \fB\-\-add\-section\fR. ++This option is similar to the \fB\-\-only\-section\fR option except ++that it does not create a formatted file, it just dumps the contents ++as raw binary data, without applying any relocations. The option can ++be specified more than once. ++.IP "\fB\-\-update\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4 ++.IX Item "--update-section sectionname=filename" ++Replace the existing contents of a section named \fIsectionname\fR ++with the contents of file \fIfilename\fR. The size of the section ++will be adjusted to the size of the file. The section flags for ++\&\fIsectionname\fR will be unchanged. For \s-1ELF\s0 format files the section ++to segment mapping will also remain unchanged, something which is not ++possible using \fB\-\-remove\-section\fR followed by ++\&\fB\-\-add\-section\fR. The option can be specified more than once. ++.Sp ++Note \- it is possible to use \fB\-\-rename\-section\fR and ++\&\fB\-\-update\-section\fR to both update and rename a section from one ++command line. In this case, pass the original section name to ++\&\fB\-\-update\-section\fR, and the original and new section names to ++\&\fB\-\-rename\-section\fR. ++.IP "\fB\-\-add\-symbol\fR \fIname\fR\fB=[\fR\fIsection\fR\fB:]\fR\fIvalue\fR\fB[,\fR\fIflags\fR\fB]\fR" 4 ++.IX Item "--add-symbol name=[section:]value[,flags]" ++Add a new symbol named \fIname\fR while copying the file. This option may be ++specified multiple times. If the \fIsection\fR is given, the symbol will be ++associated with and relative to that section, otherwise it will be an \s-1ABS\s0 ++symbol. Specifying an undefined section will result in a fatal error. There ++is no check for the value, it will be taken as specified. Symbol flags can ++be specified and not all flags will be meaningful for all object file ++formats. By default, the symbol will be global. The special flag ++\&'before=\fIothersym\fR' will insert the new symbol in front of the specified ++\&\fIothersym\fR, otherwise the symbol(s) will be added at the end of the ++symbol table in the order they appear. ++.IP "\fB\-\-rename\-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR" 4 ++.IX Item "--rename-section oldname=newname[,flags]" ++Rename a section from \fIoldname\fR to \fInewname\fR, optionally ++changing the section's flags to \fIflags\fR in the process. This has ++the advantage over using a linker script to perform the rename in that ++the output stays as an object file and does not become a linked ++executable. ++.Sp ++This option is particularly helpful when the input format is binary, ++since this will always create a section called .data. If for example, ++you wanted instead to create a section called .rodata containing binary ++data you could use the following command line to achieve it: ++.Sp ++.Vb 3 ++\& objcopy \-I binary \-O \-B \e ++\& \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e ++\& ++.Ve ++.IP "\fB\-\-long\-section\-names {enable,disable,keep}\fR" 4 ++.IX Item "--long-section-names {enable,disable,keep}" ++Controls the handling of long section names when processing \f(CW\*(C`COFF\*(C'\fR ++and \f(CW\*(C`PE\-COFF\*(C'\fR object formats. The default behaviour, \fBkeep\fR, ++is to preserve long section names if any are present in the input file. ++The \fBenable\fR and \fBdisable\fR options forcibly enable or disable ++the use of long section names in the output object; when \fBdisable\fR ++is in effect, any long section names in the input object will be truncated. ++The \fBenable\fR option will only emit long section names if any are ++present in the inputs; this is mostly the same as \fBkeep\fR, but it ++is left undefined whether the \fBenable\fR option might force the ++creation of an empty string table in the output file. ++.IP "\fB\-\-change\-leading\-char\fR" 4 ++.IX Item "--change-leading-char" ++Some object file formats use special characters at the start of ++symbols. The most common such character is underscore, which compilers ++often add before every symbol. This option tells \fBobjcopy\fR to ++change the leading character of every symbol when it converts between ++object file formats. If the object file formats use the same leading ++character, this option has no effect. Otherwise, it will add a ++character, or remove a character, or change a character, as ++appropriate. ++.IP "\fB\-\-remove\-leading\-char\fR" 4 ++.IX Item "--remove-leading-char" ++If the first character of a global symbol is a special symbol leading ++character used by the object file format, remove the character. The ++most common symbol leading character is underscore. This option will ++remove a leading underscore from all global symbols. This can be useful ++if you want to link together objects of different file formats with ++different conventions for symbol names. This is different from ++\&\fB\-\-change\-leading\-char\fR because it always changes the symbol name ++when appropriate, regardless of the object file format of the output ++file. ++.IP "\fB\-\-reverse\-bytes=\fR\fInum\fR" 4 ++.IX Item "--reverse-bytes=num" ++Reverse the bytes in a section with output contents. A section length must ++be evenly divisible by the value given in order for the swap to be able to ++take place. Reversing takes place before the interleaving is performed. ++.Sp ++This option is used typically in generating \s-1ROM\s0 images for problematic ++target systems. For example, on some target boards, the 32\-bit words ++fetched from 8\-bit ROMs are re-assembled in little-endian byte order ++regardless of the \s-1CPU\s0 byte order. Depending on the programming model, the ++endianness of the \s-1ROM\s0 may need to be modified. ++.Sp ++Consider a simple file with a section containing the following eight ++bytes: \f(CW12345678\fR. ++.Sp ++Using \fB\-\-reverse\-bytes=2\fR for the above example, the bytes in the ++output file would be ordered \f(CW21436587\fR. ++.Sp ++Using \fB\-\-reverse\-bytes=4\fR for the above example, the bytes in the ++output file would be ordered \f(CW43218765\fR. ++.Sp ++By using \fB\-\-reverse\-bytes=2\fR for the above example, followed by ++\&\fB\-\-reverse\-bytes=4\fR on the output file, the bytes in the second ++output file would be ordered \f(CW34127856\fR. ++.IP "\fB\-\-srec\-len=\fR\fIival\fR" 4 ++.IX Item "--srec-len=ival" ++Meaningful only for srec output. Set the maximum length of the Srecords ++being produced to \fIival\fR. This length covers both address, data and ++crc fields. ++.IP "\fB\-\-srec\-forceS3\fR" 4 ++.IX Item "--srec-forceS3" ++Meaningful only for srec output. Avoid generation of S1/S2 records, ++creating S3\-only record format. ++.IP "\fB\-\-redefine\-sym\fR \fIold\fR\fB=\fR\fInew\fR" 4 ++.IX Item "--redefine-sym old=new" ++Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful ++when one is trying link two things together for which you have no ++source, and there are name collisions. ++.IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4 ++.IX Item "--redefine-syms=filename" ++Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR" ++listed in the file \fIfilename\fR. \fIfilename\fR is simply a flat file, ++with one symbol pair per line. Line comments may be introduced by the hash ++character. This option may be given more than once. ++.IP "\fB\-\-weaken\fR" 4 ++.IX Item "--weaken" ++Change all global symbols in the file to be weak. This can be useful ++when building an object which will be linked against other objects using ++the \fB\-R\fR option to the linker. This option is only effective when ++using an object file format which supports weak symbols. ++.IP "\fB\-\-keep\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--keep-symbols=filename" ++Apply \fB\-\-keep\-symbol\fR option to each symbol listed in the file ++\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol ++name per line. Line comments may be introduced by the hash character. ++This option may be given more than once. ++.IP "\fB\-\-strip\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--strip-symbols=filename" ++Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file ++\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol ++name per line. Line comments may be introduced by the hash character. ++This option may be given more than once. ++.IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--strip-unneeded-symbols=filename" ++Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in ++the file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one ++symbol name per line. Line comments may be introduced by the hash ++character. This option may be given more than once. ++.IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--keep-global-symbols=filename" ++Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the ++file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one ++symbol name per line. Line comments may be introduced by the hash ++character. This option may be given more than once. ++.IP "\fB\-\-localize\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--localize-symbols=filename" ++Apply \fB\-\-localize\-symbol\fR option to each symbol listed in the file ++\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol ++name per line. Line comments may be introduced by the hash character. ++This option may be given more than once. ++.IP "\fB\-\-globalize\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--globalize-symbols=filename" ++Apply \fB\-\-globalize\-symbol\fR option to each symbol listed in the file ++\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol ++name per line. Line comments may be introduced by the hash character. ++This option may be given more than once. Note: this option cannot be ++used in conjunction with the \fB\-G\fR or \fB\-\-keep\-global\-symbol\fR ++options. ++.IP "\fB\-\-weaken\-symbols=\fR\fIfilename\fR" 4 ++.IX Item "--weaken-symbols=filename" ++Apply \fB\-\-weaken\-symbol\fR option to each symbol listed in the file ++\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol ++name per line. Line comments may be introduced by the hash character. ++This option may be given more than once. ++.IP "\fB\-\-alt\-machine\-code=\fR\fIindex\fR" 4 ++.IX Item "--alt-machine-code=index" ++If the output architecture has alternate machine codes, use the ++\&\fIindex\fRth code instead of the default one. This is useful in case ++a machine is assigned an official code and the tool-chain adopts the ++new code, but other applications still depend on the original code ++being used. For \s-1ELF\s0 based architectures if the \fIindex\fR ++alternative does not exist then the value is treated as an absolute ++number to be stored in the e_machine field of the \s-1ELF\s0 header. ++.IP "\fB\-\-writable\-text\fR" 4 ++.IX Item "--writable-text" ++Mark the output text as writable. This option isn't meaningful for all ++object file formats. ++.IP "\fB\-\-readonly\-text\fR" 4 ++.IX Item "--readonly-text" ++Make the output text write protected. This option isn't meaningful for all ++object file formats. ++.IP "\fB\-\-pure\fR" 4 ++.IX Item "--pure" ++Mark the output file as demand paged. This option isn't meaningful for all ++object file formats. ++.IP "\fB\-\-impure\fR" 4 ++.IX Item "--impure" ++Mark the output file as impure. This option isn't meaningful for all ++object file formats. ++.IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4 ++.IX Item "--prefix-symbols=string" ++Prefix all symbols in the output file with \fIstring\fR. ++.IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4 ++.IX Item "--prefix-sections=string" ++Prefix all section names in the output file with \fIstring\fR. ++.IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4 ++.IX Item "--prefix-alloc-sections=string" ++Prefix all the names of all allocated sections in the output file with ++\&\fIstring\fR. ++.IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4 ++.IX Item "--add-gnu-debuglink=path-to-file" ++Creates a .gnu_debuglink section which contains a reference to ++\&\fIpath-to-file\fR and adds it to the output file. Note: the file at ++\&\fIpath-to-file\fR must exist. Part of the process of adding the ++\&.gnu_debuglink section involves embedding a checksum of the contents ++of the debug info file into the section. ++.Sp ++If the debug info file is built in one location but it is going to be ++installed at a later time into a different location then do not use ++the path to the installed location. The \fB\-\-add\-gnu\-debuglink\fR ++option will fail because the installed file does not exist yet. ++Instead put the debug info file in the current directory and use the ++\&\fB\-\-add\-gnu\-debuglink\fR option without any directory components, ++like this: ++.Sp ++.Vb 1 ++\& objcopy \-\-add\-gnu\-debuglink=foo.debug ++.Ve ++.Sp ++At debug time the debugger will attempt to look for the separate debug ++info file in a set of known locations. The exact set of these ++locations varies depending upon the distribution being used, but it ++typically includes: ++.RS 4 ++.ie n .IP """* The same directory as the executable.""" 4 ++.el .IP "\f(CW* The same directory as the executable.\fR" 4 ++.IX Item "* The same directory as the executable." ++.PD 0 ++.ie n .IP """* A sub\-directory of the directory containing the executable""" 4 ++.el .IP "\f(CW* A sub\-directory of the directory containing the executable\fR" 4 ++.IX Item "* A sub-directory of the directory containing the executable" ++.PD ++called .debug ++.ie n .IP """* A global debug directory such as /usr/lib/debug.""" 4 ++.el .IP "\f(CW* A global debug directory such as /usr/lib/debug.\fR" 4 ++.IX Item "* A global debug directory such as /usr/lib/debug." ++.RE ++.RS 4 ++.Sp ++As long as the debug info file has been installed into one of these ++locations before the debugger is run everything should work ++correctly. ++.RE ++.IP "\fB\-\-keep\-file\-symbols\fR" 4 ++.IX Item "--keep-file-symbols" ++When stripping a file, perhaps with \fB\-\-strip\-debug\fR or ++\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names, ++which would otherwise get stripped. ++.IP "\fB\-\-only\-keep\-debug\fR" 4 ++.IX Item "--only-keep-debug" ++Strip a file, removing contents of any sections that would not be ++stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections ++intact. In \s-1ELF\s0 files, this preserves all note sections in the output. ++.Sp ++Note \- the section headers of the stripped sections are preserved, ++including their sizes, but the contents of the section are discarded. ++The section headers are preserved so that other tools can match up the ++debuginfo file with the real executable, even if that executable has ++been relocated to a different address space. ++.Sp ++The intention is that this option will be used in conjunction with ++\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a ++stripped binary which will occupy less space in \s-1RAM\s0 and in a ++distribution and the second a debugging information file which is only ++needed if debugging abilities are required. The suggested procedure ++to create these files is as follows: ++.RS 4 ++.IP "1." 4 ++.IX Item "1." ++\&\f(CW\*(C`foo\*(C'\fR then... ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++create a file containing the debugging info. ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++stripped executable. ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++to add a link to the debugging info into the stripped executable. ++.RE ++.RS 4 ++.Sp ++Note\-\-\-the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info ++file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is ++optional. You could instead do this: ++.IP "1." 4 ++.IX Item "1." ++.PD 0 ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.RE ++.RS 4 ++.PD ++.Sp ++i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the ++full executable. It does not have to be a file created by the ++\&\fB\-\-only\-keep\-debug\fR switch. ++.Sp ++Note\-\-\-this switch is only intended for use on fully linked files. It ++does not make sense to use it on object files where the debugging ++information may be incomplete. Besides the gnu_debuglink feature ++currently only supports the presence of one filename containing ++debugging information, not multiple filenames on a one-per-object-file ++basis. ++.RE ++.IP "\fB\-\-strip\-dwo\fR" 4 ++.IX Item "--strip-dwo" ++Remove the contents of all \s-1DWARF\s0 .dwo sections, leaving the ++remaining debugging sections and all symbols intact. ++This option is intended for use by the compiler as part of ++the \fB\-gsplit\-dwarf\fR option, which splits debug information ++between the .o file and a separate .dwo file. The compiler ++generates all debug information in the same file, then uses ++the \fB\-\-extract\-dwo\fR option to copy the .dwo sections to ++the .dwo file, then the \fB\-\-strip\-dwo\fR option to remove ++those sections from the original .o file. ++.IP "\fB\-\-extract\-dwo\fR" 4 ++.IX Item "--extract-dwo" ++Extract the contents of all \s-1DWARF\s0 .dwo sections. See the ++\&\fB\-\-strip\-dwo\fR option for more information. ++.IP "\fB\-\-file\-alignment\fR \fInum\fR" 4 ++.IX Item "--file-alignment num" ++Specify the file alignment. Sections in the file will always begin at ++file offsets which are multiples of this number. This defaults to ++512. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-heap\fR \fIreserve\fR" 4 ++.IX Item "--heap reserve" ++.PD 0 ++.IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4 ++.IX Item "--heap reserve,commit" ++.PD ++Specify the number of bytes of memory to reserve (and optionally commit) ++to be used as heap for this program. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-image\-base\fR \fIvalue\fR" 4 ++.IX Item "--image-base value" ++Use \fIvalue\fR as the base address of your program or dll. This is ++the lowest memory location that will be used when your program or dll ++is loaded. To reduce the need to relocate and improve performance of ++your dlls, each should have a unique base address and not overlap any ++other dlls. The default is 0x400000 for executables, and 0x10000000 ++for dlls. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-section\-alignment\fR \fInum\fR" 4 ++.IX Item "--section-alignment num" ++Sets the section alignment field in the \s-1PE\s0 header. Sections in memory ++will always begin at addresses which are a multiple of this number. ++Defaults to 0x1000. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-stack\fR \fIreserve\fR" 4 ++.IX Item "--stack reserve" ++.PD 0 ++.IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4 ++.IX Item "--stack reserve,commit" ++.PD ++Specify the number of bytes of memory to reserve (and optionally commit) ++to be used as stack for this program. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-subsystem\fR \fIwhich\fR" 4 ++.IX Item "--subsystem which" ++.PD 0 ++.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4 ++.IX Item "--subsystem which:major" ++.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4 ++.IX Item "--subsystem which:major.minor" ++.PD ++Specifies the subsystem under which your program will execute. The ++legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR, ++\&\f(CW\*(C`console\*(C'\fR, \f(CW\*(C`posix\*(C'\fR, \f(CW\*(C`efi\-app\*(C'\fR, \f(CW\*(C`efi\-bsd\*(C'\fR, ++\&\f(CW\*(C`efi\-rtd\*(C'\fR, \f(CW\*(C`sal\-rtd\*(C'\fR, and \f(CW\*(C`xbox\*(C'\fR. You may optionally set ++the subsystem version also. Numeric values are also accepted for ++\&\fIwhich\fR. ++[This option is specific to \s-1PE\s0 targets.] ++.IP "\fB\-\-extract\-symbol\fR" 4 ++.IX Item "--extract-symbol" ++Keep the file's section flags and symbols but remove all section data. ++Specifically, the option: ++.RS 4 ++.IP "*" 4 ++.IX Item "*" ++.PD 0 ++.IP "*" 4 ++.IX Item "*" ++.IP "*" 4 ++.IX Item "*" ++.RE ++.RS 4 ++.PD ++.Sp ++This option is used to build a \fI.sym\fR file for a VxWorks kernel. ++It can also be a useful way of reducing the size of a \fB\-\-just\-symbols\fR ++linker input file. ++.RE ++.IP "\fB\-\-compress\-debug\-sections\fR" 4 ++.IX Item "--compress-debug-sections" ++Compress \s-1DWARF\s0 debug sections using zlib with \s-1SHF_COMPRESSED\s0 from the ++\&\s-1ELF ABI.\s0 Note \- if compression would actually make a section ++\&\fIlarger\fR, then it is not compressed. ++.IP "\fB\-\-compress\-debug\-sections=none\fR" 4 ++.IX Item "--compress-debug-sections=none" ++.PD 0 ++.IP "\fB\-\-compress\-debug\-sections=zlib\fR" 4 ++.IX Item "--compress-debug-sections=zlib" ++.IP "\fB\-\-compress\-debug\-sections=zlib\-gnu\fR" 4 ++.IX Item "--compress-debug-sections=zlib-gnu" ++.IP "\fB\-\-compress\-debug\-sections=zlib\-gabi\fR" 4 ++.IX Item "--compress-debug-sections=zlib-gabi" ++.PD ++For \s-1ELF\s0 files, these options control how \s-1DWARF\s0 debug sections are ++compressed. \fB\-\-compress\-debug\-sections=none\fR is equivalent ++to \fB\-\-decompress\-debug\-sections\fR. ++\&\fB\-\-compress\-debug\-sections=zlib\fR and ++\&\fB\-\-compress\-debug\-sections=zlib\-gabi\fR are equivalent to ++\&\fB\-\-compress\-debug\-sections\fR. ++\&\fB\-\-compress\-debug\-sections=zlib\-gnu\fR compresses \s-1DWARF\s0 debug ++sections using zlib. The debug sections are renamed to begin with ++\&\fB.zdebug\fR instead of \fB.debug\fR. Note \- if compression would ++actually make a section \fIlarger\fR, then it is not compressed nor ++renamed. ++.IP "\fB\-\-decompress\-debug\-sections\fR" 4 ++.IX Item "--decompress-debug-sections" ++Decompress \s-1DWARF\s0 debug sections using zlib. The original section ++names of the compressed sections are restored. ++.IP "\fB\-\-elf\-stt\-common=yes\fR" 4 ++.IX Item "--elf-stt-common=yes" ++.PD 0 ++.IP "\fB\-\-elf\-stt\-common=no\fR" 4 ++.IX Item "--elf-stt-common=no" ++.PD ++For \s-1ELF\s0 files, these options control whether common symbols should be ++converted to the \f(CW\*(C`STT_COMMON\*(C'\fR or \f(CW\*(C`STT_OBJECT\*(C'\fR type. ++\&\fB\-\-elf\-stt\-common=yes\fR converts common symbol type to ++\&\f(CW\*(C`STT_COMMON\*(C'\fR. \fB\-\-elf\-stt\-common=no\fR converts common symbol ++type to \f(CW\*(C`STT_OBJECT\*(C'\fR. ++.IP "\fB\-\-merge\-notes\fR" 4 ++.IX Item "--merge-notes" ++.PD 0 ++.IP "\fB\-\-no\-merge\-notes\fR" 4 ++.IX Item "--no-merge-notes" ++.PD ++For \s-1ELF\s0 files, attempt (or do not attempt) to reduce the size of any ++\&\s-1SHT_NOTE\s0 type sections by removing duplicate notes. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Show the version number of \fBobjcopy\fR. ++.IP "\fB\-\-verilog\-data\-width=\fR\fIbytes\fR" 4 ++.IX Item "--verilog-data-width=bytes" ++For Verilog output, this options controls the number of bytes ++converted for each output data element. The input target controls the ++endianness of the conversion. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-verbose\fR" 4 ++.IX Item "--verbose" ++.PD ++Verbose output: list all object files modified. In the case of ++archives, \fBobjcopy \-V\fR lists all members of the archive. ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Show a summary of the options to \fBobjcopy\fR. ++.IP "\fB\-\-info\fR" 4 ++.IX Item "--info" ++Display a list showing all architectures and object formats available. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBld\fR\|(1), \fBobjdump\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/objdump.1 b/binutils/doc/objdump.1 +--- a/binutils/doc/objdump.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/objdump.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,1310 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "OBJDUMP 1" ++.TH OBJDUMP 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++objdump \- display information from object files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++objdump [\fB\-a\fR|\fB\-\-archive\-headers\fR] ++ [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] ++ [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR] ] ++ [\fB\-d\fR|\fB\-\-disassemble\fR[=\fIsymbol\fR]] ++ [\fB\-D\fR|\fB\-\-disassemble\-all\fR] ++ [\fB\-z\fR|\fB\-\-disassemble\-zeroes\fR] ++ [\fB\-EB\fR|\fB\-EL\fR|\fB\-\-endian=\fR{big | little }] ++ [\fB\-f\fR|\fB\-\-file\-headers\fR] ++ [\fB\-F\fR|\fB\-\-file\-offsets\fR] ++ [\fB\-\-file\-start\-context\fR] ++ [\fB\-g\fR|\fB\-\-debugging\fR] ++ [\fB\-e\fR|\fB\-\-debugging\-tags\fR] ++ [\fB\-h\fR|\fB\-\-section\-headers\fR|\fB\-\-headers\fR] ++ [\fB\-i\fR|\fB\-\-info\fR] ++ [\fB\-j\fR \fIsection\fR|\fB\-\-section=\fR\fIsection\fR] ++ [\fB\-l\fR|\fB\-\-line\-numbers\fR] ++ [\fB\-S\fR|\fB\-\-source\fR] ++ [\fB\-\-source\-comment\fR[=\fItext\fR]] ++ [\fB\-m\fR \fImachine\fR|\fB\-\-architecture=\fR\fImachine\fR] ++ [\fB\-M\fR \fIoptions\fR|\fB\-\-disassembler\-options=\fR\fIoptions\fR] ++ [\fB\-p\fR|\fB\-\-private\-headers\fR] ++ [\fB\-P\fR \fIoptions\fR|\fB\-\-private=\fR\fIoptions\fR] ++ [\fB\-r\fR|\fB\-\-reloc\fR] ++ [\fB\-R\fR|\fB\-\-dynamic\-reloc\fR] ++ [\fB\-s\fR|\fB\-\-full\-contents\fR] ++ [\fB\-W[lLiaprmfFsoRtUuTgAckK]\fR| ++ \fB\-\-dwarf\fR[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow\-links]] ++ [\fB\-\-ctf=\fR\fIsection\fR] ++ [\fB\-G\fR|\fB\-\-stabs\fR] ++ [\fB\-t\fR|\fB\-\-syms\fR] ++ [\fB\-T\fR|\fB\-\-dynamic\-syms\fR] ++ [\fB\-x\fR|\fB\-\-all\-headers\fR] ++ [\fB\-w\fR|\fB\-\-wide\fR] ++ [\fB\-\-start\-address=\fR\fIaddress\fR] ++ [\fB\-\-stop\-address=\fR\fIaddress\fR] ++ [\fB\-\-prefix\-addresses\fR] ++ [\fB\-\-[no\-]show\-raw\-insn\fR] ++ [\fB\-\-adjust\-vma=\fR\fIoffset\fR] ++ [\fB\-\-dwarf\-depth=\fR\fIn\fR] ++ [\fB\-\-dwarf\-start=\fR\fIn\fR] ++ [\fB\-\-ctf\-parent=\fR\fIsection\fR] ++ [\fB\-\-no\-recurse\-limit\fR|\fB\-\-recurse\-limit\fR] ++ [\fB\-\-special\-syms\fR] ++ [\fB\-\-prefix=\fR\fIprefix\fR] ++ [\fB\-\-prefix\-strip=\fR\fIlevel\fR] ++ [\fB\-\-insn\-width=\fR\fIwidth\fR] ++ [\fB\-\-visualize\-jumps[=color|=extended\-color|=off]\fR ++ [\fB\-V\fR|\fB\-\-version\fR] ++ [\fB\-H\fR|\fB\-\-help\fR] ++ \fIobjfile\fR... ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBobjdump\fR displays information about one or more object files. ++The options control what particular information to display. This ++information is mostly useful to programmers who are working on the ++compilation tools, as opposed to programmers who just want their ++program to compile and work. ++.PP ++\&\fIobjfile\fR... are the object files to be examined. When you ++specify archives, \fBobjdump\fR shows information on each of the member ++object files. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The long and short forms of options, shown here as alternatives, are ++equivalent. At least one option from the list ++\&\fB\-a,\-d,\-D,\-e,\-f,\-g,\-G,\-h,\-H,\-p,\-P,\-r,\-R,\-s,\-S,\-t,\-T,\-V,\-x\fR must be given. ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-archive\-header\fR" 4 ++.IX Item "--archive-header" ++.PD ++If any of the \fIobjfile\fR files are archives, display the archive ++header information (in a format similar to \fBls \-l\fR). Besides the ++information you could list with \fBar tv\fR, \fBobjdump \-a\fR shows ++the object file format of each archive member. ++.IP "\fB\-\-adjust\-vma=\fR\fIoffset\fR" 4 ++.IX Item "--adjust-vma=offset" ++When dumping information, first add \fIoffset\fR to all the section ++addresses. This is useful if the section addresses do not correspond to ++the symbol table, which can happen when putting sections at particular ++addresses when using a format which can not represent section addresses, ++such as a.out. ++.IP "\fB\-b\fR \fIbfdname\fR" 4 ++.IX Item "-b bfdname" ++.PD 0 ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++.PD ++Specify that the object-code format for the object files is ++\&\fIbfdname\fR. This option may not be necessary; \fIobjdump\fR can ++automatically recognize many formats. ++.Sp ++For example, ++.Sp ++.Vb 1 ++\& objdump \-b oasys \-m vax \-h fu.o ++.Ve ++.Sp ++displays summary information from the section headers (\fB\-h\fR) of ++\&\fIfu.o\fR, which is explicitly identified (\fB\-m\fR) as a \s-1VAX\s0 object ++file in the format produced by Oasys compilers. You can list the ++formats available with the \fB\-i\fR option. ++.IP "\fB\-C\fR" 4 ++.IX Item "-C" ++.PD 0 ++.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4 ++.IX Item "--demangle[=style]" ++.PD ++Decode (\fIdemangle\fR) low-level symbol names into user-level names. ++Besides removing any initial underscore prepended by the system, this ++makes \*(C+ function names readable. Different compilers have different ++mangling styles. The optional demangling style argument can be used to ++choose an appropriate demangling style for your compiler. ++.IP "\fB\-\-recurse\-limit\fR" 4 ++.IX Item "--recurse-limit" ++.PD 0 ++.IP "\fB\-\-no\-recurse\-limit\fR" 4 ++.IX Item "--no-recurse-limit" ++.IP "\fB\-\-recursion\-limit\fR" 4 ++.IX Item "--recursion-limit" ++.IP "\fB\-\-no\-recursion\-limit\fR" 4 ++.IX Item "--no-recursion-limit" ++.PD ++Enables or disables a limit on the amount of recursion performed ++whilst demangling strings. Since the name mangling formats allow for ++an inifinite level of recursion it is possible to create strings whose ++decoding will exhaust the amount of stack space available on the host ++machine, triggering a memory fault. The limit tries to prevent this ++from happening by restricting recursion to 2048 levels of nesting. ++.Sp ++The default is for this limit to be enabled, but disabling it may be ++necessary in order to demangle truly complicated names. Note however ++that if the recursion limit is disabled then stack exhaustion is ++possible and any bug reports about such an event will be rejected. ++.IP "\fB\-g\fR" 4 ++.IX Item "-g" ++.PD 0 ++.IP "\fB\-\-debugging\fR" 4 ++.IX Item "--debugging" ++.PD ++Display debugging information. This attempts to parse \s-1STABS\s0 ++debugging format information stored in the file and print it out using ++a C like syntax. If no \s-1STABS\s0 debuging was found this option ++falls back on the \fB\-W\fR option to print any \s-1DWARF\s0 information in ++the file. ++.IP "\fB\-e\fR" 4 ++.IX Item "-e" ++.PD 0 ++.IP "\fB\-\-debugging\-tags\fR" 4 ++.IX Item "--debugging-tags" ++.PD ++Like \fB\-g\fR, but the information is generated in a format compatible ++with ctags tool. ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.PD 0 ++.IP "\fB\-\-disassemble\fR" 4 ++.IX Item "--disassemble" ++.IP "\fB\-\-disassemble=\fR\fIsymbol\fR" 4 ++.IX Item "--disassemble=symbol" ++.PD ++Display the assembler mnemonics for the machine instructions from the ++input file. This option only disassembles those sections which are ++expected to contain instructions. If the optional \fIsymbol\fR ++argument is given, then display the assembler mnemonics starting at ++\&\fIsymbol\fR. If \fIsymbol\fR is a function name then disassembly ++will stop at the end of the function, otherwise it will stop when the ++next symbol is encountered. If there are no matches for \fIsymbol\fR ++then nothing will be displayed. ++.Sp ++Note if the \fB\-\-dwarf=follow\-links\fR option has also been enabled ++then any symbol tables in linked debug info files will be read in and ++used when disassembling. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++.PD 0 ++.IP "\fB\-\-disassemble\-all\fR" 4 ++.IX Item "--disassemble-all" ++.PD ++Like \fB\-d\fR, but disassemble the contents of all sections, not just ++those expected to contain instructions. ++.Sp ++This option also has a subtle effect on the disassembly of ++instructions in code sections. When option \fB\-d\fR is in effect ++objdump will assume that any symbols present in a code section occur ++on the boundary between instructions and it will refuse to disassemble ++across such a boundary. When option \fB\-D\fR is in effect however ++this assumption is supressed. This means that it is possible for the ++output of \fB\-d\fR and \fB\-D\fR to differ if, for example, data ++is stored in code sections. ++.Sp ++If the target is an \s-1ARM\s0 architecture this switch also has the effect ++of forcing the disassembler to decode pieces of data found in code ++sections as if they were instructions. ++.Sp ++Note if the \fB\-\-dwarf=follow\-links\fR option has also been enabled ++then any symbol tables in linked debug info files will be read in and ++used when disassembling. ++.IP "\fB\-\-prefix\-addresses\fR" 4 ++.IX Item "--prefix-addresses" ++When disassembling, print the complete address on each line. This is ++the older disassembly format. ++.IP "\fB\-EB\fR" 4 ++.IX Item "-EB" ++.PD 0 ++.IP "\fB\-EL\fR" 4 ++.IX Item "-EL" ++.IP "\fB\-\-endian={big|little}\fR" 4 ++.IX Item "--endian={big|little}" ++.PD ++Specify the endianness of the object files. This only affects ++disassembly. This can be useful when disassembling a file format which ++does not describe endianness information, such as S\-records. ++.IP "\fB\-f\fR" 4 ++.IX Item "-f" ++.PD 0 ++.IP "\fB\-\-file\-headers\fR" 4 ++.IX Item "--file-headers" ++.PD ++Display summary information from the overall header of ++each of the \fIobjfile\fR files. ++.IP "\fB\-F\fR" 4 ++.IX Item "-F" ++.PD 0 ++.IP "\fB\-\-file\-offsets\fR" 4 ++.IX Item "--file-offsets" ++.PD ++When disassembling sections, whenever a symbol is displayed, also ++display the file offset of the region of data that is about to be ++dumped. If zeroes are being skipped, then when disassembly resumes, ++tell the user how many zeroes were skipped and the file offset of the ++location from where the disassembly resumes. When dumping sections, ++display the file offset of the location from where the dump starts. ++.IP "\fB\-\-file\-start\-context\fR" 4 ++.IX Item "--file-start-context" ++Specify that when displaying interlisted source code/disassembly ++(assumes \fB\-S\fR) from a file that has not yet been displayed, extend the ++context to the start of the file. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-section\-headers\fR" 4 ++.IX Item "--section-headers" ++.IP "\fB\-\-headers\fR" 4 ++.IX Item "--headers" ++.PD ++Display summary information from the section headers of the ++object file. ++.Sp ++File segments may be relocated to nonstandard addresses, for example by ++using the \fB\-Ttext\fR, \fB\-Tdata\fR, or \fB\-Tbss\fR options to ++\&\fBld\fR. However, some object file formats, such as a.out, do not ++store the starting address of the file segments. In those situations, ++although \fBld\fR relocates the sections correctly, using \fBobjdump ++\&\-h\fR to list the file section headers cannot show the correct addresses. ++Instead, it shows the usual addresses, which are implicit for the ++target. ++.Sp ++Note, in some cases it is possible for a section to have both the ++\&\s-1READONLY\s0 and the \s-1NOREAD\s0 attributes set. In such cases the \s-1NOREAD\s0 ++attribute takes precedence, but \fBobjdump\fR will report both ++since the exact setting of the flag bits might be important. ++.IP "\fB\-H\fR" 4 ++.IX Item "-H" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Print a summary of the options to \fBobjdump\fR and exit. ++.IP "\fB\-i\fR" 4 ++.IX Item "-i" ++.PD 0 ++.IP "\fB\-\-info\fR" 4 ++.IX Item "--info" ++.PD ++Display a list showing all architectures and object formats available ++for specification with \fB\-b\fR or \fB\-m\fR. ++.IP "\fB\-j\fR \fIname\fR" 4 ++.IX Item "-j name" ++.PD 0 ++.IP "\fB\-\-section=\fR\fIname\fR" 4 ++.IX Item "--section=name" ++.PD ++Display information only for section \fIname\fR. ++.IP "\fB\-l\fR" 4 ++.IX Item "-l" ++.PD 0 ++.IP "\fB\-\-line\-numbers\fR" 4 ++.IX Item "--line-numbers" ++.PD ++Label the display (using debugging information) with the filename and ++source line numbers corresponding to the object code or relocs shown. ++Only useful with \fB\-d\fR, \fB\-D\fR, or \fB\-r\fR. ++.IP "\fB\-m\fR \fImachine\fR" 4 ++.IX Item "-m machine" ++.PD 0 ++.IP "\fB\-\-architecture=\fR\fImachine\fR" 4 ++.IX Item "--architecture=machine" ++.PD ++Specify the architecture to use when disassembling object files. This ++can be useful when disassembling object files which do not describe ++architecture information, such as S\-records. You can list the available ++architectures with the \fB\-i\fR option. ++.Sp ++If the target is an \s-1ARM\s0 architecture then this switch has an ++additional effect. It restricts the disassembly to only those ++instructions supported by the architecture specified by \fImachine\fR. ++If it is necessary to use this switch because the input file does not ++contain any architecture information, but it is also desired to ++disassemble all the instructions use \fB\-marm\fR. ++.IP "\fB\-M\fR \fIoptions\fR" 4 ++.IX Item "-M options" ++.PD 0 ++.IP "\fB\-\-disassembler\-options=\fR\fIoptions\fR" 4 ++.IX Item "--disassembler-options=options" ++.PD ++Pass target specific information to the disassembler. Only supported on ++some targets. If it is necessary to specify more than one ++disassembler option then multiple \fB\-M\fR options can be used or ++can be placed together into a comma separated list. ++.Sp ++For \s-1ARC,\s0 \fBdsp\fR controls the printing of \s-1DSP\s0 instructions, ++\&\fBspfp\fR selects the printing of \s-1FPX\s0 single precision \s-1FP\s0 ++instructions, \fBdpfp\fR selects the printing of \s-1FPX\s0 double ++precision \s-1FP\s0 instructions, \fBquarkse_em\fR selects the printing of ++special QuarkSE-EM instructions, \fBfpuda\fR selects the printing ++of double precision assist instructions, \fBfpus\fR selects the ++printing of \s-1FPU\s0 single precision \s-1FP\s0 instructions, while \fBfpud\fR ++selects the printing of \s-1FPU\s0 double precision \s-1FP\s0 instructions. ++Additionally, one can choose to have all the immediates printed in ++hexadecimal using \fBhex\fR. By default, the short immediates are ++printed using the decimal representation, while the long immediate ++values are printed as hexadecimal. ++.Sp ++\&\fBcpu=...\fR allows to enforce a particular \s-1ISA\s0 when disassembling ++instructions, overriding the \fB\-m\fR value or whatever is in the \s-1ELF\s0 file. ++This might be useful to select \s-1ARC EM\s0 or \s-1HS ISA,\s0 because architecture is same ++for those and disassembler relies on private \s-1ELF\s0 header data to decide if code ++is for \s-1EM\s0 or \s-1HS.\s0 This option might be specified multiple times \- only the ++latest value will be used. Valid values are same as for the assembler ++\&\fB\-mcpu=...\fR option. ++.Sp ++If the target is an \s-1ARM\s0 architecture then this switch can be used to ++select which register name set is used during disassembler. Specifying ++\&\fB\-M reg-names-std\fR (the default) will select the register names as ++used in \s-1ARM\s0's instruction set documentation, but with register 13 called ++\&'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying ++\&\fB\-M reg-names-apcs\fR will select the name set used by the \s-1ARM\s0 ++Procedure Call Standard, whilst specifying \fB\-M reg-names-raw\fR will ++just use \fBr\fR followed by the register number. ++.Sp ++There are also two variants on the \s-1APCS\s0 register naming scheme enabled ++by \fB\-M reg-names-atpcs\fR and \fB\-M reg-names-special-atpcs\fR which ++use the ARM/Thumb Procedure Call Standard naming conventions. (Either ++with the normal register names or the special register names). ++.Sp ++This option can also be used for \s-1ARM\s0 architectures to force the ++disassembler to interpret all instructions as Thumb instructions by ++using the switch \fB\-\-disassembler\-options=force\-thumb\fR. This can be ++useful when attempting to disassemble thumb code produced by other ++compilers. ++.Sp ++For AArch64 targets this switch can be used to set whether instructions are ++disassembled as the most general instruction using the \fB\-M no-aliases\fR ++option or whether instruction notes should be generated as comments in the ++disasssembly using \fB\-M notes\fR. ++.Sp ++For the x86, some of the options duplicate functions of the \fB\-m\fR ++switch, but allow finer grained control. Multiple selections from the ++following may be specified as a comma separated string. ++.RS 4 ++.ie n .IP """x86\-64""" 4 ++.el .IP "\f(CWx86\-64\fR" 4 ++.IX Item "x86-64" ++.PD 0 ++.ie n .IP """i386""" 4 ++.el .IP "\f(CWi386\fR" 4 ++.IX Item "i386" ++.ie n .IP """i8086""" 4 ++.el .IP "\f(CWi8086\fR" 4 ++.IX Item "i8086" ++.PD ++Select disassembly for the given architecture. ++.ie n .IP """intel""" 4 ++.el .IP "\f(CWintel\fR" 4 ++.IX Item "intel" ++.PD 0 ++.ie n .IP """att""" 4 ++.el .IP "\f(CWatt\fR" 4 ++.IX Item "att" ++.PD ++Select between intel syntax mode and \s-1AT&T\s0 syntax mode. ++.ie n .IP """amd64""" 4 ++.el .IP "\f(CWamd64\fR" 4 ++.IX Item "amd64" ++.PD 0 ++.ie n .IP """intel64""" 4 ++.el .IP "\f(CWintel64\fR" 4 ++.IX Item "intel64" ++.PD ++Select between \s-1AMD64 ISA\s0 and Intel64 \s-1ISA.\s0 ++.ie n .IP """intel\-mnemonic""" 4 ++.el .IP "\f(CWintel\-mnemonic\fR" 4 ++.IX Item "intel-mnemonic" ++.PD 0 ++.ie n .IP """att\-mnemonic""" 4 ++.el .IP "\f(CWatt\-mnemonic\fR" 4 ++.IX Item "att-mnemonic" ++.PD ++Select between intel mnemonic mode and \s-1AT&T\s0 mnemonic mode. ++Note: \f(CW\*(C`intel\-mnemonic\*(C'\fR implies \f(CW\*(C`intel\*(C'\fR and ++\&\f(CW\*(C`att\-mnemonic\*(C'\fR implies \f(CW\*(C`att\*(C'\fR. ++.ie n .IP """addr64""" 4 ++.el .IP "\f(CWaddr64\fR" 4 ++.IX Item "addr64" ++.PD 0 ++.ie n .IP """addr32""" 4 ++.el .IP "\f(CWaddr32\fR" 4 ++.IX Item "addr32" ++.ie n .IP """addr16""" 4 ++.el .IP "\f(CWaddr16\fR" 4 ++.IX Item "addr16" ++.ie n .IP """data32""" 4 ++.el .IP "\f(CWdata32\fR" 4 ++.IX Item "data32" ++.ie n .IP """data16""" 4 ++.el .IP "\f(CWdata16\fR" 4 ++.IX Item "data16" ++.PD ++Specify the default address size and operand size. These five options ++will be overridden if \f(CW\*(C`x86\-64\*(C'\fR, \f(CW\*(C`i386\*(C'\fR or \f(CW\*(C`i8086\*(C'\fR ++appear later in the option string. ++.ie n .IP """suffix""" 4 ++.el .IP "\f(CWsuffix\fR" 4 ++.IX Item "suffix" ++When in \s-1AT&T\s0 mode, instructs the disassembler to print a mnemonic ++suffix even when the suffix could be inferred by the operands. ++.RE ++.RS 4 ++.Sp ++For PowerPC, the \fB\-M\fR argument \fBraw\fR selects ++disasssembly of hardware insns rather than aliases. For example, you ++will see \f(CW\*(C`rlwinm\*(C'\fR rather than \f(CW\*(C`clrlwi\*(C'\fR, and \f(CW\*(C`addi\*(C'\fR ++rather than \f(CW\*(C`li\*(C'\fR. All of the \fB\-m\fR arguments for ++\&\fBgas\fR that select a \s-1CPU\s0 are supported. These are: ++\&\fB403\fR, \fB405\fR, \fB440\fR, \fB464\fR, \fB476\fR, ++\&\fB601\fR, \fB603\fR, \fB604\fR, \fB620\fR, \fB7400\fR, ++\&\fB7410\fR, \fB7450\fR, \fB7455\fR, \fB750cl\fR, ++\&\fB821\fR, \fB850\fR, \fB860\fR, \fBa2\fR, \fBbooke\fR, ++\&\fBbooke32\fR, \fBcell\fR, \fBcom\fR, \fBe200z4\fR, ++\&\fBe300\fR, \fBe500\fR, \fBe500mc\fR, \fBe500mc64\fR, ++\&\fBe500x2\fR, \fBe5500\fR, \fBe6500\fR, \fBefs\fR, ++\&\fBpower4\fR, \fBpower5\fR, \fBpower6\fR, \fBpower7\fR, ++\&\fBpower8\fR, \fBpower9\fR, \fBppc\fR, \fBppc32\fR, ++\&\fBppc64\fR, \fBppc64bridge\fR, \fBppcps\fR, \fBpwr\fR, ++\&\fBpwr2\fR, \fBpwr4\fR, \fBpwr5\fR, \fBpwr5x\fR, ++\&\fBpwr6\fR, \fBpwr7\fR, \fBpwr8\fR, \fBpwr9\fR, ++\&\fBpwrx\fR, \fBtitan\fR, and \fBvle\fR. ++\&\fB32\fR and \fB64\fR modify the default or a prior \s-1CPU\s0 ++selection, disabling and enabling 64\-bit insns respectively. In ++addition, \fBaltivec\fR, \fBany\fR, \fBhtm\fR, \fBvsx\fR, ++and \fBspe\fR add capabilities to a previous \fIor later\fR \s-1CPU\s0 ++selection. \fBany\fR will disassemble any opcode known to ++binutils, but in cases where an opcode has two different meanings or ++different arguments, you may not see the disassembly you expect. ++If you disassemble without giving a \s-1CPU\s0 selection, a default will be ++chosen from information gleaned by \s-1BFD\s0 from the object files headers, ++but the result again may not be as you expect. ++.Sp ++For \s-1MIPS,\s0 this option controls the printing of instruction mnemonic ++names and register names in disassembled instructions. Multiple ++selections from the following may be specified as a comma separated ++string, and invalid options are ignored: ++.ie n .IP """no\-aliases""" 4 ++.el .IP "\f(CWno\-aliases\fR" 4 ++.IX Item "no-aliases" ++Print the 'raw' instruction mnemonic instead of some pseudo ++instruction mnemonic. I.e., print 'daddu' or 'or' instead of 'move', ++\&'sll' instead of 'nop', etc. ++.ie n .IP """msa""" 4 ++.el .IP "\f(CWmsa\fR" 4 ++.IX Item "msa" ++Disassemble \s-1MSA\s0 instructions. ++.ie n .IP """virt""" 4 ++.el .IP "\f(CWvirt\fR" 4 ++.IX Item "virt" ++Disassemble the virtualization \s-1ASE\s0 instructions. ++.ie n .IP """xpa""" 4 ++.el .IP "\f(CWxpa\fR" 4 ++.IX Item "xpa" ++Disassemble the eXtended Physical Address (\s-1XPA\s0) \s-1ASE\s0 instructions. ++.ie n .IP """gpr\-names=\fIABI\fP""" 4 ++.el .IP "\f(CWgpr\-names=\f(CIABI\f(CW\fR" 4 ++.IX Item "gpr-names=ABI" ++Print \s-1GPR\s0 (general-purpose register) names as appropriate ++for the specified \s-1ABI.\s0 By default, \s-1GPR\s0 names are selected according to ++the \s-1ABI\s0 of the binary being disassembled. ++.ie n .IP """fpr\-names=\fIABI\fP""" 4 ++.el .IP "\f(CWfpr\-names=\f(CIABI\f(CW\fR" 4 ++.IX Item "fpr-names=ABI" ++Print \s-1FPR\s0 (floating-point register) names as ++appropriate for the specified \s-1ABI.\s0 By default, \s-1FPR\s0 numbers are printed ++rather than names. ++.ie n .IP """cp0\-names=\fIARCH\fP""" 4 ++.el .IP "\f(CWcp0\-names=\f(CIARCH\f(CW\fR" 4 ++.IX Item "cp0-names=ARCH" ++Print \s-1CP0\s0 (system control coprocessor; coprocessor 0) register names ++as appropriate for the \s-1CPU\s0 or architecture specified by ++\&\fI\s-1ARCH\s0\fR. By default, \s-1CP0\s0 register names are selected according to ++the architecture and \s-1CPU\s0 of the binary being disassembled. ++.ie n .IP """hwr\-names=\fIARCH\fP""" 4 ++.el .IP "\f(CWhwr\-names=\f(CIARCH\f(CW\fR" 4 ++.IX Item "hwr-names=ARCH" ++Print \s-1HWR\s0 (hardware register, used by the \f(CW\*(C`rdhwr\*(C'\fR instruction) names ++as appropriate for the \s-1CPU\s0 or architecture specified by ++\&\fI\s-1ARCH\s0\fR. By default, \s-1HWR\s0 names are selected according to ++the architecture and \s-1CPU\s0 of the binary being disassembled. ++.ie n .IP """reg\-names=\fIABI\fP""" 4 ++.el .IP "\f(CWreg\-names=\f(CIABI\f(CW\fR" 4 ++.IX Item "reg-names=ABI" ++Print \s-1GPR\s0 and \s-1FPR\s0 names as appropriate for the selected \s-1ABI.\s0 ++.ie n .IP """reg\-names=\fIARCH\fP""" 4 ++.el .IP "\f(CWreg\-names=\f(CIARCH\f(CW\fR" 4 ++.IX Item "reg-names=ARCH" ++Print CPU-specific register names (\s-1CP0\s0 register and \s-1HWR\s0 names) ++as appropriate for the selected \s-1CPU\s0 or architecture. ++.RE ++.RS 4 ++.Sp ++For any of the options listed above, \fI\s-1ABI\s0\fR or ++\&\fI\s-1ARCH\s0\fR may be specified as \fBnumeric\fR to have numbers printed ++rather than names, for the selected types of registers. ++You can list the available values of \fI\s-1ABI\s0\fR and \fI\s-1ARCH\s0\fR using ++the \fB\-\-help\fR option. ++.Sp ++For \s-1VAX,\s0 you can specify function entry addresses with \fB\-M ++entry:0xf00ba\fR. You can use this multiple times to properly ++disassemble \s-1VAX\s0 binary files that don't contain symbol tables (like ++\&\s-1ROM\s0 dumps). In these cases, the function entry mask would otherwise ++be decoded as \s-1VAX\s0 instructions, which would probably lead the rest ++of the function being wrongly disassembled. ++.RE ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-private\-headers\fR" 4 ++.IX Item "--private-headers" ++.PD ++Print information that is specific to the object file format. The exact ++information printed depends upon the object file format. For some ++object file formats, no additional information is printed. ++.IP "\fB\-P\fR \fIoptions\fR" 4 ++.IX Item "-P options" ++.PD 0 ++.IP "\fB\-\-private=\fR\fIoptions\fR" 4 ++.IX Item "--private=options" ++.PD ++Print information that is specific to the object file format. The ++argument \fIoptions\fR is a comma separated list that depends on the ++format (the lists of options is displayed with the help). ++.Sp ++For \s-1XCOFF,\s0 the available options are: ++.RS 4 ++.ie n .IP """header""" 4 ++.el .IP "\f(CWheader\fR" 4 ++.IX Item "header" ++.PD 0 ++.ie n .IP """aout""" 4 ++.el .IP "\f(CWaout\fR" 4 ++.IX Item "aout" ++.ie n .IP """sections""" 4 ++.el .IP "\f(CWsections\fR" 4 ++.IX Item "sections" ++.ie n .IP """syms""" 4 ++.el .IP "\f(CWsyms\fR" 4 ++.IX Item "syms" ++.ie n .IP """relocs""" 4 ++.el .IP "\f(CWrelocs\fR" 4 ++.IX Item "relocs" ++.ie n .IP """lineno,""" 4 ++.el .IP "\f(CWlineno,\fR" 4 ++.IX Item "lineno," ++.ie n .IP """loader""" 4 ++.el .IP "\f(CWloader\fR" 4 ++.IX Item "loader" ++.ie n .IP """except""" 4 ++.el .IP "\f(CWexcept\fR" 4 ++.IX Item "except" ++.ie n .IP """typchk""" 4 ++.el .IP "\f(CWtypchk\fR" 4 ++.IX Item "typchk" ++.ie n .IP """traceback""" 4 ++.el .IP "\f(CWtraceback\fR" 4 ++.IX Item "traceback" ++.ie n .IP """toc""" 4 ++.el .IP "\f(CWtoc\fR" 4 ++.IX Item "toc" ++.ie n .IP """ldinfo""" 4 ++.el .IP "\f(CWldinfo\fR" 4 ++.IX Item "ldinfo" ++.RE ++.RS 4 ++.PD ++.Sp ++Not all object formats support this option. In particular the \s-1ELF\s0 ++format does not use it. ++.RE ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++.PD 0 ++.IP "\fB\-\-reloc\fR" 4 ++.IX Item "--reloc" ++.PD ++Print the relocation entries of the file. If used with \fB\-d\fR or ++\&\fB\-D\fR, the relocations are printed interspersed with the ++disassembly. ++.IP "\fB\-R\fR" 4 ++.IX Item "-R" ++.PD 0 ++.IP "\fB\-\-dynamic\-reloc\fR" 4 ++.IX Item "--dynamic-reloc" ++.PD ++Print the dynamic relocation entries of the file. This is only ++meaningful for dynamic objects, such as certain types of shared ++libraries. As for \fB\-r\fR, if used with \fB\-d\fR or ++\&\fB\-D\fR, the relocations are printed interspersed with the ++disassembly. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-full\-contents\fR" 4 ++.IX Item "--full-contents" ++.PD ++Display the full contents of any sections requested. By default all ++non-empty sections are displayed. ++.IP "\fB\-S\fR" 4 ++.IX Item "-S" ++.PD 0 ++.IP "\fB\-\-source\fR" 4 ++.IX Item "--source" ++.PD ++Display source code intermixed with disassembly, if possible. Implies ++\&\fB\-d\fR. ++.IP "\fB\-\-source\-comment[=\fR\fItxt\fR\fB]\fR" 4 ++.IX Item "--source-comment[=txt]" ++Like the \fB\-S\fR option, but all source code lines are displayed ++with a prefix of \fItxt\fR. Typically \fItxt\fR will be a comment ++string which can be used to distinguish the assembler code from the ++source code. If \fItxt\fR is not provided then a default string of ++\&\fI\*(L"# \*(R"\fR (hash followed by a space), will be used. ++.IP "\fB\-\-prefix=\fR\fIprefix\fR" 4 ++.IX Item "--prefix=prefix" ++Specify \fIprefix\fR to add to the absolute paths when used with ++\&\fB\-S\fR. ++.IP "\fB\-\-prefix\-strip=\fR\fIlevel\fR" 4 ++.IX Item "--prefix-strip=level" ++Indicate how many initial directory names to strip off the hardwired ++absolute paths. It has no effect without \fB\-\-prefix=\fR\fIprefix\fR. ++.IP "\fB\-\-show\-raw\-insn\fR" 4 ++.IX Item "--show-raw-insn" ++When disassembling instructions, print the instruction in hex as well as ++in symbolic form. This is the default except when ++\&\fB\-\-prefix\-addresses\fR is used. ++.IP "\fB\-\-no\-show\-raw\-insn\fR" 4 ++.IX Item "--no-show-raw-insn" ++When disassembling instructions, do not print the instruction bytes. ++This is the default when \fB\-\-prefix\-addresses\fR is used. ++.IP "\fB\-\-insn\-width=\fR\fIwidth\fR" 4 ++.IX Item "--insn-width=width" ++Display \fIwidth\fR bytes on a single line when disassembling ++instructions. ++.IP "\fB\-\-visualize\-jumps[=color|=extended\-color|=off]\fR" 4 ++.IX Item "--visualize-jumps[=color|=extended-color|=off]" ++Visualize jumps that stay inside a function by drawing \s-1ASCII\s0 art between ++the start and target addresses. The optional \fB=color\fR argument ++adds color to the output using simple terminal colors. Alternatively ++the \fB=extended\-color\fR argument will add color using 8bit ++colors, but these might not work on all terminals. ++.Sp ++If it is necessary to disable the \fBvisualize-jumps\fR option ++after it has previously been enabled then use ++\&\fBvisualize\-jumps=off\fR. ++.IP "\fB\-W[lLiaprmfFsoRtUuTgAckK]\fR" 4 ++.IX Item "-W[lLiaprmfFsoRtUuTgAckK]" ++.PD 0 ++.IP "\fB\-\-dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow\-links]\fR" 4 ++.IX Item "--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]" ++.PD ++Displays the contents of the \s-1DWARF\s0 debug sections in the file, if any ++are present. Compressed debug sections are automatically decompressed ++(temporarily) before they are displayed. If one or more of the ++optional letters or words follows the switch then only those type(s) ++of data will be dumped. The letters and words refer to the following ++information: ++.RS 4 ++.ie n .IP """a""" 4 ++.el .IP "\f(CWa\fR" 4 ++.IX Item "a" ++.PD 0 ++.ie n .IP """=abbrev""" 4 ++.el .IP "\f(CW=abbrev\fR" 4 ++.IX Item "=abbrev" ++.PD ++Displays the contents of the \fB.debug_abbrev\fR section. ++.ie n .IP """A""" 4 ++.el .IP "\f(CWA\fR" 4 ++.IX Item "A" ++.PD 0 ++.ie n .IP """=addr""" 4 ++.el .IP "\f(CW=addr\fR" 4 ++.IX Item "=addr" ++.PD ++Displays the contents of the \fB.debug_addr\fR section. ++.ie n .IP """c""" 4 ++.el .IP "\f(CWc\fR" 4 ++.IX Item "c" ++.PD 0 ++.ie n .IP """=cu_index""" 4 ++.el .IP "\f(CW=cu_index\fR" 4 ++.IX Item "=cu_index" ++.PD ++Displays the contents of the \fB.debug_cu_index\fR and/or ++\&\fB.debug_tu_index\fR sections. ++.ie n .IP """f""" 4 ++.el .IP "\f(CWf\fR" 4 ++.IX Item "f" ++.PD 0 ++.ie n .IP """=frames""" 4 ++.el .IP "\f(CW=frames\fR" 4 ++.IX Item "=frames" ++.PD ++Display the raw contents of a \fB.debug_frame\fR section. ++.ie n .IP """F""" 4 ++.el .IP "\f(CWF\fR" 4 ++.IX Item "F" ++.PD 0 ++.ie n .IP """=frame\-interp""" 4 ++.el .IP "\f(CW=frame\-interp\fR" 4 ++.IX Item "=frame-interp" ++.PD ++Display the interpreted contents of a \fB.debug_frame\fR section. ++.ie n .IP """g""" 4 ++.el .IP "\f(CWg\fR" 4 ++.IX Item "g" ++.PD 0 ++.ie n .IP """=gdb_index""" 4 ++.el .IP "\f(CW=gdb_index\fR" 4 ++.IX Item "=gdb_index" ++.PD ++Displays the contents of the \fB.gdb_index\fR and/or ++\&\fB.debug_names\fR sections. ++.ie n .IP """i""" 4 ++.el .IP "\f(CWi\fR" 4 ++.IX Item "i" ++.PD 0 ++.ie n .IP """=info""" 4 ++.el .IP "\f(CW=info\fR" 4 ++.IX Item "=info" ++.PD ++Displays the contents of the \fB.debug_info\fR section. Note: the ++output from this option can also be restricted by the use of the ++\&\fB\-\-dwarf\-depth\fR and \fB\-\-dwarf\-start\fR options. ++.ie n .IP """k""" 4 ++.el .IP "\f(CWk\fR" 4 ++.IX Item "k" ++.PD 0 ++.ie n .IP """=links""" 4 ++.el .IP "\f(CW=links\fR" 4 ++.IX Item "=links" ++.PD ++Displays the contents of the \fB.gnu_debuglink\fR and/or ++\&\fB.gnu_debugaltlink\fR sections. Also displays any links to ++separate dwarf object files (dwo), if they are specified by the ++DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the ++\&\fB.debug_info\fR section. ++.ie n .IP """K""" 4 ++.el .IP "\f(CWK\fR" 4 ++.IX Item "K" ++.PD 0 ++.ie n .IP """=follow\-links""" 4 ++.el .IP "\f(CW=follow\-links\fR" 4 ++.IX Item "=follow-links" ++.PD ++Display the contents of any selected debug sections that are found in ++linked, separate debug info file(s). This can result in multiple ++versions of the same debug section being displayed if it exists in ++more than one file. ++.Sp ++In addition, when displaying \s-1DWARF\s0 attributes, if a form is found that ++references the separate debug info file, then the referenced contents ++will also be displayed. ++.ie n .IP """l""" 4 ++.el .IP "\f(CWl\fR" 4 ++.IX Item "l" ++.PD 0 ++.ie n .IP """=rawline""" 4 ++.el .IP "\f(CW=rawline\fR" 4 ++.IX Item "=rawline" ++.PD ++Displays the contents of the \fB.debug_line\fR section in a raw ++format. ++.ie n .IP """L""" 4 ++.el .IP "\f(CWL\fR" 4 ++.IX Item "L" ++.PD 0 ++.ie n .IP """=decodedline""" 4 ++.el .IP "\f(CW=decodedline\fR" 4 ++.IX Item "=decodedline" ++.PD ++Displays the interpreted contents of the \fB.debug_line\fR section. ++.ie n .IP """m""" 4 ++.el .IP "\f(CWm\fR" 4 ++.IX Item "m" ++.PD 0 ++.ie n .IP """=macro""" 4 ++.el .IP "\f(CW=macro\fR" 4 ++.IX Item "=macro" ++.PD ++Displays the contents of the \fB.debug_macro\fR and/or ++\&\fB.debug_macinfo\fR sections. ++.ie n .IP """o""" 4 ++.el .IP "\f(CWo\fR" 4 ++.IX Item "o" ++.PD 0 ++.ie n .IP """=loc""" 4 ++.el .IP "\f(CW=loc\fR" 4 ++.IX Item "=loc" ++.PD ++Displays the contents of the \fB.debug_loc\fR and/or ++\&\fB.debug_loclists\fR sections. ++.ie n .IP """p""" 4 ++.el .IP "\f(CWp\fR" 4 ++.IX Item "p" ++.PD 0 ++.ie n .IP """=pubnames""" 4 ++.el .IP "\f(CW=pubnames\fR" 4 ++.IX Item "=pubnames" ++.PD ++Displays the contents of the \fB.debug_pubnames\fR and/or ++\&\fB.debug_gnu_pubnames\fR sections. ++.ie n .IP """r""" 4 ++.el .IP "\f(CWr\fR" 4 ++.IX Item "r" ++.PD 0 ++.ie n .IP """=aranges""" 4 ++.el .IP "\f(CW=aranges\fR" 4 ++.IX Item "=aranges" ++.PD ++Displays the contents of the \fB.debug_aranges\fR section. ++.ie n .IP """R""" 4 ++.el .IP "\f(CWR\fR" 4 ++.IX Item "R" ++.PD 0 ++.ie n .IP """=Ranges""" 4 ++.el .IP "\f(CW=Ranges\fR" 4 ++.IX Item "=Ranges" ++.PD ++Displays the contents of the \fB.debug_ranges\fR and/or ++\&\fB.debug_rnglists\fR sections. ++.ie n .IP """s""" 4 ++.el .IP "\f(CWs\fR" 4 ++.IX Item "s" ++.PD 0 ++.ie n .IP """=str""" 4 ++.el .IP "\f(CW=str\fR" 4 ++.IX Item "=str" ++.PD ++Displays the contents of the \fB.debug_str\fR, \fB.debug_line_str\fR ++and/or \fB.debug_str_offsets\fR sections. ++.ie n .IP """t""" 4 ++.el .IP "\f(CWt\fR" 4 ++.IX Item "t" ++.PD 0 ++.ie n .IP """=pubtype""" 4 ++.el .IP "\f(CW=pubtype\fR" 4 ++.IX Item "=pubtype" ++.PD ++Displays the contents of the \fB.debug_pubtypes\fR and/or ++\&\fB.debug_gnu_pubtypes\fR sections. ++.ie n .IP """T""" 4 ++.el .IP "\f(CWT\fR" 4 ++.IX Item "T" ++.PD 0 ++.ie n .IP """=trace_aranges""" 4 ++.el .IP "\f(CW=trace_aranges\fR" 4 ++.IX Item "=trace_aranges" ++.PD ++Displays the contents of the \fB.trace_aranges\fR section. ++.ie n .IP """u""" 4 ++.el .IP "\f(CWu\fR" 4 ++.IX Item "u" ++.PD 0 ++.ie n .IP """=trace_abbrev""" 4 ++.el .IP "\f(CW=trace_abbrev\fR" 4 ++.IX Item "=trace_abbrev" ++.PD ++Displays the contents of the \fB.trace_abbrev\fR section. ++.ie n .IP """U""" 4 ++.el .IP "\f(CWU\fR" 4 ++.IX Item "U" ++.PD 0 ++.ie n .IP """=trace_info""" 4 ++.el .IP "\f(CW=trace_info\fR" 4 ++.IX Item "=trace_info" ++.PD ++Displays the contents of the \fB.trace_info\fR section. ++.RE ++.RS 4 ++.Sp ++Note: displaying the contents of \fB.debug_static_funcs\fR, ++\&\fB.debug_static_vars\fR and \fBdebug_weaknames\fR sections is not ++currently supported. ++.RE ++.IP "\fB\-\-dwarf\-depth=\fR\fIn\fR" 4 ++.IX Item "--dwarf-depth=n" ++Limit the dump of the \f(CW\*(C`.debug_info\*(C'\fR section to \fIn\fR children. ++This is only useful with \fB\-\-debug\-dump=info\fR. The default is ++to print all DIEs; the special value 0 for \fIn\fR will also have this ++effect. ++.Sp ++With a non-zero value for \fIn\fR, DIEs at or deeper than \fIn\fR ++levels will not be printed. The range for \fIn\fR is zero-based. ++.IP "\fB\-\-dwarf\-start=\fR\fIn\fR" 4 ++.IX Item "--dwarf-start=n" ++Print only DIEs beginning with the \s-1DIE\s0 numbered \fIn\fR. This is only ++useful with \fB\-\-debug\-dump=info\fR. ++.Sp ++If specified, this option will suppress printing of any header ++information and all DIEs before the \s-1DIE\s0 numbered \fIn\fR. Only ++siblings and children of the specified \s-1DIE\s0 will be printed. ++.Sp ++This can be used in conjunction with \fB\-\-dwarf\-depth\fR. ++.IP "\fB\-\-dwarf\-check\fR" 4 ++.IX Item "--dwarf-check" ++Enable additional checks for consistency of Dwarf information. ++.IP "\fB\-\-ctf=\fR\fIsection\fR" 4 ++.IX Item "--ctf=section" ++Display the contents of the specified \s-1CTF\s0 section. \s-1CTF\s0 sections themselves ++contain many subsections, all of which are displayed in order. ++.IP "\fB\-\-ctf\-parent=\fR\fIsection\fR" 4 ++.IX Item "--ctf-parent=section" ++Specify the name of another section from which the \s-1CTF\s0 dictionary can inherit ++types. (If none is specified, we assume the \s-1CTF\s0 dictionary inherits types ++from the default-named member of the archive contained within this section.) ++.IP "\fB\-G\fR" 4 ++.IX Item "-G" ++.PD 0 ++.IP "\fB\-\-stabs\fR" 4 ++.IX Item "--stabs" ++.PD ++Display the full contents of any sections requested. Display the ++contents of the .stab and .stab.index and .stab.excl sections from an ++\&\s-1ELF\s0 file. This is only useful on systems (such as Solaris 2.0) in which ++\&\f(CW\*(C`.stab\*(C'\fR debugging symbol-table entries are carried in an \s-1ELF\s0 ++section. In most other file formats, debugging symbol-table entries are ++interleaved with linkage symbols, and are visible in the \fB\-\-syms\fR ++output. ++.IP "\fB\-\-start\-address=\fR\fIaddress\fR" 4 ++.IX Item "--start-address=address" ++Start displaying data at the specified address. This affects the output ++of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options. ++.IP "\fB\-\-stop\-address=\fR\fIaddress\fR" 4 ++.IX Item "--stop-address=address" ++Stop displaying data at the specified address. This affects the output ++of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options. ++.IP "\fB\-t\fR" 4 ++.IX Item "-t" ++.PD 0 ++.IP "\fB\-\-syms\fR" 4 ++.IX Item "--syms" ++.PD ++Print the symbol table entries of the file. ++This is similar to the information provided by the \fBnm\fR program, ++although the display format is different. The format of the output ++depends upon the format of the file being dumped, but there are two main ++types. One looks like this: ++.Sp ++.Vb 2 ++\& [ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss ++\& [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred ++.Ve ++.Sp ++where the number inside the square brackets is the number of the entry ++in the symbol table, the \fIsec\fR number is the section number, the ++\&\fIfl\fR value are the symbol's flag bits, the \fIty\fR number is the ++symbol's type, the \fIscl\fR number is the symbol's storage class and ++the \fInx\fR value is the number of auxilary entries associated with ++the symbol. The last two fields are the symbol's value and its name. ++.Sp ++The other common output format, usually seen with \s-1ELF\s0 based files, ++looks like this: ++.Sp ++.Vb 2 ++\& 00000000 l d .bss 00000000 .bss ++\& 00000000 g .text 00000000 fred ++.Ve ++.Sp ++Here the first number is the symbol's value (sometimes refered to as ++its address). The next field is actually a set of characters and ++spaces indicating the flag bits that are set on the symbol. These ++characters are described below. Next is the section with which the ++symbol is associated or \fI*ABS*\fR if the section is absolute (ie ++not connected with any section), or \fI*UND*\fR if the section is ++referenced in the file being dumped, but not defined there. ++.Sp ++After the section name comes another field, a number, which for common ++symbols is the alignment and for other symbol is the size. Finally ++the symbol's name is displayed. ++.Sp ++The flag characters are divided into 7 groups as follows: ++.RS 4 ++.ie n .IP """l""" 4 ++.el .IP "\f(CWl\fR" 4 ++.IX Item "l" ++.PD 0 ++.ie n .IP """g""" 4 ++.el .IP "\f(CWg\fR" 4 ++.IX Item "g" ++.ie n .IP """u""" 4 ++.el .IP "\f(CWu\fR" 4 ++.IX Item "u" ++.ie n .IP """!""" 4 ++.el .IP "\f(CW!\fR" 4 ++.IX Item "!" ++.PD ++The symbol is a local (l), global (g), unique global (u), neither ++global nor local (a space) or both global and local (!). A ++symbol can be neither local or global for a variety of reasons, e.g., ++because it is used for debugging, but it is probably an indication of ++a bug if it is ever both local and global. Unique global symbols are ++a \s-1GNU\s0 extension to the standard set of \s-1ELF\s0 symbol bindings. For such ++a symbol the dynamic linker will make sure that in the entire process ++there is just one symbol with this name and type in use. ++.ie n .IP """w""" 4 ++.el .IP "\f(CWw\fR" 4 ++.IX Item "w" ++The symbol is weak (w) or strong (a space). ++.ie n .IP """C""" 4 ++.el .IP "\f(CWC\fR" 4 ++.IX Item "C" ++The symbol denotes a constructor (C) or an ordinary symbol (a space). ++.ie n .IP """W""" 4 ++.el .IP "\f(CWW\fR" 4 ++.IX Item "W" ++The symbol is a warning (W) or a normal symbol (a space). A warning ++symbol's name is a message to be displayed if the symbol following the ++warning symbol is ever referenced. ++.ie n .IP """I""" 4 ++.el .IP "\f(CWI\fR" 4 ++.IX Item "I" ++.PD 0 ++.ie n .IP """i""" 4 ++.el .IP "\f(CWi\fR" 4 ++.IX Item "i" ++.PD ++The symbol is an indirect reference to another symbol (I), a function ++to be evaluated during reloc processing (i) or a normal symbol (a ++space). ++.ie n .IP """d""" 4 ++.el .IP "\f(CWd\fR" 4 ++.IX Item "d" ++.PD 0 ++.ie n .IP """D""" 4 ++.el .IP "\f(CWD\fR" 4 ++.IX Item "D" ++.PD ++The symbol is a debugging symbol (d) or a dynamic symbol (D) or a ++normal symbol (a space). ++.ie n .IP """F""" 4 ++.el .IP "\f(CWF\fR" 4 ++.IX Item "F" ++.PD 0 ++.ie n .IP """f""" 4 ++.el .IP "\f(CWf\fR" 4 ++.IX Item "f" ++.ie n .IP """O""" 4 ++.el .IP "\f(CWO\fR" 4 ++.IX Item "O" ++.PD ++The symbol is the name of a function (F) or a file (f) or an object ++(O) or just a normal symbol (a space). ++.RE ++.RS 4 ++.RE ++.IP "\fB\-T\fR" 4 ++.IX Item "-T" ++.PD 0 ++.IP "\fB\-\-dynamic\-syms\fR" 4 ++.IX Item "--dynamic-syms" ++.PD ++Print the dynamic symbol table entries of the file. This is only ++meaningful for dynamic objects, such as certain types of shared ++libraries. This is similar to the information provided by the \fBnm\fR ++program when given the \fB\-D\fR (\fB\-\-dynamic\fR) option. ++.Sp ++The output format is similar to that produced by the \fB\-\-syms\fR ++option, except that an extra field is inserted before the symbol's ++name, giving the version information associated with the symbol. ++If the version is the default version to be used when resolving ++unversioned references to the symbol then it's displayed as is, ++otherwise it's put into parentheses. ++.IP "\fB\-\-special\-syms\fR" 4 ++.IX Item "--special-syms" ++When displaying symbols include those which the target considers to be ++special in some way and which would not normally be of interest to the ++user. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Print the version number of \fBobjdump\fR and exit. ++.IP "\fB\-x\fR" 4 ++.IX Item "-x" ++.PD 0 ++.IP "\fB\-\-all\-headers\fR" 4 ++.IX Item "--all-headers" ++.PD ++Display all available header information, including the symbol table and ++relocation entries. Using \fB\-x\fR is equivalent to specifying all of ++\&\fB\-a \-f \-h \-p \-r \-t\fR. ++.IP "\fB\-w\fR" 4 ++.IX Item "-w" ++.PD 0 ++.IP "\fB\-\-wide\fR" 4 ++.IX Item "--wide" ++.PD ++Format some lines for output devices that have more than 80 columns. ++Also do not truncate symbol names when they are displayed. ++.IP "\fB\-z\fR" 4 ++.IX Item "-z" ++.PD 0 ++.IP "\fB\-\-disassemble\-zeroes\fR" 4 ++.IX Item "--disassemble-zeroes" ++.PD ++Normally the disassembly output will skip blocks of zeroes. This ++option directs the disassembler to disassemble those blocks, just like ++any other data. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBnm\fR\|(1), \fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/ranlib.1 b/binutils/doc/ranlib.1 +--- a/binutils/doc/ranlib.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/ranlib.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,227 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "RANLIB 1" ++.TH RANLIB 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++ranlib \- generate an index to an archive ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++ranlib [\fB\-\-plugin\fR \fIname\fR] [\fB\-DhHvVt\fR] \fIarchive\fR ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBranlib\fR generates an index to the contents of an archive and ++stores it in the archive. The index lists each symbol defined by a ++member of an archive that is a relocatable object file. ++.PP ++You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index. ++.PP ++An archive with such an index speeds up linking to the library and ++allows routines in the library to call each other without regard to ++their placement in the archive. ++.PP ++The \s-1GNU\s0 \fBranlib\fR program is another form of \s-1GNU\s0 \fBar\fR; running ++\&\fBranlib\fR is completely equivalent to executing \fBar \-s\fR. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-H\fR" 4 ++.IX Item "-H" ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Show usage information for \fBranlib\fR. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Show the version number of \fBranlib\fR. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++Operate in \fIdeterministic\fR mode. The symbol map archive member's ++header will show zero for the \s-1UID, GID,\s0 and timestamp. When this ++option is used, multiple runs will produce identical output files. ++.Sp ++If \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by ++default. It can be disabled with the \fB\-U\fR option, described ++below. ++.IP "\fB\-t\fR" 4 ++.IX Item "-t" ++Update the timestamp of the symbol map of an archive. ++.IP "\fB\-U\fR" 4 ++.IX Item "-U" ++Do \fInot\fR operate in \fIdeterministic\fR mode. This is the ++inverse of the \fB\-D\fR option, above: the archive index will get ++actual \s-1UID, GID,\s0 timestamp, and file mode values. ++.Sp ++If \fIbinutils\fR was configured \fIwithout\fR ++\&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by ++default. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBar\fR\|(1), \fBnm\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/readelf.1 b/binutils/doc/readelf.1 +--- a/binutils/doc/readelf.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/readelf.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,720 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "READELF 1" ++.TH READELF 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++readelf \- display information about ELF files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++readelf [\fB\-a\fR|\fB\-\-all\fR] ++ [\fB\-h\fR|\fB\-\-file\-header\fR] ++ [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR] ++ [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR] ++ [\fB\-g\fR|\fB\-\-section\-groups\fR] ++ [\fB\-t\fR|\fB\-\-section\-details\fR] ++ [\fB\-e\fR|\fB\-\-headers\fR] ++ [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR] ++ [\fB\-\-dyn\-syms\fR] ++ [\fB\-n\fR|\fB\-\-notes\fR] ++ [\fB\-r\fR|\fB\-\-relocs\fR] ++ [\fB\-u\fR|\fB\-\-unwind\fR] ++ [\fB\-d\fR|\fB\-\-dynamic\fR] ++ [\fB\-V\fR|\fB\-\-version\-info\fR] ++ [\fB\-A\fR|\fB\-\-arch\-specific\fR] ++ [\fB\-D\fR|\fB\-\-use\-dynamic\fR] ++ [\fB\-x\fR |\fB\-\-hex\-dump=\fR] ++ [\fB\-p\fR |\fB\-\-string\-dump=\fR] ++ [\fB\-R\fR |\fB\-\-relocated\-dump=\fR] ++ [\fB\-z\fR|\fB\-\-decompress\fR] ++ [\fB\-c\fR|\fB\-\-archive\-index\fR] ++ [\fB\-w[lLiaprmfFsoRtUuTgAckK]\fR| ++ \fB\-\-debug\-dump\fR[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow\-links]] ++ [\fB\-\-dwarf\-depth=\fR\fIn\fR] ++ [\fB\-\-dwarf\-start=\fR\fIn\fR] ++ [\fB\-\-ctf=\fR\fIsection\fR] ++ [\fB\-\-ctf\-parent=\fR\fIsection\fR] ++ [\fB\-\-ctf\-symbols=\fR\fIsection\fR] ++ [\fB\-\-ctf\-strings=\fR\fIsection\fR] ++ [\fB\-I\fR|\fB\-\-histogram\fR] ++ [\fB\-v\fR|\fB\-\-version\fR] ++ [\fB\-W\fR|\fB\-\-wide\fR] ++ [\fB\-H\fR|\fB\-\-help\fR] ++ \fIelffile\fR... ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object ++files. The options control what particular information to display. ++.PP ++\&\fIelffile\fR... are the object files to be examined. 32\-bit and ++64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files. ++.PP ++This program performs a similar function to \fBobjdump\fR but it ++goes into more detail and it exists independently of the \s-1BFD\s0 ++library, so if there is a bug in \s-1BFD\s0 then readelf will not be ++affected. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The long and short forms of options, shown here as alternatives, are ++equivalent. At least one option besides \fB\-v\fR or \fB\-H\fR must be ++given. ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-all\fR" 4 ++.IX Item "--all" ++.PD ++Equivalent to specifying \fB\-\-file\-header\fR, ++\&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR, ++\&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR, ++\&\fB\-\-version\-info\fR, \fB\-\-arch\-specific\fR, \fB\-\-unwind\fR, ++\&\fB\-\-section\-groups\fR and \fB\-\-histogram\fR. ++.Sp ++Note \- this option does not enable \fB\-\-use\-dynamic\fR itself, so ++if that option is not present on the command line then dynamic symbols ++and dynamic relocs will not be displayed. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-file\-header\fR" 4 ++.IX Item "--file-header" ++.PD ++Displays the information contained in the \s-1ELF\s0 header at the start of the ++file. ++.IP "\fB\-l\fR" 4 ++.IX Item "-l" ++.PD 0 ++.IP "\fB\-\-program\-headers\fR" 4 ++.IX Item "--program-headers" ++.IP "\fB\-\-segments\fR" 4 ++.IX Item "--segments" ++.PD ++Displays the information contained in the file's segment headers, if it ++has any. ++.IP "\fB\-S\fR" 4 ++.IX Item "-S" ++.PD 0 ++.IP "\fB\-\-sections\fR" 4 ++.IX Item "--sections" ++.IP "\fB\-\-section\-headers\fR" 4 ++.IX Item "--section-headers" ++.PD ++Displays the information contained in the file's section headers, if it ++has any. ++.IP "\fB\-g\fR" 4 ++.IX Item "-g" ++.PD 0 ++.IP "\fB\-\-section\-groups\fR" 4 ++.IX Item "--section-groups" ++.PD ++Displays the information contained in the file's section groups, if it ++has any. ++.IP "\fB\-t\fR" 4 ++.IX Item "-t" ++.PD 0 ++.IP "\fB\-\-section\-details\fR" 4 ++.IX Item "--section-details" ++.PD ++Displays the detailed section information. Implies \fB\-S\fR. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-symbols\fR" 4 ++.IX Item "--symbols" ++.IP "\fB\-\-syms\fR" 4 ++.IX Item "--syms" ++.PD ++Displays the entries in symbol table section of the file, if it has one. ++If a symbol has version information associated with it then this is ++displayed as well. The version string is displayed as a suffix to the ++symbol name, preceeded by an @ character. For example ++\&\fBfoo@VER_1\fR. If the version is the default version to be used ++when resolving unversioned references to the symbol then it is ++displayed as a suffix preceeded by two @ characters. For example ++\&\fBfoo@@VER_2\fR. ++.IP "\fB\-\-dyn\-syms\fR" 4 ++.IX Item "--dyn-syms" ++Displays the entries in dynamic symbol table section of the file, if it ++has one. The output format is the same as the format used by the ++\&\fB\-\-syms\fR option. ++.IP "\fB\-e\fR" 4 ++.IX Item "-e" ++.PD 0 ++.IP "\fB\-\-headers\fR" 4 ++.IX Item "--headers" ++.PD ++Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR. ++.IP "\fB\-n\fR" 4 ++.IX Item "-n" ++.PD 0 ++.IP "\fB\-\-notes\fR" 4 ++.IX Item "--notes" ++.PD ++Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any. ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++.PD 0 ++.IP "\fB\-\-relocs\fR" 4 ++.IX Item "--relocs" ++.PD ++Displays the contents of the file's relocation section, if it has one. ++.IP "\fB\-u\fR" 4 ++.IX Item "-u" ++.PD 0 ++.IP "\fB\-\-unwind\fR" 4 ++.IX Item "--unwind" ++.PD ++Displays the contents of the file's unwind section, if it has one. Only ++the unwind sections for \s-1IA64 ELF\s0 files, as well as \s-1ARM\s0 unwind tables ++(\f(CW\*(C`.ARM.exidx\*(C'\fR / \f(CW\*(C`.ARM.extab\*(C'\fR) are currently supported. If ++support is not yet implemented for your architecture you could try ++dumping the contents of the \fI.eh_frames\fR section using the ++\&\fB\-\-debug\-dump=frames\fR or \fB\-\-debug\-dump=frames\-interp\fR ++options. ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.PD 0 ++.IP "\fB\-\-dynamic\fR" 4 ++.IX Item "--dynamic" ++.PD ++Displays the contents of the file's dynamic section, if it has one. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\-info\fR" 4 ++.IX Item "--version-info" ++.PD ++Displays the contents of the version sections in the file, it they ++exist. ++.IP "\fB\-A\fR" 4 ++.IX Item "-A" ++.PD 0 ++.IP "\fB\-\-arch\-specific\fR" 4 ++.IX Item "--arch-specific" ++.PD ++Displays architecture-specific information in the file, if there ++is any. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++.PD 0 ++.IP "\fB\-\-use\-dynamic\fR" 4 ++.IX Item "--use-dynamic" ++.PD ++When displaying symbols, this option makes \fBreadelf\fR use the ++symbol hash tables in the file's dynamic section, rather than the ++symbol table sections. ++.Sp ++When displaying relocations, this option makes \fBreadelf\fR ++display the dynamic relocations rather than the static relocations. ++.IP "\fB\-x \fR" 4 ++.IX Item "-x " ++.PD 0 ++.IP "\fB\-\-hex\-dump=\fR" 4 ++.IX Item "--hex-dump=" ++.PD ++Displays the contents of the indicated section as a hexadecimal bytes. ++A number identifies a particular section by index in the section table; ++any other string identifies all sections with that name in the object file. ++.IP "\fB\-R \fR" 4 ++.IX Item "-R " ++.PD 0 ++.IP "\fB\-\-relocated\-dump=\fR" 4 ++.IX Item "--relocated-dump=" ++.PD ++Displays the contents of the indicated section as a hexadecimal ++bytes. A number identifies a particular section by index in the ++section table; any other string identifies all sections with that name ++in the object file. The contents of the section will be relocated ++before they are displayed. ++.IP "\fB\-p \fR" 4 ++.IX Item "-p " ++.PD 0 ++.IP "\fB\-\-string\-dump=\fR" 4 ++.IX Item "--string-dump=" ++.PD ++Displays the contents of the indicated section as printable strings. ++A number identifies a particular section by index in the section table; ++any other string identifies all sections with that name in the object file. ++.IP "\fB\-z\fR" 4 ++.IX Item "-z" ++.PD 0 ++.IP "\fB\-\-decompress\fR" 4 ++.IX Item "--decompress" ++.PD ++Requests that the section(s) being dumped by \fBx\fR, \fBR\fR or ++\&\fBp\fR options are decompressed before being displayed. If the ++section(s) are not compressed then they are displayed as is. ++.IP "\fB\-c\fR" 4 ++.IX Item "-c" ++.PD 0 ++.IP "\fB\-\-archive\-index\fR" 4 ++.IX Item "--archive-index" ++.PD ++Displays the file symbol index information contained in the header part ++of binary archives. Performs the same function as the \fBt\fR ++command to \fBar\fR, but without using the \s-1BFD\s0 library. ++.IP "\fB\-w[lLiaprmfFsoRtUuTgAckK]\fR" 4 ++.IX Item "-w[lLiaprmfFsoRtUuTgAckK]" ++.PD 0 ++.IP "\fB\-\-debug\-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow\-links]\fR" 4 ++.IX Item "--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]" ++.PD ++Displays the contents of the \s-1DWARF\s0 debug sections in the file, if any ++are present. Compressed debug sections are automatically decompressed ++(temporarily) before they are displayed. If one or more of the ++optional letters or words follows the switch then only those type(s) ++of data will be dumped. The letters and words refer to the following ++information: ++.RS 4 ++.ie n .IP """a""" 4 ++.el .IP "\f(CWa\fR" 4 ++.IX Item "a" ++.PD 0 ++.ie n .IP """=abbrev""" 4 ++.el .IP "\f(CW=abbrev\fR" 4 ++.IX Item "=abbrev" ++.PD ++Displays the contents of the \fB.debug_abbrev\fR section. ++.ie n .IP """A""" 4 ++.el .IP "\f(CWA\fR" 4 ++.IX Item "A" ++.PD 0 ++.ie n .IP """=addr""" 4 ++.el .IP "\f(CW=addr\fR" 4 ++.IX Item "=addr" ++.PD ++Displays the contents of the \fB.debug_addr\fR section. ++.ie n .IP """c""" 4 ++.el .IP "\f(CWc\fR" 4 ++.IX Item "c" ++.PD 0 ++.ie n .IP """=cu_index""" 4 ++.el .IP "\f(CW=cu_index\fR" 4 ++.IX Item "=cu_index" ++.PD ++Displays the contents of the \fB.debug_cu_index\fR and/or ++\&\fB.debug_tu_index\fR sections. ++.ie n .IP """f""" 4 ++.el .IP "\f(CWf\fR" 4 ++.IX Item "f" ++.PD 0 ++.ie n .IP """=frames""" 4 ++.el .IP "\f(CW=frames\fR" 4 ++.IX Item "=frames" ++.PD ++Display the raw contents of a \fB.debug_frame\fR section. ++.ie n .IP """F""" 4 ++.el .IP "\f(CWF\fR" 4 ++.IX Item "F" ++.PD 0 ++.ie n .IP """=frame\-interp""" 4 ++.el .IP "\f(CW=frame\-interp\fR" 4 ++.IX Item "=frame-interp" ++.PD ++Display the interpreted contents of a \fB.debug_frame\fR section. ++.ie n .IP """g""" 4 ++.el .IP "\f(CWg\fR" 4 ++.IX Item "g" ++.PD 0 ++.ie n .IP """=gdb_index""" 4 ++.el .IP "\f(CW=gdb_index\fR" 4 ++.IX Item "=gdb_index" ++.PD ++Displays the contents of the \fB.gdb_index\fR and/or ++\&\fB.debug_names\fR sections. ++.ie n .IP """i""" 4 ++.el .IP "\f(CWi\fR" 4 ++.IX Item "i" ++.PD 0 ++.ie n .IP """=info""" 4 ++.el .IP "\f(CW=info\fR" 4 ++.IX Item "=info" ++.PD ++Displays the contents of the \fB.debug_info\fR section. Note: the ++output from this option can also be restricted by the use of the ++\&\fB\-\-dwarf\-depth\fR and \fB\-\-dwarf\-start\fR options. ++.ie n .IP """k""" 4 ++.el .IP "\f(CWk\fR" 4 ++.IX Item "k" ++.PD 0 ++.ie n .IP """=links""" 4 ++.el .IP "\f(CW=links\fR" 4 ++.IX Item "=links" ++.PD ++Displays the contents of the \fB.gnu_debuglink\fR and/or ++\&\fB.gnu_debugaltlink\fR sections. Also displays any links to ++separate dwarf object files (dwo), if they are specified by the ++DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the ++\&\fB.debug_info\fR section. ++.ie n .IP """K""" 4 ++.el .IP "\f(CWK\fR" 4 ++.IX Item "K" ++.PD 0 ++.ie n .IP """=follow\-links""" 4 ++.el .IP "\f(CW=follow\-links\fR" 4 ++.IX Item "=follow-links" ++.PD ++Display the contents of any selected debug sections that are found in ++linked, separate debug info file(s). This can result in multiple ++versions of the same debug section being displayed if it exists in ++more than one file. ++.Sp ++In addition, when displaying \s-1DWARF\s0 attributes, if a form is found that ++references the separate debug info file, then the referenced contents ++will also be displayed. ++.ie n .IP """l""" 4 ++.el .IP "\f(CWl\fR" 4 ++.IX Item "l" ++.PD 0 ++.ie n .IP """=rawline""" 4 ++.el .IP "\f(CW=rawline\fR" 4 ++.IX Item "=rawline" ++.PD ++Displays the contents of the \fB.debug_line\fR section in a raw ++format. ++.ie n .IP """L""" 4 ++.el .IP "\f(CWL\fR" 4 ++.IX Item "L" ++.PD 0 ++.ie n .IP """=decodedline""" 4 ++.el .IP "\f(CW=decodedline\fR" 4 ++.IX Item "=decodedline" ++.PD ++Displays the interpreted contents of the \fB.debug_line\fR section. ++.ie n .IP """m""" 4 ++.el .IP "\f(CWm\fR" 4 ++.IX Item "m" ++.PD 0 ++.ie n .IP """=macro""" 4 ++.el .IP "\f(CW=macro\fR" 4 ++.IX Item "=macro" ++.PD ++Displays the contents of the \fB.debug_macro\fR and/or ++\&\fB.debug_macinfo\fR sections. ++.ie n .IP """o""" 4 ++.el .IP "\f(CWo\fR" 4 ++.IX Item "o" ++.PD 0 ++.ie n .IP """=loc""" 4 ++.el .IP "\f(CW=loc\fR" 4 ++.IX Item "=loc" ++.PD ++Displays the contents of the \fB.debug_loc\fR and/or ++\&\fB.debug_loclists\fR sections. ++.ie n .IP """p""" 4 ++.el .IP "\f(CWp\fR" 4 ++.IX Item "p" ++.PD 0 ++.ie n .IP """=pubnames""" 4 ++.el .IP "\f(CW=pubnames\fR" 4 ++.IX Item "=pubnames" ++.PD ++Displays the contents of the \fB.debug_pubnames\fR and/or ++\&\fB.debug_gnu_pubnames\fR sections. ++.ie n .IP """r""" 4 ++.el .IP "\f(CWr\fR" 4 ++.IX Item "r" ++.PD 0 ++.ie n .IP """=aranges""" 4 ++.el .IP "\f(CW=aranges\fR" 4 ++.IX Item "=aranges" ++.PD ++Displays the contents of the \fB.debug_aranges\fR section. ++.ie n .IP """R""" 4 ++.el .IP "\f(CWR\fR" 4 ++.IX Item "R" ++.PD 0 ++.ie n .IP """=Ranges""" 4 ++.el .IP "\f(CW=Ranges\fR" 4 ++.IX Item "=Ranges" ++.PD ++Displays the contents of the \fB.debug_ranges\fR and/or ++\&\fB.debug_rnglists\fR sections. ++.ie n .IP """s""" 4 ++.el .IP "\f(CWs\fR" 4 ++.IX Item "s" ++.PD 0 ++.ie n .IP """=str""" 4 ++.el .IP "\f(CW=str\fR" 4 ++.IX Item "=str" ++.PD ++Displays the contents of the \fB.debug_str\fR, \fB.debug_line_str\fR ++and/or \fB.debug_str_offsets\fR sections. ++.ie n .IP """t""" 4 ++.el .IP "\f(CWt\fR" 4 ++.IX Item "t" ++.PD 0 ++.ie n .IP """=pubtype""" 4 ++.el .IP "\f(CW=pubtype\fR" 4 ++.IX Item "=pubtype" ++.PD ++Displays the contents of the \fB.debug_pubtypes\fR and/or ++\&\fB.debug_gnu_pubtypes\fR sections. ++.ie n .IP """T""" 4 ++.el .IP "\f(CWT\fR" 4 ++.IX Item "T" ++.PD 0 ++.ie n .IP """=trace_aranges""" 4 ++.el .IP "\f(CW=trace_aranges\fR" 4 ++.IX Item "=trace_aranges" ++.PD ++Displays the contents of the \fB.trace_aranges\fR section. ++.ie n .IP """u""" 4 ++.el .IP "\f(CWu\fR" 4 ++.IX Item "u" ++.PD 0 ++.ie n .IP """=trace_abbrev""" 4 ++.el .IP "\f(CW=trace_abbrev\fR" 4 ++.IX Item "=trace_abbrev" ++.PD ++Displays the contents of the \fB.trace_abbrev\fR section. ++.ie n .IP """U""" 4 ++.el .IP "\f(CWU\fR" 4 ++.IX Item "U" ++.PD 0 ++.ie n .IP """=trace_info""" 4 ++.el .IP "\f(CW=trace_info\fR" 4 ++.IX Item "=trace_info" ++.PD ++Displays the contents of the \fB.trace_info\fR section. ++.RE ++.RS 4 ++.Sp ++Note: displaying the contents of \fB.debug_static_funcs\fR, ++\&\fB.debug_static_vars\fR and \fBdebug_weaknames\fR sections is not ++currently supported. ++.RE ++.IP "\fB\-\-dwarf\-depth=\fR\fIn\fR" 4 ++.IX Item "--dwarf-depth=n" ++Limit the dump of the \f(CW\*(C`.debug_info\*(C'\fR section to \fIn\fR children. ++This is only useful with \fB\-\-debug\-dump=info\fR. The default is ++to print all DIEs; the special value 0 for \fIn\fR will also have this ++effect. ++.Sp ++With a non-zero value for \fIn\fR, DIEs at or deeper than \fIn\fR ++levels will not be printed. The range for \fIn\fR is zero-based. ++.IP "\fB\-\-dwarf\-start=\fR\fIn\fR" 4 ++.IX Item "--dwarf-start=n" ++Print only DIEs beginning with the \s-1DIE\s0 numbered \fIn\fR. This is only ++useful with \fB\-\-debug\-dump=info\fR. ++.Sp ++If specified, this option will suppress printing of any header ++information and all DIEs before the \s-1DIE\s0 numbered \fIn\fR. Only ++siblings and children of the specified \s-1DIE\s0 will be printed. ++.Sp ++This can be used in conjunction with \fB\-\-dwarf\-depth\fR. ++.IP "\fB\-\-ctf=\fR\fIsection\fR" 4 ++.IX Item "--ctf=section" ++Display the contents of the specified \s-1CTF\s0 section. \s-1CTF\s0 sections themselves ++contain many subsections, all of which are displayed in order. ++.IP "\fB\-\-ctf\-parent=\fR\fIsection\fR" 4 ++.IX Item "--ctf-parent=section" ++Specify the name of another section from which the \s-1CTF\s0 dictionary can inherit ++types. (If none is specified, we assume the \s-1CTF\s0 dictionary inherits types ++from the default-named member of the archive contained within this section.) ++.IP "\fB\-\-ctf\-symbols=\fR\fIsection\fR" 4 ++.IX Item "--ctf-symbols=section" ++.PD 0 ++.IP "\fB\-\-ctf\-strings=\fR\fIsection\fR" 4 ++.IX Item "--ctf-strings=section" ++.PD ++Specify the name of another section from which the \s-1CTF\s0 file can inherit ++strings and symbols. By default, the \f(CW\*(C`.symtab\*(C'\fR and its linked ++string table are used. ++.Sp ++If either of \fB\-\-ctf\-symbols\fR or \fB\-\-ctf\-strings\fR is specified, the ++other must be specified as well. ++.IP "\fB\-I\fR" 4 ++.IX Item "-I" ++.PD 0 ++.IP "\fB\-\-histogram\fR" 4 ++.IX Item "--histogram" ++.PD ++Display a histogram of bucket list lengths when displaying the contents ++of the symbol tables. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Display the version number of readelf. ++.IP "\fB\-W\fR" 4 ++.IX Item "-W" ++.PD 0 ++.IP "\fB\-\-wide\fR" 4 ++.IX Item "--wide" ++.PD ++Don't break output lines to fit into 80 columns. By default ++\&\fBreadelf\fR breaks section header and segment listing lines for ++64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes ++\&\fBreadelf\fR to print each section header resp. each segment one a ++single line, which is far more readable on terminals wider than 80 columns. ++.IP "\fB\-H\fR" 4 ++.IX Item "-H" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Display the command-line options understood by \fBreadelf\fR. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBobjdump\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/size.1 b/binutils/doc/size.1 +--- a/binutils/doc/size.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/size.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,297 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "SIZE 1" ++.TH SIZE 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++size \- list section sizes and total size of binary files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++size [\fB\-A\fR|\fB\-B\fR|\fB\-G\fR|\fB\-\-format=\fR\fIcompatibility\fR] ++ [\fB\-\-help\fR] ++ [\fB\-d\fR|\fB\-o\fR|\fB\-x\fR|\fB\-\-radix=\fR\fInumber\fR] ++ [\fB\-\-common\fR] ++ [\fB\-t\fR|\fB\-\-totals\fR] ++ [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-V\fR|\fB\-\-version\fR] ++ [\fIobjfile\fR...] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++The \s-1GNU\s0 \fBsize\fR utility lists the section sizes and the total ++size for each of the binary files \fIobjfile\fR on its argument list. ++By default, one line of output is generated for each file or each ++module if the file is an archive. ++.PP ++\&\fIobjfile\fR... are the files to be examined. If none are ++specified, the file \f(CW\*(C`a.out\*(C'\fR will be used instead. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++The command-line options have the following meanings: ++.IP "\fB\-A\fR" 4 ++.IX Item "-A" ++.PD 0 ++.IP "\fB\-B\fR" 4 ++.IX Item "-B" ++.IP "\fB\-G\fR" 4 ++.IX Item "-G" ++.IP "\fB\-\-format=\fR\fIcompatibility\fR" 4 ++.IX Item "--format=compatibility" ++.PD ++Using one of these options, you can choose whether the output from \s-1GNU\s0 ++\&\fBsize\fR resembles output from System V \fBsize\fR (using \fB\-A\fR, ++or \fB\-\-format=sysv\fR), or Berkeley \fBsize\fR (using \fB\-B\fR, or ++\&\fB\-\-format=berkeley\fR). The default is the one-line format similar to ++Berkeley's. Alternatively, you can choose the \s-1GNU\s0 format output ++(using \fB\-G\fR, or \fB\-\-format=gnu\fR), this is similar to ++Berkeley's output format, but sizes are counted differently. ++.Sp ++Here is an example of the Berkeley (default) format of output from ++\&\fBsize\fR: ++.Sp ++.Vb 4 ++\& $ size \-\-format=Berkeley ranlib size ++\& text data bss dec hex filename ++\& 294880 81920 11592 388392 5ed28 ranlib ++\& 294880 81920 11888 388688 5ee50 size ++.Ve ++.Sp ++The Berkeley style output counts read only data in the \f(CW\*(C`text\*(C'\fR ++column, not in the \f(CW\*(C`data\*(C'\fR column, the \f(CW\*(C`dec\*(C'\fR and \f(CW\*(C`hex\*(C'\fR ++columns both display the sum of the \f(CW\*(C`text\*(C'\fR, \f(CW\*(C`data\*(C'\fR, and ++\&\f(CW\*(C`bss\*(C'\fR columns in decimal and hexadecimal respectively. ++.Sp ++The \s-1GNU\s0 format counts read only data in the \f(CW\*(C`data\*(C'\fR column, not ++the \f(CW\*(C`text\*(C'\fR column, and only displays the sum of the \f(CW\*(C`text\*(C'\fR, ++\&\f(CW\*(C`data\*(C'\fR, and \f(CW\*(C`bss\*(C'\fR columns once, in the \f(CW\*(C`total\*(C'\fR column. ++The \fB\-\-radix\fR option can be used to change the number base for ++all columns. Here is the same data displayed with \s-1GNU\s0 conventions: ++.Sp ++.Vb 4 ++\& $ size \-\-format=GNU ranlib size ++\& text data bss total filename ++\& 279880 96920 11592 388392 ranlib ++\& 279880 96920 11888 388688 size ++.Ve ++.Sp ++This is the same data, but displayed closer to System V conventions: ++.Sp ++.Vb 7 ++\& $ size \-\-format=SysV ranlib size ++\& ranlib : ++\& section size addr ++\& .text 294880 8192 ++\& .data 81920 303104 ++\& .bss 11592 385024 ++\& Total 388392 ++\& ++\& ++\& size : ++\& section size addr ++\& .text 294880 8192 ++\& .data 81920 303104 ++\& .bss 11888 385024 ++\& Total 388688 ++.Ve ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Show a summary of acceptable arguments and options. ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.PD 0 ++.IP "\fB\-o\fR" 4 ++.IX Item "-o" ++.IP "\fB\-x\fR" 4 ++.IX Item "-x" ++.IP "\fB\-\-radix=\fR\fInumber\fR" 4 ++.IX Item "--radix=number" ++.PD ++Using one of these options, you can control whether the size of each ++section is given in decimal (\fB\-d\fR, or \fB\-\-radix=10\fR); octal ++(\fB\-o\fR, or \fB\-\-radix=8\fR); or hexadecimal (\fB\-x\fR, or ++\&\fB\-\-radix=16\fR). In \fB\-\-radix=\fR\fInumber\fR, only the three ++values (8, 10, 16) are supported. The total size is always given in two ++radices; decimal and hexadecimal for \fB\-d\fR or \fB\-x\fR output, or ++octal and hexadecimal if you're using \fB\-o\fR. ++.IP "\fB\-\-common\fR" 4 ++.IX Item "--common" ++Print total size of common symbols in each file. When using Berkeley ++or \s-1GNU\s0 format these are included in the bss size. ++.IP "\fB\-t\fR" 4 ++.IX Item "-t" ++.PD 0 ++.IP "\fB\-\-totals\fR" 4 ++.IX Item "--totals" ++.PD ++Show totals of all objects listed (Berkeley or \s-1GNU\s0 format mode only). ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++Specify that the object-code format for \fIobjfile\fR is ++\&\fIbfdname\fR. This option may not be necessary; \fBsize\fR can ++automatically recognize many formats. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Display the version number of \fBsize\fR. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBar\fR\|(1), \fBobjdump\fR\|(1), \fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/strings.1 b/binutils/doc/strings.1 +--- a/binutils/doc/strings.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/strings.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,315 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "STRINGS 1" ++.TH STRINGS 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++strings \- print the sequences of printable characters in files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++strings [\fB\-afovV\fR] [\fB\-\fR\fImin-len\fR] ++ [\fB\-n\fR \fImin-len\fR] [\fB\-\-bytes=\fR\fImin-len\fR] ++ [\fB\-t\fR \fIradix\fR] [\fB\-\-radix=\fR\fIradix\fR] ++ [\fB\-e\fR \fIencoding\fR] [\fB\-\-encoding=\fR\fIencoding\fR] ++ [\fB\-\fR] [\fB\-\-all\fR] [\fB\-\-print\-file\-name\fR] ++ [\fB\-T\fR \fIbfdname\fR] [\fB\-\-target=\fR\fIbfdname\fR] ++ [\fB\-w\fR] [\fB\-\-include\-all\-whitespace\fR] ++ [\fB\-s\fR] [\fB\-\-output\-separator\fR\fIsep_string\fR] ++ [\fB\-\-help\fR] [\fB\-\-version\fR] \fIfile\fR... ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++For each \fIfile\fR given, \s-1GNU\s0 \fBstrings\fR prints the ++printable character sequences that are at least 4 characters long (or ++the number given with the options below) and are followed by an ++unprintable character. ++.PP ++Depending upon how the strings program was configured it will default ++to either displaying all the printable sequences that it can find in ++each file, or only those sequences that are in loadable, initialized ++data sections. If the file type in unrecognizable, or if strings is ++reading from stdin then it will always display all of the printable ++sequences that it can find. ++.PP ++For backwards compatibility any file that occurs after a command-line ++option of just \fB\-\fR will also be scanned in full, regardless of ++the presence of any \fB\-d\fR option. ++.PP ++\&\fBstrings\fR is mainly useful for determining the contents of ++non-text files. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-all\fR" 4 ++.IX Item "--all" ++.IP "\fB\-\fR" 4 ++.IX Item "-" ++.PD ++Scan the whole file, regardless of what sections it contains or ++whether those sections are loaded or initialized. Normally this is ++the default behaviour, but strings can be configured so that the ++\&\fB\-d\fR is the default instead. ++.Sp ++The \fB\-\fR option is position dependent and forces strings to ++perform full scans of any file that is mentioned after the \fB\-\fR ++on the command line, even if the \fB\-d\fR option has been ++specified. ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.PD 0 ++.IP "\fB\-\-data\fR" 4 ++.IX Item "--data" ++.PD ++Only print strings from initialized, loaded data sections in the ++file. This may reduce the amount of garbage in the output, but it ++also exposes the strings program to any security flaws that may be ++present in the \s-1BFD\s0 library used to scan and load sections. Strings ++can be configured so that this option is the default behaviour. In ++such cases the \fB\-a\fR option can be used to avoid using the \s-1BFD\s0 ++library and instead just print all of the strings found in the file. ++.IP "\fB\-f\fR" 4 ++.IX Item "-f" ++.PD 0 ++.IP "\fB\-\-print\-file\-name\fR" 4 ++.IX Item "--print-file-name" ++.PD ++Print the name of the file before each string. ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Print a summary of the program usage on the standard output and exit. ++.IP "\fB\-\fR\fImin-len\fR" 4 ++.IX Item "-min-len" ++.PD 0 ++.IP "\fB\-n\fR \fImin-len\fR" 4 ++.IX Item "-n min-len" ++.IP "\fB\-\-bytes=\fR\fImin-len\fR" 4 ++.IX Item "--bytes=min-len" ++.PD ++Print sequences of characters that are at least \fImin-len\fR characters ++long, instead of the default 4. ++.IP "\fB\-o\fR" 4 ++.IX Item "-o" ++Like \fB\-t o\fR. Some other versions of \fBstrings\fR have \fB\-o\fR ++act like \fB\-t d\fR instead. Since we can not be compatible with both ++ways, we simply chose one. ++.IP "\fB\-t\fR \fIradix\fR" 4 ++.IX Item "-t radix" ++.PD 0 ++.IP "\fB\-\-radix=\fR\fIradix\fR" 4 ++.IX Item "--radix=radix" ++.PD ++Print the offset within the file before each string. The single ++character argument specifies the radix of the offset\-\-\-\fBo\fR for ++octal, \fBx\fR for hexadecimal, or \fBd\fR for decimal. ++.IP "\fB\-e\fR \fIencoding\fR" 4 ++.IX Item "-e encoding" ++.PD 0 ++.IP "\fB\-\-encoding=\fR\fIencoding\fR" 4 ++.IX Item "--encoding=encoding" ++.PD ++Select the character encoding of the strings that are to be found. ++Possible values for \fIencoding\fR are: \fBs\fR = single\-7\-bit\-byte ++characters (\s-1ASCII, ISO 8859,\s0 etc., default), \fBS\fR = ++single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR = ++16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit ++littleendian. Useful for finding wide character strings. (\fBl\fR ++and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings). ++.IP "\fB\-T\fR \fIbfdname\fR" 4 ++.IX Item "-T bfdname" ++.PD 0 ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++.PD ++Specify an object code format other than your system's default format. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Print the program version number on the standard output and exit. ++.IP "\fB\-w\fR" 4 ++.IX Item "-w" ++.PD 0 ++.IP "\fB\-\-include\-all\-whitespace\fR" 4 ++.IX Item "--include-all-whitespace" ++.PD ++By default tab and space characters are included in the strings that ++are displayed, but other whitespace characters, such a newlines and ++carriage returns, are not. The \fB\-w\fR option changes this so ++that all whitespace characters are considered to be part of a string. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-output\-separator\fR" 4 ++.IX Item "--output-separator" ++.PD ++By default, output strings are delimited by a new-line. This option ++allows you to supply any string to be used as the output record ++separator. Useful with \-\-include\-all\-whitespace where strings ++may contain new-lines internally. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++\&\fBar\fR\|(1), \fBnm\fR\|(1), \fBobjdump\fR\|(1), \fBranlib\fR\|(1), \fBreadelf\fR\|(1) ++and the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/strip.1 b/binutils/doc/strip.1 +--- a/binutils/doc/strip.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/strip.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,502 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "STRIP 1" ++.TH STRIP 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++strip \- discard symbols and other data from object files ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR] ++ [\fB\-I\fR \fIbfdname\fR |\fB\-\-input\-target=\fR\fIbfdname\fR] ++ [\fB\-O\fR \fIbfdname\fR |\fB\-\-output\-target=\fR\fIbfdname\fR] ++ [\fB\-s\fR|\fB\-\-strip\-all\fR] ++ [\fB\-S\fR|\fB\-g\fR|\fB\-d\fR|\fB\-\-strip\-debug\fR] ++ [\fB\-\-strip\-dwo\fR] ++ [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-M\fR|\fB\-\-merge\-notes\fR][\fB\-\-no\-merge\-notes\fR] ++ [\fB\-N\fR \fIsymbolname\fR |\fB\-\-strip\-symbol=\fR\fIsymbolname\fR] ++ [\fB\-w\fR|\fB\-\-wildcard\fR] ++ [\fB\-x\fR|\fB\-\-discard\-all\fR] [\fB\-X\fR |\fB\-\-discard\-locals\fR] ++ [\fB\-R\fR \fIsectionname\fR |\fB\-\-remove\-section=\fR\fIsectionname\fR] ++ [\fB\-\-keep\-section=\fR\fIsectionpattern\fR] ++ [\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR] ++ [\fB\-o\fR \fIfile\fR] [\fB\-p\fR|\fB\-\-preserve\-dates\fR] ++ [\fB\-D\fR|\fB\-\-enable\-deterministic\-archives\fR] ++ [\fB\-U\fR|\fB\-\-disable\-deterministic\-archives\fR] ++ [\fB\-\-keep\-file\-symbols\fR] ++ [\fB\-\-only\-keep\-debug\fR] ++ [\fB\-v\fR |\fB\-\-verbose\fR] [\fB\-V\fR|\fB\-\-version\fR] ++ [\fB\-\-help\fR] [\fB\-\-info\fR] ++ \fIobjfile\fR... ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\s-1GNU\s0 \fBstrip\fR discards all symbols from object files ++\&\fIobjfile\fR. The list of object files may include archives. ++At least one object file must be given. ++.PP ++\&\fBstrip\fR modifies the files named in its argument, ++rather than writing modified copies under different names. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-F\fR \fIbfdname\fR" 4 ++.IX Item "-F bfdname" ++.PD 0 ++.IP "\fB\-\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--target=bfdname" ++.PD ++Treat the original \fIobjfile\fR as a file with the object ++code format \fIbfdname\fR, and rewrite it in the same format. ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++Show a summary of the options to \fBstrip\fR and exit. ++.IP "\fB\-\-info\fR" 4 ++.IX Item "--info" ++Display a list showing all architectures and object formats available. ++.IP "\fB\-I\fR \fIbfdname\fR" 4 ++.IX Item "-I bfdname" ++.PD 0 ++.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--input-target=bfdname" ++.PD ++Treat the original \fIobjfile\fR as a file with the object ++code format \fIbfdname\fR. ++.IP "\fB\-O\fR \fIbfdname\fR" 4 ++.IX Item "-O bfdname" ++.PD 0 ++.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4 ++.IX Item "--output-target=bfdname" ++.PD ++Replace \fIobjfile\fR with a file in the output format \fIbfdname\fR. ++.IP "\fB\-R\fR \fIsectionname\fR" 4 ++.IX Item "-R sectionname" ++.PD 0 ++.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4 ++.IX Item "--remove-section=sectionname" ++.PD ++Remove any section named \fIsectionname\fR from the output file, in ++addition to whatever sections would otherwise be removed. This ++option may be given more than once. Note that using this option ++inappropriately may make the output file unusable. The wildcard ++character \fB*\fR may be given at the end of \fIsectionname\fR. If ++so, then any section starting with \fIsectionname\fR will be removed. ++.Sp ++If the first character of \fIsectionpattern\fR is the exclamation ++point (!) then matching sections will not be removed even if an ++earlier use of \fB\-\-remove\-section\fR on the same command line ++would otherwise remove it. For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-section=.text.* \-\-remove\-section=!.text.foo ++.Ve ++.Sp ++will remove all sections matching the pattern '.text.*', but will not ++remove the section '.text.foo'. ++.IP "\fB\-\-keep\-section=\fR\fIsectionpattern\fR" 4 ++.IX Item "--keep-section=sectionpattern" ++When removing sections from the output file, keep sections that match ++\&\fIsectionpattern\fR. ++.IP "\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR" 4 ++.IX Item "--remove-relocations=sectionpattern" ++Remove relocations from the output file for any section matching ++\&\fIsectionpattern\fR. This option may be given more than once. Note ++that using this option inappropriately may make the output file ++unusable. Wildcard characters are accepted in \fIsectionpattern\fR. ++For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-relocations=.text.* ++.Ve ++.Sp ++will remove the relocations for all sections matching the patter ++\&'.text.*'. ++.Sp ++If the first character of \fIsectionpattern\fR is the exclamation ++point (!) then matching sections will not have their relocation ++removed even if an earlier use of \fB\-\-remove\-relocations\fR on the ++same command line would otherwise cause the relocations to be removed. ++For example: ++.Sp ++.Vb 1 ++\& \-\-remove\-relocations=.text.* \-\-remove\-relocations=!.text.foo ++.Ve ++.Sp ++will remove all relocations for sections matching the pattern ++\&'.text.*', but will not remove relocations for the section ++\&'.text.foo'. ++.IP "\fB\-s\fR" 4 ++.IX Item "-s" ++.PD 0 ++.IP "\fB\-\-strip\-all\fR" 4 ++.IX Item "--strip-all" ++.PD ++Remove all symbols. ++.IP "\fB\-g\fR" 4 ++.IX Item "-g" ++.PD 0 ++.IP "\fB\-S\fR" 4 ++.IX Item "-S" ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.IP "\fB\-\-strip\-debug\fR" 4 ++.IX Item "--strip-debug" ++.PD ++Remove debugging symbols only. ++.IP "\fB\-\-strip\-dwo\fR" 4 ++.IX Item "--strip-dwo" ++Remove the contents of all \s-1DWARF\s0 .dwo sections, leaving the ++remaining debugging sections and all symbols intact. ++See the description of this option in the \fBobjcopy\fR section ++for more information. ++.IP "\fB\-\-strip\-unneeded\fR" 4 ++.IX Item "--strip-unneeded" ++Remove all symbols that are not needed for relocation processing. ++.IP "\fB\-K\fR \fIsymbolname\fR" 4 ++.IX Item "-K symbolname" ++.PD 0 ++.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--keep-symbol=symbolname" ++.PD ++When stripping symbols, keep symbol \fIsymbolname\fR even if it would ++normally be stripped. This option may be given more than once. ++.IP "\fB\-M\fR" 4 ++.IX Item "-M" ++.PD 0 ++.IP "\fB\-\-merge\-notes\fR" 4 ++.IX Item "--merge-notes" ++.IP "\fB\-\-no\-merge\-notes\fR" 4 ++.IX Item "--no-merge-notes" ++.PD ++For \s-1ELF\s0 files, attempt (or do not attempt) to reduce the size of any ++\&\s-1SHT_NOTE\s0 type sections by removing duplicate notes. The default is to ++attempt this reduction unless stripping debug or \s-1DWO\s0 information. ++.IP "\fB\-N\fR \fIsymbolname\fR" 4 ++.IX Item "-N symbolname" ++.PD 0 ++.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4 ++.IX Item "--strip-symbol=symbolname" ++.PD ++Remove symbol \fIsymbolname\fR from the source file. This option may be ++given more than once, and may be combined with strip options other than ++\&\fB\-K\fR. ++.IP "\fB\-o\fR \fIfile\fR" 4 ++.IX Item "-o file" ++Put the stripped output in \fIfile\fR, rather than replacing the ++existing file. When this argument is used, only one \fIobjfile\fR ++argument may be specified. ++.IP "\fB\-p\fR" 4 ++.IX Item "-p" ++.PD 0 ++.IP "\fB\-\-preserve\-dates\fR" 4 ++.IX Item "--preserve-dates" ++.PD ++Preserve the access and modification dates of the file. ++.IP "\fB\-D\fR" 4 ++.IX Item "-D" ++.PD 0 ++.IP "\fB\-\-enable\-deterministic\-archives\fR" 4 ++.IX Item "--enable-deterministic-archives" ++.PD ++Operate in \fIdeterministic\fR mode. When copying archive members ++and writing the archive index, use zero for UIDs, GIDs, timestamps, ++and use consistent file modes for all files. ++.Sp ++If \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by default. ++It can be disabled with the \fB\-U\fR option, below. ++.IP "\fB\-U\fR" 4 ++.IX Item "-U" ++.PD 0 ++.IP "\fB\-\-disable\-deterministic\-archives\fR" 4 ++.IX Item "--disable-deterministic-archives" ++.PD ++Do \fInot\fR operate in \fIdeterministic\fR mode. This is the ++inverse of the \fB\-D\fR option, above: when copying archive members ++and writing the archive index, use their actual \s-1UID, GID,\s0 timestamp, ++and file mode values. ++.Sp ++This is the default unless \fIbinutils\fR was configured with ++\&\fB\-\-enable\-deterministic\-archives\fR. ++.IP "\fB\-w\fR" 4 ++.IX Item "-w" ++.PD 0 ++.IP "\fB\-\-wildcard\fR" 4 ++.IX Item "--wildcard" ++.PD ++Permit regular expressions in \fIsymbolname\fRs used in other command ++line options. The question mark (?), asterisk (*), backslash (\e) and ++square brackets ([]) operators can be used anywhere in the symbol ++name. If the first character of the symbol name is the exclamation ++point (!) then the sense of the switch is reversed for that symbol. ++For example: ++.Sp ++.Vb 1 ++\& \-w \-K !foo \-K fo* ++.Ve ++.Sp ++would cause strip to only keep symbols that start with the letters ++\&\*(L"fo\*(R", but to discard the symbol \*(L"foo\*(R". ++.IP "\fB\-x\fR" 4 ++.IX Item "-x" ++.PD 0 ++.IP "\fB\-\-discard\-all\fR" 4 ++.IX Item "--discard-all" ++.PD ++Remove non-global symbols. ++.IP "\fB\-X\fR" 4 ++.IX Item "-X" ++.PD 0 ++.IP "\fB\-\-discard\-locals\fR" 4 ++.IX Item "--discard-locals" ++.PD ++Remove compiler-generated local symbols. ++(These usually start with \fBL\fR or \fB.\fR.) ++.IP "\fB\-\-keep\-file\-symbols\fR" 4 ++.IX Item "--keep-file-symbols" ++When stripping a file, perhaps with \fB\-\-strip\-debug\fR or ++\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names, ++which would otherwise get stripped. ++.IP "\fB\-\-only\-keep\-debug\fR" 4 ++.IX Item "--only-keep-debug" ++Strip a file, emptying the contents of any sections that would not be ++stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections ++intact. In \s-1ELF\s0 files, this preserves all the note sections in the ++output as well. ++.Sp ++Note \- the section headers of the stripped sections are preserved, ++including their sizes, but the contents of the section are discarded. ++The section headers are preserved so that other tools can match up the ++debuginfo file with the real executable, even if that executable has ++been relocated to a different address space. ++.Sp ++The intention is that this option will be used in conjunction with ++\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a ++stripped binary which will occupy less space in \s-1RAM\s0 and in a ++distribution and the second a debugging information file which is only ++needed if debugging abilities are required. The suggested procedure ++to create these files is as follows: ++.RS 4 ++.IP "1." 4 ++.IX Item "1." ++\&\f(CW\*(C`foo\*(C'\fR then... ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++create a file containing the debugging info. ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++stripped executable. ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++to add a link to the debugging info into the stripped executable. ++.RE ++.RS 4 ++.Sp ++Note\-\-\-the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info ++file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is ++optional. You could instead do this: ++.IP "1." 4 ++.IX Item "1." ++.PD 0 ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.ie n .IP "1." 4 ++.el .IP "1." 4 ++.IX Item "1." ++.RE ++.RS 4 ++.PD ++.Sp ++i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the ++full executable. It does not have to be a file created by the ++\&\fB\-\-only\-keep\-debug\fR switch. ++.Sp ++Note\-\-\-this switch is only intended for use on fully linked files. It ++does not make sense to use it on object files where the debugging ++information may be incomplete. Besides the gnu_debuglink feature ++currently only supports the presence of one filename containing ++debugging information, not multiple filenames on a one-per-object-file ++basis. ++.RE ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Show the version number for \fBstrip\fR. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-verbose\fR" 4 ++.IX Item "--verbose" ++.PD ++Verbose output: list all object files modified. In the case of ++archives, \fBstrip \-v\fR lists all members of the archive. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/windmc.1 b/binutils/doc/windmc.1 +--- a/binutils/doc/windmc.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/windmc.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,360 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "WINDMC 1" ++.TH WINDMC 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++windmc \- generates Windows message resources ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++windmc [options] input-file ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBwindmc\fR reads message definitions from an input file (.mc) and ++translate them into a set of output files. The output files may be of ++four kinds: ++.ie n .IP """h""" 4 ++.el .IP "\f(CWh\fR" 4 ++.IX Item "h" ++A C header file containing the message definitions. ++.ie n .IP """rc""" 4 ++.el .IP "\f(CWrc\fR" 4 ++.IX Item "rc" ++A resource file compilable by the \fBwindres\fR tool. ++.ie n .IP """bin""" 4 ++.el .IP "\f(CWbin\fR" 4 ++.IX Item "bin" ++One or more binary files containing the resource data for a specific ++message language. ++.ie n .IP """dbg""" 4 ++.el .IP "\f(CWdbg\fR" 4 ++.IX Item "dbg" ++A C include file that maps message id's to their symbolic name. ++.PP ++The exact description of these different formats is available in ++documentation from Microsoft. ++.PP ++When \fBwindmc\fR converts from the \f(CW\*(C`mc\*(C'\fR format to the \f(CW\*(C`bin\*(C'\fR ++format, \f(CW\*(C`rc\*(C'\fR, \f(CW\*(C`h\*(C'\fR, and optional \f(CW\*(C`dbg\*(C'\fR it is acting like the ++Windows Message Compiler. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-a\fR" 4 ++.IX Item "-a" ++.PD 0 ++.IP "\fB\-\-ascii_in\fR" 4 ++.IX Item "--ascii_in" ++.PD ++Specifies that the input file specified is \s-1ASCII.\s0 This is the default ++behaviour. ++.IP "\fB\-A\fR" 4 ++.IX Item "-A" ++.PD 0 ++.IP "\fB\-\-ascii_out\fR" 4 ++.IX Item "--ascii_out" ++.PD ++Specifies that messages in the output \f(CW\*(C`bin\*(C'\fR files should be in \s-1ASCII\s0 ++format. ++.IP "\fB\-b\fR" 4 ++.IX Item "-b" ++.PD 0 ++.IP "\fB\-\-binprefix\fR" 4 ++.IX Item "--binprefix" ++.PD ++Specifies that \f(CW\*(C`bin\*(C'\fR filenames should have to be prefixed by the ++basename of the source file. ++.IP "\fB\-c\fR" 4 ++.IX Item "-c" ++.PD 0 ++.IP "\fB\-\-customflag\fR" 4 ++.IX Item "--customflag" ++.PD ++Sets the customer bit in all message id's. ++.IP "\fB\-C\fR \fIcodepage\fR" 4 ++.IX Item "-C codepage" ++.PD 0 ++.IP "\fB\-\-codepage_in\fR \fIcodepage\fR" 4 ++.IX Item "--codepage_in codepage" ++.PD ++Sets the default codepage to be used to convert input file to \s-1UTF16.\s0 The ++default is ocdepage 1252. ++.IP "\fB\-d\fR" 4 ++.IX Item "-d" ++.PD 0 ++.IP "\fB\-\-decimal_values\fR" 4 ++.IX Item "--decimal_values" ++.PD ++Outputs the constants in the header file in decimal. Default is using ++hexadecimal output. ++.IP "\fB\-e\fR \fIext\fR" 4 ++.IX Item "-e ext" ++.PD 0 ++.IP "\fB\-\-extension\fR \fIext\fR" 4 ++.IX Item "--extension ext" ++.PD ++The extension for the header file. The default is .h extension. ++.IP "\fB\-F\fR \fItarget\fR" 4 ++.IX Item "-F target" ++.PD 0 ++.IP "\fB\-\-target\fR \fItarget\fR" 4 ++.IX Item "--target target" ++.PD ++Specify the \s-1BFD\s0 format to use for a bin file as output. This ++is a \s-1BFD\s0 target name; you can use the \fB\-\-help\fR option to see a list ++of supported targets. Normally \fBwindmc\fR will use the default ++format, which is the first one listed by the \fB\-\-help\fR option. ++.IP "\fB\-h\fR \fIpath\fR" 4 ++.IX Item "-h path" ++.PD 0 ++.IP "\fB\-\-headerdir\fR \fIpath\fR" 4 ++.IX Item "--headerdir path" ++.PD ++The target directory of the generated header file. The default is the ++current directory. ++.IP "\fB\-H\fR" 4 ++.IX Item "-H" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Displays a list of command-line options and then exits. ++.IP "\fB\-m\fR \fIcharacters\fR" 4 ++.IX Item "-m characters" ++.PD 0 ++.IP "\fB\-\-maxlength\fR \fIcharacters\fR" 4 ++.IX Item "--maxlength characters" ++.PD ++Instructs \fBwindmc\fR to generate a warning if the length ++of any message exceeds the number specified. ++.IP "\fB\-n\fR" 4 ++.IX Item "-n" ++.PD 0 ++.IP "\fB\-\-nullterminate\fR" 4 ++.IX Item "--nullterminate" ++.PD ++Terminate message text in \f(CW\*(C`bin\*(C'\fR files by zero. By default they are ++terminated by \s-1CR/LF.\s0 ++.IP "\fB\-o\fR" 4 ++.IX Item "-o" ++.PD 0 ++.IP "\fB\-\-hresult_use\fR" 4 ++.IX Item "--hresult_use" ++.PD ++Not yet implemented. Instructs \f(CW\*(C`windmc\*(C'\fR to generate an \s-1OLE2\s0 header ++file, using \s-1HRESULT\s0 definitions. Status codes are used if the flag is not ++specified. ++.IP "\fB\-O\fR \fIcodepage\fR" 4 ++.IX Item "-O codepage" ++.PD 0 ++.IP "\fB\-\-codepage_out\fR \fIcodepage\fR" 4 ++.IX Item "--codepage_out codepage" ++.PD ++Sets the default codepage to be used to output text files. The default ++is ocdepage 1252. ++.IP "\fB\-r\fR \fIpath\fR" 4 ++.IX Item "-r path" ++.PD 0 ++.IP "\fB\-\-rcdir\fR \fIpath\fR" 4 ++.IX Item "--rcdir path" ++.PD ++The target directory for the generated \f(CW\*(C`rc\*(C'\fR script and the generated ++\&\f(CW\*(C`bin\*(C'\fR files that the resource compiler script includes. The default ++is the current directory. ++.IP "\fB\-u\fR" 4 ++.IX Item "-u" ++.PD 0 ++.IP "\fB\-\-unicode_in\fR" 4 ++.IX Item "--unicode_in" ++.PD ++Specifies that the input file is \s-1UTF16.\s0 ++.IP "\fB\-U\fR" 4 ++.IX Item "-U" ++.PD 0 ++.IP "\fB\-\-unicode_out\fR" 4 ++.IX Item "--unicode_out" ++.PD ++Specifies that messages in the output \f(CW\*(C`bin\*(C'\fR file should be in \s-1UTF16\s0 ++format. This is the default behaviour. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++.PD 0 ++.IP "\fB\-\-verbose\fR" 4 ++.IX Item "--verbose" ++.PD ++Enable verbose mode. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Prints the version number for \fBwindmc\fR. ++.IP "\fB\-x\fR \fIpath\fR" 4 ++.IX Item "-x path" ++.PD 0 ++.IP "\fB\-\-xdgb\fR \fIpath\fR" 4 ++.IX Item "--xdgb path" ++.PD ++The path of the \f(CW\*(C`dbg\*(C'\fR C include file that maps message id's to the ++symbolic name. No such file is generated without specifying the switch. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/doc/windres.1 b/binutils/doc/windres.1 +--- a/binutils/doc/windres.1 1969-12-31 21:00:00.000000000 -0300 ++++ b/binutils/doc/windres.1 2021-03-30 17:47:59.838886000 -0300 +@@ -0,0 +1,368 @@ ++.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) ++.\" ++.\" Standard preamble: ++.\" ======================================================================== ++.de Sp \" Vertical space (when we can't use .PP) ++.if t .sp .5v ++.if n .sp ++.. ++.de Vb \" Begin verbatim text ++.ft CW ++.nf ++.ne \\$1 ++.. ++.de Ve \" End verbatim text ++.ft R ++.fi ++.. ++.\" Set up some character translations and predefined strings. \*(-- will ++.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left ++.\" double quote, and \*(R" will give a right double quote. \*(C+ will ++.\" give a nicer C++. Capital omega is used to do unbreakable dashes and ++.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, ++.\" nothing in troff, for use with C<>. ++.tr \(*W- ++.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' ++.ie n \{\ ++. ds -- \(*W- ++. ds PI pi ++. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch ++. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch ++. ds L" "" ++. ds R" "" ++. ds C` "" ++. ds C' "" ++'br\} ++.el\{\ ++. ds -- \|\(em\| ++. ds PI \(*p ++. ds L" `` ++. ds R" '' ++. ds C` ++. ds C' ++'br\} ++.\" ++.\" Escape single quotes in literal strings from groff's Unicode transform. ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ++.\" If the F register is >0, we'll generate index entries on stderr for ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index ++.\" entries marked with X<> in POD. Of course, you'll have to process the ++.\" output yourself in some meaningful fashion. ++.\" ++.\" Avoid warning from groff about undefined register 'F'. ++.de IX ++.. ++.nr rF 0 ++.if \n(.g .if rF .nr rF 1 ++.if (\n(rF:(\n(.g==0)) \{\ ++. if \nF \{\ ++. de IX ++. tm Index:\\$1\t\\n%\t"\\$2" ++.. ++. if !\nF==2 \{\ ++. nr % 0 ++. nr F 2 ++. \} ++. \} ++.\} ++.rr rF ++.\" ++.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). ++.\" Fear. Run. Save yourself. No user-serviceable parts. ++. \" fudge factors for nroff and troff ++.if n \{\ ++. ds #H 0 ++. ds #V .8m ++. ds #F .3m ++. ds #[ \f1 ++. ds #] \fP ++.\} ++.if t \{\ ++. ds #H ((1u-(\\\\n(.fu%2u))*.13m) ++. ds #V .6m ++. ds #F 0 ++. ds #[ \& ++. ds #] \& ++.\} ++. \" simple accents for nroff and troff ++.if n \{\ ++. ds ' \& ++. ds ` \& ++. ds ^ \& ++. ds , \& ++. ds ~ ~ ++. ds / ++.\} ++.if t \{\ ++. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" ++. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' ++. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' ++. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' ++. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' ++. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' ++.\} ++. \" troff and (daisy-wheel) nroff accents ++.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' ++.ds 8 \h'\*(#H'\(*b\h'-\*(#H' ++.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] ++.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' ++.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' ++.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] ++.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] ++.ds ae a\h'-(\w'a'u*4/10)'e ++.ds Ae A\h'-(\w'A'u*4/10)'E ++. \" corrections for vroff ++.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' ++.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' ++. \" for low resolution devices (crt and lpr) ++.if \n(.H>23 .if \n(.V>19 \ ++\{\ ++. ds : e ++. ds 8 ss ++. ds o a ++. ds d- d\h'-1'\(ga ++. ds D- D\h'-1'\(hy ++. ds th \o'bp' ++. ds Th \o'LP' ++. ds ae ae ++. ds Ae AE ++.\} ++.rm #[ #] #H #V #F C ++.\" ======================================================================== ++.\" ++.IX Title "WINDRES 1" ++.TH WINDRES 1 "2020-04-03" "binutils-2.34" "GNU Development Tools" ++.\" For nroff, turn off justification. Always turn off hyphenation; it makes ++.\" way too many mistakes in technical documents. ++.if n .ad l ++.nh ++.SH "NAME" ++windres \- manipulate Windows resources ++.SH "SYNOPSIS" ++.IX Header "SYNOPSIS" ++windres [options] [input\-file] [output\-file] ++.SH "DESCRIPTION" ++.IX Header "DESCRIPTION" ++\&\fBwindres\fR reads resources from an input file and copies them into ++an output file. Either file may be in one of three formats: ++.ie n .IP """rc""" 4 ++.el .IP "\f(CWrc\fR" 4 ++.IX Item "rc" ++A text format read by the Resource Compiler. ++.ie n .IP """res""" 4 ++.el .IP "\f(CWres\fR" 4 ++.IX Item "res" ++A binary format generated by the Resource Compiler. ++.ie n .IP """coff""" 4 ++.el .IP "\f(CWcoff\fR" 4 ++.IX Item "coff" ++A \s-1COFF\s0 object or executable. ++.PP ++The exact description of these different formats is available in ++documentation from Microsoft. ++.PP ++When \fBwindres\fR converts from the \f(CW\*(C`rc\*(C'\fR format to the \f(CW\*(C`res\*(C'\fR ++format, it is acting like the Windows Resource Compiler. When ++\&\fBwindres\fR converts from the \f(CW\*(C`res\*(C'\fR format to the \f(CW\*(C`coff\*(C'\fR ++format, it is acting like the Windows \f(CW\*(C`CVTRES\*(C'\fR program. ++.PP ++When \fBwindres\fR generates an \f(CW\*(C`rc\*(C'\fR file, the output is similar ++but not identical to the format expected for the input. When an input ++\&\f(CW\*(C`rc\*(C'\fR file refers to an external filename, an output \f(CW\*(C`rc\*(C'\fR file ++will instead include the file contents. ++.PP ++If the input or output format is not specified, \fBwindres\fR will ++guess based on the file name, or, for the input file, the file contents. ++A file with an extension of \fI.rc\fR will be treated as an \f(CW\*(C`rc\*(C'\fR ++file, a file with an extension of \fI.res\fR will be treated as a ++\&\f(CW\*(C`res\*(C'\fR file, and a file with an extension of \fI.o\fR or ++\&\fI.exe\fR will be treated as a \f(CW\*(C`coff\*(C'\fR file. ++.PP ++If no output file is specified, \fBwindres\fR will print the resources ++in \f(CW\*(C`rc\*(C'\fR format to standard output. ++.PP ++The normal use is for you to write an \f(CW\*(C`rc\*(C'\fR file, use \fBwindres\fR ++to convert it to a \s-1COFF\s0 object file, and then link the \s-1COFF\s0 file into ++your application. This will make the resources described in the ++\&\f(CW\*(C`rc\*(C'\fR file available to Windows. ++.SH "OPTIONS" ++.IX Header "OPTIONS" ++.IP "\fB\-i\fR \fIfilename\fR" 4 ++.IX Item "-i filename" ++.PD 0 ++.IP "\fB\-\-input\fR \fIfilename\fR" 4 ++.IX Item "--input filename" ++.PD ++The name of the input file. If this option is not used, then ++\&\fBwindres\fR will use the first non-option argument as the input file ++name. If there are no non-option arguments, then \fBwindres\fR will ++read from standard input. \fBwindres\fR can not read a \s-1COFF\s0 file from ++standard input. ++.IP "\fB\-o\fR \fIfilename\fR" 4 ++.IX Item "-o filename" ++.PD 0 ++.IP "\fB\-\-output\fR \fIfilename\fR" 4 ++.IX Item "--output filename" ++.PD ++The name of the output file. If this option is not used, then ++\&\fBwindres\fR will use the first non-option argument, after any used ++for the input file name, as the output file name. If there is no ++non-option argument, then \fBwindres\fR will write to standard output. ++\&\fBwindres\fR can not write a \s-1COFF\s0 file to standard output. Note, ++for compatibility with \fBrc\fR the option \fB\-fo\fR is also ++accepted, but its use is not recommended. ++.IP "\fB\-J\fR \fIformat\fR" 4 ++.IX Item "-J format" ++.PD 0 ++.IP "\fB\-\-input\-format\fR \fIformat\fR" 4 ++.IX Item "--input-format format" ++.PD ++The input format to read. \fIformat\fR may be \fBres\fR, \fBrc\fR, or ++\&\fBcoff\fR. If no input format is specified, \fBwindres\fR will ++guess, as described above. ++.IP "\fB\-O\fR \fIformat\fR" 4 ++.IX Item "-O format" ++.PD 0 ++.IP "\fB\-\-output\-format\fR \fIformat\fR" 4 ++.IX Item "--output-format format" ++.PD ++The output format to generate. \fIformat\fR may be \fBres\fR, ++\&\fBrc\fR, or \fBcoff\fR. If no output format is specified, ++\&\fBwindres\fR will guess, as described above. ++.IP "\fB\-F\fR \fItarget\fR" 4 ++.IX Item "-F target" ++.PD 0 ++.IP "\fB\-\-target\fR \fItarget\fR" 4 ++.IX Item "--target target" ++.PD ++Specify the \s-1BFD\s0 format to use for a \s-1COFF\s0 file as input or output. This ++is a \s-1BFD\s0 target name; you can use the \fB\-\-help\fR option to see a list ++of supported targets. Normally \fBwindres\fR will use the default ++format, which is the first one listed by the \fB\-\-help\fR option. ++.IP "\fB\-\-preprocessor\fR \fIprogram\fR" 4 ++.IX Item "--preprocessor program" ++When \fBwindres\fR reads an \f(CW\*(C`rc\*(C'\fR file, it runs it through the C ++preprocessor first. This option may be used to specify the preprocessor ++to use, including any leading arguments. The default preprocessor ++argument is \f(CW\*(C`gcc \-E \-xc\-header \-DRC_INVOKED\*(C'\fR. ++.IP "\fB\-\-preprocessor\-arg\fR \fIoption\fR" 4 ++.IX Item "--preprocessor-arg option" ++When \fBwindres\fR reads an \f(CW\*(C`rc\*(C'\fR file, it runs it through ++the C preprocessor first. This option may be used to specify additional ++text to be passed to preprocessor on its command line. ++This option can be used multiple times to add multiple options to the ++preprocessor command line. ++.IP "\fB\-I\fR \fIdirectory\fR" 4 ++.IX Item "-I directory" ++.PD 0 ++.IP "\fB\-\-include\-dir\fR \fIdirectory\fR" 4 ++.IX Item "--include-dir directory" ++.PD ++Specify an include directory to use when reading an \f(CW\*(C`rc\*(C'\fR file. ++\&\fBwindres\fR will pass this to the preprocessor as an \fB\-I\fR ++option. \fBwindres\fR will also search this directory when looking for ++files named in the \f(CW\*(C`rc\*(C'\fR file. If the argument passed to this command ++matches any of the supported \fIformats\fR (as described in the \fB\-J\fR ++option), it will issue a deprecation warning, and behave just like the ++\&\fB\-J\fR option. New programs should not use this behaviour. If a ++directory happens to match a \fIformat\fR, simple prefix it with \fB./\fR ++to disable the backward compatibility. ++.IP "\fB\-D\fR \fItarget\fR" 4 ++.IX Item "-D target" ++.PD 0 ++.IP "\fB\-\-define\fR \fIsym\fR\fB[=\fR\fIval\fR\fB]\fR" 4 ++.IX Item "--define sym[=val]" ++.PD ++Specify a \fB\-D\fR option to pass to the preprocessor when reading an ++\&\f(CW\*(C`rc\*(C'\fR file. ++.IP "\fB\-U\fR \fItarget\fR" 4 ++.IX Item "-U target" ++.PD 0 ++.IP "\fB\-\-undefine\fR \fIsym\fR" 4 ++.IX Item "--undefine sym" ++.PD ++Specify a \fB\-U\fR option to pass to the preprocessor when reading an ++\&\f(CW\*(C`rc\*(C'\fR file. ++.IP "\fB\-r\fR" 4 ++.IX Item "-r" ++Ignored for compatibility with rc. ++.IP "\fB\-v\fR" 4 ++.IX Item "-v" ++Enable verbose mode. This tells you what the preprocessor is if you ++didn't specify one. ++.IP "\fB\-c\fR \fIval\fR" 4 ++.IX Item "-c val" ++.PD 0 ++.IP "\fB\-\-codepage\fR \fIval\fR" 4 ++.IX Item "--codepage val" ++.PD ++Specify the default codepage to use when reading an \f(CW\*(C`rc\*(C'\fR file. ++\&\fIval\fR should be a hexadecimal prefixed by \fB0x\fR or decimal ++codepage code. The valid range is from zero up to 0xffff, but the ++validity of the codepage is host and configuration dependent. ++.IP "\fB\-l\fR \fIval\fR" 4 ++.IX Item "-l val" ++.PD 0 ++.IP "\fB\-\-language\fR \fIval\fR" 4 ++.IX Item "--language val" ++.PD ++Specify the default language to use when reading an \f(CW\*(C`rc\*(C'\fR file. ++\&\fIval\fR should be a hexadecimal language code. The low eight bits are ++the language, and the high eight bits are the sublanguage. ++.IP "\fB\-\-use\-temp\-file\fR" 4 ++.IX Item "--use-temp-file" ++Use a temporary file to instead of using popen to read the output of ++the preprocessor. Use this option if the popen implementation is buggy ++on the host (eg., certain non-English language versions of Windows 95 and ++Windows 98 are known to have buggy popen where the output will instead ++go the console). ++.IP "\fB\-\-no\-use\-temp\-file\fR" 4 ++.IX Item "--no-use-temp-file" ++Use popen, not a temporary file, to read the output of the preprocessor. ++This is the default behaviour. ++.IP "\fB\-h\fR" 4 ++.IX Item "-h" ++.PD 0 ++.IP "\fB\-\-help\fR" 4 ++.IX Item "--help" ++.PD ++Prints a usage summary. ++.IP "\fB\-V\fR" 4 ++.IX Item "-V" ++.PD 0 ++.IP "\fB\-\-version\fR" 4 ++.IX Item "--version" ++.PD ++Prints the version number for \fBwindres\fR. ++.IP "\fB\-\-yydebug\fR" 4 ++.IX Item "--yydebug" ++If \fBwindres\fR is compiled with \f(CW\*(C`YYDEBUG\*(C'\fR defined as \f(CW1\fR, ++this will turn on parser debugging. ++.IP "\fB@\fR\fIfile\fR" 4 ++.IX Item "@file" ++Read command-line options from \fIfile\fR. The options read are ++inserted in place of the original @\fIfile\fR option. If \fIfile\fR ++does not exist, or cannot be read, then the option will be treated ++literally, and not removed. ++.Sp ++Options in \fIfile\fR are separated by whitespace. A whitespace ++character may be included in an option by surrounding the entire ++option in either single or double quotes. Any character (including a ++backslash) may be included by prefixing the character to be included ++with a backslash. The \fIfile\fR may itself contain additional ++@\fIfile\fR options; any such options will be processed recursively. ++.SH "SEE ALSO" ++.IX Header "SEE ALSO" ++the Info entries for \fIbinutils\fR. ++.SH "COPYRIGHT" ++.IX Header "COPYRIGHT" ++Copyright (c) 1991\-2020 Free Software Foundation, Inc. ++.PP ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". +diff -rNU3 a/binutils/Makefile.in b/binutils/Makefile.in +--- a/binutils/Makefile.in 2021-03-30 23:12:40.151226599 -0300 ++++ b/binutils/Makefile.in 2021-03-30 17:47:59.815553000 -0300 +@@ -171,7 +171,7 @@ + am__EXEEXT_17 = $(am__EXEEXT_14) $(am__EXEEXT_15) $(am__EXEEXT_16) + am__EXEEXT_18 = bfdtest1$(EXEEXT) + am__EXEEXT_19 = bfdtest2$(EXEEXT) +-am__EXEEXT_20 = testsuite/gentestdlls$(EXEEXT) ++#am__EXEEXT_20 = testsuite/gentestdlls$(EXEEXT) + am__EXEEXT_21 = $(am__EXEEXT_18) $(am__EXEEXT_19) $(am__EXEEXT_20) + PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) + am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) +@@ -347,8 +347,8 @@ + $(nm_new_SOURCES) $(objcopy_SOURCES) $(objdump_SOURCES) \ + $(EXTRA_objdump_SOURCES) $(ranlib_SOURCES) $(readelf_SOURCES) \ + $(size_SOURCES) $(srconv_SOURCES) $(strings_SOURCES) \ +- $(strip_new_SOURCES) $(sysdump_SOURCES) \ +- testsuite/gentestdlls.c $(windmc_SOURCES) $(windres_SOURCES) ++ $(strip_new_SOURCES) $(sysdump_SOURCES) ++# testsuite/gentestdlls.c $(windmc_SOURCES) $(windres_SOURCES) + RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ +@@ -537,6 +537,7 @@ + libexecdir = @libexecdir@ + localedir = @localedir@ + localstatedir = @localstatedir@ ++lt_ECHO = @lt_ECHO@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ +@@ -605,7 +606,7 @@ + EXTRA_SCRIPTS = embedspu + BFDTEST1_PROG = bfdtest1 + BFDTEST2_PROG = bfdtest2 +-GENTESTDLLS_PROG = testsuite/gentestdlls ++#GENTESTDLLS_PROG = testsuite/gentestdlls + TEST_PROGS = $(BFDTEST1_PROG) $(BFDTEST2_PROG) $(GENTESTDLLS_PROG) + RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG) + +diff -rNU3 a/binutils/po/sv.po b/binutils/po/sv.po +--- a/binutils/po/sv.po 2021-03-30 23:12:40.157893266 -0300 ++++ b/binutils/po/sv.po 2021-03-30 17:47:59.962219000 -0300 +@@ -5,7 +5,7 @@ + # Tommy Pettersson , 2001, 2002, 2004. + # Göran Uddeborg , 2013, 2014, 2016, 2017, 2018, 2019, 2020. + # +-# $Revision: 1.23 $ ++# Revision: 1.23 + # + msgid "" + msgstr "" +diff -rNU3 a/binutils/readelf.c b/binutils/readelf.c +--- a/binutils/readelf.c 2021-03-30 23:12:40.161226599 -0300 ++++ b/binutils/readelf.c 2021-03-30 17:47:59.992219000 -0300 +@@ -238,6 +238,7 @@ + static Elf_Internal_Dyn * dynamic_section; + static elf_section_list * symtab_shndx_list; + static bfd_boolean show_name = FALSE; ++static bfd_boolean do_special_files = FALSE; + static bfd_boolean do_dynamic = FALSE; + static bfd_boolean do_syms = FALSE; + static bfd_boolean do_dyn_syms = FALSE; +@@ -4456,6 +4457,7 @@ + {"relocs", no_argument, 0, 'r'}, + {"notes", no_argument, 0, 'n'}, + {"dynamic", no_argument, 0, 'd'}, ++ {"special-files", no_argument, 0, 'f'}, + {"arch-specific", no_argument, 0, 'A'}, + {"version-info", no_argument, 0, 'V'}, + {"use-dynamic", no_argument, 0, 'D'}, +@@ -4508,6 +4510,7 @@ + -r --relocs Display the relocations (if present)\n\ + -u --unwind Display the unwind info (if present)\n\ + -d --dynamic Display the dynamic section (if present)\n\ ++ -f --special-files Process non-plain files too\n\ + -V --version-info Display the version sections (if present)\n\ + -A --arch-specific Display architecture specific information (if any)\n\ + -c --archive-index Display the symbol/file index in an archive\n\ +@@ -4639,7 +4642,7 @@ + usage (stderr); + + while ((c = getopt_long +- (argc, argv, "ADHINR:SVWacdeghi:lnp:rstuvw::x:z", options, NULL)) != EOF) ++ (argc, argv, "ADHINR:SVWacdefghi:lnp:rstuvw::x:z", options, NULL)) != EOF) + { + switch (c) + { +@@ -4689,6 +4692,9 @@ + case 'u': + do_unwind = TRUE; + break; ++ case 'f': ++ do_special_files++; ++ break; + case 'h': + do_header = TRUE; + break; +@@ -5146,7 +5152,7 @@ + if (filedata->file_header.e_phnum > 1) + printf (_("\nProgram Headers:\n")); + else +- printf (_("\nProgram Headers:\n")); ++ printf (_("\nProgram Header:\n")); + + if (is_32bit_elf) + printf +@@ -18286,9 +18292,9 @@ + switch (pnote->type) + { + case NT_NETBSD_IDENT: +- version = byte_get ((unsigned char *) pnote->descdata, sizeof (version)); ++ version = byte_get((unsigned char *)pnote->descdata, sizeof(version)); + if ((version / 10000) % 100) +- printf (" NetBSD\t\t0x%08lx\tIDENT %u (%u.%u%s%c)\n", pnote->descsz, ++ printf (" NetBSD\t0x%08lx\tIDENT %u (%u.%u%s%c)\n", pnote->descsz, + version, version / 100000000, (version / 1000000) % 100, + (version / 10000) % 100 > 26 ? "Z" : "", + 'A' + (version / 10000) % 26); +@@ -20362,7 +20368,7 @@ + return FALSE; + } + +- if (! S_ISREG (statbuf.st_mode)) ++ if (!do_special_files && ! S_ISREG (statbuf.st_mode)) + { + error (_("'%s' is not an ordinary file\n"), file_name); + return FALSE; +diff -rNU3 a/config.guess b/config.guess +--- a/config.guess 2021-03-30 23:12:40.164559933 -0300 ++++ b/config.guess 2021-03-30 17:48:00.025553000 -0300 +@@ -184,6 +184,7 @@ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in ++ aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; +diff -rNU3 a/gas/atof-generic.c b/gas/atof-generic.c +--- a/gas/atof-generic.c 2021-03-30 23:12:40.167893266 -0300 ++++ b/gas/atof-generic.c 2021-03-30 17:48:00.152219000 -0300 +@@ -120,6 +120,32 @@ + + switch (first_digit[0]) + { ++ case 's': ++ case 'S': ++ if (!strncasecmp ("snan", first_digit, 4)) ++ { ++ address_of_generic_floating_point_number->sign = 0; ++ address_of_generic_floating_point_number->exponent = 0; ++ address_of_generic_floating_point_number->leader = ++ address_of_generic_floating_point_number->low; ++ *address_of_string_pointer = first_digit + 4; ++ return 0; ++ } ++ break; ++ ++ case 'q': ++ case 'Q': ++ if (!strncasecmp ("qnan", first_digit, 4)) ++ { ++ address_of_generic_floating_point_number->sign = 0; ++ address_of_generic_floating_point_number->exponent = 0; ++ address_of_generic_floating_point_number->leader = ++ address_of_generic_floating_point_number->low; ++ *address_of_string_pointer = first_digit + 4; ++ return 0; ++ } ++ break; ++ + case 'n': + case 'N': + if (!strncasecmp ("nan", first_digit, 3)) +diff -rNU3 a/gas/config/atof-vax.c b/gas/config/atof-vax.c +--- a/gas/config/atof-vax.c 2021-03-30 23:12:40.167893266 -0300 ++++ b/gas/config/atof-vax.c 2021-03-30 17:48:00.162219000 -0300 +@@ -267,10 +267,27 @@ + int exponent_skippage; + LITTLENUM_TYPE word1; + +- /* JF: Deal with new Nan, +Inf and -Inf codes. */ + if (f->sign != '-' && f->sign != '+') + { +- make_invalid_floating_point_number (words); ++ if (f->sign == 0) ++ { ++ /* All NaNs are 0. */ ++ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); ++ } ++ else if (f->sign == 'P') ++ { ++ /* Positive Infinity. */ ++ memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision); ++ words[0] &= 0x7fff; ++ } ++ else if (f->sign == 'N') ++ { ++ /* Negative Infinity. */ ++ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); ++ words[0] = 0x0080; ++ } ++ else ++ make_invalid_floating_point_number (words); + return return_value; + } + +diff -rNU3 a/gas/config/obj-elf.c b/gas/config/obj-elf.c +--- a/gas/config/obj-elf.c 2021-03-30 23:12:40.167893266 -0300 ++++ b/gas/config/obj-elf.c 2021-03-30 17:48:00.168886000 -0300 +@@ -2063,6 +2063,7 @@ + || strcmp (type_name, "10") == 0 + || strcmp (type_name, "STT_GNU_IFUNC") == 0) + { ++#if 0 + struct elf_backend_data *bed; + + bed = (struct elf_backend_data *) get_elf_backend_data (stdoutput); +@@ -2072,6 +2073,7 @@ + && bed->elf_osabi != ELFOSABI_FREEBSD) + as_bad (_("symbol type \"%s\" is supported only by GNU " + "and FreeBSD targets"), type_name); ++#endif + elf_tdata (stdoutput)->has_gnu_osabi |= elf_gnu_osabi_ifunc; + type = BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION; + } +diff -rNU3 a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c +--- a/gas/config/tc-aarch64.c 2021-03-30 23:12:40.171226600 -0300 ++++ b/gas/config/tc-aarch64.c 2021-03-30 17:48:00.172219000 -0300 +@@ -250,12 +250,6 @@ + typedef struct + { + const char *template; +- unsigned long value; +-} asm_barrier_opt; +- +-typedef struct +-{ +- const char *template; + uint32_t value; + } asm_nzcv; + +@@ -3994,7 +3988,7 @@ + parse_barrier (char **str) + { + char *p, *q; +- const asm_barrier_opt *o; ++ const struct aarch64_name_value_pair *o; + + p = q = *str; + while (ISALPHA (*q)) +diff -rNU3 a/gas/config/tc-arm.c b/gas/config/tc-arm.c +--- a/gas/config/tc-arm.c 2021-03-30 23:12:40.177893266 -0300 ++++ b/gas/config/tc-arm.c 2021-03-30 17:48:00.185553000 -0300 +@@ -23117,16 +23117,20 @@ + asection *sect; + + for (sect = stdoutput->sections; sect != NULL; sect = sect->next) +- if (seg_info (sect)->tc_segment_info_data.current_pred.state +- == MANUAL_PRED_BLOCK) +- { +- if (now_pred.type == SCALAR_PRED) +- as_warn (_("section '%s' finished with an open IT block."), +- sect->name); +- else +- as_warn (_("section '%s' finished with an open VPT/VPST block."), ++ { ++ segment_info_type *seginfo = seg_info (sect); ++ ++ if (seginfo && seginfo->tc_segment_info_data.current_pred.state ++ == MANUAL_PRED_BLOCK) ++ { ++ if (now_pred.type == SCALAR_PRED) ++ as_warn (_("section '%s' finished with an open IT block."), ++ sect->name); ++ else ++ as_warn (_("section '%s' finished with an open VPT/VPST block."), + sect->name); +- } ++ } ++ } + #else + if (now_pred.state == MANUAL_PRED_BLOCK) + { +diff -rNU3 a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c +--- a/gas/config/tc-m68k.c 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/tc-m68k.c 2021-03-30 17:48:00.222219000 -0300 +@@ -7294,7 +7294,7 @@ + { + if (arg[0] == 'm') + { +- if (arg[1] == '6') ++ if (arg[1] == '6' || arg[1] == '5') + arg += 1; + else if (arg[1] == 'c' && arg[2] == '6') + arg += 2; +diff -rNU3 a/gas/config/tc-mips.c b/gas/config/tc-mips.c +--- a/gas/config/tc-mips.c 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/tc-mips.c 2021-03-30 17:48:00.228886000 -0300 +@@ -933,6 +933,9 @@ + NUM_FIX_VR4120_CLASSES + }; + ++/* ...likewise -mtrap-zero-jump. */ ++static bfd_boolean mips_trap_zero_jump; ++ + /* ...likewise -mfix-loongson2f-jump. */ + static bfd_boolean mips_fix_loongson2f_jump; + +@@ -976,6 +979,8 @@ + + static int mips_relax_branch; + ++static int mips_fix_loongson2f_btb; ++ + /* TRUE if checks are suppressed for invalid branches between ISA modes. + Needed for broken assembly produced by some GCC versions and some + sloppy code out there, where branches to data labels are present. */ +@@ -1369,6 +1374,7 @@ + static void mips16_macro_build + (expressionS *, const char *, const char *, va_list *); + static void load_register (int, expressionS *, int); ++static void macro_build (expressionS *, const char *, const char *, ...); + static void macro_start (void); + static void macro_end (void); + static void macro (struct mips_cl_insn *ip, char *str); +@@ -1573,6 +1579,8 @@ + OPTION_NO_LOONGSON_EXT, + OPTION_LOONGSON_EXT2, + OPTION_NO_LOONGSON_EXT2, ++ OPTION_FIX_LOONGSON2F_BTB, ++ OPTION_NO_FIX_LOONGSON2F_BTB, + OPTION_END_OF_ENUM + }; + +@@ -1662,6 +1670,8 @@ + {"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP}, + {"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP}, + {"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP}, ++ {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB}, ++ {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB}, + {"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120}, + {"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120}, + {"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130}, +@@ -5619,6 +5629,8 @@ + if ((reglist & 0x3f00ffff) != 0) + return FALSE; + ++ ++/* Fix NOP issue: Replace nops by "or at,at,zero". */ + ra = (reglist >> 27) & 0x10; + sregs = ((reglist >> 22) & 0x100) | ((reglist >> 16) & 0xff); + } +@@ -5630,6 +5642,35 @@ + return TRUE; + } + ++static void ++trap_zero_jump (struct mips_cl_insn * ip) ++{ ++ if (strcmp (ip->insn_mo->name, "j") == 0 ++ || strcmp (ip->insn_mo->name, "jr") == 0 ++ || strcmp (ip->insn_mo->name, "jalr") == 0) ++ { ++ int sreg; ++ ++ if (mips_opts.warn_about_macros) ++ return; ++ ++ sreg = EXTRACT_OPERAND (0, RS, *ip); ++ if (mips_opts.isa == ISA_MIPS32 ++ || mips_opts.isa == ISA_MIPS32R2 ++ || mips_opts.isa == ISA_MIPS64 ++ || mips_opts.isa == ISA_MIPS64R2) ++ { ++ expressionS ep; ++ ep.X_op = O_constant; ++ ep.X_add_number = 4096; ++ macro_build (&ep, "tltiu", "s,j", sreg, BFD_RELOC_LO16); ++ } ++ else if (mips_opts.isa != ISA_UNKNOWN ++ && mips_opts.isa != ISA_MIPS1) ++ macro_build (NULL, "teq", "s,t", sreg, 0); ++ } ++} ++ + /* OP_ENTRY_EXIT_LIST matcher. */ + + static unsigned int +@@ -5843,6 +5884,13 @@ + } + frame_size /= 8; + ++ /* If the branch is itself the target of a branch, we can not swap. ++ We cheat on this; all we check for is whether there is a label on ++ this instruction. If there are any branches to anything other than ++ a label, users must use .set noreorder. */ ++ if (seg_info (now_seg)->label_list) ++ return FALSE; ++ + /* Finally build the instruction. */ + if (mips_opts.mips16) + opcode |= mips16_encode_save_restore (arg_mask, num_sregs, ra, s0, s1, +@@ -7044,6 +7092,11 @@ + if (mips_opts.mips16 && history[0].fixp[0]) + return FALSE; + ++ if (mips_fix_loongson2f) ++ fix_loongson2f (ip); ++ if (mips_trap_zero_jump) ++ trap_zero_jump (ip); ++ + /* If the branch is itself the target of a branch, we can not swap. + We cheat on this; all we check for is whether there is a label on + this instruction. If there are any branches to anything other than +@@ -7192,6 +7245,45 @@ + return TRUE; + } + ++/* Fix jump through register issue on loongson2f processor for kernel code: ++ force a BTB clear before the jump to prevent it from being incorrectly ++ prefetched by the branch prediction engine. */ ++ ++static void ++macro_build_jrpatch (expressionS *ep, unsigned int sreg) ++{ ++ if (!mips_fix_loongson2f_btb) ++ return; ++ ++ if (sreg == ZERO || sreg == KT0 || sreg == KT1 || sreg == AT) ++ return; ++ ++ if (!mips_opts.at) ++ { ++ as_warn (_("unable to apply loongson2f BTB workaround when .set noat")); ++ return; ++ } ++ ++ /* li $at, COP_0_BTB_CLEAR | COP_0_RAS_DISABLE */ ++ ep->X_op = O_constant; ++ ep->X_add_number = 3; ++ macro_build (ep, "ori", "t,r,i", AT, ZERO, BFD_RELOC_LO16); ++ ++ /* dmtc0 $at, COP_0_DIAG */ ++ macro_build (NULL, "dmtc0", "t,G", AT, 22); ++ ++ /* Hide these two instructions to avoid getting a ``macro expanded into ++ multiple instructions'' warning. */ ++ if (mips_relax.sequence != 2) { ++ mips_macro_warning.sizes[0] -= 2 * 4; ++ mips_macro_warning.insns[0] -= 2; ++ } ++ if (mips_relax.sequence != 1) { ++ mips_macro_warning.sizes[1] -= 2 * 4; ++ mips_macro_warning.insns[1] -= 2; ++ } ++} ++ + /* Decide how we should add IP to the instruction stream. + ADDRESS_EXPR is an operand of the instruction to be used with + RELOC_TYPE. */ +@@ -11552,6 +11644,26 @@ + macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", op[0], tempreg, breg); + break; + ++ case M_JR_S: ++ macro_build_jrpatch (&expr1, op[2]); ++ macro_build (NULL, "jr", "s", op[2]); ++ return; /* didn't modify $at */ ++ ++ case M_J_S: ++ macro_build_jrpatch (&expr1, op[2]); ++ macro_build (NULL, "j", "s", op[2]); ++ return; /* didn't modify $at */ ++ ++ case M_JALR_S: ++ macro_build_jrpatch (&expr1, op[2]); ++ macro_build (NULL, "jalr", "s", op[2]); ++ return; /* didn't modify $at */ ++ ++ case M_JALR_DS: ++ macro_build_jrpatch (&expr1, op[2]); ++ macro_build (NULL, "jalr", "d,s", op[0], op[2]); ++ return; /* didn't modify $at */ ++ + case M_MSGSND: + gas_assert (!mips_opts.micromips); + macro_build (NULL, "c2", "C", (op[0] << 16) | 0x01); +@@ -14993,6 +15105,14 @@ + mips_fix_vr4130 = 0; + break; + ++ case OPTION_FIX_LOONGSON2F_BTB: ++ mips_fix_loongson2f_btb = 1; ++ break; ++ ++ case OPTION_NO_FIX_LOONGSON2F_BTB: ++ mips_fix_loongson2f_btb = 0; ++ break; ++ + case OPTION_FIX_CN63XXP1: + mips_fix_cn63xxp1 = TRUE; + break; +@@ -20422,6 +20542,7 @@ + fprintf (stream, _("\ + -mfix-loongson2f-jump work around Loongson2F JUMP instructions\n\ + -mfix-loongson2f-nop work around Loongson2F NOP errata\n\ ++-mfix-loongson2f-btb work around Loongson2F BTB errata\n\ + -mfix-loongson3-llsc work around Loongson3 LL/SC errata\n\ + -mno-fix-loongson3-llsc disable work around Loongson3 LL/SC errata\n\ + -mfix-vr4120 work around certain VR4120 errata\n\ +diff -rNU3 a/gas/config/tc-mips.h b/gas/config/tc-mips.h +--- a/gas/config/tc-mips.h 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/tc-mips.h 2021-03-30 17:48:00.228886000 -0300 +@@ -187,7 +187,7 @@ + #define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size () + #define DWARF2_FDE_RELOC_SIZE (compact_eh ? 4 : mips_dwarf2_addr_size ()) + #define DWARF2_FDE_RELOC_ENCODING(enc) \ +- (enc | (compact_eh ? DW_EH_PE_pcrel : 0)) ++ (compact_eh ? (enc)|DW_EH_PE_pcrel : DW_EH_PE_absptr) + + #define TARGET_USE_CFIPOP 1 + +diff -rNU3 a/gas/config/tc-vax.c b/gas/config/tc-vax.c +--- a/gas/config/tc-vax.c 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/tc-vax.c 2021-03-30 17:48:00.278886000 -0300 +@@ -22,6 +22,7 @@ + + #include "vax-inst.h" + #include "obstack.h" /* For FRAG_APPEND_1_CHAR macro in "frags.h" */ ++#include "dw2gencfi.h" + #include "subsegs.h" + #include "safe-ctype.h" + +@@ -396,6 +397,9 @@ + && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol) + && fragP->fr_symbol != NULL + && flag_want_pic ++#ifdef OBJ_ELF ++ && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN ++#endif + && (!S_IS_DEFINED (fragP->fr_symbol) + || S_IS_WEAK (fragP->fr_symbol) + || S_IS_EXTERNAL (fragP->fr_symbol))) +@@ -1077,6 +1081,154 @@ + return retval; + } + ++#ifdef OBJ_AOUT ++#ifndef BFD_ASSEMBLER ++void ++tc_aout_fix_to_chars (where, fixP, segment_address_in_file) ++ char *where; ++ fixS *fixP; ++ relax_addressT segment_address_in_file; ++{ ++ /* ++ * In: length of relocation (or of address) in chars: 1, 2 or 4. ++ * Out: GNU LD relocation length code: 0, 1, or 2. ++ */ ++ ++ static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2}; ++ int r_symbolnum; ++ int r_flags; ++ ++ know (fixP->fx_addsy != NULL); ++ ++ md_number_to_chars (where, ++ fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file, ++ 4); ++ ++ r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy) ++ ? S_GET_TYPE (fixP->fx_addsy) ++ : fixP->fx_addsy->sy_number); ++ r_flags = (fixP->fx_pcrel ? 1 : 0) ++ | (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */ ++ | ((nbytes_r_length[fixP->fx_size] & 3) << 1); ++ ++#if 0 ++ r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy) ++ && fixP->fx_pcrel ++ && fixP->fx_addsy != GOT_symbol ++ && fixP->fx_addsy != PLT_symbol ++ && flags_want_pic) ? 0x10 : 0); ++#endif ++ ++ switch (fixP->fx_r_type) { ++ case NO_RELOC: ++ break; ++ case NO_RELOC2: ++ if (r_flags & 8) ++ r_flags |= 0x80; /* setting the copy bit */ ++ /* says we can convert */ ++ /* to gotslot if needed */ ++ break; ++ case RELOC_32: ++ if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) { ++ r_symbolnum = fixP->fx_addsy->sy_number; ++ r_flags |= 8; /* set extern bit */ ++ } ++ break; ++ case RELOC_JMP_SLOT: ++ if (flag_want_pic) { ++ r_flags |= 0x20; /* set jmptable */ ++ r_flags &= ~0x08; /* clear extern bit */ ++ } ++ break; ++ case RELOC_JMP_TBL: ++ if (flag_want_pic) { ++ r_flags |= 0x20; /* set jmptable */ ++ r_flags |= 0x08; /* set extern bit */ ++ } ++ break; ++ case RELOC_GLOB_DAT: ++ if (flag_want_pic) { ++ r_flags |= 0x10; /* set baserel bit */ ++ r_symbolnum = fixP->fx_addsy->sy_number; ++ if (S_IS_EXTERNAL(fixP->fx_addsy)) ++ r_flags |= 8; /* set extern bit */ ++ } ++ break; ++ } ++ ++ where[4] = (r_symbolnum >> 0) & 0xff; ++ where[5] = (r_symbolnum >> 8) & 0xff; ++ where[6] = (r_symbolnum >> 16) & 0xff; ++ where[7] = r_flags; ++} ++#endif /* !BFD_ASSEMBLER */ ++#endif /* OBJ_AOUT */ ++ ++/* ++ * BUGS, GRIPES, APOLOGIA, etc. ++ * ++ * The opcode table 'votstrs' needs to be sorted on opcode frequency. ++ * That is, AFTER we hash it with hash_...(), we want most-used opcodes ++ * to come out of the hash table faster. ++ * ++ * I am sorry to inflict yet another VAX assembler on the world, but ++ * RMS says we must do everything from scratch, to prevent pin-heads ++ * restricting this software. ++ */ ++ ++/* ++ * This is a vaguely modular set of routines in C to parse VAX ++ * assembly code using DEC mnemonics. It is NOT un*x specific. ++ * ++ * The idea here is that the assembler has taken care of all: ++ * labels ++ * macros ++ * listing ++ * pseudo-ops ++ * line continuation ++ * comments ++ * condensing any whitespace down to exactly one space ++ * and all we have to do is parse 1 line into a vax instruction ++ * partially formed. We will accept a line, and deliver: ++ * an error message (hopefully empty) ++ * a skeleton VAX instruction (tree structure) ++ * textual pointers to all the operand expressions ++ * a warning message that notes a silly operand (hopefully empty) ++ */ ++ ++/* ++ * E D I T H I S T O R Y ++ * ++ * 17may86 Dean Elsner. Bug if line ends immediately after opcode. ++ * 30apr86 Dean Elsner. New vip_op() uses arg block so change call. ++ * 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults(). ++ * 2jan86 Dean Elsner. Invent synthetic opcodes. ++ * Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC, ++ * which means this is not a real opcode, it is like a macro; it will ++ * be relax()ed into 1 or more instructions. ++ * Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised ++ * like a regular branch instruction. Option added to vip_begin(): ++ * exclude synthetic opcodes. Invent synthetic_votstrs[]. ++ * 31dec85 Dean Elsner. Invent vit_opcode_nbytes. ++ * Also make vit_opcode into a char[]. We now have n-byte vax opcodes, ++ * so caller's don't have to know the difference between a 1-byte & a ++ * 2-byte op-code. Still need vax_opcodeT concept, so we know how ++ * big an object must be to hold an op.code. ++ * 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h" ++ * because vax opcodes may be 16 bits. Our crufty C compiler was ++ * happily initialising 8-bit vot_codes with 16-bit numbers! ++ * (Wouldn't the 'phone company like to compress data so easily!) ++ * 29dec85 Dean Elsner. New static table vax_operand_width_size[]. ++ * Invented so we know hw many bytes a "I^#42" needs in its immediate ++ * operand. Revised struct vop in "vax-inst.h": explicitly include ++ * byte length of each operand, and it's letter-code datum type. ++ * 17nov85 Dean Elsner. Name Change. ++ * Due to ar(1) truncating names, we learned the hard way that ++ * "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off ++ * the archived object name. SO... we shortened the name of this ++ * source file, and changed the makefile. ++ */ ++ + /* Parse a vax operand in DEC assembler notation. + For speed, expect a string of whitespace to be reduced to a single ' '. + This is the case for GNU AS, and is easy for other DEC-compatible +@@ -3156,7 +3308,7 @@ + if (flag_want_pic && operandP->vop_mode == 8 + && this_add_symbol != NULL) + { +- as_warn (_("Symbol %s used as immediate operand in PIC mode."), ++ as_warn (_("Symbol '%s' used as immediate operand in PIC mode."), + S_GET_NAME (this_add_symbol)); + } + #endif +@@ -3232,7 +3384,15 @@ + length = 4; + } + } ++#ifdef OBJ_ELF ++ if (flag_want_pic && this_add_symbol != NULL) ++ { ++ as_warn (_("Symbol '%s' used as displacement in PIC mode."), ++ S_GET_NAME (this_add_symbol)); ++ } ++#endif + p = frag_more (1 + length); ++ know (operandP->vop_reg != 0xf); + know (operandP->vop_reg >= 0); + p[0] = operandP->vop_reg + | ((at | "?\12\14?\16"[length]) << 4); +@@ -3410,3 +3570,36 @@ + { + return vax_md_atof (type, litP, sizeP); + } ++ ++void ++vax_cfi_frame_initial_instructions (void) ++{ ++ cfi_add_CFA_def_cfa (14, 0); ++} ++ ++int ++tc_vax_regname_to_dw2regnum (char *regname) ++{ ++ unsigned int i; ++ static const struct { char *name; int dw2regnum; } regnames[] = ++ { ++ { "r0", 0 }, { "r1", 1 }, { "r2", 2 }, { "r3", 3 }, ++ { "r4", 4 }, { "r5", 5 }, { "r6", 6 }, { "r7", 7 }, ++ { "r8", 8 }, { "r9", 9 }, { "r10", 10 }, { "r11", 11 }, ++ { "ap", 12 }, { "fp", 13 }, { "sp", 14 }, { "pc", 15 }, ++ { "psw", 16 }, ++ }; ++ ++ for (i = 0; i < ARRAY_SIZE (regnames); ++i) ++ if (strcmp (regnames[i].name, regname) == 0) ++ return regnames[i].dw2regnum; ++ ++ return -1; ++} ++ ++void ++vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes) ++{ ++ expP->X_add_number += nbytes; ++ emit_expr (expP, nbytes); ++} +diff -rNU3 a/gas/config/tc-vax.h b/gas/config/tc-vax.h +--- a/gas/config/tc-vax.h 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/tc-vax.h 2021-03-30 17:48:00.282219000 -0300 +@@ -71,9 +71,17 @@ + == S_GET_SEGMENT ((FIX)->fx_addsy))) \ + || S_IS_LOCAL ((FIX)->fx_addsy))) + +-/* +- * Local Variables: +- * comment-column: 0 +- * fill-column: 131 +- * End: +- */ ++#define TARGET_USE_CFIPOP 1 ++ ++#define tc_cfi_frame_initial_instructions vax_cfi_frame_initial_instructions ++extern void vax_cfi_frame_initial_instructions (void); ++ ++#define tc_regname_to_dw2regnum tc_vax_regname_to_dw2regnum ++extern int tc_vax_regname_to_dw2regnum (char *); ++ ++#define tc_cfi_emit_pcrel_expr vax_cfi_emit_pcrel_expr ++extern void vax_cfi_emit_pcrel_expr (expressionS *, unsigned int); ++ ++#define DWARF2_LINE_MIN_INSN_LENGTH 1 ++#define DWARF2_DEFAULT_RETURN_COLUMN 15 ++#define DWARF2_CIE_DATA_ALIGNMENT -4 +diff -rNU3 a/gas/config/te-armnbsdeabi.h b/gas/config/te-armnbsdeabi.h +--- a/gas/config/te-armnbsdeabi.h 1969-12-31 21:00:00.000000000 -0300 ++++ b/gas/config/te-armnbsdeabi.h 2021-03-30 17:48:00.292219000 -0300 +@@ -0,0 +1,25 @@ ++/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. ++ ++ This file is part of GAS, the GNU Assembler. ++ ++ GAS 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, ++ or (at your option) any later version. ++ ++ GAS 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 GAS; see the file COPYING. If not, write to the Free ++ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA ++ 02110-1301, USA. */ ++ ++#include "te-nbsd.h" ++ ++/* The EABI requires the use of VFP. */ ++#define CPU_DEFAULT ARM_ARCH_V5TEJ ++#define FPU_DEFAULT FPU_ARCH_VFP ++#define EABI_DEFAULT EF_ARM_EABI_VER5 +diff -rNU3 a/gas/config/te-armnbsdeabihf.h b/gas/config/te-armnbsdeabihf.h +--- a/gas/config/te-armnbsdeabihf.h 1969-12-31 21:00:00.000000000 -0300 ++++ b/gas/config/te-armnbsdeabihf.h 2021-03-30 17:48:00.292219000 -0300 +@@ -0,0 +1,25 @@ ++/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. ++ ++ This file is part of GAS, the GNU Assembler. ++ ++ GAS 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, ++ or (at your option) any later version. ++ ++ GAS 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 GAS; see the file COPYING. If not, write to the Free ++ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA ++ 02110-1301, USA. */ ++ ++#include "te-nbsd.h" ++ ++/* The EABI requires the use of VFP. */ ++#define CPU_DEFAULT ARM_ARCH_V5TEJ ++#define FPU_DEFAULT FPU_ARCH_VFP_V2 ++#define EABI_DEFAULT EF_ARM_EABI_VER5 +diff -rNU3 a/gas/config/te-armnbsd.h b/gas/config/te-armnbsd.h +--- a/gas/config/te-armnbsd.h 1969-12-31 21:00:00.000000000 -0300 ++++ b/gas/config/te-armnbsd.h 2021-03-30 17:48:00.292219000 -0300 +@@ -0,0 +1,22 @@ ++/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. ++ ++ This file is part of GAS, the GNU Assembler. ++ ++ GAS 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, ++ or (at your option) any later version. ++ ++ GAS 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 GAS; see the file COPYING. If not, write to the Free ++ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA ++ 02110-1301, USA. */ ++ ++#include "te-nbsd.h" ++ ++#define CPU_DEFAULT ARM_ARCH_V4 +diff -rNU3 a/gas/config/vax-inst.h b/gas/config/vax-inst.h +--- a/gas/config/vax-inst.h 2021-03-30 23:12:40.184559933 -0300 ++++ b/gas/config/vax-inst.h 2021-03-30 17:48:00.298886000 -0300 +@@ -65,6 +65,8 @@ + #define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */ + #define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/ + /* Needs VAX_PC_RELATIVE_MODE byte after it*/ ++#define VAX_CALLS (0xFB) /* Call with arg list on stack */ ++#define VAX_CALLG (0xFA) /* Call with arg list in memory */ + + struct vit /* vax instruction tree */ + { +diff -rNU3 a/gas/configure.tgt b/gas/configure.tgt +--- a/gas/configure.tgt 2021-03-30 23:12:40.191226600 -0300 ++++ b/gas/configure.tgt 2021-03-30 17:48:00.308886000 -0300 +@@ -70,7 +70,7 @@ + m32c) cpu_type=m32c endian=little ;; + m32r) cpu_type=m32r endian=big ;; + m32rle) cpu_type=m32r endian=little ;; +- m5200) cpu_type=m68k ;; ++ m5200|m5407) cpu_type=m68k ;; + m68008) cpu_type=m68k ;; + m680[012346]0) cpu_type=m68k ;; + m6811|m6812|m68hc12) cpu_type=m68hc11 ;; +@@ -123,6 +123,7 @@ + case ${generic_target} in + aarch64*-*-elf*) fmt=elf;; + aarch64*-*-fuchsia*) fmt=elf;; ++ aarch64*-*-netbsd*) fmt=elf em=nbsd ;; + aarch64*-*-linux*) fmt=elf em=linux + case ${cpu}-${os} in + aarch64*-linux-gnu_ilp32) arch=aarch64:32 ;; +@@ -139,6 +140,8 @@ + + arm-*-phoenix*) fmt=elf ;; + arm-*-elf) fmt=elf ;; ++ arm-*-netbsdelf*-*eabihf*) fmt=elf em=armnbsdeabihf ;; ++ arm-*-netbsdelf*-*eabi*) fmt=elf em=armnbsdeabi ;; + arm-*-eabi* | arm-*-rtems*) fmt=elf em=armeabi ;; + arm-*-symbianelf*) fmt=elf em=symbian ;; + arm-*-kaos*) fmt=elf ;; +@@ -152,7 +155,7 @@ + arm-*-uclinux*eabi*) fmt=elf em=armlinuxeabi ;; + arm-*-uclinux*) fmt=elf em=linux ;; + arm-*-nacl*) fmt=elf em=nacl ;; +- arm-*-netbsdelf*) fmt=elf em=nbsd ;; ++ arm-*-netbsdelf*) fmt=elf em=armnbsd ;; + arm-*-nto*) fmt=elf ;; + arm-wince-pe | arm-*-wince | arm*-*-mingw32ce* | arm*-*-cegcc*) + fmt=coff em=wince-pe ;; +@@ -343,6 +346,7 @@ + + or1k*-*-elf | or1k*-*-rtems*) fmt=elf endian=big ;; + or1k*-*-linux*) fmt=elf em=linux endian=big ;; ++ or1k-*-netbsd*) fmt=elf em=nbsd ;; + + pj*) fmt=elf ;; + +diff -rNU3 a/gas/doc/c-mips.texi b/gas/doc/c-mips.texi +--- a/gas/doc/c-mips.texi 2021-03-30 23:12:40.191226600 -0300 ++++ b/gas/doc/c-mips.texi 2021-03-30 17:48:00.332219000 -0300 +@@ -325,6 +325,14 @@ + @itemx -mno-fix-vr4130 + Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata. + ++@item -mfix-loongson2f-btb ++@itemx -mno-fix-loongson2f-btb ++Clear the Branch Target Buffer before any jump through a register. This ++option is intended to be used on kernel code for the Loongson 2F processor ++only; userland code compiled with this option will fault, and kernel code ++compiled with this option run on another processor than Loongson 2F will ++yield unpredictable results. ++ + @item -mfix-24k + @itemx -mno-fix-24k + Insert nops to work around the 24K @samp{eret}/@samp{deret} errata. +diff -rNU3 a/gas/doc/Makefile.am b/gas/doc/Makefile.am +--- a/gas/doc/Makefile.am 2021-03-30 23:12:40.191226600 -0300 ++++ b/gas/doc/Makefile.am 2021-03-30 17:48:00.308886000 -0300 +@@ -41,6 +41,8 @@ + -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc + + asconfig.texi: $(CONFIG).texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_asconfig.text: + rm -f asconfig.texi + cp $(srcdir)/$(CONFIG).texi ./asconfig.texi + chmod u+w ./asconfig.texi +@@ -124,6 +126,8 @@ + # The sed command removes the no-adjust Nroff command so that + # the man output looks standard. + as.1: $(srcdir)/as.texi asconfig.texi $(CPU_DOCS) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_as.1: + touch $@ + -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texi > as.pod + -($(POD2MAN) as.pod | \ +diff -rNU3 a/gas/doc/Makefile.in b/gas/doc/Makefile.in +--- a/gas/doc/Makefile.in 2021-03-30 23:12:40.191226600 -0300 ++++ b/gas/doc/Makefile.in 2021-03-30 17:48:00.308886000 -0300 +@@ -504,6 +504,8 @@ + -rm -rf .libs _libs + + as.info: as.texi $(as_TEXINFOS) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_as.info: as.texinfo $(as_TEXINFOS) + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ +@@ -940,6 +942,8 @@ + + + asconfig.texi: $(CONFIG).texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_asconfig.texi: + rm -f asconfig.texi + cp $(srcdir)/$(CONFIG).texi ./asconfig.texi + chmod u+w ./asconfig.texi +@@ -957,6 +961,8 @@ + # The sed command removes the no-adjust Nroff command so that + # the man output looks standard. + as.1: $(srcdir)/as.texi asconfig.texi $(CPU_DOCS) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_as.1: + touch $@ + -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texi > as.pod + -($(POD2MAN) as.pod | \ +diff -rNU3 a/gas/remap.c b/gas/remap.c +--- a/gas/remap.c 2021-03-30 23:12:40.191226600 -0300 ++++ b/gas/remap.c 2021-03-30 17:48:00.495553000 -0300 +@@ -76,10 +76,13 @@ + + for (map = debug_prefix_maps; map; map = map->next) + if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) +- { +- const char *name = filename + map->old_len; +- return concat (map->new_prefix, name, NULL); +- } +- +- return xstrdup (filename); ++ break; ++ if (!map) ++ return xstrdup (filename); ++ const char *name = filename + map->old_len; ++ size_t name_len = strlen (name) + 1; ++ char *s = (char *) xmalloc (name_len + map->new_len); ++ memcpy (s, map->new_prefix, map->new_len); ++ memcpy (s + map->new_len, name, name_len); ++ return s; + } +diff -rNU3 a/gold/Makefile.am b/gold/Makefile.am +--- a/gold/Makefile.am 2021-03-30 23:12:40.191226600 -0300 ++++ b/gold/Makefile.am 2021-03-30 17:48:00.518886000 -0300 +@@ -19,7 +19,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = po testsuite ++SUBDIRS = po # testsuite + + tooldir = $(exec_prefix)/$(target_alias) + +Os arquivos binários a/gold/po/ja.gmo e b/gold/po/ja.gmo são diferentes +diff -rNU3 a/gold/po/ja.po b/gold/po/ja.po +--- a/gold/po/ja.po 2021-03-30 23:12:40.194559933 -0300 ++++ b/gold/po/ja.po 1969-12-31 21:00:00.000000000 -0300 +@@ -1,2241 +0,0 @@ +-# Japanese messages for GNU binutils gold. +-# Copyright (C) 2010 Free Software Foundation, Inc. +-# This file is distributed under the same license as the binutils package. +-# Yasuaki Taniguchi , 2010. +-# +-msgid "" +-msgstr "" +-"Project-Id-Version: gold 2.20.90\n" +-"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" +-"POT-Creation-Date: 2010-03-03 15:08+0100\n" +-"PO-Revision-Date: 2010-12-18 16:06+0900\n" +-"Last-Translator: Yasuaki Taniguchi \n" +-"Language-Team: Japanese \n" +-"X-Bugs: Report translation errors to the Language-Team address.\n" +-"MIME-Version: 1.0\n" +-"Content-Type: text/plain; charset=UTF-8\n" +-"Content-Transfer-Encoding: 8bit\n" +-"Plural-Forms: nplurals=1; plural=0;\n" +- +-#: archive.cc:119 +-#, c-format +-msgid "%s: no archive symbol table (run ranlib)" +-msgstr "%s: 書庫シンボル表がありません (ranlib を実行してください)" +- +-#: archive.cc:204 +-#, c-format +-msgid "%s: bad archive symbol table names" +-msgstr "%s: 誤った書庫シンボル表名です" +- +-#: archive.cc:236 +-#, c-format +-msgid "%s: malformed archive header at %zu" +-msgstr "%s: 誤った形式の書庫ヘッダが %zu にあります" +- +-#: archive.cc:256 +-#, c-format +-msgid "%s: malformed archive header size at %zu" +-msgstr "%s: 誤った形式の書庫ヘッダサイズが %zu にあります" +- +-#: archive.cc:267 +-#, c-format +-msgid "%s: malformed archive header name at %zu" +-msgstr "%s: 誤った形式の書庫ヘッダ名が %zu にあります" +- +-#: archive.cc:297 +-#, c-format +-msgid "%s: bad extended name index at %zu" +-msgstr "%s: 誤った拡張名索引が %zu にあります" +- +-#: archive.cc:307 +-#, c-format +-msgid "%s: bad extended name entry at header %zu" +-msgstr "%s: 誤った拡張名エントリが %zu にあります" +- +-#: archive.cc:404 +-#, c-format +-msgid "%s: short archive header at %zu" +-msgstr "%s: 短い書庫ヘッダが %zu にあります" +- +-#: archive.cc:560 +-#, c-format +-msgid "%s: member at %zu is not an ELF object" +-msgstr "%s: %zu にあるメンバは ELF オブジェクトではありません" +- +-#: archive.cc:879 +-#, c-format +-msgid "%s: archive libraries: %u\n" +-msgstr "%s: 書庫ライブラリ: %u\n" +- +-#: archive.cc:881 +-#, c-format +-msgid "%s: total archive members: %u\n" +-msgstr "%s: 書庫メンバ総数: %u\n" +- +-#: archive.cc:883 +-#, c-format +-msgid "%s: loaded archive members: %u\n" +-msgstr "%s: ロードされた書庫メンバ数: %u\n" +- +-#: arm.cc:1149 i386.cc:536 sparc.cc:1087 x86_64.cc:565 +-msgid "** PLT" +-msgstr "" +- +-#: arm.cc:1364 i386.cc:880 powerpc.cc:1014 sparc.cc:1502 x86_64.cc:955 +-#: x86_64.cc:1265 +-#, c-format +-msgid "%s: unsupported reloc %u against local symbol" +-msgstr "%s: 局所シンボルに対するサポートされない再配置 %u です" +- +-#: arm.cc:1404 powerpc.cc:1105 sparc.cc:1592 x86_64.cc:992 +-msgid "requires unsupported dynamic reloc; recompile with -fPIC" +-msgstr "サポートされていない動的再配置が必要になりました。 -fPIC を付けて再コンパイルしてください" +- +-#. These are relocations which should only be seen by the +-#. dynamic linker, and should never be seen here. +-#: arm.cc:1519 arm.cc:1739 arm.cc:2354 i386.cc:1002 i386.cc:1334 +-#: powerpc.cc:1223 powerpc.cc:1432 sparc.cc:1877 sparc.cc:2238 x86_64.cc:1145 +-#: x86_64.cc:1453 +-#, c-format +-msgid "%s: unexpected reloc %u in object file" +-msgstr "%s: オブジェクトファイル内で予期しない再配置 %u です" +- +-#: arm.cc:1538 i386.cc:1171 powerpc.cc:1242 sparc.cc:1896 x86_64.cc:1279 +-#: x86_64.cc:1571 +-#, c-format +-msgid "%s: unsupported reloc %u against global symbol %s" +-msgstr "%1$s: 大域シンボル %3$s に対するサポートされない再配置 %2$u です" +- +-#: arm.cc:1804 i386.cc:1542 +-#, c-format +-msgid "%s: unsupported RELA reloc section" +-msgstr "%s: サポートされない RELA 再配置セクションです" +- +-#: arm.cc:2047 +-msgid "relocation R_ARM_MOVW_ABS_NC cannot be used when makinga shared object; recompile with -fPIC" +-msgstr "" +- +-#: arm.cc:2056 +-msgid "relocation R_ARM_MOVT_ABS cannot be used when makinga shared object; recompile with -fPIC" +-msgstr "" +- +-#: arm.cc:2067 +-msgid "relocation R_ARM_THM_MOVW_ABS_NC cannot be used whenmaking a shared object; recompile with -fPIC" +-msgstr "" +- +-#: arm.cc:2077 +-msgid "relocation R_ARM_THM_MOVT_ABS cannot be used whenmaking a shared object; recompile with -fPIC" +-msgstr "" +- +-#: arm.cc:2141 +-msgid "cannot find origin of R_ARM_BASE_PREL" +-msgstr "" +- +-#: arm.cc:2169 +-msgid "cannot find origin of R_ARM_BASE_ABS" +-msgstr "" +- +-#: arm.cc:2230 i386.cc:1820 i386.cc:2521 powerpc.cc:1798 sparc.cc:2711 +-#: x86_64.cc:1935 x86_64.cc:2518 +-#, c-format +-msgid "unexpected reloc %u in object file" +-msgstr "オブジェクトファイル内で予期しない再配置 %u です" +- +-#: arm.cc:2236 i386.cc:1852 i386.cc:1931 i386.cc:1983 i386.cc:2014 +-#: i386.cc:2076 powerpc.cc:1804 sparc.cc:2717 sparc.cc:2900 sparc.cc:2961 +-#: sparc.cc:3068 x86_64.cc:1956 x86_64.cc:2039 x86_64.cc:2094 x86_64.cc:2119 +-#, c-format +-msgid "unsupported reloc %u" +-msgstr "サポートされない再配置 %u です" +- +-#: arm.cc:2248 +-#, c-format +-msgid "relocation overflow in relocation %u" +-msgstr "再配置 %u で再配置オーバーフローが発生しました" +- +-#: arm.cc:2256 +-#, c-format +-msgid "unexpected opcode while processing relocation %u" +-msgstr "再配置 %u を処理中に予期しないオペコードです" +- +-#: arm.cc:2359 i386.cc:2535 +-#, c-format +-msgid "unsupported reloc %u in object file" +-msgstr "オブジェクトファイル内でサポートされない再配置 %u です" +- +-#: binary.cc:129 +-#, c-format +-msgid "cannot open %s: %s:" +-msgstr "%s を開けません: %s:" +- +-#: compressed_output.cc:128 +-msgid "not compressing section data: zlib error" +-msgstr "セクションデータを圧縮しません: zlib エラー" +- +-#: cref.cc:244 +-#, c-format +-msgid "cannot open symbol count file %s: %s" +-msgstr "シンボルカウントファイル %s を開けません: %s" +- +-#: descriptors.cc:116 +-#, c-format +-msgid "file %s was removed during the link" +-msgstr "ファイル %s がリンク中に削除されました" +- +-#: descriptors.cc:169 +-msgid "out of file descriptors and couldn't close any" +-msgstr "ファイル記述子が足りなくなり、どれも閉じることが出来ませんでした" +- +-#: descriptors.cc:190 descriptors.cc:226 +-#, c-format +-msgid "while closing %s: %s" +-msgstr "%s を閉じている間: %s" +- +-#: dirsearch.cc:71 +-#, c-format +-msgid "%s: can not read directory: %s" +-msgstr "%s: ディレクトリを読み込めません: %s" +- +-#: dwarf_reader.cc:53 dwarf_reader.cc:84 +-msgid "Unusually large LEB128 decoded, debug information may be corrupted" +-msgstr "通常ではない大きな LEB128 デコードです。デバッグ情報が壊れているかもしれません" +- +-#: dynobj.cc:164 +-#, c-format +-msgid "unexpected duplicate type %u section: %u, %u" +-msgstr "" +- +-#: dynobj.cc:200 +-#, c-format +-msgid "unexpected link in section %u header: %u != %u" +-msgstr "" +- +-#: dynobj.cc:236 +-#, c-format +-msgid "DYNAMIC section %u link out of range: %u" +-msgstr "" +- +-#: dynobj.cc:244 +-#, c-format +-msgid "DYNAMIC section %u link %u is not a strtab" +-msgstr "" +- +-#: dynobj.cc:273 +-#, c-format +-msgid "DT_SONAME value out of range: %lld >= %lld" +-msgstr "DT_SONAME の値が範囲外です: %lld >= %lld" +- +-#: dynobj.cc:285 +-#, c-format +-msgid "DT_NEEDED value out of range: %lld >= %lld" +-msgstr "DT_NEEDED の値が範囲外です: %lld >= %lld" +- +-#: dynobj.cc:298 +-msgid "missing DT_NULL in dynamic segment" +-msgstr "動的セグメント内に DT_NULL がありません" +- +-#: dynobj.cc:344 +-#, c-format +-msgid "invalid dynamic symbol table name index: %u" +-msgstr "無効な動的シンボル表名索引です: %u" +- +-#: dynobj.cc:351 +-#, c-format +-msgid "dynamic symbol table name section has wrong type: %u" +-msgstr "動的シンボルテーブル名セクションの型が誤っています: %u" +- +-#: dynobj.cc:438 object.cc:463 object.cc:1106 +-#, c-format +-msgid "bad section name offset for section %u: %lu" +-msgstr "セクション %u に対する誤ったセクション名オフセットです: %lu" +- +-#: dynobj.cc:468 +-#, c-format +-msgid "duplicate definition for version %u" +-msgstr "" +- +-#: dynobj.cc:497 +-#, c-format +-msgid "unexpected verdef version %u" +-msgstr "" +- +-#: dynobj.cc:513 +-#, c-format +-msgid "verdef vd_cnt field too small: %u" +-msgstr "" +- +-#: dynobj.cc:521 +-#, c-format +-msgid "verdef vd_aux field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:532 +-#, c-format +-msgid "verdaux vda_name field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:542 +-#, c-format +-msgid "verdef vd_next field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:576 +-#, c-format +-msgid "unexpected verneed version %u" +-msgstr "" +- +-#: dynobj.cc:585 +-#, c-format +-msgid "verneed vn_aux field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:599 +-#, c-format +-msgid "vernaux vna_name field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:610 +-#, c-format +-msgid "verneed vna_next field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:621 +-#, c-format +-msgid "verneed vn_next field out of range: %u" +-msgstr "" +- +-#: dynobj.cc:670 +-msgid "size of dynamic symbols is not multiple of symbol size" +-msgstr "動的シンボルのサイズがシンボルサイズの倍数ではありません" +- +-#: dynobj.cc:1435 +-#, c-format +-msgid "symbol %s has undefined version %s" +-msgstr "" +- +-#: ehframe.h:82 +-msgid "** eh_frame_hdr" +-msgstr "" +- +-#: ehframe.h:353 +-msgid "** eh_frame" +-msgstr "" +- +-#: errors.cc:81 +-#, c-format +-msgid "%s: fatal error: " +-msgstr "%s: 致命的エラー: " +- +-#: errors.cc:92 +-#, c-format +-msgid "%s: error: " +-msgstr "%s: エラー: " +- +-#: errors.cc:104 +-#, c-format +-msgid "%s: warning: " +-msgstr "%s: 警告: " +- +-#: errors.cc:128 +-#, c-format +-msgid "%s: %s: error: " +-msgstr "%s: %s: エラー: " +- +-#: errors.cc:144 +-#, c-format +-msgid "%s: %s: warning: " +-msgstr "%s: %s: 警告: " +- +-#: errors.cc:167 +-#, c-format +-msgid "%s: %s: error: undefined reference to '%s'\n" +-msgstr "%s: %s: エラー: '%s' への未定義の参照です\n" +- +-#: errors.cc:172 +-#, c-format +-msgid "%s: %s: error: undefined reference to '%s', version '%s'\n" +-msgstr "%s: %s: error: '%s', バージョン '%s' への未定義の参照です\n" +- +-#: errors.cc:182 +-#, c-format +-msgid "%s: " +-msgstr "%s: " +- +-#: expression.cc:172 +-#, c-format +-msgid "undefined symbol '%s' referenced in expression" +-msgstr "式内で未定義シンボル '%s' が参照されました" +- +-#: expression.cc:209 +-msgid "invalid reference to dot symbol outside of SECTIONS clause" +-msgstr "" +- +-#. Handle unary operators. We use a preprocessor macro as a hack to +-#. capture the C operator. +-#: expression.cc:278 +-msgid "unary " +-msgstr "単項演算子 " +- +-#. Handle binary operators. We use a preprocessor macro as a hack to +-#. capture the C operator. KEEP_LEFT means that if the left operand +-#. is section relative and the right operand is not, the result uses +-#. the same section as the left operand. KEEP_RIGHT is the same with +-#. left and right swapped. IS_DIV means that we need to give an error +-#. if the right operand is zero. WARN means that we should warn if +-#. used on section relative values in a relocatable link. We always +-#. warn if used on values in different sections in a relocatable link. +-#: expression.cc:400 +-msgid "binary " +-msgstr "二項演算子 " +- +-#: expression.cc:404 +-msgid " by zero" +-msgstr "" +- +-#: expression.cc:575 +-msgid "max applied to section relative value" +-msgstr "" +- +-#: expression.cc:610 +-msgid "min applied to section relative value" +-msgstr "" +- +-#: expression.cc:740 +-msgid "aligning to section relative value" +-msgstr "" +- +-#: expression.cc:895 +-#, c-format +-msgid "unknown constant %s" +-msgstr "不明な定数 %s" +- +-#: expression.cc:1126 +-msgid "SEGMENT_START not implemented" +-msgstr "SEGMENT_START は実装されていません" +- +-#: expression.cc:1135 +-msgid "ORIGIN not implemented" +-msgstr "ORIGIN は実装されていません" +- +-#: expression.cc:1141 +-msgid "LENGTH not implemented" +-msgstr "LENGTH は実装されていません" +- +-#: fileread.cc:65 +-#, c-format +-msgid "munmap failed: %s" +-msgstr "munmap に失敗しました: %s" +- +-#: fileread.cc:129 +-#, c-format +-msgid "%s: fstat failed: %s" +-msgstr "%s: fstat に失敗しました: %s" +- +-#: fileread.cc:169 +-#, c-format +-msgid "could not reopen file %s" +-msgstr "ファイル %s を再度開くことが出来ませんでした" +- +-#: fileread.cc:302 +-#, c-format +-msgid "%s: pread failed: %s" +-msgstr "%s: pread に失敗しました: %s" +- +-#: fileread.cc:308 +-#, c-format +-msgid "%s: file too short: read only %lld of %lld bytes at %lld" +-msgstr "%1$s: ファイルが短すぎます。位置 %4$lld で %3$lld バイト中 %2$lld バイトしか読み込めませんでした" +- +-#: fileread.cc:372 +-#, c-format +-msgid "%s: attempt to map %lld bytes at offset %lld exceeds size of file; the file may be corrupt" +-msgstr "%1$s: オフセット %3$lld で %2$lld バイト分マップを試みましたがファイルサイズを超過しています。ファイルが壊れているかもしれません" +- +-#: fileread.cc:402 +-#, c-format +-msgid "%s: mmap offset %lld size %lld failed: %s" +-msgstr "%s: オフセット %lld、サイズ %lld の mmap に失敗しました: %s" +- +-#: fileread.cc:548 +-#, c-format +-msgid "%s: lseek failed: %s" +-msgstr "%s: lseek に失敗しました: %s" +- +-#: fileread.cc:554 +-#, c-format +-msgid "%s: readv failed: %s" +-msgstr "%s: readv に失敗しました: %s" +- +-#: fileread.cc:557 +-#, c-format +-msgid "%s: file too short: read only %zd of %zd bytes at %lld" +-msgstr "%1$s: ファイルが短すぎます。位置 %4$lld で %3$zd バイト中 %2$zd バイトしか読み込めませんでした" +- +-#: fileread.cc:706 +-#, c-format +-msgid "%s: total bytes mapped for read: %llu\n" +-msgstr "" +- +-#: fileread.cc:708 +-#, c-format +-msgid "%s: maximum bytes mapped for read at one time: %llu\n" +-msgstr "" +- +-#: fileread.cc:791 +-#, c-format +-msgid "%s: stat failed: %s" +-msgstr "%s: stat に失敗しました: %s" +- +-#: fileread.cc:849 +-#, c-format +-msgid "cannot find %s%s" +-msgstr "%s%s が見つかりません" +- +-#: fileread.cc:880 +-#, c-format +-msgid "cannot find %s" +-msgstr "%s が見つかりません" +- +-#: fileread.cc:904 +-#, c-format +-msgid "cannot open %s: %s" +-msgstr "%s を開けません: %s" +- +-#: gold-threads.cc:103 +-#, c-format +-msgid "pthead_mutextattr_init failed: %s" +-msgstr "pthead_mutextattr_init に失敗しました: %s" +- +-#: gold-threads.cc:107 +-#, c-format +-msgid "pthread_mutextattr_settype failed: %s" +-msgstr "pthread_mutextattr_settype に失敗しました: %s" +- +-#: gold-threads.cc:112 +-#, c-format +-msgid "pthread_mutex_init failed: %s" +-msgstr "pthread_mutex_init に失敗しました: %s" +- +-#: gold-threads.cc:116 +-#, c-format +-msgid "pthread_mutexattr_destroy failed: %s" +-msgstr "pthread_mutexattr_destroy に失敗しました: %s" +- +-#: gold-threads.cc:123 +-#, c-format +-msgid "pthread_mutex_destroy failed: %s" +-msgstr "pthread_mutex_destroy に失敗しました: %s" +- +-#: gold-threads.cc:131 gold-threads.cc:382 +-#, c-format +-msgid "pthread_mutex_lock failed: %s" +-msgstr "pthread_mutex_lock に失敗しました: %s" +- +-#: gold-threads.cc:139 gold-threads.cc:394 +-#, c-format +-msgid "pthread_mutex_unlock failed: %s" +-msgstr "pthread_mutex_unlock に失敗しました: %s" +- +-#: gold-threads.cc:220 +-#, c-format +-msgid "pthread_cond_init failed: %s" +-msgstr "pthread_cond_init に失敗しました: %s" +- +-#: gold-threads.cc:227 +-#, c-format +-msgid "pthread_cond_destroy failed: %s" +-msgstr "pthread_cond_destroy に失敗しました: %s" +- +-#: gold-threads.cc:236 +-#, c-format +-msgid "pthread_cond_wait failed: %s" +-msgstr "pthread_cond_wait に失敗しました: %s" +- +-#: gold-threads.cc:244 +-#, c-format +-msgid "pthread_cond_signal failed: %s" +-msgstr "pthread_cond_signal に失敗しました: %s" +- +-#: gold-threads.cc:252 +-#, c-format +-msgid "pthread_cond_broadcast failed: %s" +-msgstr "pthread_cond_broadcast に失敗しました: %s" +- +-#: gold-threads.cc:388 +-#, c-format +-msgid "pthread_once failed: %s" +-msgstr "pthread_once に失敗しました: %s" +- +-#: gold.cc:91 +-#, c-format +-msgid "%s: internal error in %s, at %s:%d\n" +-msgstr "%s: %s の中の位置 %s で内部エラーが発生しました:%d\n" +- +-#: gold.cc:173 +-msgid "no input files" +-msgstr "入力ファイルがありません" +- +-#: gold.cc:226 +-msgid "cannot mix -r with --gc-sections or --icf" +-msgstr "-r と --gc-sections 、--icf は同時に使用できません" +- +-#: gold.cc:407 +-#, c-format +-msgid "cannot mix -static with dynamic object %s" +-msgstr "-static と動的オブジェクト %s は同時に使用できません" +- +-#: gold.cc:411 +-#, c-format +-msgid "cannot mix -r with dynamic object %s" +-msgstr "-r と動的オブジェクト %s は同時に使用できません" +- +-#: gold.cc:415 +-#, c-format +-msgid "cannot use non-ELF output format with dynamic object %s" +-msgstr "動的オブジェクト %s を使用すると非 ELF 出力形式を使用できません" +- +-#: gold.cc:427 +-#, c-format +-msgid "cannot mix split-stack '%s' and non-split-stack '%s' when using -r" +-msgstr "-r を使用しているときはスタック分割 '%s' と非スタック分割 '%s' を同時に使用できません" +- +-#. FIXME: This needs to specify the location somehow. +-#: i386.cc:232 i386.cc:1669 sparc.cc:234 sparc.cc:2395 x86_64.cc:237 +-#: x86_64.cc:1732 +-msgid "missing expected TLS relocation" +-msgstr "予期される TLS 再配置がありません" +- +-#: i386.cc:944 x86_64.cc:1068 +-#, c-format +-msgid "section symbol %u has bad shndx %u" +-msgstr "" +- +-#: i386.cc:1036 i386.cc:1060 sparc.cc:1777 x86_64.cc:1176 x86_64.cc:1204 +-#, c-format +-msgid "local symbol %u has bad shndx %u" +-msgstr "" +- +-#: i386.cc:1991 +-msgid "both SUN and GNU model TLS relocations" +-msgstr "SUN と GNU モデルの TLS 再配置が両方あります" +- +-#: i386.cc:2730 x86_64.cc:2719 +-#, c-format +-msgid "failed to match split-stack sequence at section %u offset %0zx" +-msgstr "" +- +-#: icf.cc:616 +-#, c-format +-msgid "%s: ICF Converged after %u iteration(s)" +-msgstr "" +- +-#: icf.cc:619 +-#, c-format +-msgid "%s: ICF stopped after %u iteration(s)" +-msgstr "" +- +-#: icf.cc:633 +-#, c-format +-msgid "Could not find symbol %s to unfold\n" +-msgstr "" +- +-#: incremental.cc:242 +-#, c-format +-msgid "the link might take longer: cannot perform incremental link: %s" +-msgstr "リンクに時間がかかるかもしれません: 増分リンクを実行できません: %s" +- +-#: incremental.cc:302 +-msgid "no incremental data from previous build" +-msgstr "前回のビルドからの増分データがありません" +- +-#: incremental.cc:309 incremental.cc:332 +-msgid "invalid incremental build data" +-msgstr "無効な増分ビルドデータです" +- +-#: incremental.cc:321 +-msgid "different version of incremental build data" +-msgstr "異なるバージョンの増分ビルドデータです" +- +-#: incremental.cc:338 +-msgid "command line changed" +-msgstr "コマンドラインに変更がありました" +- +-#: incremental.cc:362 +-#, c-format +-msgid "unsupported ELF machine number %d" +-msgstr "サポートされていない ELF マシン番号 %d です" +- +-#: incremental.cc:387 +-msgid "output is not an ELF file." +-msgstr "出力が ELF ファイルではありません。" +- +-#: incremental.cc:410 +-msgid "unsupported file: 32-bit, big-endian" +-msgstr "サポートされていないファイルです: 32-ビット、ビッグエンディアン" +- +-#: incremental.cc:419 +-msgid "unsupported file: 32-bit, little-endian" +-msgstr "サポートされていないファイルです: 32-ビット、リトルエンディアン" +- +-#: incremental.cc:431 +-msgid "unsupported file: 64-bit, big-endian" +-msgstr "サポートされていないファイルです: 64-ビット、ビッグエンディアン" +- +-#: incremental.cc:440 +-msgid "unsupported file: 64-bit, little-endian" +-msgstr "サポートされていないファイルです: 64-ビット、リトルエンディアン" +- +-#: layout.cc:1887 +-#, c-format +-msgid "--build-id=uuid failed: could not open /dev/urandom: %s" +-msgstr "--build-id=uuid に失敗しました: /dev/urandom を開けませんでした: %s" +- +-#: layout.cc:1894 +-#, c-format +-msgid "/dev/urandom: read failed: %s" +-msgstr "/dev/urandom: 読み込みに失敗しました: %s" +- +-#: layout.cc:1896 +-#, c-format +-msgid "/dev/urandom: expected %zu bytes, got %zd bytes" +-msgstr "" +- +-#: layout.cc:1918 +-#, c-format +-msgid "--build-id argument '%s' not a valid hex number" +-msgstr "--build-id の引数 '%s' が有効な十六進数ではありません" +- +-#: layout.cc:1924 +-#, c-format +-msgid "unrecognized --build-id argument '%s'" +-msgstr "認識できない --build-id の引数 '%s' です" +- +-#: layout.cc:2337 +-#, c-format +-msgid "load segment overlap [0x%llx -> 0x%llx] and [0x%llx -> 0x%llx]" +-msgstr "ロードセグメントが重なり合っています [0x%llx -> 0x%llx] および [0x%llx -> 0x%llx]" +- +-#: mapfile.cc:70 +-#, c-format +-msgid "cannot open map file %s: %s" +-msgstr "マップファイル %s を開けません: %s" +- +-#: mapfile.cc:84 +-#, c-format +-msgid "cannot close map file: %s" +-msgstr "マップファイルを閉じられません: %s" +- +-#: mapfile.cc:116 +-#, c-format +-msgid "" +-"Archive member included because of file (symbol)\n" +-"\n" +-msgstr "" +- +-#: mapfile.cc:159 +-#, c-format +-msgid "" +-"\n" +-"Allocating common symbols\n" +-msgstr "" +- +-#: mapfile.cc:161 +-#, c-format +-msgid "" +-"Common symbol size file\n" +-"\n" +-msgstr "" +- +-#: mapfile.cc:195 +-#, c-format +-msgid "" +-"\n" +-"Memory map\n" +-"\n" +-msgstr "" +-"\n" +-"メモリマップ\n" +-"\n" +- +-#: mapfile.cc:361 +-#, c-format +-msgid "" +-"\n" +-"Discarded input sections\n" +-"\n" +-msgstr "" +-"\n" +-"破棄された入力セクション\n" +-"\n" +- +-#: merge.cc:455 +-#, c-format +-msgid "%s: %s merged constants size: %lu; input: %zu; output: %zu\n" +-msgstr "" +- +-#: merge.cc:478 +-msgid "mergeable string section length not multiple of character size" +-msgstr "" +- +-#: merge.cc:494 +-#, c-format +-msgid "%s: last entry in mergeable string section '%s' not null terminated" +-msgstr "" +- +-#: merge.cc:613 +-#, c-format +-msgid "%s: %s input: %zu\n" +-msgstr "" +- +-#: merge.h:300 +-msgid "** merge constants" +-msgstr "" +- +-#: merge.h:422 +-msgid "** merge strings" +-msgstr "" +- +-#: object.cc:75 +-msgid "missing SHT_SYMTAB_SHNDX section" +-msgstr "" +- +-#: object.cc:119 +-#, c-format +-msgid "symbol %u out of range for SHT_SYMTAB_SHNDX section" +-msgstr "" +- +-#: object.cc:126 +-#, c-format +-msgid "extended index for symbol %u out of range: %u" +-msgstr "" +- +-#: object.cc:148 object.cc:2331 output.cc:4052 +-#, c-format +-msgid "%s: %s" +-msgstr "" +- +-#: object.cc:190 +-#, c-format +-msgid "section name section has wrong type: %u" +-msgstr "" +- +-#: object.cc:546 +-#, c-format +-msgid "invalid symbol table name index: %u" +-msgstr "" +- +-#: object.cc:552 +-#, c-format +-msgid "symbol table name section has wrong type: %u" +-msgstr "" +- +-#: object.cc:641 +-#, c-format +-msgid "section group %u info %u out of range" +-msgstr "" +- +-#: object.cc:660 +-#, c-format +-msgid "symbol %u name offset %u out of range" +-msgstr "" +- +-#: object.cc:678 +-#, c-format +-msgid "symbol %u invalid section index %u" +-msgstr "" +- +-#: object.cc:723 +-#, c-format +-msgid "section %u in section group %u out of range" +-msgstr "" +- +-#: object.cc:731 +-#, c-format +-msgid "invalid section group %u refers to earlier section %u" +-msgstr "" +- +-#: object.cc:1037 reloc.cc:271 reloc.cc:838 +-#, c-format +-msgid "relocation section %u has bad info %u" +-msgstr "" +- +-#: object.cc:1231 +-#, c-format +-msgid "%s: removing unused section from '%s' in file '%s'" +-msgstr "" +- +-#: object.cc:1257 +-#, c-format +-msgid "%s: ICF folding section '%s' in file '%s'into '%s' in file '%s'" +-msgstr "" +- +-#: object.cc:1454 +-msgid "size of symbols is not multiple of symbol size" +-msgstr "" +- +-#: object.cc:1563 +-#, c-format +-msgid "local symbol %u section name out of range: %u >= %u" +-msgstr "" +- +-#: object.cc:1652 +-#, c-format +-msgid "unknown section index %u for local symbol %u" +-msgstr "" +- +-#: object.cc:1661 +-#, c-format +-msgid "local symbol %u section index %u out of range" +-msgstr "" +- +-#: object.cc:2169 +-#, c-format +-msgid "%s is not supported but is required for %s in %s" +-msgstr "" +- +-#: object.cc:2273 +-#, c-format +-msgid "%s: unsupported ELF machine number %d" +-msgstr "" +- +-#: object.cc:2283 +-#, c-format +-msgid "%s: incompatible target" +-msgstr "" +- +-#: object.cc:2347 plugin.cc:1019 +-#, c-format +-msgid "%s: not configured to support 32-bit big-endian object" +-msgstr "" +- +-#: object.cc:2363 plugin.cc:1028 +-#, c-format +-msgid "%s: not configured to support 32-bit little-endian object" +-msgstr "" +- +-#: object.cc:2382 plugin.cc:1040 +-#, c-format +-msgid "%s: not configured to support 64-bit big-endian object" +-msgstr "" +- +-#: object.cc:2398 plugin.cc:1049 +-#, c-format +-msgid "%s: not configured to support 64-bit little-endian object" +-msgstr "" +- +-#: options.cc:156 +-#, c-format +-msgid "" +-"Usage: %s [options] file...\n" +-"Options:\n" +-msgstr "" +-"使用法: %s [options] file...\n" +-"オプション:\n" +- +-#. config.guess and libtool.m4 look in ld --help output for the +-#. string "supported targets". +-#: options.cc:164 +-#, c-format +-msgid "%s: supported targets:" +-msgstr "" +- +-#: options.cc:176 +-#, c-format +-msgid "Report bugs to %s\n" +-msgstr "" +- +-#: options.cc:193 options.cc:203 options.cc:213 +-#, c-format +-msgid "%s: invalid option value (expected an integer): %s" +-msgstr "" +- +-#: options.cc:223 +-#, c-format +-msgid "%s: invalid option value (expected a floating point number): %s" +-msgstr "" +- +-#: options.cc:232 +-#, c-format +-msgid "%s: must take a non-empty argument" +-msgstr "" +- +-#: options.cc:273 +-#, c-format +-msgid "%s: must take one of the following arguments: %s" +-msgstr "" +- +-#: options.cc:300 +-#, c-format +-msgid " Supported targets:\n" +-msgstr "" +- +-#: options.cc:409 +-#, c-format +-msgid "unable to parse script file %s" +-msgstr "" +- +-#: options.cc:417 +-#, c-format +-msgid "unable to parse version script file %s" +-msgstr "" +- +-#: options.cc:425 +-#, c-format +-msgid "unable to parse dynamic-list script file %s" +-msgstr "" +- +-#: options.cc:522 +-#, c-format +-msgid "format '%s' not supported; treating as elf (supported formats: elf, binary)" +-msgstr "" +- +-#: options.cc:538 +-#, c-format +-msgid "%s: use the --help option for usage information\n" +-msgstr "" +- +-#: options.cc:547 +-#, c-format +-msgid "%s: %s: %s\n" +-msgstr "" +- +-#: options.cc:651 +-msgid "unexpected argument" +-msgstr "" +- +-#: options.cc:664 options.cc:725 +-msgid "missing argument" +-msgstr "" +- +-#: options.cc:736 +-msgid "unknown -z option" +-msgstr "" +- +-#: options.cc:935 +-#, c-format +-msgid "ignoring --threads: %s was compiled without thread support" +-msgstr "" +- +-#: options.cc:942 +-#, c-format +-msgid "ignoring --thread-count: %s was compiled without thread support" +-msgstr "" +- +-#: options.cc:981 +-#, c-format +-msgid "unable to open -retain-symbols-file file %s: %s" +-msgstr "" +- +-#: options.cc:1003 +-msgid "-shared and -static are incompatible" +-msgstr "" +- +-#: options.cc:1005 +-msgid "-shared and -pie are incompatible" +-msgstr "" +- +-#: options.cc:1008 +-msgid "-shared and -r are incompatible" +-msgstr "" +- +-#: options.cc:1010 +-msgid "-pie and -r are incompatible" +-msgstr "" +- +-#: options.cc:1014 +-msgid "-retain-symbols-file does not yet work with -r" +-msgstr "" +- +-#: options.cc:1020 +-msgid "binary output format not compatible with -shared or -pie or -r" +-msgstr "" +- +-#: options.cc:1026 +-#, c-format +-msgid "--hash-bucket-empty-fraction value %g out of range [0.0, 1.0)" +-msgstr "" +- +-#: options.cc:1031 +-msgid "Options --incremental-changed, --incremental-unchanged, --incremental-unknown require the use of --incremental" +-msgstr "" +- +-#: options.cc:1097 +-msgid "May not nest groups" +-msgstr "" +- +-#: options.cc:1109 +-msgid "Group end without group start" +-msgstr "" +- +-#. I guess it's neither a long option nor a short option. +-#: options.cc:1174 +-msgid "unknown option" +-msgstr "" +- +-#: options.cc:1201 +-#, c-format +-msgid "%s: missing group end\n" +-msgstr "" +- +-#: options.h:571 +-msgid "Report usage information" +-msgstr "" +- +-#: options.h:573 +-msgid "Report version information" +-msgstr "" +- +-#: options.h:575 +-msgid "Report version and target information" +-msgstr "" +- +-#: options.h:584 options.h:635 +-msgid "Not supported" +-msgstr "" +- +-#: options.h:585 options.h:636 +-msgid "Do not copy DT_NEEDED tags from shared libraries" +-msgstr "" +- +-#: options.h:588 +-msgid "Allow unresolved references in shared libraries" +-msgstr "" +- +-#: options.h:589 +-msgid "Do not allow unresolved references in shared libraries" +-msgstr "" +- +-#: options.h:592 +-msgid "Only set DT_NEEDED for shared libraries if used" +-msgstr "" +- +-#: options.h:593 +-msgid "Always DT_NEEDED for shared libraries" +-msgstr "" +- +-#: options.h:600 +-msgid "Set input format" +-msgstr "" +- +-#: options.h:603 +-msgid "-l searches for shared libraries" +-msgstr "" +- +-#: options.h:605 +-msgid "-l does not search for shared libraries" +-msgstr "" +- +-#: options.h:609 +-msgid "Bind defined symbols locally" +-msgstr "" +- +-#: options.h:612 +-msgid "Bind defined function symbols locally" +-msgstr "" +- +-#: options.h:615 +-msgid "Generate build ID note" +-msgstr "" +- +-#: options.h:616 options.h:655 +-msgid "[=STYLE]" +-msgstr "" +- +-#: options.h:619 +-msgid "Check segment addresses for overlaps (default)" +-msgstr "" +- +-#: options.h:620 +-msgid "Do not check segment addresses for overlaps" +-msgstr "" +- +-#: options.h:624 options.h:629 +-msgid "Compress .debug_* sections in the output file" +-msgstr "" +- +-#: options.h:630 +-msgid "[none]" +-msgstr "" +- +-#: options.h:639 +-msgid "Define common symbols" +-msgstr "" +- +-#: options.h:640 +-msgid "Do not define common symbols" +-msgstr "" +- +-#: options.h:642 options.h:644 +-msgid "Alias for -d" +-msgstr "" +- +-#: options.h:647 +-msgid "Turn on debugging" +-msgstr "" +- +-#: options.h:648 +-msgid "[all,files,script,task][,...]" +-msgstr "" +- +-#: options.h:651 +-msgid "Define a symbol" +-msgstr "" +- +-#: options.h:651 +-msgid "SYMBOL=EXPRESSION" +-msgstr "" +- +-#: options.h:654 +-msgid "Demangle C++ symbols in log messages" +-msgstr "" +- +-#: options.h:658 +-msgid "Do not demangle C++ symbols in log messages" +-msgstr "" +- +-#: options.h:662 +-msgid "Try to detect violations of the One Definition Rule" +-msgstr "" +- +-#: options.h:666 +-msgid "Delete all temporary local symbols" +-msgstr "" +- +-#: options.h:669 +-msgid "Add data symbols to dynamic symbols" +-msgstr "" +- +-#: options.h:672 +-msgid "Add C++ operator new/delete to dynamic symbols" +-msgstr "" +- +-#: options.h:675 +-msgid "Add C++ typeinfo to dynamic symbols" +-msgstr "" +- +-#: options.h:678 +-msgid "Read a list of dynamic symbols" +-msgstr "" +- +-#: options.h:678 options.h:732 options.h:766 options.h:893 options.h:921 +-msgid "FILE" +-msgstr "" +- +-#: options.h:681 +-msgid "Set program start address" +-msgstr "" +- +-#: options.h:681 options.h:908 options.h:910 options.h:912 +-msgid "ADDRESS" +-msgstr "" +- +-#: options.h:684 +-msgid "Exclude libraries from automatic export" +-msgstr "" +- +-#: options.h:688 +-msgid "Export all dynamic symbols" +-msgstr "" +- +-#: options.h:689 +-msgid "Do not export all dynamic symbols (default)" +-msgstr "" +- +-#: options.h:692 +-msgid "Create exception frame header" +-msgstr "" +- +-#: options.h:695 +-msgid "Treat warnings as errors" +-msgstr "" +- +-#: options.h:696 +-msgid "Do not treat warnings as errors" +-msgstr "" +- +-#: options.h:699 +-msgid "Call SYMBOL at unload-time" +-msgstr "" +- +-#: options.h:699 options.h:729 options.h:873 options.h:915 options.h:936 +-#: options.h:939 +-msgid "SYMBOL" +-msgstr "" +- +-#: options.h:702 +-msgid "Set shared library name" +-msgstr "" +- +-#: options.h:702 options.h:792 +-msgid "FILENAME" +-msgstr "" +- +-#: options.h:705 +-msgid "Min fraction of empty buckets in dynamic hash" +-msgstr "" +- +-#: options.h:706 +-msgid "FRACTION" +-msgstr "" +- +-#: options.h:709 +-msgid "Dynamic hash style" +-msgstr "" +- +-#: options.h:709 +-msgid "[sysv,gnu,both]" +-msgstr "" +- +-#: options.h:713 +-msgid "Set dynamic linker path" +-msgstr "" +- +-#: options.h:713 +-msgid "PROGRAM" +-msgstr "" +- +-#: options.h:716 +-msgid "Work in progress; do not use" +-msgstr "" +- +-#: options.h:717 +-msgid "Do a full build" +-msgstr "" +- +-#: options.h:720 +-msgid "Assume files changed" +-msgstr "" +- +-#: options.h:723 +-msgid "Assume files didn't change" +-msgstr "" +- +-#: options.h:726 +-msgid "Use timestamps to check files (default)" +-msgstr "" +- +-#: options.h:729 +-msgid "Call SYMBOL at load-time" +-msgstr "" +- +-#: options.h:732 +-msgid "Read only symbol values from FILE" +-msgstr "" +- +-#: options.h:735 +-msgid "Search for library LIBNAME" +-msgstr "" +- +-#: options.h:735 +-msgid "LIBNAME" +-msgstr "" +- +-#: options.h:738 +-msgid "Add directory to search path" +-msgstr "" +- +-#: options.h:738 options.h:813 options.h:816 options.h:820 options.h:887 +-msgid "DIR" +-msgstr "" +- +-#: options.h:741 +-msgid "Ignored for compatibility" +-msgstr "" +- +-#: options.h:741 +-msgid "EMULATION" +-msgstr "" +- +-#: options.h:744 +-msgid "Write map file on standard output" +-msgstr "" +- +-#: options.h:745 +-msgid "Write map file" +-msgstr "" +- +-#: options.h:746 +-msgid "MAPFILENAME" +-msgstr "" +- +-#: options.h:749 +-msgid "Do not page align data" +-msgstr "" +- +-#: options.h:751 +-msgid "Do not page align data, do not make text readonly" +-msgstr "" +- +-#: options.h:752 +-msgid "Page align data, make text readonly" +-msgstr "" +- +-#: options.h:755 +-msgid "Enable use of DT_RUNPATH and DT_FLAGS" +-msgstr "" +- +-#: options.h:756 +-msgid "Disable use of DT_RUNPATH and DT_FLAGS" +-msgstr "" +- +-#: options.h:759 +-msgid "Create an output file even if errors occur" +-msgstr "" +- +-#: options.h:762 options.h:958 +-msgid "Report undefined symbols (even with --shared)" +-msgstr "" +- +-#: options.h:766 +-msgid "Set output file name" +-msgstr "" +- +-#: options.h:769 +-msgid "Optimize output file size" +-msgstr "" +- +-#: options.h:769 +-msgid "LEVEL" +-msgstr "" +- +-#: options.h:772 +-msgid "Set output format" +-msgstr "" +- +-#: options.h:772 +-msgid "[binary]" +-msgstr "" +- +-#: options.h:775 options.h:777 +-msgid "Create a position independent executable" +-msgstr "" +- +-#: options.h:782 +-msgid "Load a plugin library" +-msgstr "" +- +-#: options.h:782 +-msgid "PLUGIN" +-msgstr "" +- +-#: options.h:784 +-msgid "Pass an option to the plugin" +-msgstr "" +- +-#: options.h:784 +-msgid "OPTION" +-msgstr "" +- +-#: options.h:788 +-msgid "Preread archive symbols when multi-threaded" +-msgstr "" +- +-#: options.h:791 +-msgid "Print symbols defined and used for each input" +-msgstr "" +- +-#: options.h:795 +-msgid "Ignored for SVR4 compatibility" +-msgstr "" +- +-#: options.h:798 +-msgid "Generate relocations in output" +-msgstr "" +- +-#: options.h:801 +-msgid "Generate relocatable output" +-msgstr "" +- +-#: options.h:804 +-msgid "Relax branches on certain targets" +-msgstr "" +- +-#: options.h:807 +-msgid "keep only symbols listed in this file" +-msgstr "" +- +-#: options.h:807 +-msgid "[file]" +-msgstr "" +- +-#: options.h:813 options.h:816 +-msgid "Add DIR to runtime search path" +-msgstr "" +- +-#: options.h:819 +-msgid "Add DIR to link time shared library search path" +-msgstr "" +- +-#: options.h:823 +-msgid "Strip all symbols" +-msgstr "" +- +-#: options.h:825 +-msgid "Strip debugging information" +-msgstr "" +- +-#: options.h:827 +-msgid "Emit only debug line number information" +-msgstr "" +- +-#: options.h:829 +-msgid "Strip debug symbols that are unused by gdb (at least versions <= 6.7)" +-msgstr "" +- +-#: options.h:832 +-msgid "Strip LTO intermediate code sections" +-msgstr "" +- +-#: options.h:835 +-msgid "(ARM only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after the group. 1 means using default size.\n" +-msgstr "" +- +-#: options.h:838 options.h:852 options.h:956 options.h:975 +-msgid "SIZE" +-msgstr "" +- +-#: options.h:841 +-msgid "Use less memory and more disk I/O (included only for compatibility with GNU ld)" +-msgstr "" +- +-#: options.h:845 options.h:848 +-msgid "Generate shared library" +-msgstr "" +- +-#: options.h:851 +-msgid "Stack size when -fsplit-stack function calls non-split" +-msgstr "" +- +-#: options.h:857 +-msgid "Do not link against shared libraries" +-msgstr "" +- +-#: options.h:860 +-msgid "Identical Code Folding. '--icf=safe' folds only ctors and dtors." +-msgstr "" +- +-#: options.h:866 +-msgid "Number of iterations of ICF (default 2)" +-msgstr "" +- +-#: options.h:866 options.h:899 options.h:901 options.h:903 options.h:905 +-msgid "COUNT" +-msgstr "" +- +-#: options.h:869 +-msgid "List folded identical sections on stderr" +-msgstr "" +- +-#: options.h:870 +-msgid "Do not list folded identical sections" +-msgstr "" +- +-#: options.h:873 +-msgid "Do not fold this symbol during ICF" +-msgstr "" +- +-#: options.h:876 +-msgid "Remove unused sections" +-msgstr "" +- +-#: options.h:877 +-msgid "Don't remove unused sections (default)" +-msgstr "" +- +-#: options.h:880 +-msgid "List removed unused sections on stderr" +-msgstr "" +- +-#: options.h:881 +-msgid "Do not list removed unused sections" +-msgstr "" +- +-#: options.h:884 +-msgid "Print resource usage statistics" +-msgstr "" +- +-#: options.h:887 +-msgid "Set target system root directory" +-msgstr "" +- +-#: options.h:890 +-msgid "Print the name of each input file" +-msgstr "" +- +-#: options.h:893 +-msgid "Read linker script" +-msgstr "" +- +-#: options.h:896 +-msgid "Run the linker multi-threaded" +-msgstr "" +- +-#: options.h:897 +-msgid "Do not run the linker multi-threaded" +-msgstr "" +- +-#: options.h:899 +-msgid "Number of threads to use" +-msgstr "" +- +-#: options.h:901 +-msgid "Number of threads to use in initial pass" +-msgstr "" +- +-#: options.h:903 +-msgid "Number of threads to use in middle pass" +-msgstr "" +- +-#: options.h:905 +-msgid "Number of threads to use in final pass" +-msgstr "" +- +-#: options.h:908 +-msgid "Set the address of the bss segment" +-msgstr "" +- +-#: options.h:910 +-msgid "Set the address of the data segment" +-msgstr "" +- +-#: options.h:912 +-msgid "Set the address of the text segment" +-msgstr "" +- +-#: options.h:915 +-msgid "Create undefined reference to SYMBOL" +-msgstr "" +- +-#: options.h:918 +-msgid "Synonym for --debug=files" +-msgstr "" +- +-#: options.h:921 +-msgid "Read version script" +-msgstr "" +- +-#: options.h:924 +-msgid "Warn about duplicate common symbols" +-msgstr "" +- +-#: options.h:925 +-msgid "Do not warn about duplicate common symbols (default)" +-msgstr "" +- +-#: options.h:928 +-msgid "Warn when skipping an incompatible library" +-msgstr "" +- +-#: options.h:929 +-msgid "Don't warn when skipping an incompatible library" +-msgstr "" +- +-#: options.h:932 +-msgid "Include all archive contents" +-msgstr "" +- +-#: options.h:933 +-msgid "Include only needed archive contents" +-msgstr "" +- +-#: options.h:936 +-msgid "Use wrapper functions for SYMBOL" +-msgstr "" +- +-#: options.h:939 +-msgid "Trace references to symbol" +-msgstr "" +- +-#: options.h:942 +-msgid "Default search path for Solaris compatibility" +-msgstr "" +- +-#: options.h:943 +-msgid "PATH" +-msgstr "" +- +-#: options.h:946 +-msgid "Start a library search group" +-msgstr "" +- +-#: options.h:948 +-msgid "End a library search group" +-msgstr "" +- +-#: options.h:953 +-msgid "Sort dynamic relocs" +-msgstr "" +- +-#: options.h:954 +-msgid "Do not sort dynamic relocs" +-msgstr "" +- +-#: options.h:956 +-msgid "Set common page size to SIZE" +-msgstr "" +- +-#: options.h:961 +-msgid "Mark output as requiring executable stack" +-msgstr "" +- +-#: options.h:963 +-msgid "Mark DSO to be initialized first at runtime" +-msgstr "" +- +-#: options.h:966 +-msgid "Mark object to interpose all DSOs but executable" +-msgstr "" +- +-#: options.h:969 +-msgid "Mark object for lazy runtime binding (default)" +-msgstr "" +- +-#: options.h:972 +-msgid "Mark object requiring immediate process" +-msgstr "" +- +-#: options.h:975 +-msgid "Set maximum page size to SIZE" +-msgstr "" +- +-#: options.h:978 +-msgid "Do not create copy relocs" +-msgstr "" +- +-#: options.h:980 +-msgid "Mark object not to use default search paths" +-msgstr "" +- +-#: options.h:983 +-msgid "Mark DSO non-deletable at runtime" +-msgstr "" +- +-#: options.h:986 +-msgid "Mark DSO not available to dlopen" +-msgstr "" +- +-#: options.h:989 +-msgid "Mark DSO not available to dldump" +-msgstr "" +- +-#: options.h:992 +-msgid "Mark output as not requiring executable stack" +-msgstr "" +- +-#: options.h:994 +-msgid "Mark object for immediate function binding" +-msgstr "" +- +-#: options.h:997 +-msgid "Mark DSO to indicate that needs immediate $ORIGIN processing at runtime" +-msgstr "" +- +-#: options.h:1000 +-msgid "Where possible mark variables read-only after relocation" +-msgstr "" +- +-#: options.h:1001 +-msgid "Don't mark variables read-only after relocation" +-msgstr "" +- +-#: output.cc:1132 +-msgid "section group retained but group element discarded" +-msgstr "" +- +-#: output.cc:1860 +-#, c-format +-msgid "invalid alignment %lu for section \"%s\"" +-msgstr "" +- +-#: output.cc:3573 +-#, c-format +-msgid "dot moves backward in linker script from 0x%llx to 0x%llx" +-msgstr "" +- +-#: output.cc:3576 +-#, c-format +-msgid "address of section '%s' moves backward from 0x%llx to 0x%llx" +-msgstr "" +- +-#: output.cc:3755 +-#, c-format +-msgid "nobits section %s may not precede progbits section %s in same segment" +-msgstr "" +- +-#: output.cc:3907 output.cc:3975 +-#, c-format +-msgid "%s: open: %s" +-msgstr "" +- +-#: output.cc:3996 +-#, c-format +-msgid "%s: mremap: %s" +-msgstr "" +- +-#: output.cc:4005 +-#, c-format +-msgid "%s: mmap: %s" +-msgstr "" +- +-#: output.cc:4085 +-#, c-format +-msgid "%s: mmap: failed to allocate %lu bytes for output file: %s" +-msgstr "" +- +-#: output.cc:4096 +-#, c-format +-msgid "%s: munmap: %s" +-msgstr "" +- +-#: output.cc:4115 +-#, c-format +-msgid "%s: write: unexpected 0 return-value" +-msgstr "" +- +-#: output.cc:4117 +-#, c-format +-msgid "%s: write: %s" +-msgstr "" +- +-#: output.cc:4132 +-#, c-format +-msgid "%s: close: %s" +-msgstr "" +- +-#: output.h:520 +-msgid "** section headers" +-msgstr "" +- +-#: output.h:565 +-msgid "** segment headers" +-msgstr "" +- +-#: output.h:613 +-msgid "** file header" +-msgstr "" +- +-#: output.h:833 +-msgid "** fill" +-msgstr "" +- +-#: output.h:987 +-msgid "** string table" +-msgstr "" +- +-#: output.h:1300 +-msgid "** dynamic relocs" +-msgstr "" +- +-#: output.h:1301 output.h:1637 +-msgid "** relocs" +-msgstr "" +- +-#: output.h:1662 +-msgid "** group" +-msgstr "" +- +-#: output.h:1774 +-msgid "** GOT" +-msgstr "" +- +-#: output.h:1916 +-msgid "** dynamic" +-msgstr "" +- +-#: output.h:2039 +-msgid "** symtab xindex" +-msgstr "" +- +-#: parameters.cc:172 +-#, c-format +-msgid "unrecognized output format %s" +-msgstr "" +- +-#: plugin.cc:106 +-#, c-format +-msgid "%s: could not load plugin library" +-msgstr "" +- +-#: plugin.cc:116 +-#, c-format +-msgid "%s: could not find onload entry point" +-msgstr "" +- +-#: plugin.cc:426 +-msgid "Input files added by plug-ins in --incremental mode not supported yet.\n" +-msgstr "" +- +-#: powerpc.cc:1502 sparc.cc:2307 x86_64.cc:1632 +-#, c-format +-msgid "%s: unsupported REL reloc section" +-msgstr "" +- +-#: readsyms.cc:191 +-#, c-format +-msgid "%s: file is empty" +-msgstr "" +- +-#. Here we have to handle any other input file types we need. +-#: readsyms.cc:575 +-#, c-format +-msgid "%s: not an object or archive" +-msgstr "" +- +-#: reduced_debug_output.cc:236 +-msgid "Debug abbreviations extend beyond .debug_abbrev section; failed to reduce debug abbreviations" +-msgstr "" +- +-#: reduced_debug_output.cc:322 +-msgid "Extremely large compile unit in debug info; failed to reduce debug info" +-msgstr "" +- +-#: reduced_debug_output.cc:330 +-msgid "Debug info extends beyond .debug_info section;failed to reduce debug info" +-msgstr "" +- +-#: reduced_debug_output.cc:350 reduced_debug_output.cc:392 +-msgid "Invalid DIE in debug info; failed to reduce debug info" +-msgstr "" +- +-#: reduced_debug_output.cc:373 +-msgid "Debug info extends beyond .debug_info section; failed to reduce debug info" +-msgstr "" +- +-#: reloc.cc:297 reloc.cc:858 +-#, c-format +-msgid "relocation section %u uses unexpected symbol table %u" +-msgstr "" +- +-#: reloc.cc:312 reloc.cc:875 +-#, c-format +-msgid "unexpected entsize for reloc section %u: %lu != %u" +-msgstr "" +- +-#: reloc.cc:321 reloc.cc:884 +-#, c-format +-msgid "reloc section %u size %lu uneven" +-msgstr "" +- +-#: reloc.cc:1203 +-#, c-format +-msgid "could not convert call to '%s' to '%s'" +-msgstr "" +- +-#: reloc.cc:1343 +-#, c-format +-msgid "reloc section size %zu is not a multiple of reloc size %d\n" +-msgstr "" +- +-#. We should only see externally visible symbols in the symbol +-#. table. +-#: resolve.cc:191 +-msgid "invalid STB_LOCAL symbol in external symbols" +-msgstr "" +- +-#. Any target which wants to handle STB_LOOS, etc., needs to +-#. define a resolve method. +-#: resolve.cc:197 +-msgid "unsupported symbol binding" +-msgstr "" +- +-#. A dynamic object cannot reference a hidden or internal symbol +-#. defined in another object. +-#: resolve.cc:266 +-#, c-format +-msgid "%s symbol '%s' in %s is referenced by DSO %s" +-msgstr "" +- +-#: resolve.cc:326 +-#, c-format +-msgid "common of '%s' overriding smaller common" +-msgstr "" +- +-#: resolve.cc:331 +-#, c-format +-msgid "common of '%s' overidden by larger common" +-msgstr "" +- +-#: resolve.cc:336 +-#, c-format +-msgid "multiple common of '%s'" +-msgstr "" +- +-#: resolve.cc:442 +-#, c-format +-msgid "multiple definition of '%s'" +-msgstr "" +- +-#: resolve.cc:481 +-#, c-format +-msgid "definition of '%s' overriding common" +-msgstr "" +- +-#: resolve.cc:516 +-#, c-format +-msgid "definition of '%s' overriding dynamic common definition" +-msgstr "" +- +-#: resolve.cc:636 +-#, c-format +-msgid "common '%s' overridden by previous definition" +-msgstr "" +- +-#: resolve.cc:766 resolve.cc:778 +-msgid "command line" +-msgstr "" +- +-#: script-sections.cc:690 +-msgid "dot may not move backward" +-msgstr "" +- +-#: script-sections.cc:757 +-msgid "** expression" +-msgstr "" +- +-#: script-sections.cc:941 +-msgid "fill value is not absolute" +-msgstr "" +- +-#: script-sections.cc:1913 +-#, c-format +-msgid "alignment of section %s is not absolute" +-msgstr "" +- +-#: script-sections.cc:1957 +-#, c-format +-msgid "subalign of section %s is not absolute" +-msgstr "" +- +-#: script-sections.cc:1972 +-#, c-format +-msgid "fill of section %s is not absolute" +-msgstr "" +- +-#: script-sections.cc:2048 +-msgid "SPECIAL constraints are not implemented" +-msgstr "" +- +-#: script-sections.cc:2090 +-msgid "mismatched definition for constrained sections" +-msgstr "" +- +-#: script-sections.cc:2634 +-msgid "DATA_SEGMENT_ALIGN may only appear once in a linker script" +-msgstr "" +- +-#: script-sections.cc:2649 +-msgid "DATA_SEGMENT_RELRO_END may only appear once in a linker script" +-msgstr "" +- +-#: script-sections.cc:2654 +-msgid "DATA_SEGMENT_RELRO_END must follow DATA_SEGMENT_ALIGN" +-msgstr "" +- +-#: script-sections.cc:2826 +-msgid "no matching section constraint" +-msgstr "" +- +-#: script-sections.cc:3151 +-msgid "TLS sections are not adjacent" +-msgstr "" +- +-#: script-sections.cc:3280 +-msgid "allocated section not in any segment" +-msgstr "" +- +-#: script-sections.cc:3309 +-#, c-format +-msgid "no segment %s" +-msgstr "" +- +-#: script-sections.cc:3323 +-msgid "section in two PT_LOAD segments" +-msgstr "" +- +-#: script-sections.cc:3330 +-msgid "allocated section not in any PT_LOAD segment" +-msgstr "" +- +-#: script-sections.cc:3358 +-msgid "may only specify load address for PT_LOAD segment" +-msgstr "" +- +-#: script-sections.cc:3382 +-#, c-format +-msgid "PHDRS load address overrides section %s load address" +-msgstr "" +- +-#. We could support this if we wanted to. +-#: script-sections.cc:3393 +-msgid "using only one of FILEHDR and PHDRS is not currently supported" +-msgstr "" +- +-#: script-sections.cc:3408 +-msgid "sections loaded on first page without room for file and program headers are not supported" +-msgstr "" +- +-#: script-sections.cc:3414 +-msgid "using FILEHDR and PHDRS on more than one PT_LOAD segment is not currently supported" +-msgstr "" +- +-#: script.cc:1072 +-msgid "invalid use of PROVIDE for dot symbol" +-msgstr "" +- +-#: script.cc:2132 +-#, c-format +-msgid "%s:%d:%d: %s" +-msgstr "" +- +-#. There are some options that we could handle here--e.g., +-#. -lLIBRARY. Should we bother? +-#: script.cc:2297 +-#, c-format +-msgid "%s:%d:%d: ignoring command OPTION; OPTION is only valid for scripts specified via -T/--script" +-msgstr "" +- +-#: script.cc:2362 +-#, c-format +-msgid "%s:%d:%d: ignoring SEARCH_DIR; SEARCH_DIR is only valid for scripts specified via -T/--script" +-msgstr "" +- +-#: script.cc:2606 script.cc:2620 +-#, c-format +-msgid "%s:%d:%d: DATA_SEGMENT_ALIGN not in SECTIONS clause" +-msgstr "" +- +-#: script.cc:2739 +-msgid "unknown PHDR type (try integer)" +-msgstr "" +- +-#: stringpool.cc:528 +-#, c-format +-msgid "%s: %s entries: %zu; buckets: %zu\n" +-msgstr "" +- +-#: stringpool.cc:532 +-#, c-format +-msgid "%s: %s entries: %zu\n" +-msgstr "" +- +-#: stringpool.cc:535 +-#, c-format +-msgid "%s: %s Stringdata structures: %zu\n" +-msgstr "" +- +-#: symtab.cc:857 +-#, c-format +-msgid "%s: reference to %s" +-msgstr "" +- +-#: symtab.cc:859 +-#, c-format +-msgid "%s: definition of %s" +-msgstr "" +- +-#: symtab.cc:1052 +-#, c-format +-msgid "bad global symbol name offset %u at %zu" +-msgstr "" +- +-#: symtab.cc:1278 +-msgid "--just-symbols does not make sense with a shared object" +-msgstr "" +- +-#: symtab.cc:1284 +-msgid "too few symbol versions" +-msgstr "" +- +-#: symtab.cc:1333 +-#, c-format +-msgid "bad symbol name offset %u at %zu" +-msgstr "" +- +-#: symtab.cc:1396 +-#, c-format +-msgid "versym for symbol %zu out of range: %u" +-msgstr "" +- +-#: symtab.cc:1404 +-#, c-format +-msgid "versym for symbol %zu has no name: %u" +-msgstr "" +- +-#: symtab.cc:2549 symtab.cc:2681 +-#, c-format +-msgid "%s: unsupported symbol section 0x%x" +-msgstr "" +- +-#: symtab.cc:2933 +-#, c-format +-msgid "%s: symbol table entries: %zu; buckets: %zu\n" +-msgstr "" +- +-#: symtab.cc:2936 +-#, c-format +-msgid "%s: symbol table entries: %zu\n" +-msgstr "" +- +-#: symtab.cc:3007 +-#, c-format +-msgid "while linking %s: symbol '%s' defined in multiple places (possible ODR violation):" +-msgstr "" +- +-#: target-reloc.h:259 +-msgid "relocation refers to discarded comdat section" +-msgstr "再配置が破棄された domdat セクションを参照しています" +- +-#: target-reloc.h:298 +-#, c-format +-msgid "reloc has bad offset %zu" +-msgstr "再配置に誤ったオフセット %zu があります" +- +-#: target.cc:90 +-#, c-format +-msgid "%s: unsupported ELF file type %d" +-msgstr "%s: サポートされていない ELF ファイル型 %d です" +- +-#: target.cc:157 +-#, c-format +-msgid "linker does not include stack split support required by %s" +-msgstr "リンカは %s で必要となるスタック分割をサポートしていません" +- +-#: tls.h:59 +-msgid "TLS relocation out of range" +-msgstr "TLS 再配置が範囲外です" +- +-#: tls.h:73 +-msgid "TLS relocation against invalid instruction" +-msgstr "無効な命令に対する TLS 再配置です" +- +-#. This output is intended to follow the GNU standards. +-#: version.cc:65 +-#, c-format +-msgid "Copyright 2008 Free Software Foundation, Inc.\n" +-msgstr "Copyright 2008 Free Software Foundation, Inc.\n" +- +-#: version.cc:66 +-#, c-format +-msgid "" +-"This program is free software; you may redistribute it under the terms of\n" +-"the GNU General Public License version 3 or (at your option) a later version.\n" +-"This program has absolutely no warranty.\n" +-msgstr "" +-"This program is free software; you may redistribute it under the terms of\n" +-"the GNU General Public License version 3 or (at your option) a later version.\n" +-"This program has absolutely no warranty.\n" +- +-#: workqueue-threads.cc:106 +-#, c-format +-msgid "%s failed: %s" +-msgstr "%s に失敗しました: %s" +- +-#: x86_64.cc:2184 +-#, c-format +-msgid "unsupported reloc type %u" +-msgstr "サポートされていない再配置型 %u です" +- +-#: x86_64.cc:2524 +-#, c-format +-msgid "unsupported reloc %u against local symbol" +-msgstr "サポートされていない局所シンボルに対する再配置 %u です" +diff -rNU3 a/gprof/corefile.c b/gprof/corefile.c +--- a/gprof/corefile.c 2021-03-30 23:12:40.197893267 -0300 ++++ b/gprof/corefile.c 2021-03-30 17:48:00.645553000 -0300 +@@ -30,6 +30,8 @@ + #include "safe-ctype.h" + #include /* For UINT_MAX. */ + ++#include ++ + bfd *core_bfd; + static int core_num_syms; + static asymbol **core_syms; +diff -rNU3 a/gprof/gprof.c b/gprof/gprof.c +--- a/gprof/gprof.c 2021-03-30 23:12:40.197893267 -0300 ++++ b/gprof/gprof.c 2021-03-30 17:48:00.645553000 -0300 +@@ -47,6 +47,8 @@ + + static void usage (FILE *, int) ATTRIBUTE_NORETURN; + ++#include ++ + const char * whoami; + const char * function_mapping_file; + static const char * external_symbol_table; +diff -rNU3 a/include/elf/common.h b/include/elf/common.h +--- a/include/elf/common.h 2021-03-30 23:12:40.197893267 -0300 ++++ b/include/elf/common.h 2021-03-30 17:48:00.692219000 -0300 +@@ -686,6 +686,7 @@ + must start with "NetBSD-CORE". */ + + #define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */ ++#define NT_NETBSDCORE_AUXV 2 /* Has ELF Auxiliary vector */ + #define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */ + + +@@ -862,6 +863,15 @@ + #define NT_NETBSD_IDENT 1 + #define NT_NETBSD_MARCH 5 + ++/* Values for NetBSD .note.netbsd.ident notes. Note name is "PaX". */ ++#define NT_NETBSD_PAX 3 ++#define NT_NETBSD_PAX_MPROTECT 0x01 /* Force enable Mprotect */ ++#define NT_NETBSD_PAX_NOMPROTECT 0x02 /* Force disable Mprotect */ ++#define NT_NETBSD_PAX_GUARD 0x04 /* Force enable Segvguard */ ++#define NT_NETBSD_PAX_NOGUARD 0x08 /* Force disable Segvguard */ ++#define NT_NETBSD_PAX_ASLR 0x10 /* Force enable ASLR */ ++#define NT_NETBSD_PAX_NOASLR 0x20 /* Force disable ASLR */ ++ + /* Values for OpenBSD .note.openbsd.ident notes. Note name is "OpenBSD". */ + + #define NT_OPENBSD_IDENT 1 +diff -rNU3 a/include/opcode/mips.h b/include/opcode/mips.h +--- a/include/opcode/mips.h 2021-03-30 23:12:40.201226600 -0300 ++++ b/include/opcode/mips.h 2021-03-30 17:48:00.728886000 -0300 +@@ -1595,7 +1595,11 @@ + M_DSUB_I, + M_DSUBU_I, + M_DSUBU_I_2, ++ M_JR_S, ++ M_J_S, + M_J_A, ++ M_JALR_S, ++ M_JALR_DS, + M_JAL_1, + M_JAL_2, + M_JAL_A, +diff -rNU3 a/ld/configdoc.texi b/ld/configdoc.texi +--- a/ld/configdoc.texi 2021-03-30 23:12:40.201226600 -0300 ++++ b/ld/configdoc.texi 1969-12-31 21:00:00.000000000 -0300 +@@ -1,35 +0,0 @@ +-@c Copyright (C) 2012-2020 Free Software Foundation, Inc. +-@c For copying conditions, see the file ld.texi. +- +-@c ------------------------------ CONFIGURATION VARS: +-@c 1. Inclusiveness of this manual +-@set GENERIC +- +-@c 2. Specific target machines +-@set ARM +-@set C6X +-@set CSKY +-@set H8300 +-@set HPPA +-@set I960 +-@set M68HC11 +-@set M68K +-@set MIPS +-@set MMIX +-@set MSP430 +-@set NDS32 +-@set NIOSII +-@set POWERPC +-@set POWERPC64 +-@set Renesas +-@set S/390 +-@set SPU +-@set TICOFF +-@set WIN32 +-@set XTENSA +- +-@c 3. Properties of this configuration +-@clear SingleFormat +-@set UsesEnvVars +-@c ------------------------------ end CONFIGURATION VARS +- +diff -rNU3 a/ld/configure.tgt b/ld/configure.tgt +--- a/ld/configure.tgt 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/configure.tgt 2021-03-30 17:48:00.818886000 -0300 +@@ -77,6 +77,12 @@ + targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi" + targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" + ;; ++aarch64_be-*-netbsd*) targ_emul=aarch64nbsdb ++ targ_extra_emuls="aarch64nbsd aarch64elfb aarch64elf armelfb_nbsd_eabihf armelf_nbsd_eabihf armelfb_nbsd_eabi armelf_nbsd_eabi armelfb_nbsd armelf_nbsd armelf armelfb" ++ ;; ++aarch64-*-netbsd*) targ_emul=aarch64nbsd ++ targ_extra_emuls="aarch64nbsdb aarch64elf aarch64elfb armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armelfb" ++ ;; + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) + targ_emul=elf64alpha_fbsd + targ_extra_emuls="elf64alpha alpha" +@@ -133,11 +139,21 @@ + ;; + arm*-*-freebsd* | arm-*-kfreebsd*-gnu) + targ_emul=armelf_fbsd +- targ_extra_emuls="armelfb_fbsd armelf" +- ;; +-armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; +- targ_extra_emuls="armelf_nbsd armelf" +- ;; ++ targ_extra_emuls="armelfb_fbsd armelf" ;; ++arm*eb-*-netbsdelf*-*eabihf*) ++ targ_emul=armelfb_nbsd_eabihf; ++ targ_extra_emuls="armelf_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf" ;; ++arm*eb-*-netbsdelf*-*eabi*) ++ targ_emul=armelfb_nbsd_eabi; ++ targ_extra_emuls="armelf_nbsd_eabi armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd armelfb_nbsd armelf" ;; ++arm*-*-netbsdelf*-*eabihf*) ++ targ_emul=armelf_nbsd_eabihf; ++ targ_extra_emuls="armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf" ;; ++arm*-*-netbsdelf*-*eabi*) ++ targ_emul=armelf_nbsd_eabi; ++ targ_extra_emuls="armelfb_nbsd_eabi armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd armelfb_nbsd armelf" ;; ++arm*eb-*-netbsdelf*) targ_emul=armelfb_nbsd; ++ targ_extra_emuls="armelf_nbsd armelf" ;; + arm-*-netbsdelf*) targ_emul=armelf_nbsd; + targ_extra_emuls="armelfb_nbsd armelf" + ;; +@@ -486,8 +502,15 @@ + ;; + mips*-sgi-irix6*) targ_emul=elf32bmipn32 + targ_extra_emuls="elf32bsmip elf64bmip" ++ targ_extra_libpath=$targ_extra_emuls ;; ++mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32 ++ targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip" ++ targ_extra_libpath=$targ_extra_emuls ++ ;; ++mips64*-*-netbsd*) targ_emul=elf32btsmipn32 ++ targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip" + targ_extra_libpath=$targ_extra_emuls +- ;; ++ ;; + mips*el-*-netbsd*) targ_emul=elf32ltsmip + targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" + ;; +@@ -646,6 +669,21 @@ + tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` + tdir_elf32ppc_fbsd=$tdir_elf32ppc + ;; ++powerpc-*-netbsd*) ++ targ_emul=elf32ppc_nbsd ++ targ_extra_emuls="elf32ppc elf32ppcsim" ++ targ_extra_libpath=elf32ppc; ++ tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ++ targ64_extra_emuls=elf64ppc ++ targ64_extra_libpath=elf64ppc ++ ;; ++powerpc64-*-netbsd*) ++ targ_emul=elf64ppc ++ targ_extra_emuls="elf32ppc elf32ppc_nbsd elf32ppcsim" ++ targ_extra_libpath="elf32ppc_nbsd elf32ppc" ++ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` ++ tdir_elf32ppc_fbsd=$tdir_elf32ppc ++ ;; + powerpc-*-vxworks*) + targ_emul=elf32ppcvxworks + targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" +@@ -750,7 +788,8 @@ + ;; + pru*-*-*) targ_emul=pruelf + ;; +-riscv32*-*-linux*) targ_emul=elf32lriscv ++riscv32*-*-linux* | riscv-*-netbsd* | riscv32*-*-netbsd*) ++ targ_emul=elf32lriscv + targ_extra_emuls="elf32lriscv_ilp32f elf32lriscv_ilp32 elf64lriscv elf64lriscv_lp64f elf64lriscv_lp64" + targ_extra_libpath=$targ_extra_emuls + ;; +@@ -759,7 +798,8 @@ + targ_extra_emuls="elf64lriscv" + targ_extra_libpath=$targ_extra_emuls + ;; +-riscv64*-*-linux*) targ_emul=elf64lriscv ++riscv64*-*-linux* | riscv64*-*-netbsd*) ++ targ_emul=elf64lriscv + targ_extra_emuls="elf64lriscv_lp64f elf64lriscv_lp64 elf32lriscv elf32lriscv_ilp32f elf32lriscv_ilp32" + targ_extra_libpath=$targ_extra_emuls + ;; +@@ -864,6 +904,16 @@ + targ_extra_libpath=elf64_sparc + tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` + ;; ++sparc64-*-netbsd*) targ_emul=elf64_sparc ++ targ_extra_emuls="elf32_sparc" ++ ;; ++sparc64-*-openbsd*) targ_emul=elf64_sparc ++ targ_extra_emuls="elf32_sparc" ++ ;; ++sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ++ ;; ++sparc*-*-netbsd*) targ_emul=sparcnbsd ++ ;; + sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) + targ_emul=elf32_sparc_sol2 + targ_extra_emuls=elf32_sparc +diff -rNU3 a/ld/emulparams/aarch64nbsdb.sh b/ld/emulparams/aarch64nbsdb.sh +--- a/ld/emulparams/aarch64nbsdb.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/aarch64nbsdb.sh 2021-03-30 17:48:00.828886000 -0300 +@@ -0,0 +1,2 @@ ++. ${srcdir}/emulparams/aarch64nbsd.sh ++OUTPUT_FORMAT="elf64-bigaarch64" +diff -rNU3 a/ld/emulparams/aarch64nbsd.sh b/ld/emulparams/aarch64nbsd.sh +--- a/ld/emulparams/aarch64nbsd.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/aarch64nbsd.sh 2021-03-30 17:48:00.828886000 -0300 +@@ -0,0 +1,37 @@ ++ARCH=aarch64 ++MACHINE= ++NOP=0 ++ ++SCRIPT_NAME=elf ++ELFSIZE=64 ++OUTPUT_FORMAT="elf64-littleaarch64" ++BIG_OUTPUT_FORMAT="elf64-bigaarch64" ++LITTLE_OUTPUT_FORMAT="elf64-littleaarch64" ++NO_REL_RELOCS=yes ++ ++TEMPLATE_NAME=elf ++EXTRA_EM_FILE=aarch64elf ++ ++GENERATE_SHLIB_SCRIPT=yes ++GENERATE_PIE_SCRIPT=yes ++ ++MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ++COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ++SEPARATE_GOTPLT=24 ++IREL_IN_PLT= ++ ++TEXT_START_ADDR=0x200100000 ++ ++DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; ++ ++# AArch64 does not support .s* sections. ++NO_SMALL_DATA=yes ++ ++OTHER_BSS_SYMBOLS='__bss_start__ = .;' ++OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' ++OTHER_END_SYMBOLS='__end__ = . ;' ++ ++OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }' ++ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }' ++# Ensure each PLT entry is aligned to a cache line. ++PLT=".plt ${RELOCATING-0} : ALIGN(16) { *(.plt)${IREL_IN_PLT+ *(.iplt)} }" +diff -rNU3 a/ld/emulparams/armelfb_nbsd_eabihf.sh b/ld/emulparams/armelfb_nbsd_eabihf.sh +--- a/ld/emulparams/armelfb_nbsd_eabihf.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/armelfb_nbsd_eabihf.sh 2021-03-30 17:48:00.838886000 -0300 +@@ -0,0 +1,2 @@ ++. ${srcdir}/emulparams/armelf_nbsd_eabihf.sh ++OUTPUT_FORMAT="elf32-bigarm" +diff -rNU3 a/ld/emulparams/armelfb_nbsd_eabi.sh b/ld/emulparams/armelfb_nbsd_eabi.sh +--- a/ld/emulparams/armelfb_nbsd_eabi.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/armelfb_nbsd_eabi.sh 2021-03-30 17:48:00.838886000 -0300 +@@ -0,0 +1,2 @@ ++. ${srcdir}/emulparams/armelf_nbsd_eabi.sh ++OUTPUT_FORMAT="elf32-bigarm" +diff -rNU3 a/ld/emulparams/armelf_nbsd_eabihf.sh b/ld/emulparams/armelf_nbsd_eabihf.sh +--- a/ld/emulparams/armelf_nbsd_eabihf.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/armelf_nbsd_eabihf.sh 2021-03-30 17:48:00.838886000 -0300 +@@ -0,0 +1,20 @@ ++. ${srcdir}/emulparams/armelf_nbsd.sh ++ ++# Use the ARM ABI-compliant exception-handling sections. ++OTHER_READONLY_SECTIONS=" ++ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } ++ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" ++ ++case "$target" in ++ arm*-*-netbsdelf*-*eabihf*) ++ ;; ++ aarch64*-*-netbsd* | arm*-*-netbsdelf*) ++ case "$EMULATION_NAME" in ++ *armelf*eabihf) ++ LIB_PATH='=/usr/lib/eabihf' ++ ;; ++ esac ++ ;; ++esac +diff -rNU3 a/ld/emulparams/armelf_nbsd_eabi.sh b/ld/emulparams/armelf_nbsd_eabi.sh +--- a/ld/emulparams/armelf_nbsd_eabi.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/armelf_nbsd_eabi.sh 2021-03-30 17:48:00.838886000 -0300 +@@ -0,0 +1,27 @@ ++. ${srcdir}/emulparams/armelf_nbsd.sh ++ ++# Use the ARM ABI-compliant exception-handling sections. ++OTHER_READONLY_SECTIONS=" ++ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } ++ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" ++ ++case "$target" in ++ arm*-*-netbsdelf*-*eabihf*) ++ case "$EMULATION_NAME" in ++ *armelf*eabi) ++ LIB_PATH='=/usr/lib/eabi' ++ ;; ++ esac ++ ;; ++ arm*-*-netbsdelf*-*eabi*) ++ ;; ++ aarch64*-*-netbsd* | arm*-*-netbsdelf*) ++ case "$EMULATION_NAME" in ++ *armelf*eabi) ++ LIB_PATH='=/usr/lib/eabi' ++ ;; ++ esac ++ ;; ++esac +diff -rNU3 a/ld/emulparams/armelf_nbsd.sh b/ld/emulparams/armelf_nbsd.sh +--- a/ld/emulparams/armelf_nbsd.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/armelf_nbsd.sh 2021-03-30 17:48:00.838886000 -0300 +@@ -1,7 +1,19 @@ + source_sh ${srcdir}/emulparams/armelf.sh + MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +-TEXT_START_ADDR=0x00008000 ++TEXT_START_ADDR=0x00010000 + TARGET2_TYPE=got-rel ++GENERATE_PIE_SCRIPT=yes + ++unset DATA_START_SYMBOLS + unset STACK_ADDR + unset EMBEDDED ++ ++case "$target" in ++ aarch64*-*-netbsd* | arm*-*-netbsdelf*-*eabi*) ++ case "$EMULATION_NAME" in ++ armelf*_nbsd) ++ LIB_PATH='=/usr/lib/oabi' ++ ;; ++ esac ++ ;; ++esac +diff -rNU3 a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh +--- a/ld/emulparams/elf32bmipn32-defs.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32bmipn32-defs.sh 2021-03-30 17:48:00.845553000 -0300 +@@ -6,6 +6,7 @@ + + # Handle both big- and little-ended 32-bit MIPS objects. + ARCH=mips ++MACHINE= + OUTPUT_FORMAT="elf32-bigmips" + BIG_OUTPUT_FORMAT="elf32-bigmips" + LITTLE_OUTPUT_FORMAT="elf32-littlemips" +@@ -77,7 +78,7 @@ + " + + # Magic symbols. +-TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};" ++TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .); ${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};" + DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fdata = .${CREATE_SHLIB+)};" + OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fbss = .${CREATE_SHLIB+)};" + +diff -rNU3 a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh +--- a/ld/emulparams/elf32bmip.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32bmip.sh 2021-03-30 17:48:00.845553000 -0300 +@@ -56,7 +56,7 @@ + .lit8 ${RELOCATING-0} : { *(.lit8) } + .lit4 ${RELOCATING-0} : { *(.lit4) } + " +-TEXT_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};" ++TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .); ${CREATE_SHLIB+PROVIDE (}_ftext = .${CREATE_SHLIB+)};" + DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fdata = .${CREATE_SHLIB+)};" + OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_fbss = .${CREATE_SHLIB+)};" + OTHER_SECTIONS=" +diff -rNU3 a/ld/emulparams/elf32lriscv_ilp32f.sh b/ld/emulparams/elf32lriscv_ilp32f.sh +--- a/ld/emulparams/elf32lriscv_ilp32f.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32lriscv_ilp32f.sh 2021-03-30 17:48:00.848886000 -0300 +@@ -11,4 +11,13 @@ + LIBPATH_SUFFIX="32/ilp32f 32" ;; + esac + ;; ++ # NetBSD puts ILP32 libraries in rv32 subdirectory. ++ # XXX d vs f vs "" ++ riscv64-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *32*) ++ LIB_PATH='=/usr/lib/rv32' ++ ;; ++ esac ++ ;; + esac +diff -rNU3 a/ld/emulparams/elf32lriscv_ilp32.sh b/ld/emulparams/elf32lriscv_ilp32.sh +--- a/ld/emulparams/elf32lriscv_ilp32.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32lriscv_ilp32.sh 2021-03-30 17:48:00.848886000 -0300 +@@ -11,4 +11,13 @@ + LIBPATH_SUFFIX="32/ilp32 32" ;; + esac + ;; ++ # NetBSD puts ILP32 libraries in rv32 subdirectory. ++ # XXX d vs f vs "" ++ riscv64-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *32*) ++ LIB_PATH='=/usr/lib/rv32' ++ ;; ++ esac ++ ;; + esac +diff -rNU3 a/ld/emulparams/elf32lriscv.sh b/ld/emulparams/elf32lriscv.sh +--- a/ld/emulparams/elf32lriscv.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32lriscv.sh 2021-03-30 17:48:00.848886000 -0300 +@@ -12,4 +12,13 @@ + LIBPATH_SUFFIX="32/ilp32d 32" ;; + esac + ;; ++ # NetBSD puts ILP32 libraries in rv32 subdirectory. ++ # XXX d vs f vs "" ++ riscv64-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *32*) ++ LIB_PATH='=/usr/lib/rv32' ++ ;; ++ esac ++ ;; + esac +diff -rNU3 a/ld/emulparams/elf32or1k_nbsd.sh b/ld/emulparams/elf32or1k_nbsd.sh +--- a/ld/emulparams/elf32or1k_nbsd.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/elf32or1k_nbsd.sh 2021-03-30 17:48:00.852219000 -0300 +@@ -0,0 +1,6 @@ ++. ${srcdir}/emulparams/elf32or1k.sh ++unset EMBEDDED ++GENERATE_SHLIB_SCRIPT=yes ++GENERATE_PIE_SCRIPT=yes ++GENERATE_COMBRELOC_SCRIPT=yes ++TEXT_START_ADDR=0x00002000 +diff -rNU3 a/ld/emulparams/elf32ppc_nbsd.sh b/ld/emulparams/elf32ppc_nbsd.sh +--- a/ld/emulparams/elf32ppc_nbsd.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/elf32ppc_nbsd.sh 2021-03-30 17:48:00.852219000 -0300 +@@ -0,0 +1,10 @@ ++. ${srcdir}/emulparams/elf32ppc.sh ++ ++case "$target" in ++ powerpc64*-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *32*) ++ LIB_PATH='=/usr/lib/powerpc' ++ ;; ++ esac ++esac +diff -rNU3 a/ld/emulparams/elf32_sparc.sh b/ld/emulparams/elf32_sparc.sh +--- a/ld/emulparams/elf32_sparc.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf32_sparc.sh 2021-03-30 17:48:00.842219000 -0300 +@@ -13,6 +13,17 @@ + TEMPLATE_NAME=elf + DATA_PLT= + GENERATE_SHLIB_SCRIPT=yes ++#ELFSIZE=32 + GENERATE_PIE_SCRIPT=yes + NOP=0x01000000 + NO_SMALL_DATA=yes ++ ++case "$target" in ++ sparc64-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *32*) ++ LIB_PATH='=/usr/lib/sparc' ++ ;; ++ esac ++ ;; ++esac +diff -rNU3 a/ld/emulparams/elf64alpha_nbsd.sh b/ld/emulparams/elf64alpha_nbsd.sh +--- a/ld/emulparams/elf64alpha_nbsd.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf64alpha_nbsd.sh 2021-03-30 17:48:00.855553000 -0300 +@@ -1,2 +1,8 @@ + source_sh ${srcdir}/emulparams/elf64alpha.sh + ENTRY=__start ++ ++NOP=0x47ff041f ++# XXX binutils 2.13 ++# Note that the number is always big-endian, thus we have to ++# reverse the digit string. ++#NOP=0x0000fe2f1f04ff47 # unop; nop +diff -rNU3 a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh +--- a/ld/emulparams/elf_i386.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/elf_i386.sh 2021-03-30 17:48:00.858886000 -0300 +@@ -14,10 +14,22 @@ + TEMPLATE_NAME=elf + EXTRA_EM_FILE="elf-x86" + GENERATE_SHLIB_SCRIPT=yes ++#ELFSIZE=32 + GENERATE_PIE_SCRIPT=yes + NO_SMALL_DATA=yes + SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0" + IREL_IN_PLT= ++ ++case "$target" in ++ x86_64-*-netbsd*) ++ case "$EMULATION_NAME" in ++ *i386*) ++ LIB_PATH='=/usr/lib/i386' ++ ;; ++ esac ++ ;; ++esac ++ + # These sections are placed right after .plt section. + OTHER_PLT_SECTIONS=" + .plt.got ${RELOCATING-0} : { *(.plt.got) } +diff -rNU3 a/ld/emulparams/hppalinux.sh b/ld/emulparams/hppalinux.sh +--- a/ld/emulparams/hppalinux.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/hppalinux.sh 2021-03-30 17:48:00.862219000 -0300 +@@ -1,5 +1,5 @@ + # If you change this file, please also look at files which source this one: +-# hppanbsd.sh ++# hppanbsd.sh hppaobsd.sh + + SCRIPT_NAME=elf + ELFSIZE=32 +diff -rNU3 a/ld/emulparams/m68kelfnbsd.sh b/ld/emulparams/m68kelfnbsd.sh +--- a/ld/emulparams/m68kelfnbsd.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/m68kelfnbsd.sh 2021-03-30 17:48:00.865553000 -0300 +@@ -1,4 +1,4 @@ + source_sh ${srcdir}/emulparams/m68kelf.sh + TEXT_START_ADDR=0x2000 + TARGET_PAGE_SIZE=0x2000 +-MACHINE= ++NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR} +diff -rNU3 a/ld/emulparams/m68kelf.sh b/ld/emulparams/m68kelf.sh +--- a/ld/emulparams/m68kelf.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/m68kelf.sh 2021-03-30 17:48:00.865553000 -0300 +@@ -10,5 +10,6 @@ + TEMPLATE_NAME=elf + EXTRA_EM_FILE=m68kelf + GENERATE_SHLIB_SCRIPT=yes ++ELFSIZE=32 + GENERATE_PIE_SCRIPT=yes + NO_SMALL_DATA=yes +diff -rNU3 a/ld/emulparams/shelf_nbsd.sh b/ld/emulparams/shelf_nbsd.sh +--- a/ld/emulparams/shelf_nbsd.sh 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/emulparams/shelf_nbsd.sh 2021-03-30 17:48:00.868886000 -0300 +@@ -9,7 +9,12 @@ + + DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; + +-ENTRY=_start ++ENTRY=__start + + unset EMBEDDED ++unset OTHER_SECTIONS ++ ++OTHER_READWRITE_SECTIONS=' ++ .note.ABI-tag : { *(.note.ABI-tag) } ++' + unset STACK_ADDR +diff -rNU3 a/ld/emulparams/sh.sh b/ld/emulparams/sh.sh +--- a/ld/emulparams/sh.sh 2021-03-30 23:12:40.207893267 -0300 ++++ b/ld/emulparams/sh.sh 2021-03-30 17:48:00.868886000 -0300 +@@ -3,6 +3,6 @@ + + SCRIPT_NAME=sh + OUTPUT_FORMAT="coff-sh" +-TEXT_START_ADDR=0x8000 +-TARGET_PAGE_SIZE=128 ++TEXT_START_ADDR=0x1000 ++TARGET_PAGE_SIZE=0x1000 + ARCH=sh +diff -rNU3 a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em +--- a/ld/emultempl/aarch64elf.em 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/emultempl/aarch64elf.em 2021-03-30 17:48:00.872219000 -0300 +@@ -44,6 +44,7 @@ + ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); + #endif /* not TARGET_ */ + input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; ++ input_flags.add_DT_NEEDED_for_dynamic = TRUE; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; + link_info.check_relocs_after_open_input = TRUE; +diff -rNU3 a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em +--- a/ld/emultempl/armelf.em 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/emultempl/armelf.em 2021-03-30 17:48:00.875553000 -0300 +@@ -57,6 +57,7 @@ + ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); + #endif /* not TARGET_ */ + input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; ++ input_flags.add_DT_NEEDED_for_dynamic = TRUE; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; + link_info.check_relocs_after_open_input = TRUE; +diff -rNU3 a/ld/emultempl/elf.em b/ld/emultempl/elf.em +--- a/ld/emultempl/elf.em 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/emultempl/elf.em 2021-03-30 17:48:00.875553000 -0300 +@@ -79,6 +79,7 @@ + { + ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); + input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; ++ input_flags.add_DT_NEEDED_for_dynamic = TRUE; + config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; + config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; + link_info.check_relocs_after_open_input = TRUE; +diff -rNU3 a/ld/genscripts.sh b/ld/genscripts.sh +--- a/ld/genscripts.sh 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/genscripts.sh 2021-03-30 17:48:00.895553000 -0300 +@@ -257,7 +257,8 @@ + done + libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}" + fi +- append_to_lib_path ${libs} ++ #NetBSD: don't spam linker scripts like this. ++ #append_to_lib_path ${libs} + fi + + if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then +diff -rNU3 a/ld/ldlex.l b/ld/ldlex.l +--- a/ld/ldlex.l 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/ldlex.l 2021-03-30 17:48:00.918886000 -0300 +@@ -58,10 +58,6 @@ + #undef YY_INPUT + #define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size) + +-#ifndef YY_NO_UNPUT +-#define YY_NO_UNPUT +-#endif +- + #define MAX_INCLUDE_DEPTH 10 + static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; + static const char *file_name_stack[MAX_INCLUDE_DEPTH]; +@@ -89,6 +85,8 @@ + + %} + ++%option nounput ++ + %a 4000 + %o 5000 + +diff -rNU3 a/ld/lexsup.c b/ld/lexsup.c +--- a/ld/lexsup.c 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/lexsup.c 2021-03-30 17:48:00.918886000 -0300 +@@ -427,7 +427,7 @@ + ONE_DASH }, + { {"shared", no_argument, NULL, OPTION_SHARED}, + '\0', NULL, N_("Create a shared library"), ONE_DASH }, +- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */ ++ { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */ + '\0', NULL, NULL, ONE_DASH }, + { {"pie", no_argument, NULL, OPTION_PIE}, + '\0', NULL, N_("Create a position independent executable"), ONE_DASH }, +@@ -527,6 +527,8 @@ + { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, + '\0', NULL, N_("Include all objects from following archives"), + TWO_DASHES }, ++ { {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, ++ '\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */ + { {"wrap", required_argument, NULL, OPTION_WRAP}, + '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }, + { {"ignore-unresolved-symbol", required_argument, NULL, +diff -rNU3 a/ld/Makefile.am b/ld/Makefile.am +--- a/ld/Makefile.am 2021-03-30 23:12:40.201226600 -0300 ++++ b/ld/Makefile.am 2021-03-30 17:48:00.812219000 -0300 +@@ -181,6 +181,8 @@ + earmelf_linux_fdpiceabi.c \ + earmelf_nacl.c \ + earmelf_nbsd.c \ ++ earmelf_nbsd_eabi.c \ ++ earmelf_nbsd_eabihf.c \ + earmelf_phoenix.c \ + earmelf_vxworks.c \ + earmelfb.c \ +@@ -191,6 +193,9 @@ + earmelfb_linux_fdpiceabi.c \ + earmelfb_nacl.c \ + earmelfb_nbsd.c \ ++ earmelfb_nbsd_eabi.c \ ++ earmelfb_nbsd_eabihf.c \ ++ earmnbsd.c \ + earmnto.c \ + earmpe.c \ + earmsymbian.c \ +@@ -252,6 +257,12 @@ + eelf32lppclinux.c \ + eelf32lppcnto.c \ + eelf32lppcsim.c \ ++ eelf32lriscv.c \ ++ eelf32lsmip.c \ ++ eelf32ltsmip.c \ ++ eelf32ltsmip_fbsd.c \ ++ eelf32ltsmipn32.c \ ++ eelf32ltsmipn32_fbsd.c \ + eelf32m32c.c \ + eelf32mb_linux.c \ + eelf32mbel_linux.c \ +@@ -265,8 +276,10 @@ + eelf32mt.c \ + eelf32or1k.c \ + eelf32or1k_linux.c \ ++ eelf32or1k_nbsd.c \ + eelf32ppc.c \ + eelf32ppc_fbsd.c \ ++ eelf32ppc_nbsd.c \ + eelf32ppclinux.c \ + eelf32ppcnto.c \ + eelf32ppcsim.c \ +@@ -400,6 +413,8 @@ + eaarch64fbsdb.c \ + eaarch64linux.c \ + eaarch64linuxb.c \ ++ eaarch64nbsd.c \ ++ eaarch64nbsdb.c \ + eaarch64linux32.c \ + eaarch64linux32b.c \ + eelf32_x86_64.c \ +@@ -1017,6 +1032,8 @@ + # because almost all configs use "gen" version of manual. + # Set DOCVER above to change. + configdoc.texi: ${DOCVER}-doc.texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_configdoc.texi: + cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi + chmod u+w ./configdoc.texi + +@@ -1024,6 +1041,8 @@ + # The sed command removes the no-adjust Nroff command so that + # the man output looks standard. + ld.1: $(srcdir)/ld.texi configdoc.texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ld.1: + touch $@ + -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texi > ld.pod + -($(POD2MAN) ld.pod | \ +diff -rNU3 a/ld/Makefile.in b/ld/Makefile.in +--- a/ld/Makefile.in 2021-03-30 23:12:40.201226600 -0300 ++++ b/ld/Makefile.in 2021-03-30 17:48:00.815553000 -0300 +@@ -671,6 +671,8 @@ + earmelf_linux_fdpiceabi.c \ + earmelf_nacl.c \ + earmelf_nbsd.c \ ++ earmelf_nbsd_eabi.c \ ++ earmelf_nbsd_eabihf.c \ + earmelf_phoenix.c \ + earmelf_vxworks.c \ + earmelfb.c \ +@@ -681,6 +683,9 @@ + earmelfb_linux_fdpiceabi.c \ + earmelfb_nacl.c \ + earmelfb_nbsd.c \ ++ earmelfb_nbsd_eabi.c \ ++ earmelfb_nbsd_eabihf.c \ ++ earmnbsd.c \ + earmnto.c \ + earmpe.c \ + earmsymbian.c \ +@@ -742,6 +747,12 @@ + eelf32lppclinux.c \ + eelf32lppcnto.c \ + eelf32lppcsim.c \ ++ eelf32lriscv.c \ ++ eelf32lsmip.c \ ++ eelf32ltsmip.c \ ++ eelf32ltsmip_fbsd.c \ ++ eelf32ltsmipn32.c \ ++ eelf32ltsmipn32_fbsd.c \ + eelf32m32c.c \ + eelf32mb_linux.c \ + eelf32mbel_linux.c \ +@@ -755,8 +766,10 @@ + eelf32mt.c \ + eelf32or1k.c \ + eelf32or1k_linux.c \ ++ eelf32or1k_nbsd.c \ + eelf32ppc.c \ + eelf32ppc_fbsd.c \ ++ eelf32ppc_nbsd.c \ + eelf32ppclinux.c \ + eelf32ppcnto.c \ + eelf32ppcsim.c \ +@@ -889,6 +902,8 @@ + eaarch64fbsdb.c \ + eaarch64linux.c \ + eaarch64linuxb.c \ ++ eaarch64nbsd.c \ ++ eaarch64nbsdb.c \ + eaarch64linux32.c \ + eaarch64linux32b.c \ + eelf32_x86_64.c \ +@@ -1206,6 +1221,8 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsd.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsdb.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Po@am__quote@ +@@ -1226,6 +1243,8 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_eabi.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_eabihf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@ +@@ -1236,6 +1255,9 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_fdpiceabi.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabi.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabihf.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmsymbian.Po@am__quote@ +@@ -1313,6 +1335,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppclinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcnto.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcsim.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900n32.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv.Po@am__quote@ +@@ -1336,8 +1359,10 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_nbsd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_fbsd.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_nbsd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppclinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcnto.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcsim.Po@am__quote@ +@@ -1586,6 +1611,8 @@ + -rm -f libtool config.lt + + ld.info: ld.texi $(ld_TEXINFOS) ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ld.info: ld.texinfo $(ld_TEXINFOS) + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ +@@ -2582,6 +2609,8 @@ + # because almost all configs use "gen" version of manual. + # Set DOCVER above to change. + configdoc.texi: ${DOCVER}-doc.texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_configdoc.texi: + cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi + chmod u+w ./configdoc.texi + +@@ -2589,6 +2618,8 @@ + # The sed command removes the no-adjust Nroff command so that + # the man output looks standard. + ld.1: $(srcdir)/ld.texi configdoc.texi ++ @echo "NOT REBUILDING $@" ++NetBSD_DISABLED_ld.1: + touch $@ + -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texi > ld.pod + -($(POD2MAN) ld.pod | \ +diff -rNU3 a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc +--- a/ld/scripttempl/elf.sc 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/scripttempl/elf.sc 2021-03-30 17:48:00.995553000 -0300 +@@ -103,6 +103,8 @@ + # + # Each of these can also have corresponding .rel.* and .rela.* sections. + ++test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);" ++test -z "$ENTRY" && ENTRY=_start + if test -n "$NOP"; then + FILL="=$NOP" + else +@@ -510,6 +512,7 @@ + .text ${RELOCATING-0} : + { + ${RELOCATING+${TEXT_START_SYMBOLS}} ++ *(.text) + ${RELOCATING+*(.text.unlikely .text.*_unlikely .text.unlikely.*)} + ${RELOCATING+*(.text.exit .text.exit.*)} + ${RELOCATING+*(.text.startup .text.startup.*)} +diff -rNU3 a/ld/scripttempl/sh.sc b/ld/scripttempl/sh.sc +--- a/ld/scripttempl/sh.sc 2021-03-30 23:12:40.211226601 -0300 ++++ b/ld/scripttempl/sh.sc 2021-03-30 17:48:01.002219000 -0300 +@@ -23,6 +23,7 @@ + + OUTPUT_FORMAT("${OUTPUT_FORMAT}") + OUTPUT_ARCH(${ARCH}) ++${LIB_SEARCH_DIRS} + + EOF + +@@ -42,9 +43,9 @@ + *(.text) + *(.strings) + ${RELOCATING+ _etext = . ; } +- } ${RELOCATING+ > ram} ++ } + ${CONSTRUCTING+${TORS}} +- .data : ++ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : + { + *(.data) + ${RELOCATING+*(.gcc_exc*)} +@@ -53,19 +54,19 @@ + ${RELOCATING+___EH_FRAME_END__ = . ;} + ${RELOCATING+LONG(0);} + ${RELOCATING+ _edata = . ; } +- } ${RELOCATING+ > ram} +- .bss : ++ } ++ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : + { + ${RELOCATING+ _bss_start = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } +- } ${RELOCATING+ > ram} +- .stack ${RELOCATING+ 0x30000 } : ++ } ++ .stack : + { + ${RELOCATING+ _stack = . ; } + *(.stack) +- } ${RELOCATING+ > ram} ++ } + .stab 0 ${RELOCATING+(NOLOAD)} : + { + *(.stab) +diff -rNU3 a/libiberty/configure b/libiberty/configure +--- a/libiberty/configure 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/configure 2021-03-30 17:48:01.032219000 -0300 +@@ -7471,7 +7471,7 @@ + + + # We need multilib support, but only if configuring for the target. +-ac_config_files="$ac_config_files Makefile testsuite/Makefile" ++ac_config_files="$ac_config_files Makefile" # testsuite/Makefile + + ac_config_commands="$ac_config_commands default" + +diff -rNU3 a/libiberty/configure.ac b/libiberty/configure.ac +--- a/libiberty/configure.ac 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/configure.ac 2021-03-30 17:48:01.032219000 -0300 +@@ -728,7 +728,7 @@ + AC_SUBST(htmldir) + + # We need multilib support, but only if configuring for the target. +-AC_CONFIG_FILES([Makefile testsuite/Makefile]) ++AC_CONFIG_FILES([Makefile]) + AC_CONFIG_COMMANDS([default], + [[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h + if test -n "$CONFIG_FILES"; then +diff -rNU3 a/libiberty/floatformat.c b/libiberty/floatformat.c +--- a/libiberty/floatformat.c 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/floatformat.c 2021-03-30 17:48:01.045553000 -0300 +@@ -498,7 +498,11 @@ + if (nan) + dto = NAN; + else ++#ifdef __vax__ ++ dto = HUGE_VAL; ++#else + dto = INFINITY; ++#endif + + if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1)) + dto = -dto; +diff -rNU3 a/libiberty/Makefile.in b/libiberty/Makefile.in +--- a/libiberty/Makefile.in 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/Makefile.in 2021-03-30 17:48:01.028886000 -0300 +@@ -97,7 +97,7 @@ + "tooldir=$(tooldir)" + + # Subdirectories to recurse into. We need to override this during cleaning +-SUBDIRS = testsuite ++SUBDIRS = # testsuite + + # FIXME: add @BUILD_INFO@ once we're sure it works for everyone. + all: stamp-picdir stamp-noasandir $(TARGETLIB) required-list all-subdir +diff -rNU3 a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c +--- a/libiberty/make-temp-file.c 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/make-temp-file.c 2021-03-30 17:48:01.048886000 -0300 +@@ -129,10 +129,10 @@ + base = try_dir (P_tmpdir, base); + #endif + +- /* Try /var/tmp, /usr/tmp, then /tmp. */ ++ /* Try /tmp, /var/tmp, then /usr/tmp. */ ++ base = try_dir (tmp, base); + base = try_dir (vartmp, base); + base = try_dir (usrtmp, base); +- base = try_dir (tmp, base); + + /* If all else fails, use the current directory! */ + if (base == 0) +diff -rNU3 a/libiberty/strerror.c b/libiberty/strerror.c +--- a/libiberty/strerror.c 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/strerror.c 2021-03-30 17:48:01.072219000 -0300 +@@ -347,7 +347,7 @@ + ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"), + #endif + #if defined (ENOPROTOOPT) +- ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"), ++ ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"), + #endif + #if defined (EPROTONOSUPPORT) + ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"), +diff -rNU3 a/libiberty/strsignal.c b/libiberty/strsignal.c +--- a/libiberty/strsignal.c 2021-03-30 23:12:40.214559934 -0300 ++++ b/libiberty/strsignal.c 2021-03-30 17:48:01.075553000 -0300 +@@ -551,7 +551,7 @@ + #ifndef HAVE_PSIGNAL + + void +-psignal (int signo, char *message) ++psignal (int signo, const char *message) + { + if (signal_names == NULL) + { +diff -rNU3 a/opcodes/cgen.sh b/opcodes/cgen.sh +--- a/opcodes/cgen.sh 2021-03-30 23:12:40.217893267 -0300 ++++ b/opcodes/cgen.sh 2021-03-30 17:48:01.238886000 -0300 +@@ -61,6 +61,7 @@ + shift ; extrafiles=$9 + + rootdir=${srcdir}/.. ++move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change" + + # $arch is $6, as passed on the command line. + # $ARCH is the same argument but in all uppercase. +diff -rNU3 a/opcodes/configure b/opcodes/configure +--- a/opcodes/configure 2021-03-30 23:12:40.221226601 -0300 ++++ b/opcodes/configure 2021-03-30 17:48:01.242219000 -0300 +@@ -12919,6 +12919,7 @@ + bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; + bfd_pru_arch) ta="$ta pru-dis.lo pru-opc.lo" ;; + bfd_pyramid_arch) ;; ++ bfd_riscv_arch) ta="$ta riscv-dis.lo riscv-opc.lo" ;; + bfd_romp_arch) ;; + bfd_riscv_arch) ta="$ta riscv-dis.lo riscv-opc.lo" ;; + bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; +@@ -12926,7 +12927,29 @@ + bfd_rx_arch) ta="$ta rx-dis.lo rx-decode.lo";; + bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;; + bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;; +- bfd_sh_arch) ta="$ta sh-dis.lo cgen-bitset.lo" ;; ++ bfd_sh_arch) ++ # We can't decide what we want just from the CPU family. ++ # We want SH5 support unless a specific version of sh is ++ # specified, as in sh3-elf, sh3b-linux-gnu, etc. ++ # Include it just for ELF targets, since the SH5 bfd:s are ELF only. ++ for t in $target $canon_targets; do ++ # For NetBSD we do NOT want SH5 support unless sh5 or sh64 ++ # is specified ++ case $t in ++ sh5*-* | sh64*-*) # let the case below handle it ++ ;; ++ sh*-*-netbsd* | sh*l*-*-netbsd*) ++ continue ;; ++ esac ++ case $t in ++ all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ ++ sh-*-linux* | shl-*-linux*) ++ ta="$ta sh64-dis.lo sh64-opc.lo" ++ archdefs="$archdefs -DINCLUDE_SHMEDIA" ++ break;; ++ esac; ++ done ++ ta="$ta sh-dis.lo cgen-bitset.lo" ;; + bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;; + bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;; + bfd_tic30_arch) ta="$ta tic30-dis.lo" ;; +diff -rNU3 a/opcodes/Makefile.am b/opcodes/Makefile.am +--- a/opcodes/Makefile.am 2021-03-30 23:12:40.217893267 -0300 ++++ b/opcodes/Makefile.am 2021-03-30 17:48:01.165553000 -0300 +@@ -78,6 +78,7 @@ + mep-desc.h mep-opc.h \ + microblaze-opc.h \ + mt-desc.h mt-opc.h \ ++ or1k-desc.h or1k-opc.h \ + score-opc.h \ + sh-opc.h \ + sysdep.h \ +diff -rNU3 a/opcodes/Makefile.in b/opcodes/Makefile.in +--- a/opcodes/Makefile.in 2021-03-30 23:12:40.217893267 -0300 ++++ b/opcodes/Makefile.in 2021-03-30 17:48:01.168886000 -0300 +@@ -1019,6 +1019,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-dis.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-ibld.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-opc.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-opinst.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdp11-dis.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdp11-opc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pj-dis.Plo@am__quote@ +diff -rNU3 a/zlib/adler32.c b/zlib/adler32.c +--- a/zlib/adler32.c 2021-03-30 23:12:40.221226601 -0300 ++++ b/zlib/adler32.c 2021-03-30 17:48:01.618886000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: adler32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: adler32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + #include "zutil.h" + +diff -rNU3 a/zlib/ChangeLog b/zlib/ChangeLog +--- a/zlib/ChangeLog 2021-03-30 23:12:40.221226601 -0300 ++++ b/zlib/ChangeLog 2021-03-30 17:48:01.615553000 -0300 +@@ -1259,7 +1259,7 @@ + - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) + - added makelcc.bat for lcc-win32 (Tom St Denis) + - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) +-- Avoid expanded $Id: ChangeLog,v 1.5 2002/05/08 04:38:00 aoliva Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. ++- Avoid expanded Id: ChangeLog,v 1.5 2002/05/08 04:38:00 aoliva Exp . Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. + - check for unistd.h in configure (for off_t) + - remove useless check parameter in inflate_blocks_free + - avoid useless assignment of s->check to itself in inflate_blocks_new +diff -rNU3 a/zlib/compress.c b/zlib/compress.c +--- a/zlib/compress.c 2021-03-30 23:12:40.221226601 -0300 ++++ b/zlib/compress.c 2021-03-30 17:48:01.618886000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: compress.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: compress.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + #define ZLIB_INTERNAL + #include "zlib.h" +diff -rNU3 a/zlib/contrib/ada/buffer_demo.adb b/zlib/contrib/ada/buffer_demo.adb +--- a/zlib/contrib/ada/buffer_demo.adb 2021-03-30 23:12:40.221226601 -0300 ++++ b/zlib/contrib/ada/buffer_demo.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + -- +--- $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $ ++-- Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp + + -- This demo program provided by Dr Steve Sangwine + -- +diff -rNU3 a/zlib/contrib/ada/mtest.adb b/zlib/contrib/ada/mtest.adb +--- a/zlib/contrib/ada/mtest.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/mtest.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -8,7 +8,7 @@ + -- Continuous test for ZLib multithreading. If the test would fail + -- we should provide thread safe allocation routines for the Z_Stream. + -- +--- $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $ ++-- Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp + + with ZLib; + with Ada.Streams; +diff -rNU3 a/zlib/contrib/ada/read.adb b/zlib/contrib/ada/read.adb +--- a/zlib/contrib/ada/read.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/read.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $ ++-- Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp + + -- Test/demo program for the generic read interface. + +diff -rNU3 a/zlib/contrib/ada/test.adb b/zlib/contrib/ada/test.adb +--- a/zlib/contrib/ada/test.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/test.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp $ ++-- Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp + + -- The program has a few aims. + -- 1. Test ZLib.Ada95 thick binding functionality. +diff -rNU3 a/zlib/contrib/ada/zlib.adb b/zlib/contrib/ada/zlib.adb +--- a/zlib/contrib/ada/zlib.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib.adb 2021-03-30 17:48:01.628886000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp $ ++-- Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp + + with Ada.Exceptions; + with Ada.Unchecked_Conversion; +diff -rNU3 a/zlib/contrib/ada/zlib.ads b/zlib/contrib/ada/zlib.ads +--- a/zlib/contrib/ada/zlib.ads 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib.ads 2021-03-30 17:48:01.628886000 -0300 +@@ -25,7 +25,7 @@ + -- covered by the GNU Public License. -- + ------------------------------------------------------------------------------ + +--- $Id: zlib.ads,v 1.26 2004/09/06 06:53:19 vagul Exp $ ++-- Id: zlib.ads,v 1.26 2004/09/06 06:53:19 vagul Exp + + with Ada.Streams; + +diff -rNU3 a/zlib/contrib/ada/zlib-streams.adb b/zlib/contrib/ada/zlib-streams.adb +--- a/zlib/contrib/ada/zlib-streams.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib-streams.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $ ++-- Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp + + with Ada.Unchecked_Deallocation; + +diff -rNU3 a/zlib/contrib/ada/zlib-streams.ads b/zlib/contrib/ada/zlib-streams.ads +--- a/zlib/contrib/ada/zlib-streams.ads 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib-streams.ads 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $ ++-- Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp + + package ZLib.Streams is + +diff -rNU3 a/zlib/contrib/ada/zlib-thin.adb b/zlib/contrib/ada/zlib-thin.adb +--- a/zlib/contrib/ada/zlib-thin.adb 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib-thin.adb 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $ ++-- Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp + + package body ZLib.Thin is + +diff -rNU3 a/zlib/contrib/ada/zlib-thin.ads b/zlib/contrib/ada/zlib-thin.ads +--- a/zlib/contrib/ada/zlib-thin.ads 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/ada/zlib-thin.ads 2021-03-30 17:48:01.625553000 -0300 +@@ -6,7 +6,7 @@ + -- Open source license information is in the zlib.ads file. -- + ---------------------------------------------------------------- + +--- $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $ ++-- Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp + + with Interfaces.C.Strings; + +diff -rNU3 a/zlib/contrib/iostream2/zstream.h b/zlib/contrib/iostream2/zstream.h +--- a/zlib/contrib/iostream2/zstream.h 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/contrib/iostream2/zstream.h 2021-03-30 17:48:01.635553000 -0300 +@@ -21,7 +21,7 @@ + + /* + * zstream.h - C++ interface to the 'zlib' general purpose compression library +- * $Id: zstream.h,v 1.1 1999/05/04 19:30:27 tromey Exp $ ++ * Id: zstream.h,v 1.1 1999/05/04 19:30:27 tromey Exp + */ + + #include +Os arquivos binários a/zlib/contrib/masmx64/gvmat64.obj e b/zlib/contrib/masmx64/gvmat64.obj são diferentes +Os arquivos binários a/zlib/contrib/masmx64/inffasx64.obj e b/zlib/contrib/masmx64/inffasx64.obj são diferentes +Os arquivos binários a/zlib/contrib/masmx86/gvmat32.obj e b/zlib/contrib/masmx86/gvmat32.obj são diferentes +Os arquivos binários a/zlib/contrib/masmx86/inffas32.obj e b/zlib/contrib/masmx86/inffas32.obj são diferentes +diff -rNU3 a/zlib/crc32.c b/zlib/crc32.c +--- a/zlib/crc32.c 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/crc32.c 2021-03-30 17:48:01.658886000 -0300 +@@ -9,7 +9,7 @@ + * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. + */ + +-/* @(#) $Id: crc32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: crc32.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + /* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore +diff -rNU3 a/zlib/deflate.c b/zlib/deflate.c +--- a/zlib/deflate.c 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/deflate.c 2021-03-30 17:48:01.662219000 -0300 +@@ -47,7 +47,7 @@ + * + */ + +-/* @(#) $Id: deflate.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: deflate.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + #include "deflate.h" + +diff -rNU3 a/zlib/deflate.h b/zlib/deflate.h +--- a/zlib/deflate.h 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/deflate.h 2021-03-30 17:48:01.662219000 -0300 +@@ -8,7 +8,7 @@ + subject to change. Applications should only use zlib.h. + */ + +-/* @(#) $Id: deflate.h,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: deflate.h,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + #ifndef DEFLATE_H + #define DEFLATE_H +diff -rNU3 a/zlib/example.c b/zlib/example.c +--- a/zlib/example.c 2021-03-30 23:12:40.224559934 -0300 ++++ b/zlib/example.c 2021-03-30 17:48:01.662219000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: example.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp $ */ ++/* @(#) Id: example.c,v 1.1.1.2 2002/03/11 21:53:23 tromey Exp */ + + #include "zlib.h" + #include +diff -rNU3 a/zlib/minigzip.c b/zlib/minigzip.c +--- a/zlib/minigzip.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/minigzip.c 2021-03-30 17:48:01.668886000 -0300 +@@ -13,7 +13,7 @@ + * or in pipe mode. + */ + +-/* @(#) $Id: minigzip.c,v 1.1.1.2 2002/03/11 21:53:26 tromey Exp $ */ ++/* @(#) Id: minigzip.c,v 1.1.1.2 2002/03/11 21:53:26 tromey Exp */ + + #include "zlib.h" + #include +diff -rNU3 a/zlib/test/example.c b/zlib/test/example.c +--- a/zlib/test/example.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/test/example.c 2021-03-30 17:48:01.672219000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) Id */ + + #include "zlib.h" + #include +diff -rNU3 a/zlib/test/minigzip.c b/zlib/test/minigzip.c +--- a/zlib/test/minigzip.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/test/minigzip.c 2021-03-30 17:48:01.672219000 -0300 +@@ -13,7 +13,7 @@ + * or in pipe mode. + */ + +-/* @(#) $Id$ */ ++/* @(#) Id */ + + #include "zlib.h" + #include +diff -rNU3 a/zlib/trees.c b/zlib/trees.c +--- a/zlib/trees.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/trees.c 2021-03-30 17:48:01.672219000 -0300 +@@ -30,7 +30,7 @@ + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +-/* @(#) $Id: trees.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ ++/* @(#) Id: trees.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp */ + + /* #define GEN_TREES_H */ + +diff -rNU3 a/zlib/uncompr.c b/zlib/uncompr.c +--- a/zlib/uncompr.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/uncompr.c 2021-03-30 17:48:01.672219000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: uncompr.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ ++/* @(#) Id: uncompr.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp */ + + #define ZLIB_INTERNAL + #include "zlib.h" +diff -rNU3 a/zlib/zconf.h b/zlib/zconf.h +--- a/zlib/zconf.h 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/zconf.h 2021-03-30 17:48:01.675553000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: zconf.h,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ ++/* @(#) Id: zconf.h,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp */ + + #ifndef ZCONF_H + #define ZCONF_H +diff -rNU3 a/zlib/zconf.h.cmakein b/zlib/zconf.h.cmakein +--- a/zlib/zconf.h.cmakein 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/zconf.h.cmakein 2021-03-30 17:48:01.675553000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) Id */ + + #ifndef ZCONF_H + #define ZCONF_H +diff -rNU3 a/zlib/zconf.h.in b/zlib/zconf.h.in +--- a/zlib/zconf.h.in 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/zconf.h.in 2021-03-30 17:48:01.675553000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id$ */ ++/* @(#) Id */ + + #ifndef ZCONF_H + #define ZCONF_H +diff -rNU3 a/zlib/zutil.c b/zlib/zutil.c +--- a/zlib/zutil.c 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/zutil.c 2021-03-30 17:48:01.675553000 -0300 +@@ -3,7 +3,7 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +-/* @(#) $Id: zutil.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */ ++/* @(#) Id: zutil.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp */ + + #include "zutil.h" + #ifndef Z_SOLO +diff -rNU3 a/zlib/zutil.h b/zlib/zutil.h +--- a/zlib/zutil.h 2021-03-30 23:12:40.227893268 -0300 ++++ b/zlib/zutil.h 2021-03-30 17:48:01.675553000 -0300 +@@ -8,7 +8,7 @@ + subject to change. Applications should only use zlib.h. + */ + +-/* @(#) $Id: zutil.h,v 1.1.1.2 2002/03/11 21:53:28 tromey Exp $ */ ++/* @(#) Id: zutil.h,v 1.1.1.2 2002/03/11 21:53:28 tromey Exp */ + + #ifndef ZUTIL_H + #define ZUTIL_H diff --git a/external/gpl3/binutils/patches/0000-binutils_nbsd.patch b/external/gpl3/binutils/patches/0000-binutils_nbsd.patch deleted file mode 100644 index 7ad82421f..000000000 --- a/external/gpl3/binutils/patches/0000-binutils_nbsd.patch +++ /dev/null @@ -1,37997 +0,0 @@ -diff -rNU3 dist.orig/bfd/ChangeLog dist/bfd/ChangeLog ---- dist.orig/bfd/ChangeLog 2013-03-25 10:08:08.000000000 +0100 -+++ dist/bfd/ChangeLog 2015-10-18 13:11:12.000000000 +0200 -@@ -1,3 +1,8 @@ -+2013-12-14 Alan Modra -+ -+ * elflink.c (_bfd_elf_merge_symbol): If merging a new weak -+ symbol that will be skipped, we don't have a new definition. -+ - 2013-03-25 Tristan Gingold - - * configure.in: Bump version to 2.23.2 -diff -rNU3 dist.orig/bfd/Makefile.am dist/bfd/Makefile.am ---- dist.orig/bfd/Makefile.am 2013-03-25 10:08:05.000000000 +0100 -+++ dist/bfd/Makefile.am 2015-10-18 13:11:13.000000000 +0200 -@@ -897,6 +897,18 @@ - sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new - mv -f elf64-ia64.new elf64-ia64.c - -+elf32-riscv.c : elfnn-riscv.c -+ rm -f elf32-riscv.c -+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf32-riscv.new -+ sed -e s/NN/32/g < $(srcdir)/elfnn-riscv.c >> elf32-riscv.new -+ mv -f elf32-riscv.new elf32-riscv.c -+ -+elf64-riscv.c : elfnn-riscv.c -+ rm -f elf64-riscv.c -+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf64-riscv.new -+ sed -e s/NN/64/g < $(srcdir)/elfnn-riscv.c >> elf64-riscv.new -+ mv -f elf64-riscv.new elf64-riscv.c -+ - peigen.c : peXXigen.c - rm -f peigen.c - sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new -diff -rNU3 dist.orig/bfd/Makefile.in dist/bfd/Makefile.in ---- dist.orig/bfd/Makefile.in 2013-03-25 10:08:08.000000000 +0100 -+++ dist/bfd/Makefile.in 2015-10-18 13:11:13.000000000 +0200 -@@ -419,7 +419,7 @@ - cpu-mt.lo \ - cpu-ns32k.lo \ - cpu-openrisc.lo \ -- cpu-or32.lo \ -+ cpu-or1k.lo \ - cpu-pdp11.lo \ - cpu-pj.lo \ - cpu-plugin.lo \ -@@ -500,7 +500,7 @@ - cpu-mt.c \ - cpu-ns32k.c \ - cpu-openrisc.c \ -- cpu-or32.c \ -+ cpu-or1k.c \ - cpu-pdp11.c \ - cpu-pj.c \ - cpu-plugin.c \ -@@ -559,7 +559,7 @@ - coff-m68k.lo \ - coff-m88k.lo \ - coff-mips.lo \ -- coff-or32.lo \ -+ coff-or1k.lo \ - coff-rs6000.lo \ - coff-sh.lo \ - coff-sparc.lo \ -@@ -627,7 +627,7 @@ - elf32-msp430.lo \ - elf32-mt.lo \ - elf32-openrisc.lo \ -- elf32-or32.lo \ -+ elf32-or1k.lo \ - elf32-pj.lo \ - elf32-ppc.lo \ - elf32-rl78.lo \ -@@ -747,7 +747,7 @@ - coff-m68k.c \ - coff-m88k.c \ - coff-mips.c \ -- coff-or32.c \ -+ coff-or1k.c \ - coff-rs6000.c \ - coff-sh.c \ - coff-sparc.c \ -@@ -815,7 +815,7 @@ - elf32-msp430.c \ - elf32-mt.c \ - elf32-openrisc.c \ -- elf32-or32.c \ -+ elf32-or1k.c \ - elf32-pj.c \ - elf32-ppc.c \ - elf32-rl78.c \ -@@ -1253,7 +1253,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-m68k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-m88k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-mips.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-or32.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-or1k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-rs6000.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sh.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sparc.Plo@am__quote@ -@@ -1323,7 +1323,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mt.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or32.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or1k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pdp11.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pj.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-plugin.Plo@am__quote@ -@@ -1408,7 +1408,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or32.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or1k.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ppc.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rl78.Plo@am__quote@ -@@ -1967,6 +1967,18 @@ - sed -e s/NN/64/g < $(srcdir)/elfnn-ia64.c > elf64-ia64.new - mv -f elf64-ia64.new elf64-ia64.c - -+elf32-riscv.c : elfnn-riscv.c -+ rm -f elf32-riscv.c -+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf32-riscv.new -+ sed -e s/NN/32/g < $(srcdir)/elfnn-riscv.c >> elf32-riscv.new -+ mv -f elf32-riscv.new elf32-riscv.c -+ -+elf64-riscv.c : elfnn-riscv.c -+ rm -f elf64-riscv.c -+ echo "#line 1 \"$(srcdir)/elfnn-riscv.c\"" > elf64-riscv.new -+ sed -e s/NN/64/g < $(srcdir)/elfnn-riscv.c >> elf64-riscv.new -+ mv -f elf64-riscv.new elf64-riscv.c -+ - peigen.c : peXXigen.c - rm -f peigen.c - sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new -diff -rNU3 dist.orig/bfd/aoutx.h dist/bfd/aoutx.h ---- dist.orig/bfd/aoutx.h 2012-05-01 18:07:33.000000000 +0200 -+++ dist/bfd/aoutx.h 2015-10-18 13:11:12.000000000 +0200 -@@ -762,7 +762,7 @@ - break; - - case bfd_arch_arm: -- if (machine == 0) -+ if (machine == 0 || machine == 5) - arch_flags = M_ARM; - break; - -diff -rNU3 dist.orig/bfd/archive.c dist/bfd/archive.c ---- dist.orig/bfd/archive.c 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/archive.c 2015-10-18 13:11:12.000000000 +0200 -@@ -157,6 +157,9 @@ - #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) - - #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) -+ -+static const char * normalize (bfd *, const char *); -+ - #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header) - - /* True iff NAME designated a BSD 4.4 extended name. */ -@@ -760,7 +763,9 @@ - /* Pad to an even boundary... - Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ -- filestart += filestart % 2; -+ if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3)) -+ size += strlen(normalize(last_file, last_file->filename)); -+ filestart += size % 2; - } - - return _bfd_get_elt_at_filepos (archive, filestart); -@@ -2180,11 +2185,22 @@ - current = current->archive_next) - { - char buffer[DEFAULT_BUFFERSIZE]; -- bfd_size_type remaining = arelt_size (current); -+ bfd_size_type saved_size = arelt_size (current); -+ bfd_size_type remaining = saved_size; -+ struct ar_hdr *hdr = arch_hdr (current); - - /* Write ar header. */ - if (!_bfd_write_ar_hdr (arch, current)) -- return FALSE; -+ return FALSE; -+ /* Write filename if it is a 4.4BSD extended file, and add to size. */ -+ if (!strncmp (hdr->ar_name, "#1/", 3)) -+ { -+ const char *normal = normalize (current, current->filename); -+ unsigned int thislen = strlen (normal); -+ if (bfd_write (normal, 1, thislen, arch) != thislen) -+ return FALSE; -+ saved_size += thislen; -+ } - if (bfd_is_thin_archive (arch)) - continue; - if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) -@@ -2457,11 +2473,19 @@ - { - do - { -+#if 1 -+ bfd_size_type size = arelt_size (current); -+ if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3)) -+ size += strlen(normalize(current, current->filename)); -+ firstreal += size + sizeof (struct ar_hdr); -+ firstreal += size % 2; -+#else - struct areltdata *ared = arch_eltdata (current); - - firstreal += (ared->parsed_size + ared->extra_size - + sizeof (struct ar_hdr)); - firstreal += firstreal % 2; -+#endif - current = current->archive_next; - } - while (current != map[count].u.abfd); -diff -rNU3 dist.orig/bfd/archures.c dist/bfd/archures.c ---- dist.orig/bfd/archures.c 2012-09-04 14:53:41.000000000 +0200 -+++ dist/bfd/archures.c 2015-10-18 13:11:12.000000000 +0200 -@@ -123,7 +123,7 @@ - .#define bfd_mach_i960_jx 7 - .#define bfd_mach_i960_hx 8 - . --. bfd_arch_or32, {* OpenRISC 32 *} -+. bfd_arch_or1k, {* OpenRISC 32 *} - . - . bfd_arch_sparc, {* SPARC *} - .#define bfd_mach_sparc 1 -@@ -245,6 +245,9 @@ - .#define bfd_mach_ppc_e6500 5007 - .#define bfd_mach_ppc_titan 83 - .#define bfd_mach_ppc_vle 84 -+. bfd_arch_riscv, {* RISC-V *} -+.#define bfd_mach_riscv32 132 -+.#define bfd_mach_riscv64 164 - . bfd_arch_rs6000, {* IBM RS/6000 *} - .#define bfd_mach_rs6k 6000 - .#define bfd_mach_rs6k_rs1 6001 -@@ -556,12 +559,13 @@ - extern const bfd_arch_info_type bfd_mt_arch; - extern const bfd_arch_info_type bfd_ns32k_arch; - extern const bfd_arch_info_type bfd_openrisc_arch; --extern const bfd_arch_info_type bfd_or32_arch; -+extern const bfd_arch_info_type bfd_or1k_arch; - extern const bfd_arch_info_type bfd_pdp11_arch; - extern const bfd_arch_info_type bfd_pj_arch; - extern const bfd_arch_info_type bfd_plugin_arch; - extern const bfd_arch_info_type bfd_powerpc_archs[]; - #define bfd_powerpc_arch bfd_powerpc_archs[0] -+extern const bfd_arch_info_type bfd_riscv_arch; - extern const bfd_arch_info_type bfd_rs6000_arch; - extern const bfd_arch_info_type bfd_rl78_arch; - extern const bfd_arch_info_type bfd_rx_arch; -@@ -642,9 +646,10 @@ - &bfd_mt_arch, - &bfd_ns32k_arch, - &bfd_openrisc_arch, -- &bfd_or32_arch, -+ &bfd_or1k_arch, - &bfd_pdp11_arch, - &bfd_powerpc_arch, -+ &bfd_riscv_arch, - &bfd_rs6000_arch, - &bfd_rl78_arch, - &bfd_rx_arch, -diff -rNU3 dist.orig/bfd/bfd-in2.h dist/bfd/bfd-in2.h ---- dist.orig/bfd/bfd-in2.h 2012-09-04 14:53:41.000000000 +0200 -+++ dist/bfd/bfd-in2.h 2015-10-18 13:11:12.000000000 +0200 -@@ -1852,7 +1852,9 @@ - #define bfd_mach_i960_jx 7 - #define bfd_mach_i960_hx 8 - -- bfd_arch_or32, /* OpenRISC 32 */ -+ bfd_arch_or1k, /* OpenRISC 1000 */ -+#define bfd_mach_or1k 1 -+#define bfd_mach_or1knd 2 - - bfd_arch_sparc, /* SPARC */ - #define bfd_mach_sparc 1 -@@ -1974,6 +1976,9 @@ - #define bfd_mach_ppc_e6500 5007 - #define bfd_mach_ppc_titan 83 - #define bfd_mach_ppc_vle 84 -+ bfd_arch_riscv, /* RISC-V */ -+#define bfd_mach_riscv32 132 -+#define bfd_mach_riscv64 164 - bfd_arch_rs6000, /* IBM RS/6000 */ - #define bfd_mach_rs6k 6000 - #define bfd_mach_rs6k_rs1 6001 -@@ -4803,9 +4808,66 @@ - BFD_RELOC_860_HIGOT, - BFD_RELOC_860_HIGOTOFF, - --/* OpenRISC Relocations. */ -- BFD_RELOC_OPENRISC_ABS_26, -- BFD_RELOC_OPENRISC_REL_26, -+/* OpenRISC 1000 Relocations. */ -+ BFD_RELOC_OR1K_REL_26, -+ BFD_RELOC_OR1K_GOTPC_HI16, -+ BFD_RELOC_OR1K_GOTPC_LO16, -+ BFD_RELOC_OR1K_GOT16, -+ BFD_RELOC_OR1K_PLT26, -+ BFD_RELOC_OR1K_GOTOFF_HI16, -+ BFD_RELOC_OR1K_GOTOFF_LO16, -+ 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_LDM_HI16, -+ BFD_RELOC_OR1K_TLS_LDM_LO16, -+ BFD_RELOC_OR1K_TLS_LDO_HI16, -+ BFD_RELOC_OR1K_TLS_LDO_LO16, -+ BFD_RELOC_OR1K_TLS_IE_HI16, -+ BFD_RELOC_OR1K_TLS_IE_LO16, -+ BFD_RELOC_OR1K_TLS_LE_HI16, -+ BFD_RELOC_OR1K_TLS_LE_LO16, -+ BFD_RELOC_OR1K_TLS_TPOFF, -+ BFD_RELOC_OR1K_TLS_DTPOFF, -+ BFD_RELOC_OR1K_TLS_DTPMOD, -+ -+/* 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, - - /* H8 elf Relocations. */ - BFD_RELOC_H8_DIR16A8, -@@ -5788,6 +5850,11 @@ - /* This BFD has been created by the linker and doesn't correspond - to any input file. */ - #define BFD_LINKER_CREATED 0x2000 -+ /* 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 0x4000 -+ - - /* This may be set before writing out a BFD to request that it - be written using values for UIDs, GIDs, timestamps, etc. that -diff -rNU3 dist.orig/bfd/coff-alpha.c dist/bfd/coff-alpha.c ---- dist.orig/bfd/coff-alpha.c 2012-07-13 16:22:42.000000000 +0200 -+++ dist/bfd/coff-alpha.c 2015-10-18 13:11:12.000000000 +0200 -@@ -642,7 +642,9 @@ - case ALPHA_R_OP_STORE: - /* The STORE reloc needs the size and offset fields. We store - them in the addend. */ -+#if 0 - BFD_ASSERT (intern->r_offset <= 256); -+#endif - rptr->addend = (intern->r_offset << 8) + intern->r_size; - break; - -diff -rNU3 dist.orig/bfd/coff-or32.c dist/bfd/coff-or32.c ---- dist.orig/bfd/coff-or32.c 2012-07-13 16:22:43.000000000 +0200 -+++ dist/bfd/coff-or32.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,629 +0,0 @@ --/* BFD back-end for OpenRISC 1000 COFF binaries. -- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 -- Free Software Foundation, Inc. -- Contributed by Ivan Guzvinec -- -- 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. */ -- --#define OR32 1 -- --#include "sysdep.h" --#include "bfd.h" --#include "libbfd.h" --#include "coff/or32.h" --#include "coff/internal.h" --#include "libcoff.h" -- --static bfd_reloc_status_type or32_reloc -- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -- --#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) -- --#define INSERT_HWORD(WORD,HWORD) \ -- (((WORD) & 0xffff0000) | ((HWORD)& 0x0000ffff)) --#define EXTRACT_HWORD(WORD) \ -- ((WORD) & 0x0000ffff) --#define SIGN_EXTEND_HWORD(HWORD) \ -- ((HWORD) & 0x8000 ? (HWORD)|(~0xffffL) : (HWORD)) -- --#define INSERT_JUMPTARG(WORD,JT) \ -- (((WORD) & 0xfc000000) | ((JT)& 0x03ffffff)) --#define EXTRACT_JUMPTARG(WORD) \ -- ((WORD) & 0x03ffffff) --#define SIGN_EXTEND_JUMPTARG(JT) \ -- ((JT) & 0x04000000 ? (JT)|(~0x03ffffffL) : (JT)) -- --/* Provided the symbol, returns the value reffed. */ -- --static long --get_symbol_value (asymbol *symbol) --{ -- long relocation = 0; -- -- if (bfd_is_com_section (symbol->section)) -- relocation = 0; -- else -- relocation = symbol->value + -- symbol->section->output_section->vma + -- symbol->section->output_offset; -- -- return relocation; --} -- --/* This function is in charge of performing all the or32 relocations. */ -- --static bfd_reloc_status_type --or32_reloc (bfd *abfd, -- arelent *reloc_entry, -- asymbol *symbol_in, -- void * data, -- asection *input_section, -- bfd *output_bfd, -- char **error_message) --{ -- /* The consth relocation comes in two parts, we have to remember -- the state between calls, in these variables. */ -- static bfd_boolean part1_consth_active = FALSE; -- static unsigned long part1_consth_value; -- -- unsigned long insn; -- unsigned long sym_value; -- unsigned long unsigned_value; -- unsigned short r_type; -- long signed_value; -- -- unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/ -- bfd_byte *hit_data =addr + (bfd_byte *)(data); -- -- r_type = reloc_entry->howto->type; -- -- if (output_bfd) -- { -- /* Partial linking - do nothing. */ -- reloc_entry->address += input_section->output_offset; -- return bfd_reloc_ok; -- } -- -- if (symbol_in != NULL -- && bfd_is_und_section (symbol_in->section)) -- { -- /* Keep the state machine happy in case we're called again. */ -- if (r_type == R_IHIHALF) -- { -- part1_consth_active = TRUE; -- part1_consth_value = 0; -- } -- -- return bfd_reloc_undefined; -- } -- -- if ((part1_consth_active) && (r_type != R_IHCONST)) -- { -- part1_consth_active = FALSE; -- *error_message = (char *) "Missing IHCONST"; -- -- return bfd_reloc_dangerous; -- } -- -- sym_value = get_symbol_value (symbol_in); -- -- switch (r_type) -- { -- case R_IREL: -- insn = bfd_get_32(abfd, hit_data); -- -- /* Take the value in the field and sign extend it. */ -- signed_value = EXTRACT_JUMPTARG (insn); -- signed_value = SIGN_EXTEND_JUMPTARG (signed_value); -- signed_value <<= 2; -- -- /* See the note on the R_IREL reloc in coff_or32_relocate_section. */ -- if (signed_value == - (long) reloc_entry->address) -- signed_value = 0; -- -- signed_value += sym_value + reloc_entry->addend; -- /* Relative jmp/call, so subtract from the value the -- address of the place we're coming from. */ -- signed_value -= (reloc_entry->address -- + input_section->output_section->vma -- + input_section->output_offset); -- if (signed_value > 0x7ffffff || signed_value < -0x8000000) -- return bfd_reloc_overflow; -- -- signed_value >>= 2; -- insn = INSERT_JUMPTARG (insn, signed_value); -- bfd_put_32 (abfd, insn, hit_data); -- break; -- -- case R_ILOHALF: -- insn = bfd_get_32 (abfd, hit_data); -- unsigned_value = EXTRACT_HWORD (insn); -- unsigned_value += sym_value + reloc_entry->addend; -- insn = INSERT_HWORD (insn, unsigned_value); -- bfd_put_32 (abfd, insn, hit_data); -- break; -- -- case R_IHIHALF: -- insn = bfd_get_32 (abfd, hit_data); -- -- /* consth, part 1 -- Just get the symbol value that is referenced. */ -- part1_consth_active = TRUE; -- part1_consth_value = sym_value + reloc_entry->addend; -- -- /* Don't modify insn until R_IHCONST. */ -- break; -- -- case R_IHCONST: -- insn = bfd_get_32 (abfd, hit_data); -- -- /* consth, part 2 -- Now relocate the reference. */ -- if (! part1_consth_active) -- { -- *error_message = (char *) "Missing IHIHALF"; -- return bfd_reloc_dangerous; -- } -- -- /* sym_ptr_ptr = r_symndx, in coff_slurp_reloc_table() */ -- unsigned_value = 0; /*EXTRACT_HWORD(insn) << 16;*/ -- unsigned_value += reloc_entry->addend; /* r_symndx */ -- unsigned_value += part1_consth_value; -- unsigned_value = unsigned_value >> 16; -- insn = INSERT_HWORD (insn, unsigned_value); -- part1_consth_active = FALSE; -- bfd_put_32 (abfd, insn, hit_data); -- break; -- -- case R_BYTE: -- insn = bfd_get_8 (abfd, hit_data); -- unsigned_value = insn + sym_value + reloc_entry->addend; -- if (unsigned_value & 0xffffff00) -- return bfd_reloc_overflow; -- bfd_put_8 (abfd, unsigned_value, hit_data); -- break; -- -- case R_HWORD: -- insn = bfd_get_16 (abfd, hit_data); -- unsigned_value = insn + sym_value + reloc_entry->addend; -- if (unsigned_value & 0xffff0000) -- return bfd_reloc_overflow; -- bfd_put_16 (abfd, insn, hit_data); -- break; -- -- case R_WORD: -- insn = bfd_get_32 (abfd, hit_data); -- insn += sym_value + reloc_entry->addend; -- bfd_put_32 (abfd, insn, hit_data); -- break; -- -- default: -- *error_message = _("Unrecognized reloc"); -- return bfd_reloc_dangerous; -- } -- -- return bfd_reloc_ok; --} -- --/* type rightshift -- size -- bitsize -- pc-relative -- bitpos -- absolute -- complain_on_overflow -- special_function -- relocation name -- partial_inplace -- src_mask --*/ -- --/* FIXME: I'm not real sure about this table. */ --static reloc_howto_type howto_table[] = --{ -- { R_ABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "ABS", TRUE, 0xffffffff,0xffffffff, FALSE }, -- EMPTY_HOWTO (1), -- EMPTY_HOWTO (2), -- EMPTY_HOWTO (3), -- EMPTY_HOWTO (4), -- EMPTY_HOWTO (5), -- EMPTY_HOWTO (6), -- EMPTY_HOWTO (7), -- EMPTY_HOWTO (8), -- EMPTY_HOWTO (9), -- EMPTY_HOWTO (10), -- EMPTY_HOWTO (11), -- EMPTY_HOWTO (12), -- EMPTY_HOWTO (13), -- EMPTY_HOWTO (14), -- EMPTY_HOWTO (15), -- EMPTY_HOWTO (16), -- EMPTY_HOWTO (17), -- EMPTY_HOWTO (18), -- EMPTY_HOWTO (19), -- EMPTY_HOWTO (20), -- EMPTY_HOWTO (21), -- EMPTY_HOWTO (22), -- EMPTY_HOWTO (23), -- { R_IREL, 0, 3, 32, TRUE, 0, complain_overflow_signed, or32_reloc, "IREL", TRUE, 0xffffffff,0xffffffff, FALSE }, -- { R_IABS, 0, 3, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "IABS", TRUE, 0xffffffff,0xffffffff, FALSE }, -- { R_ILOHALF, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "ILOHALF", TRUE, 0x0000ffff,0x0000ffff, FALSE }, -- { R_IHIHALF, 0, 3, 16, TRUE, 16,complain_overflow_signed, or32_reloc, "IHIHALF", TRUE, 0xffff0000,0xffff0000, FALSE }, -- { R_IHCONST, 0, 3, 16, TRUE, 0, complain_overflow_signed, or32_reloc, "IHCONST", TRUE, 0xffff0000,0xffff0000, FALSE }, -- { R_BYTE, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, or32_reloc, "BYTE", TRUE, 0x000000ff,0x000000ff, FALSE }, -- { R_HWORD, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, or32_reloc, "HWORD", TRUE, 0x0000ffff,0x0000ffff, FALSE }, -- { R_WORD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, or32_reloc, "WORD", TRUE, 0xffffffff,0xffffffff, FALSE }, --}; -- --#define BADMAG(x) OR32BADMAG (x) -- --#define RELOC_PROCESSING(relent, reloc, symbols, abfd, section) \ -- reloc_processing (relent, reloc, symbols, abfd, section) -- --static void --reloc_processing (arelent *relent, -- struct internal_reloc *reloc, -- asymbol **symbols, -- bfd *abfd, -- asection *section) --{ -- static bfd_vma ihihalf_vaddr = (bfd_vma) -1; -- -- relent->address = reloc->r_vaddr; -- relent->howto = howto_table + reloc->r_type; -- -- if (reloc->r_type == R_IHCONST) -- { -- /* The address of an R_IHCONST should always be the address of -- the immediately preceding R_IHIHALF. relocs generated by gas -- are correct, but relocs generated by High C are different (I -- can't figure out what the address means for High C). We can -- handle both gas and High C by ignoring the address here, and -- simply reusing the address saved for R_IHIHALF. */ -- if (ihihalf_vaddr == (bfd_vma) -1) -- abort (); -- -- relent->address = ihihalf_vaddr; -- ihihalf_vaddr = (bfd_vma) -1; -- relent->addend = reloc->r_symndx; -- relent->sym_ptr_ptr= bfd_abs_section_ptr->symbol_ptr_ptr; -- } -- else -- { -- relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx]; -- relent->addend = 0; -- relent->address-= section->vma; -- -- if (reloc->r_type == R_IHIHALF) -- ihihalf_vaddr = relent->address; -- else if (ihihalf_vaddr != (bfd_vma) -1) -- abort (); -- } --} -- --/* The reloc processing routine for the optimized COFF linker. */ -- --static bfd_boolean --coff_or32_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, -- 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; -- bfd_boolean hihalf; -- bfd_vma hihalf_val; -- -- /* If we are performing a relocatable link, we don't need to do a -- thing. The caller will take care of adjusting the reloc -- addresses and symbol indices. */ -- if (info->relocatable) -- return TRUE; -- -- hihalf = FALSE; -- hihalf_val = 0; -- -- rel = relocs; -- relend = rel + input_section->reloc_count; -- -- for (; rel < relend; rel++) -- { -- long symndx; -- bfd_byte *loc; -- struct coff_link_hash_entry *h; -- struct internal_syment *sym; -- asection *sec; -- bfd_vma val; -- bfd_boolean overflow; -- unsigned long insn; -- long signed_value; -- unsigned long unsigned_value; -- bfd_reloc_status_type rstat; -- -- symndx = rel->r_symndx; -- loc = contents + rel->r_vaddr - input_section->vma; -- -- if (symndx == -1 || rel->r_type == R_IHCONST) -- h = NULL; -- else -- h = obj_coff_sym_hashes (input_bfd)[symndx]; -- -- sym = NULL; -- sec = NULL; -- val = 0; -- -- /* An R_IHCONST reloc does not have a symbol. Instead, the -- symbol index is an addend. R_IHCONST is always used in -- conjunction with R_IHHALF. */ -- if (rel->r_type != R_IHCONST) -- { -- if (h == NULL) -- { -- if (symndx == -1) -- sec = bfd_abs_section_ptr; -- else -- { -- sym = syms + symndx; -- sec = sections[symndx]; -- val = (sec->output_section->vma -- + sec->output_offset -- + sym->n_value -- - sec->vma); -- } -- } -- else -- { -- if (h->root.type == bfd_link_hash_defined -- || h->root.type == bfd_link_hash_defweak) -- { -- sec = h->root.u.def.section; -- val = (h->root.u.def.value -- + sec->output_section->vma -- + sec->output_offset); -- } -- else -- { -- if (! ((*info->callbacks->undefined_symbol) -- (info, h->root.root.string, input_bfd, input_section, -- rel->r_vaddr - input_section->vma, TRUE))) -- return FALSE; -- } -- } -- -- if (hihalf) -- { -- if (! ((*info->callbacks->reloc_dangerous) -- (info, "missing IHCONST reloc", input_bfd, -- input_section, rel->r_vaddr - input_section->vma))) -- return FALSE; -- hihalf = FALSE; -- } -- } -- -- overflow = FALSE; -- -- switch (rel->r_type) -- { -- default: -- bfd_set_error (bfd_error_bad_value); -- return FALSE; -- -- case R_IREL: -- insn = bfd_get_32 (input_bfd, loc); -- -- /* Extract the addend. */ -- signed_value = EXTRACT_JUMPTARG (insn); -- signed_value = SIGN_EXTEND_JUMPTARG (signed_value); -- signed_value <<= 2; -- -- /* Determine the destination of the jump. */ -- signed_value += val; -- -- /* Make the destination PC relative. */ -- signed_value -= (input_section->output_section->vma -- + input_section->output_offset -- + (rel->r_vaddr - input_section->vma)); -- if (signed_value > 0x7ffffff || signed_value < - 0x8000000) -- { -- overflow = TRUE; -- signed_value = 0; -- } -- -- /* Put the adjusted value back into the instruction. */ -- signed_value >>= 2; -- insn = INSERT_JUMPTARG(insn, signed_value); -- -- bfd_put_32 (input_bfd, (bfd_vma) insn, loc); -- break; -- -- case R_ILOHALF: -- insn = bfd_get_32 (input_bfd, loc); -- unsigned_value = EXTRACT_HWORD (insn); -- unsigned_value += val; -- insn = INSERT_HWORD (insn, unsigned_value); -- bfd_put_32 (input_bfd, insn, loc); -- break; -- -- case R_IHIHALF: -- /* Save the value for the R_IHCONST reloc. */ -- hihalf = TRUE; -- hihalf_val = val; -- break; -- -- case R_IHCONST: -- if (! hihalf) -- { -- if (! ((*info->callbacks->reloc_dangerous) -- (info, "missing IHIHALF reloc", input_bfd, -- input_section, rel->r_vaddr - input_section->vma))) -- return FALSE; -- hihalf_val = 0; -- } -- -- insn = bfd_get_32 (input_bfd, loc); -- unsigned_value = rel->r_symndx + hihalf_val; -- unsigned_value >>= 16; -- insn = INSERT_HWORD (insn, unsigned_value); -- bfd_put_32 (input_bfd, (bfd_vma) insn, loc); -- -- hihalf = FALSE; -- break; -- -- case R_BYTE: -- case R_HWORD: -- case R_WORD: -- rstat = _bfd_relocate_contents (howto_table + rel->r_type, -- input_bfd, val, loc); -- if (rstat == bfd_reloc_overflow) -- overflow = TRUE; -- else if (rstat != bfd_reloc_ok) -- abort (); -- break; -- } -- -- if (overflow) -- { -- const char *name; -- char buf[SYMNMLEN + 1]; -- -- if (symndx == -1) -- name = "*ABS*"; -- else if (h != NULL) -- name = NULL; -- else if (sym == NULL) -- name = "*unknown*"; -- 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; -- else -- { -- strncpy (buf, sym->_n._n_name, SYMNMLEN); -- buf[SYMNMLEN] = '\0'; -- name = buf; -- } -- -- if (! ((*info->callbacks->reloc_overflow) -- (info, (h ? &h->root : NULL), name, -- howto_table[rel->r_type].name, (bfd_vma) 0, input_bfd, -- input_section, rel->r_vaddr - input_section->vma))) -- return FALSE; -- } -- } -- -- return TRUE; --} -- --#define coff_relocate_section coff_or32_relocate_section -- --/* We don't want to change the symndx of a R_IHCONST reloc, since it -- is actually an addend, not a symbol index at all. */ -- --static bfd_boolean --coff_or32_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info ATTRIBUTE_UNUSED, -- bfd *ibfd ATTRIBUTE_UNUSED, -- asection *sec ATTRIBUTE_UNUSED, -- struct internal_reloc *irel, -- bfd_boolean *adjustedp) --{ -- if (irel->r_type == R_IHCONST) -- *adjustedp = TRUE; -- else -- *adjustedp = FALSE; -- return TRUE; --} -- --#define coff_adjust_symndx coff_or32_adjust_symndx -- --#ifndef bfd_pe_print_pdata --#define bfd_pe_print_pdata NULL --#endif -- --#include "coffcode.h" -- --const bfd_target or32coff_big_vec = --{ -- "coff-or32-big", /* Name. */ -- bfd_target_coff_flavour, -- BFD_ENDIAN_BIG, /* Data byte order is big. */ -- BFD_ENDIAN_BIG, /* Header byte order is big. */ -- -- (HAS_RELOC | EXEC_P | /* Object flags. */ -- HAS_LINENO | HAS_DEBUG | -- HAS_SYMS | HAS_LOCALS | WP_TEXT), -- -- (SEC_HAS_CONTENTS | SEC_ALLOC | /* Section flags. */ -- SEC_LOAD | SEC_RELOC | -- SEC_READONLY ), -- '_', /* Leading underscore. */ -- '/', /* ar_pad_char. */ -- 15, /* ar_max_namelen. */ -- 0, /* match priority. */ -- -- /* Data. */ -- bfd_getb64, bfd_getb_signed_64, bfd_putb64, -- bfd_getb32, bfd_getb_signed_32, bfd_putb32, -- bfd_getb16, bfd_getb_signed_16, bfd_putb16, -- -- /* Headers. */ -- bfd_getb64, bfd_getb_signed_64, bfd_putb64, -- bfd_getb32, bfd_getb_signed_32, bfd_putb32, -- bfd_getb16, bfd_getb_signed_16, bfd_putb16, -- -- { -- _bfd_dummy_target, -- coff_object_p, -- bfd_generic_archive_p, -- _bfd_dummy_target -- }, -- { -- bfd_false, -- coff_mkobject, -- _bfd_generic_mkarchive, -- bfd_false -- }, -- { -- bfd_false, -- coff_write_object_contents, -- _bfd_write_archive_contents, -- bfd_false -- }, -- -- BFD_JUMP_TABLE_GENERIC (coff), -- BFD_JUMP_TABLE_COPY (coff), -- BFD_JUMP_TABLE_CORE (_bfd_nocore), -- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), -- BFD_JUMP_TABLE_SYMBOLS (coff), -- BFD_JUMP_TABLE_RELOCS (coff), -- BFD_JUMP_TABLE_WRITE (coff), -- BFD_JUMP_TABLE_LINK (coff), -- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), -- -- /* Alternative_target. */ --#ifdef TARGET_LITTLE_SYM -- & TARGET_LITTLE_SYM, --#else -- NULL, --#endif -- -- COFF_SWAP_TABLE --}; -diff -rNU3 dist.orig/bfd/coffcode.h dist/bfd/coffcode.h ---- dist.orig/bfd/coffcode.h 2011-09-27 18:03:49.000000000 +0200 -+++ dist/bfd/coffcode.h 2015-10-18 13:11:12.000000000 +0200 -@@ -2083,12 +2083,6 @@ - machine = 0; - switch (internal_f->f_magic) - { --#ifdef OR32_MAGIC_BIG -- case OR32_MAGIC_BIG: -- case OR32_MAGIC_LITTLE: -- arch = bfd_arch_or32; -- break; --#endif - #ifdef PPCMAGIC - case PPCMAGIC: - arch = bfd_arch_powerpc; -@@ -3055,15 +3049,6 @@ - return TRUE; - #endif - --#ifdef OR32_MAGIC_BIG -- case bfd_arch_or32: -- if (bfd_big_endian (abfd)) -- * magicp = OR32_MAGIC_BIG; -- else -- * magicp = OR32_MAGIC_LITTLE; -- return TRUE; --#endif -- - default: /* Unknown architecture. */ - /* Fall through to "return FALSE" below, to avoid - "statement never reached" errors on the one below. */ -diff -rNU3 dist.orig/bfd/config.bfd dist/bfd/config.bfd ---- dist.orig/bfd/config.bfd 2012-09-04 16:14:59.000000000 +0200 -+++ dist/bfd/config.bfd 2015-10-18 13:11:12.000000000 +0200 -@@ -86,16 +86,18 @@ - i[3-7]86) targ_archs=bfd_i386_arch ;; - i370) targ_archs=bfd_i370_arch ;; - lm32) targ_archs=bfd_lm32_arch ;; -+m5200|m5407) targ_archs=bfd_m68k_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" ;; - m68*) targ_archs=bfd_m68k_arch ;; - m88*) targ_archs=bfd_m88k_arch ;; - microblaze*) targ_archs=bfd_microblaze_arch ;; - mips*) targ_archs=bfd_mips_arch ;; --or32*) targ_archs=bfd_or32_arch ;; -+or1k*) targ_archs=bfd_or1k_arch ;; - pdp11*) targ_archs=bfd_pdp11_arch ;; - pj*) targ_archs="bfd_pj_arch bfd_i386_arch";; - powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; -+riscv*) targ_archs=bfd_riscv_arch ;; - rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; - s390*) targ_archs=bfd_s390_arch ;; - sh*) targ_archs=bfd_sh_arch ;; -@@ -164,6 +166,16 @@ - targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec" - want64=true - ;; -+ aarch64-*-netbsd*) -+ targ_defvec=bfd_elf64_littleaarch64_vec -+ targ_selvecs="bfd_elf64_bigaarch64_vec bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec" -+ want64=true -+ ;; -+ aarch64_be-*-netbsd*) -+ targ_defvec=bfd_elf64_bigaarch64_vec -+ targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec" -+ want64=true -+ ;; - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) - targ_defvec=bfd_elf64_alpha_freebsd_vec - targ_selvecs="bfd_elf64_alpha_vec ecoffalpha_little_vec" -@@ -250,17 +262,17 @@ - targ64_selvecs="bfd_elf32_x86_64_nacl_vec bfd_elf64_x86_64_nacl_vec" - targ_archs="$targ_archs bfd_i386_arch" - ;; -- armeb-*-netbsdelf*) -+ arm*eb-*-netbsdelf*) - targ_defvec=bfd_elf32_bigarm_vec -- targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec" -+ targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec" - ;; -- arm-*-netbsdelf*) -+ arm*-*-netbsdelf*) - targ_defvec=bfd_elf32_littlearm_vec -- targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec" -+ targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec" - ;; - arm-*-netbsd* | arm-*-openbsd*) - targ_defvec=armnetbsd_vec -- targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec" -+ targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec armcoff_little_vec armcoff_big_vec" - targ_underscore=yes - targ_cflags=-D__QNXTARGET__ - ;; -@@ -574,8 +586,8 @@ - ;; - i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu) - targ_defvec=bfd_elf32_i386_vec -- targ_selvecs=i386netbsd_vec -- targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" -+ targ_selvecs="i386netbsd_vec i386coff_vec i386pei_vec" -+ targ64_selvecs="bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" - ;; - i[3-7]86-*-netbsdpe*) - targ_defvec=i386pe_vec -@@ -845,12 +857,12 @@ - # targ_selvecs=m68kmach3_vec - # targ_cflags=-DSTAT_FOR_EXEC - ;; -- m68*-hp*-netbsd*) -+ m68k4k*-*-netbsd*) - targ_defvec=m68k4knetbsd_vec -- targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec" -+ targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec" - targ_underscore=yes - ;; -- m68*-*-netbsdelf*) -+ m68*-*-netbsdelf* | m5407-*-netbsdelf*) - targ_defvec=bfd_elf32_m68k_vec - targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec" - ;; -@@ -923,6 +935,16 @@ - targ_defvec=ecoff_big_vec - targ_selvecs=ecoff_little_vec - ;; -+#ifdef BFD64 -+ mips64*el-*-netbsd*) -+ targ_defvec=bfd_elf32_ntradlittlemips_vec -+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec" -+ ;; -+ mips64*-*-netbsd*) -+ targ_defvec=bfd_elf32_ntradbigmips_vec -+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec" -+ ;; -+#endif - mips*el-*-netbsd*) - targ_defvec=bfd_elf32_tradlittlemips_vec - targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec" -@@ -1102,17 +1124,16 @@ - targ_underscore=yes - ;; - -- openrisc-*-elf) -- targ_defvec=bfd_elf32_openrisc_vec -+ or1k*-*-elf) -+ targ_defvec=bfd_elf32_or1k_big_vec - ;; - -- or32-*-coff) -- targ_defvec=or32coff_big_vec -- targ_underscore=yes -+ or1k*-*-linux*) -+ targ_defvec=bfd_elf32_or1k_big_vec - ;; - -- or32-*-elf) -- targ_defvec=bfd_elf32_or32_big_vec -+ or1k*-*-netbsd*) -+ targ_defvec=bfd_elf32_or1k_big_vec - ;; - - pdp11-*-*) -@@ -1252,6 +1273,14 @@ - targ_defvec=bfd_elf32_rl78_vec - ;; - -+#ifdef BFD64 -+ riscv*-*-*) -+ targ_defvec=bfd_elf64_riscv_vec -+ targ_selvecs="bfd_elf32_riscv_vec bfd_elf64_riscv_vec" -+ want64=true -+ ;; -+#endif -+ - rx-*-elf) - targ_defvec=bfd_elf32_rx_le_vec - targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec bfd_elf32_rx_be_ns_vec" -@@ -1347,6 +1376,8 @@ - want64=true - ;; - -+#endif -+ - sh*l*-*-netbsdelf*) - targ_defvec=bfd_elf32_shlnbsd_vec - targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" -@@ -1357,8 +1388,6 @@ - targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" - want64=true - ;; --#endif -- - sh*-*-netbsdelf*) - targ_defvec=bfd_elf32_shnbsd_vec - targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec" -@@ -1448,11 +1477,12 @@ - ;; - sparc-*-netbsdelf*) - targ_defvec=bfd_elf32_sparc_vec -- targ_selvecs=sparcnetbsd_vec -+ targ_selvecs="sparcnetbsd_vec sunos_big_vec" -+ want64=true - ;; -- sparc-*-netbsdaout* | sparc-*-netbsd*) -+ sparc-*-netbsd*) - targ_defvec=sparcnetbsd_vec -- targ_selvecs=bfd_elf32_sparc_vec -+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" - targ_underscore=yes - ;; - sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]) -@@ -1500,6 +1530,10 @@ - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" - want64=true - ;; -+ sparc64-*-netbsd*) -+ targ_defvec=bfd_elf64_sparc_vec -+ targ_selvecs="bfd_elf32_sparc_vec sparcnetbsd_vec sunos_big_vec" -+ ;; - sparc64-*-elf* | sparc64-*-rtems* ) - targ_defvec=bfd_elf64_sparc_vec - targ_selvecs=bfd_elf32_sparc_vec -diff -rNU3 dist.orig/bfd/configure dist/bfd/configure ---- dist.orig/bfd/configure 2013-03-25 10:08:07.000000000 +0100 -+++ dist/bfd/configure 2015-10-18 13:11:12.000000000 +0200 -@@ -12101,10 +12101,10 @@ - withval=$with_pkgversion; case "$withval" in - yes) as_fn_error "package version not specified" "$LINENO" 5 ;; - no) PKGVERSION= ;; -- *) PKGVERSION="($withval) " ;; -+ *) PKGVERSION="($withval)\ " ;; - esac - else -- PKGVERSION="(GNU Binutils) " -+ PKGVERSION="(GNU Binutils)\ " - - fi - -@@ -13861,6 +13861,7 @@ - COREFILE=netbsd-core.lo - ;; - arm-*-riscix) COREFILE=trad-core.lo ;; -+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;; - hppa*-*-hpux*) COREFILE=hpux-core.lo ;; - hppa*-*-hiux*) COREFILE=hpux-core.lo ;; - hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; -@@ -13923,7 +13924,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i860mach3.h"' - ;; -- mips-*-netbsd* | mips*-*-openbsd*) -+ mips*-*-netbsd* | mips*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - mips-dec-*) -@@ -15278,14 +15279,14 @@ - tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec) - tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; -- bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; -- bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; -+ bfd_elf32_or1k_big_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;; - bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; - bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; - bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; -+ bfd_elf32_riscv_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;; - bfd_elf32_rl78_vec) tb="$tb elf32-rl78.lo $elf" ;; - bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; - bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; -@@ -15356,6 +15357,7 @@ - bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; -+ bfd_elf64_riscv_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;; - bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; -@@ -15447,7 +15449,6 @@ - nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; - nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; - nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; -- or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;; - pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; - pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; - pef_vec) tb="$tb pef.lo" ;; -diff -rNU3 dist.orig/bfd/configure.host dist/bfd/configure.host ---- dist.orig/bfd/configure.host 2010-12-31 12:00:52.000000000 +0100 -+++ dist/bfd/configure.host 2015-10-18 13:11:12.000000000 +0200 -@@ -57,6 +57,18 @@ - - m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;; - -+sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; -+ -+x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; -+ -+*-*-aix*) HOST_64BIT_TYPE="long long" -+ HOST_U_64BIT_TYPE="unsigned long long" -+ ;; -+ -+*-*-solaris*) HOST_64BIT_TYPE="long long" -+ HOST_U_64BIT_TYPE="unsigned long long" -+ ;; -+ - # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise - # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the - # default code page used by windres/windmc when not specified by a commandline -diff -rNU3 dist.orig/bfd/configure.in dist/bfd/configure.in ---- dist.orig/bfd/configure.in 2013-03-25 10:08:05.000000000 +0100 -+++ dist/bfd/configure.in 2015-10-18 13:11:12.000000000 +0200 -@@ -254,6 +254,7 @@ - COREFILE=netbsd-core.lo - ;; - arm-*-riscix) COREFILE=trad-core.lo ;; -+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;; - hppa*-*-hpux*) COREFILE=hpux-core.lo ;; - hppa*-*-hiux*) COREFILE=hpux-core.lo ;; - hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; -@@ -340,7 +341,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i860mach3.h"' - ;; -- mips-*-netbsd* | mips*-*-openbsd*) -+ mips*-*-netbsd* | mips*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - mips-dec-*) -@@ -771,7 +772,8 @@ - bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec) - tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; -- bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; -+ bfd_elf32_or1k_big_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;; -+ bfd_elf32_riscv_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;; - bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; - bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; - bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; -@@ -835,6 +837,7 @@ - bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; -+ bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; - bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; -@@ -844,10 +847,12 @@ - bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; -+ bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; - bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; -+ bfd_elf64_riscv_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;; - bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; -@@ -939,7 +944,6 @@ - nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; - nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; - nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; -- or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;; - pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; - pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; - pef_vec) tb="$tb pef.lo" ;; -diff -rNU3 dist.orig/bfd/cpu-or1k.c dist/bfd/cpu-or1k.c ---- dist.orig/bfd/cpu-or1k.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/cpu-or1k.c 2015-10-18 13:11:12.000000000 +0200 -@@ -0,0 +1,61 @@ -+/* BFD support for the OpenRISC 1000 architecture. -+ Copyright 2002, 2005, 2007 Free Software Foundation, Inc. -+ Contributed by Ivan Guzvinec -+ -+ 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" -+ -+extern const bfd_arch_info_type bfd_or1knd_arch; -+ -+const bfd_arch_info_type bfd_or1k_arch = -+ { -+ 32, /* 32 bits in a word. */ -+ 32, /* 32 bits in an address. */ -+ 8, /* 8 bits in a byte. */ -+ bfd_arch_or1k, -+ bfd_mach_or1k, -+ "or1k", -+ "or1k", -+ 4, -+ TRUE, /* The one and only. */ -+ bfd_default_compatible, -+ bfd_default_scan, -+ bfd_arch_default_fill, -+ &bfd_or1knd_arch, -+ }; -+ -+ -+const bfd_arch_info_type bfd_or1knd_arch = -+ { -+ 32, /* 32 bits in a word. */ -+ 32, /* 32 bits in an address. */ -+ 8, /* 8 bits in a byte. */ -+ bfd_arch_or1k, -+ bfd_mach_or1knd, -+ "or1knd", -+ "or1knd", -+ 4, -+ TRUE, /* The one and only. */ -+ bfd_default_compatible, -+ bfd_default_scan, -+ bfd_arch_default_fill, -+ 0, -+ }; -diff -rNU3 dist.orig/bfd/cpu-or32.c dist/bfd/cpu-or32.c ---- dist.orig/bfd/cpu-or32.c 2012-01-31 18:54:35.000000000 +0100 -+++ dist/bfd/cpu-or32.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,42 +0,0 @@ --/* BFD support for the OpenRISC 1000 architecture. -- Copyright 2002, 2005, 2007 Free Software Foundation, Inc. -- Contributed by Ivan Guzvinec -- -- 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" -- --const bfd_arch_info_type bfd_or32_arch = -- { -- 32, /* 32 bits in a word. */ -- 32, /* 32 bits in an address. */ -- 8, /* 8 bits in a byte. */ -- bfd_arch_or32, -- 0, /* Only 1 machine. */ -- "or32", -- "or32", -- 4, -- TRUE, /* The one and only. */ -- bfd_default_compatible, -- bfd_default_scan, -- bfd_arch_default_fill, -- 0, -- }; -- -diff -rNU3 dist.orig/bfd/cpu-riscv.c dist/bfd/cpu-riscv.c ---- dist.orig/bfd/cpu-riscv.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/cpu-riscv.c 2015-10-18 13:11:12.000000000 +0200 -@@ -0,0 +1,80 @@ -+/* BFD backend for RISC-V -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ 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" -+ -+static const bfd_arch_info_type *riscv_compatible -+ (const bfd_arch_info_type *, const bfd_arch_info_type *); -+ -+/* The default routine tests bits_per_word, which is wrong on RISC-V, as -+ RISC-V word size doesn't correlate with reloc size. */ -+ -+static const bfd_arch_info_type * -+riscv_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b) -+{ -+ if (a->arch != b->arch) -+ return NULL; -+ -+ /* Machine compatibility is checked in -+ _bfd_riscv_elf_merge_private_bfd_data. */ -+ -+ return a; -+} -+ -+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \ -+ { \ -+ BITS_WORD, /* bits in a word */ \ -+ BITS_ADDR, /* bits in an address */ \ -+ 8, /* 8 bits in a byte */ \ -+ bfd_arch_riscv, \ -+ NUMBER, \ -+ "riscv", \ -+ PRINT, \ -+ 3, \ -+ DEFAULT, \ -+ riscv_compatible, \ -+ bfd_default_scan, \ -+ bfd_arch_default_fill, \ -+ NEXT, \ -+ } -+ -+enum -+{ -+ I_riscv64, -+ I_riscv32 -+}; -+ -+#define NN(index) (&arch_info_struct[(index) + 1]) -+ -+static const bfd_arch_info_type arch_info_struct[] = -+{ -+ N (64, 64, bfd_mach_riscv64, "riscv:rv64", FALSE, NN(I_riscv64)), -+ N (32, 32, bfd_mach_riscv32, "riscv:rv32", FALSE, 0) -+}; -+ -+/* The default architecture is riscv:rv64. */ -+ -+const bfd_arch_info_type bfd_riscv_arch = -+N (64, 64, 0, "riscv", TRUE, &arch_info_struct[0]); -diff -rNU3 dist.orig/bfd/doc/Makefile.in dist/bfd/doc/Makefile.in ---- dist.orig/bfd/doc/Makefile.in 2013-03-25 10:08:08.000000000 +0100 -+++ dist/bfd/doc/Makefile.in 2015-10-18 13:11:12.000000000 +0200 -@@ -417,7 +417,9 @@ - clean-libtool: - -rm -rf .libs _libs - --bfd.info: bfd.texinfo $(bfd_TEXINFOS) -+bfd.info: -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_bfd.info: bfd.texinfo $(bfd_TEXINFOS) - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -diff -rNU3 dist.orig/bfd/doc/reloc.texi dist/bfd/doc/reloc.texi ---- dist.orig/bfd/doc/reloc.texi 2012-11-13 15:19:29.000000000 +0100 -+++ dist/bfd/doc/reloc.texi 2015-10-18 13:11:12.000000000 +0200 -@@ -570,6 +570,12 @@ - @deffnx {} BFD_RELOC_68K_TLS_LE8 - Relocations used by 68K ELF. - @end deffn -+@deffn {} BFD_RELOC_VAX_GLOB_DAT -+@deffnx {} BFD_RELOC_VAX_GLOB_REF -+@deffnx {} BFD_RELOC_VAX_JMP_SLOT -+@deffnx {} BFD_RELOC_VAX_RELATIVE -+Relocations used by VAX ELF. -+@end deffn - @deffn {} BFD_RELOC_32_BASEREL - @deffnx {} BFD_RELOC_16_BASEREL - @deffnx {} BFD_RELOC_LO16_BASEREL -diff -rNU3 dist.orig/bfd/elf-bfd.h dist/bfd/elf-bfd.h ---- dist.orig/bfd/elf-bfd.h 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/elf-bfd.h 2015-10-18 13:11:12.000000000 +0200 -@@ -420,6 +420,7 @@ - MICROBLAZE_ELF_DATA, - MIPS_ELF_DATA, - MN10300_ELF_DATA, -+ OR1K_ELF_DATA, - PPC32_ELF_DATA, - PPC64_ELF_DATA, - S390_ELF_DATA, -@@ -432,6 +433,7 @@ - XGATE_ELF_DATA, - TILEGX_ELF_DATA, - TILEPRO_ELF_DATA, -+ RISCV_ELF_DATA, - GENERIC_ELF_DATA - }; - -diff -rNU3 dist.orig/bfd/elf.c dist/bfd/elf.c ---- dist.orig/bfd/elf.c 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/elf.c 2015-10-18 13:11:12.000000000 +0200 -@@ -8756,6 +8756,23 @@ - return TRUE; - } - -+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. -+ There's also old PT___GETREGS40 == mach + 1 for old reg -+ structure which lacks GBR. */ -+ -+ case bfd_arch_sh: -+ switch (note->type) -+ { -+ case NT_NETBSDCORE_FIRSTMACH+3: -+ return elfcore_make_note_pseudosection (abfd, ".reg", note); -+ -+ case NT_NETBSDCORE_FIRSTMACH+5: -+ return elfcore_make_note_pseudosection (abfd, ".reg2", note); -+ -+ default: -+ return TRUE; -+ } -+ - /* On all other arch's, PT_GETREGS == mach+1 and - PT_GETFPREGS == mach+3. */ - -diff -rNU3 dist.orig/bfd/elf32-arm.c dist/bfd/elf32-arm.c ---- dist.orig/bfd/elf32-arm.c 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/elf32-arm.c 2015-10-18 13:11:12.000000000 +0200 -@@ -13475,6 +13475,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation to `%s' in readonly section `%s'"), -+ h->root.root.string, s->name); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -@@ -15640,7 +15644,7 @@ - #ifdef __QNXTARGET__ - #define ELF_MAXPAGESIZE 0x1000 - #else --#define ELF_MAXPAGESIZE 0x8000 -+#define ELF_MAXPAGESIZE 0x10000 - #endif - #define ELF_MINPAGESIZE 0x1000 - #define ELF_COMMONPAGESIZE 0x1000 -@@ -15769,9 +15773,6 @@ - #undef elf_backend_modify_program_headers - #define elf_backend_modify_program_headers nacl_modify_program_headers - --#undef ELF_MAXPAGESIZE --#define ELF_MAXPAGESIZE 0x10000 -- - #include "elf32-target.h" - - /* Reset to defaults. */ -diff -rNU3 dist.orig/bfd/elf32-hppa.c dist/bfd/elf32-hppa.c ---- dist.orig/bfd/elf32-hppa.c 2012-06-29 16:45:58.000000000 +0200 -+++ dist/bfd/elf32-hppa.c 2015-10-18 13:11:12.000000000 +0200 -@@ -2191,6 +2191,10 @@ - { - struct bfd_link_info *info = inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ eh->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist.orig/bfd/elf32-i386.c dist/bfd/elf32-i386.c ---- dist.orig/bfd/elf32-i386.c 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/elf32-i386.c 2015-10-18 13:11:12.000000000 +0200 -@@ -518,7 +518,7 @@ - /* The name of the dynamic interpreter. This is put in the .interp - section. */ - --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1" -+#define ELF_DYNAMIC_INTERPRETER "/libexec/ld.elf_so" - - /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid - copying dynamic variables from a shared lib into an app's dynbss -@@ -2552,7 +2552,10 @@ - if (s != NULL && (s->flags & SEC_READONLY) != 0) - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; -- -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - if (info->warn_shared_textrel && info->shared) -diff -rNU3 dist.orig/bfd/elf32-m68k.c dist/bfd/elf32-m68k.c ---- dist.orig/bfd/elf32-m68k.c 2012-07-13 16:22:47.000000000 +0200 -+++ dist/bfd/elf32-m68k.c 2015-10-18 13:11:12.000000000 +0200 -@@ -2532,7 +2532,7 @@ - if (ind->got_entry_key != 0) - { - BFD_ASSERT (dir->got_entry_key == 0); -- /* Assert that GOTs aren't partioned yet. */ -+ /* Assert that GOTs aren't partitioned yet. */ - BFD_ASSERT (ind->glist == NULL); - - dir->got_entry_key = ind->got_entry_key; -@@ -3104,6 +3104,7 @@ - /* Make sure we know what is going on here. */ - BFD_ASSERT (dynobj != NULL - && (h->needs_plt -+ || h->type == STT_GNU_IFUNC - || h->u.weakdef != NULL - || (h->def_dynamic - && h->ref_regular -@@ -3112,7 +3113,7 @@ - /* If this is a function, put it in the procedure linkage table. We - will fill in the contents of the procedure linkage table later, - when we know the address of the .got section. */ -- if (h->type == STT_FUNC -+ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) - || h->needs_plt) - { - if ((h->plt.refcount <= 0 -diff -rNU3 dist.orig/bfd/elf32-openrisc.c dist/bfd/elf32-openrisc.c ---- dist.orig/bfd/elf32-openrisc.c 2012-05-07 05:27:50.000000000 +0200 -+++ dist/bfd/elf32-openrisc.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,566 +0,0 @@ --/* OpenRISC-specific support for 32-bit ELF. -- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2012 -- Free Software Foundation, Inc. -- Contributed by Johan Rydberg, jrydberg@opencores.org -- -- 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 "elf-bfd.h" --#include "elf/openrisc.h" --#include "libiberty.h" -- --static reloc_howto_type openrisc_elf_howto_table[] = --{ -- /* This reloc does nothing. */ -- HOWTO (R_OPENRISC_NONE, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 32, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_NONE", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A PC relative 26 bit relocation, right shifted by 2. */ -- HOWTO (R_OPENRISC_INSN_REL_26, /* type */ -- 2, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 26, /* bitsize */ -- TRUE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_signed, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_INSN_REL_26", /* name */ -- FALSE, /* partial_inplace */ -- 0x00000000, /* src_mask */ -- 0x03ffffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A absolute 26 bit relocation, right shifted by 2. */ -- HOWTO (R_OPENRISC_INSN_ABS_26, /* type */ -- 2, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 26, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_signed, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_INSN_ABS_26", /* name */ -- FALSE, /* partial_inplace */ -- 0x00000000, /* src_mask */ -- 0x03ffffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- HOWTO (R_OPENRISC_LO_16_IN_INSN, /* type */ -- 0, /* rightshift */ -- 1, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_LO_16_IN_INSN", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- HOWTO (R_OPENRISC_HI_16_IN_INSN, /* type */ -- 16, /* rightshift */ -- 1, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_HI_16_IN_INSN", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* An 8 bit absolute relocation. */ -- HOWTO (R_OPENRISC_8, /* type */ -- 0, /* rightshift */ -- 0, /* size (0 = byte, 1 = short, 2 = long) */ -- 8, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_8", /* name */ -- TRUE, /* partial_inplace */ -- 0x0000, /* src_mask */ -- 0x00ff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A 16 bit absolute relocation. */ -- HOWTO (R_OPENRISC_16, /* type */ -- 0, /* rightshift */ -- 1, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_16", /* name */ -- TRUE, /* partial_inplace */ -- 0x00000000, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A 32 bit absolute relocation. */ -- HOWTO (R_OPENRISC_32, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 32, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OPENRISC_32", /* name */ -- TRUE, /* partial_inplace */ -- 0x00000000, /* src_mask */ -- 0xffffffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* GNU extension to record C++ vtable hierarchy. */ -- HOWTO (R_OPENRISC_GNU_VTINHERIT, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 0, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- NULL, /* special_function */ -- "R_OPENRISC_GNU_VTINHERIT", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* GNU extension to record C++ vtable member usage. */ -- HOWTO (R_OPENRISC_GNU_VTENTRY, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 0, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- _bfd_elf_rel_vtable_reloc_fn, /* special_function */ -- "R_OPENRISC_GNU_VTENTRY", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ --}; -- --/* Map BFD reloc types to OpenRISC ELF reloc types. */ -- --struct openrisc_reloc_map --{ -- bfd_reloc_code_real_type bfd_reloc_val; -- unsigned int openrisc_reloc_val; --}; -- --static const struct openrisc_reloc_map openrisc_reloc_map[] = --{ -- { BFD_RELOC_NONE, R_OPENRISC_NONE }, -- { BFD_RELOC_32, R_OPENRISC_32 }, -- { BFD_RELOC_16, R_OPENRISC_16 }, -- { BFD_RELOC_8, R_OPENRISC_8 }, -- { BFD_RELOC_OPENRISC_REL_26, R_OPENRISC_INSN_REL_26 }, -- { BFD_RELOC_OPENRISC_ABS_26, R_OPENRISC_INSN_ABS_26 }, -- { BFD_RELOC_HI16, R_OPENRISC_HI_16_IN_INSN }, -- { BFD_RELOC_LO16, R_OPENRISC_LO_16_IN_INSN }, -- { BFD_RELOC_VTABLE_INHERIT, R_OPENRISC_GNU_VTINHERIT }, -- { BFD_RELOC_VTABLE_ENTRY, R_OPENRISC_GNU_VTENTRY } --}; -- --static reloc_howto_type * --openrisc_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, -- bfd_reloc_code_real_type code) --{ -- unsigned int i; -- -- for (i = ARRAY_SIZE (openrisc_reloc_map); --i;) -- if (openrisc_reloc_map[i].bfd_reloc_val == code) -- return & openrisc_elf_howto_table[openrisc_reloc_map[i]. -- openrisc_reloc_val]; -- -- return NULL; --} -- --static reloc_howto_type * --openrisc_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, -- const char *r_name) --{ -- unsigned int i; -- -- for (i = 0; -- i < (sizeof (openrisc_elf_howto_table) -- / sizeof (openrisc_elf_howto_table[0])); -- i++) -- if (openrisc_elf_howto_table[i].name != NULL -- && strcasecmp (openrisc_elf_howto_table[i].name, r_name) == 0) -- return &openrisc_elf_howto_table[i]; -- -- return NULL; --} -- --/* Set the howto pointer for an OpenRISC ELF reloc. */ -- --static void --openrisc_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, -- arelent * cache_ptr, -- Elf_Internal_Rela * dst) --{ -- unsigned int r_type; -- -- r_type = ELF32_R_TYPE (dst->r_info); -- BFD_ASSERT (r_type < (unsigned int) R_OPENRISC_max); -- cache_ptr->howto = & openrisc_elf_howto_table[r_type]; --} -- --/* Perform a single relocation. By default we use the standard BFD -- routines, but a few relocs, we have to do them ourselves. */ -- --static bfd_reloc_status_type --openrisc_final_link_relocate (reloc_howto_type *howto, -- bfd *input_bfd, -- asection *input_section, -- bfd_byte *contents, -- Elf_Internal_Rela *rel, -- bfd_vma relocation) --{ -- bfd_reloc_status_type r = bfd_reloc_ok; -- -- switch (howto->type) -- { -- case R_OPENRISC_LO_16_IN_INSN: -- relocation &= 0xffff; -- r = _bfd_final_link_relocate (howto, input_bfd, input_section, -- contents, rel->r_offset, -- relocation, rel->r_addend); -- break; -- -- default: -- r = _bfd_final_link_relocate (howto, input_bfd, input_section, -- contents, rel->r_offset, -- relocation, rel->r_addend); -- } -- -- return r; --} -- --/* Relocate an OpenRISC ELF section. -- -- The RELOCATE_SECTION function is called by the new ELF backend linker -- to handle the relocations for a section. -- -- The relocs are always passed as Rela structures; if the section -- actually uses Rel structures, the r_addend field will always be -- zero. -- -- This function is responsible for adjusting the section contents as -- necessary, and (if using Rela relocs and generating a relocatable -- output file) adjusting the reloc addend as necessary. -- -- This function does not have to worry about setting the reloc -- address or the reloc symbol index. -- -- LOCAL_SYMS is a pointer to the swapped in local symbols. -- -- LOCAL_SECTIONS is an array giving the section in the input file -- corresponding to the st_shndx field of each local symbol. -- -- The global hash table entry for the global symbols can be found -- via elf_sym_hashes (input_bfd). -- -- When generating relocatable output, this function must handle -- STB_LOCAL/STT_SECTION symbols specially. The output symbol is -- going to be the section symbol corresponding to the output -- section, which means that the addend must be adjusted -- accordingly. */ -- --static bfd_boolean --openrisc_elf_relocate_section (bfd *output_bfd, -- struct bfd_link_info *info, -- bfd *input_bfd, -- asection *input_section, -- bfd_byte *contents, -- Elf_Internal_Rela *relocs, -- Elf_Internal_Sym *local_syms, -- asection **local_sections) --{ -- Elf_Internal_Shdr *symtab_hdr; -- struct elf_link_hash_entry **sym_hashes; -- Elf_Internal_Rela *rel; -- Elf_Internal_Rela *relend; -- -- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; -- sym_hashes = elf_sym_hashes (input_bfd); -- relend = relocs + input_section->reloc_count; -- -- for (rel = relocs; rel < relend; rel++) -- { -- reloc_howto_type *howto; -- unsigned long r_symndx; -- Elf_Internal_Sym *sym; -- asection *sec; -- struct elf_link_hash_entry *h; -- bfd_vma relocation; -- bfd_reloc_status_type r; -- const char *name = NULL; -- int r_type; -- -- r_type = ELF32_R_TYPE (rel->r_info); -- r_symndx = ELF32_R_SYM (rel->r_info); -- -- if (r_type == R_OPENRISC_GNU_VTINHERIT -- || r_type == R_OPENRISC_GNU_VTENTRY) -- continue; -- -- if ((unsigned int) r_type > -- (sizeof openrisc_elf_howto_table / sizeof (reloc_howto_type))) -- abort (); -- -- howto = openrisc_elf_howto_table + ELF32_R_TYPE (rel->r_info); -- h = NULL; -- sym = NULL; -- sec = NULL; -- -- if (r_symndx < symtab_hdr->sh_info) -- { -- sym = local_syms + r_symndx; -- sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); -- -- name = bfd_elf_string_from_elf_section -- (input_bfd, symtab_hdr->sh_link, sym->st_name); -- name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; -- } -- else -- { -- bfd_boolean unresolved_reloc, warned; -- -- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, -- r_symndx, symtab_hdr, sym_hashes, -- h, sec, relocation, -- unresolved_reloc, warned); -- } -- -- if (sec != NULL && discarded_section (sec)) -- RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, -- rel, 1, relend, howto, 0, contents); -- -- if (info->relocatable) -- continue; -- -- r = openrisc_final_link_relocate (howto, input_bfd, input_section, -- contents, rel, relocation); -- -- if (r != bfd_reloc_ok) -- { -- const char *msg = NULL; -- -- switch (r) -- { -- case bfd_reloc_overflow: -- r = info->callbacks->reloc_overflow -- (info, (h ? &h->root : NULL), name, howto->name, -- (bfd_vma) 0, input_bfd, input_section, rel->r_offset); -- break; -- -- case bfd_reloc_undefined: -- r = info->callbacks->undefined_symbol -- (info, name, input_bfd, input_section, rel->r_offset, TRUE); -- break; -- -- case bfd_reloc_outofrange: -- msg = _("internal error: out of range error"); -- break; -- -- case bfd_reloc_notsupported: -- msg = _("internal error: unsupported relocation error"); -- break; -- -- case bfd_reloc_dangerous: -- msg = _("internal error: dangerous relocation"); -- break; -- -- default: -- msg = _("internal error: unknown error"); -- break; -- } -- -- if (msg) -- r = info->callbacks->warning -- (info, msg, name, input_bfd, input_section, rel->r_offset); -- -- if (!r) -- return FALSE; -- } -- } -- -- return TRUE; --} -- --/* Return the section that should be marked against GC for a given -- relocation. */ -- --static asection * --openrisc_elf_gc_mark_hook (asection *sec, -- struct bfd_link_info *info, -- Elf_Internal_Rela *rel, -- struct elf_link_hash_entry *h, -- Elf_Internal_Sym *sym) --{ -- if (h != NULL) -- switch (ELF32_R_TYPE (rel->r_info)) -- { -- case R_OPENRISC_GNU_VTINHERIT: -- case R_OPENRISC_GNU_VTENTRY: -- return NULL; -- } -- -- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); --} -- --/* Look through the relocs for a section during the first phase. -- Since we don't do .gots or .plts, we just need to consider the -- virtual table relocs for gc. */ -- --static bfd_boolean --openrisc_elf_check_relocs (bfd *abfd, -- struct bfd_link_info *info, -- asection *sec, -- const Elf_Internal_Rela *relocs) --{ -- Elf_Internal_Shdr *symtab_hdr; -- struct elf_link_hash_entry **sym_hashes; -- const Elf_Internal_Rela *rel; -- const Elf_Internal_Rela *rel_end; -- -- if (info->relocatable) -- return TRUE; -- -- symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -- sym_hashes = elf_sym_hashes (abfd); -- -- rel_end = relocs + sec->reloc_count; -- for (rel = relocs; rel < rel_end; rel++) -- { -- struct elf_link_hash_entry *h; -- unsigned long r_symndx; -- -- r_symndx = ELF32_R_SYM (rel->r_info); -- if (r_symndx < symtab_hdr->sh_info) -- h = NULL; -- else -- { -- h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -- while (h->root.type == bfd_link_hash_indirect -- || h->root.type == bfd_link_hash_warning) -- h = (struct elf_link_hash_entry *) h->root.u.i.link; -- } -- -- switch (ELF32_R_TYPE (rel->r_info)) -- { -- /* This relocation describes the C++ object vtable hierarchy. -- Reconstruct it for later use during GC. */ -- case R_OPENRISC_GNU_VTINHERIT: -- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) -- return FALSE; -- break; -- -- /* This relocation describes which C++ vtable entries are actually -- used. Record for later use during GC. */ -- case R_OPENRISC_GNU_VTENTRY: -- BFD_ASSERT (h != NULL); -- if (h != NULL -- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) -- return FALSE; -- break; -- } -- } -- -- return TRUE; --} -- --/* Set the right machine number. */ -- --static bfd_boolean --openrisc_elf_object_p (bfd *abfd) --{ -- bfd_default_set_arch_mach (abfd, bfd_arch_openrisc, 0); -- return TRUE; --} -- --/* Store the machine number in the flags field. */ -- --static void --openrisc_elf_final_write_processing (bfd *abfd, -- bfd_boolean linker ATTRIBUTE_UNUSED) --{ -- unsigned long val; -- -- switch (bfd_get_mach (abfd)) -- { -- default: -- val = 0; -- break; -- } -- -- elf_elfheader (abfd)->e_flags &= ~0xf; -- elf_elfheader (abfd)->e_flags |= val; --} -- -- --#define ELF_ARCH bfd_arch_openrisc --#define ELF_MACHINE_CODE EM_OPENRISC --#define ELF_MACHINE_ALT1 EM_OPENRISC_OLD --#define ELF_MAXPAGESIZE 0x1000 -- --#define TARGET_BIG_SYM bfd_elf32_openrisc_vec --#define TARGET_BIG_NAME "elf32-openrisc" -- --#define elf_info_to_howto_rel NULL --#define elf_info_to_howto openrisc_info_to_howto_rela --#define elf_backend_relocate_section openrisc_elf_relocate_section --#define elf_backend_gc_mark_hook openrisc_elf_gc_mark_hook --#define elf_backend_check_relocs openrisc_elf_check_relocs -- --#define elf_backend_can_gc_sections 1 --#define elf_backend_rela_normal 1 -- --#define bfd_elf32_bfd_reloc_type_lookup openrisc_reloc_type_lookup --#define bfd_elf32_bfd_reloc_name_lookup openrisc_reloc_name_lookup -- --#define elf_backend_object_p openrisc_elf_object_p --#define elf_backend_final_write_processing openrisc_elf_final_write_processing -- --#include "elf32-target.h" -diff -rNU3 dist.orig/bfd/elf32-or1k.c dist/bfd/elf32-or1k.c ---- dist.orig/bfd/elf32-or1k.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/elf32-or1k.c 2015-10-18 13:11:12.000000000 +0200 -@@ -0,0 +1,2852 @@ -+/* Or1k-specific support for 32-bit ELF. -+ Copyright 2001-2014 Free Software Foundation, Inc. -+ Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org -+ -+ PIC parts added by Stefan Kristiansson, stefan.kristiansson@saunalahti.fi, -+ largely based on elf32-m32r.c and elf32-microblaze.c. -+ -+ 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, see . */ -+ -+#include "sysdep.h" -+#include "bfd.h" -+#include "libbfd.h" -+#include "elf-bfd.h" -+#include "elf/or1k.h" -+#include "libiberty.h" -+ -+#define PLT_ENTRY_SIZE 20 -+ -+#define PLT0_ENTRY_WORD0 0x19800000 /* l.movhi r12, 0 <- hi(.got+4) */ -+#define PLT0_ENTRY_WORD1 0xa98c0000 /* l.ori r12, r12, 0 <- lo(.got+4) */ -+#define PLT0_ENTRY_WORD2 0x85ec0004 /* l.lwz r15, 4(r12) <- *(.got+8)*/ -+#define PLT0_ENTRY_WORD3 0x44007800 /* l.jr r15 */ -+#define PLT0_ENTRY_WORD4 0x858c0000 /* l.lwz r12, 0(r12) */ -+ -+#define PLT0_PIC_ENTRY_WORD0 0x85900004 /* l.lwz r12, 4(r16) */ -+#define PLT0_PIC_ENTRY_WORD1 0x85f00008 /* l.lwz r15, 8(r16) */ -+#define PLT0_PIC_ENTRY_WORD2 0x44007800 /* l.jr r15 */ -+#define PLT0_PIC_ENTRY_WORD3 0x15000000 /* l.nop */ -+#define PLT0_PIC_ENTRY_WORD4 0x15000000 /* l.nop */ -+ -+#define PLT_ENTRY_WORD0 0x19800000 /* l.movhi r12, 0 <- hi(got idx addr) */ -+#define PLT_ENTRY_WORD1 0xa98c0000 /* l.ori r12, r12, 0 <- lo(got idx addr) */ -+#define PLT_ENTRY_WORD2 0x858c0000 /* l.lwz r12, 0(r12) */ -+#define PLT_ENTRY_WORD3 0x44006000 /* l.jr r12 */ -+#define PLT_ENTRY_WORD4 0xa9600000 /* l.ori r11, r0, 0 <- reloc offset */ -+ -+#define PLT_PIC_ENTRY_WORD0 0x85900000 /* l.lwz r12, 0(r16) <- index in got */ -+#define PLT_PIC_ENTRY_WORD1 0xa9600000 /* l.ori r11, r0, 0 <- reloc offset */ -+#define PLT_PIC_ENTRY_WORD2 0x44006000 /* l.jr r12 */ -+#define PLT_PIC_ENTRY_WORD3 0x15000000 /* l.nop */ -+#define PLT_PIC_ENTRY_WORD4 0x15000000 /* l.nop */ -+ -+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" -+ -+static reloc_howto_type or1k_elf_howto_table[] = -+{ -+ /* This reloc does nothing. */ -+ HOWTO (R_OR1K_NONE, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_NONE", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_32, -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_unsigned, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_32", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_16, -+ 0, /* rightshift */ -+ 1, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_unsigned, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_8, -+ 0, /* rightshift */ -+ 0, /* size (0 = byte, 1 = short, 2 = long) */ -+ 8, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_unsigned, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_8", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_LO_16_IN_INSN, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_LO_16_IN_INSN", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0x0000ffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_HI_16_IN_INSN, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_HI_16_IN_INSN", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0x0000ffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* A PC relative 26 bit relocation, right shifted by 2. */ -+ HOWTO (R_OR1K_INSN_REL_26, /* type */ -+ 2, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 26, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_INSN_REL_26", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0x03ffffff, /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* GNU extension to record C++ vtable hierarchy. */ -+ HOWTO (R_OR1K_GNU_VTINHERIT, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ NULL, /* special_function */ -+ "R_OR1K_GNU_VTINHERIT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* GNU extension to record C++ vtable member usage. */ -+ HOWTO (R_OR1K_GNU_VTENTRY, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ -+ "R_OR1K_GNU_VTENTRY", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_32_PCREL, -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_32_PCREL", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_16_PCREL, -+ 0, /* rightshift */ -+ 1, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_16_PCREL", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_8_PCREL, -+ 0, /* rightshift */ -+ 0, /* size (0 = byte, 1 = short, 2 = long) */ -+ 8, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_8_PCREL", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_GOTPC_HI16, /* Type. */ -+ 16, /* Rightshift. */ -+ 2, /* Size (0 = byte, 1 = short, 2 = long). */ -+ 16, /* Bitsize. */ -+ TRUE, /* PC_relative. */ -+ 0, /* Bitpos. */ -+ complain_overflow_dont, /* Complain on overflow. */ -+ bfd_elf_generic_reloc, /* Special Function. */ -+ "R_OR1K_GOTPC_HI16", /* Name. */ -+ FALSE, /* Partial Inplace. */ -+ 0, /* Source Mask. */ -+ 0xffff, /* Dest Mask. */ -+ TRUE), /* PC relative offset? */ -+ -+ HOWTO (R_OR1K_GOTPC_LO16, /* Type. */ -+ 0, /* Rightshift. */ -+ 2, /* Size (0 = byte, 1 = short, 2 = long). */ -+ 16, /* Bitsize. */ -+ TRUE, /* PC_relative. */ -+ 0, /* Bitpos. */ -+ complain_overflow_dont, /* Complain on overflow. */ -+ bfd_elf_generic_reloc, /* Special Function. */ -+ "R_OR1K_GOTPC_LO16", /* Name. */ -+ FALSE, /* Partial Inplace. */ -+ 0, /* Source Mask. */ -+ 0xffff, /* Dest Mask. */ -+ TRUE), /* PC relative offset? */ -+ -+ HOWTO (R_OR1K_GOT16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_GOT16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* A 26 bit PLT relocation. Shifted by 2. */ -+ HOWTO (R_OR1K_PLT26, /* Type. */ -+ 2, /* Rightshift. */ -+ 2, /* Size (0 = byte, 1 = short, 2 = long). */ -+ 26, /* Bitsize. */ -+ TRUE, /* PC_relative. */ -+ 0, /* Bitpos. */ -+ complain_overflow_dont, /* Complain on overflow. */ -+ bfd_elf_generic_reloc,/* Special Function. */ -+ "R_OR1K_PLT26", /* Name. */ -+ FALSE, /* Partial Inplace. */ -+ 0, /* Source Mask. */ -+ 0x03ffffff, /* Dest Mask. */ -+ TRUE), /* PC relative offset? */ -+ -+ HOWTO (R_OR1K_GOTOFF_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_GOTOFF_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_GOTOFF_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_GOTOFF_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_COPY, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_COPY", /* name */ -+ FALSE, /* partial_inplace */ -+ 0xffffffff, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_GLOB_DAT, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_GLOB_DAT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0xffffffff, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_JMP_SLOT, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_JMP_SLOT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0xffffffff, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_RELATIVE, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_RELATIVE", /* name */ -+ FALSE, /* partial_inplace */ -+ 0xffffffff, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_GD_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_GD_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_GD_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_GD_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LDM_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LDM_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LDM_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LDM_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LDO_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LDO_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LDO_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LDO_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_IE_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_IE_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_IE_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_IE_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LE_HI16, /* type */ -+ 16, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LE_HI16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_OR1K_TLS_LE_LO16, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_OR1K_TLS_LE_LO16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0xffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+}; -+ -+/* Map BFD reloc types to Or1k ELF reloc types. */ -+ -+struct or1k_reloc_map -+{ -+ bfd_reloc_code_real_type bfd_reloc_val; -+ unsigned int or1k_reloc_val; -+}; -+ -+static const struct or1k_reloc_map or1k_reloc_map[] = -+{ -+ { BFD_RELOC_NONE, R_OR1K_NONE }, -+ { BFD_RELOC_32, R_OR1K_32 }, -+ { BFD_RELOC_16, R_OR1K_16 }, -+ { BFD_RELOC_8, R_OR1K_8 }, -+ { BFD_RELOC_LO16, R_OR1K_LO_16_IN_INSN }, -+ { BFD_RELOC_HI16, R_OR1K_HI_16_IN_INSN }, -+ { BFD_RELOC_OR1K_REL_26, R_OR1K_INSN_REL_26 }, -+ { BFD_RELOC_VTABLE_ENTRY, R_OR1K_GNU_VTENTRY }, -+ { BFD_RELOC_VTABLE_INHERIT, R_OR1K_GNU_VTINHERIT }, -+ { BFD_RELOC_32_PCREL, R_OR1K_32_PCREL }, -+ { BFD_RELOC_16_PCREL, R_OR1K_16_PCREL }, -+ { BFD_RELOC_8_PCREL, R_OR1K_8_PCREL }, -+ { BFD_RELOC_OR1K_GOTPC_HI16, R_OR1K_GOTPC_HI16 }, -+ { BFD_RELOC_OR1K_GOTPC_LO16, R_OR1K_GOTPC_LO16 }, -+ { BFD_RELOC_OR1K_GOT16, R_OR1K_GOT16 }, -+ { BFD_RELOC_OR1K_PLT26, R_OR1K_PLT26 }, -+ { BFD_RELOC_OR1K_GOTOFF_HI16, R_OR1K_GOTOFF_HI16 }, -+ { BFD_RELOC_OR1K_GOTOFF_LO16, R_OR1K_GOTOFF_LO16 }, -+ { BFD_RELOC_OR1K_GLOB_DAT, R_OR1K_GLOB_DAT }, -+ { BFD_RELOC_OR1K_COPY, R_OR1K_COPY }, -+ { BFD_RELOC_OR1K_JMP_SLOT, R_OR1K_JMP_SLOT }, -+ { BFD_RELOC_OR1K_RELATIVE, R_OR1K_RELATIVE }, -+ { BFD_RELOC_OR1K_TLS_GD_HI16, R_OR1K_TLS_GD_HI16 }, -+ { BFD_RELOC_OR1K_TLS_GD_LO16, R_OR1K_TLS_GD_LO16 }, -+ { BFD_RELOC_OR1K_TLS_LDM_HI16, R_OR1K_TLS_LDM_HI16 }, -+ { BFD_RELOC_OR1K_TLS_LDM_LO16, R_OR1K_TLS_LDM_LO16 }, -+ { BFD_RELOC_OR1K_TLS_LDO_HI16, R_OR1K_TLS_LDO_HI16 }, -+ { BFD_RELOC_OR1K_TLS_LDO_LO16, R_OR1K_TLS_LDO_LO16 }, -+ { BFD_RELOC_OR1K_TLS_IE_HI16, R_OR1K_TLS_IE_HI16 }, -+ { BFD_RELOC_OR1K_TLS_IE_LO16, R_OR1K_TLS_IE_LO16 }, -+ { BFD_RELOC_OR1K_TLS_LE_HI16, R_OR1K_TLS_LE_HI16 }, -+ { BFD_RELOC_OR1K_TLS_LE_LO16, R_OR1K_TLS_LE_LO16 }, -+}; -+ -+/* The linker needs to keep track of the number of relocs that it -+ decides to copy as dynamic relocs in check_relocs for each symbol. -+ This is so that it can later discard them if they are found to be -+ unnecessary. We store the information in a field extending the -+ regular ELF linker hash table. */ -+ -+struct elf_or1k_dyn_relocs -+{ -+ struct elf_or1k_dyn_relocs *next; -+ -+ /* The input section of the reloc. */ -+ asection *sec; -+ -+ /* Total number of relocs copied for the input section. */ -+ bfd_size_type count; -+ -+ /* Number of pc-relative relocs copied for the input section. */ -+ bfd_size_type pc_count; -+}; -+ -+#define TLS_UNKNOWN 0 -+#define TLS_NONE 1 -+#define TLS_GD 2 -+#define TLS_LD 3 -+#define TLS_IE 4 -+#define TLS_LE 5 -+ -+/* ELF linker hash entry. */ -+struct elf_or1k_link_hash_entry -+{ -+ struct elf_link_hash_entry root; -+ -+ /* Track dynamic relocs copied for this symbol. */ -+ struct elf_or1k_dyn_relocs *dyn_relocs; -+ -+ /* Track type of TLS access. */ -+ unsigned char tls_type; -+}; -+ -+/* ELF object data. */ -+struct elf_or1k_obj_tdata -+{ -+ struct elf_obj_tdata root; -+ -+ /* tls_type for each local got entry. */ -+ unsigned char *local_tls_type; -+}; -+ -+#define elf_or1k_tdata(abfd) \ -+ ((struct elf_or1k_obj_tdata *) (abfd)->tdata.any) -+ -+#define elf_or1k_local_tls_type(abfd) \ -+ (elf_or1k_tdata (abfd)->local_tls_type) -+ -+/* ELF linker hash table. */ -+struct elf_or1k_link_hash_table -+{ -+ struct elf_link_hash_table root; -+ -+ /* Short-cuts to get to dynamic linker sections. */ -+ asection *sgot; -+ asection *sgotplt; -+ asection *srelgot; -+ asection *splt; -+ asection *srelplt; -+ asection *sdynbss; -+ asection *srelbss; -+ -+ /* Small local sym to section mapping cache. */ -+ struct sym_cache sym_sec; -+}; -+ -+/* Get the ELF linker hash table from a link_info structure. */ -+#define or1k_elf_hash_table(p) \ -+ (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ -+ == OR1K_ELF_DATA ? ((struct elf_or1k_link_hash_table *) ((p)->hash)) : NULL) -+ -+static bfd_boolean -+elf_or1k_mkobject (bfd *abfd) -+{ -+ return bfd_elf_allocate_object (abfd, sizeof (struct elf_or1k_obj_tdata), -+ OR1K_ELF_DATA); -+} -+ -+/* Create an entry in an or1k ELF linker hash table. */ -+ -+static struct bfd_hash_entry * -+or1k_elf_link_hash_newfunc (struct bfd_hash_entry *entry, -+ struct bfd_hash_table *table, -+ const char *string) -+{ -+ struct elf_or1k_link_hash_entry *ret = -+ (struct elf_or1k_link_hash_entry *) entry; -+ -+ /* Allocate the structure if it has not already been allocated by a -+ subclass. */ -+ if (ret == NULL) -+ ret = bfd_hash_allocate (table, -+ sizeof (struct elf_or1k_link_hash_entry)); -+ if (ret == NULL) -+ return NULL; -+ -+ /* Call the allocation method of the superclass. */ -+ ret = ((struct elf_or1k_link_hash_entry *) -+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, -+ table, string)); -+ if (ret != NULL) -+ { -+ struct elf_or1k_link_hash_entry *eh; -+ -+ eh = (struct elf_or1k_link_hash_entry *) ret; -+ eh->dyn_relocs = NULL; -+ eh->tls_type = TLS_UNKNOWN; -+ } -+ -+ return (struct bfd_hash_entry *) ret; -+} -+ -+/* Create an or1k ELF linker hash table. */ -+ -+static struct bfd_link_hash_table * -+or1k_elf_link_hash_table_create (bfd *abfd) -+{ -+ struct elf_or1k_link_hash_table *ret; -+ bfd_size_type amt = sizeof (struct elf_or1k_link_hash_table); -+ -+ ret = bfd_zmalloc (amt); -+ if (ret == NULL) -+ return NULL; -+ -+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, -+ or1k_elf_link_hash_newfunc, -+ sizeof (struct elf_or1k_link_hash_entry), -+ OR1K_ELF_DATA)) -+ { -+ free (ret); -+ return NULL; -+ } -+ -+ return &ret->root.root; -+} -+ -+static reloc_howto_type * -+or1k_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, -+ bfd_reloc_code_real_type code) -+{ -+ unsigned int i; -+ -+ for (i = ARRAY_SIZE (or1k_reloc_map); --i;) -+ if (or1k_reloc_map[i].bfd_reloc_val == code) -+ return & or1k_elf_howto_table[or1k_reloc_map[i].or1k_reloc_val]; -+ -+ return NULL; -+} -+ -+static reloc_howto_type * -+or1k_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, -+ const char *r_name) -+{ -+ unsigned int i; -+ -+ for (i = 0; -+ i < (sizeof (or1k_elf_howto_table) -+ / sizeof (or1k_elf_howto_table[0])); -+ i++) -+ if (or1k_elf_howto_table[i].name != NULL -+ && strcasecmp (or1k_elf_howto_table[i].name, r_name) == 0) -+ return &or1k_elf_howto_table[i]; -+ -+ return NULL; -+} -+ -+/* Set the howto pointer for an Or1k ELF reloc. */ -+ -+static void -+or1k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, -+ arelent * cache_ptr, -+ Elf_Internal_Rela * dst) -+{ -+ unsigned int r_type; -+ -+ r_type = ELF32_R_TYPE (dst->r_info); -+ BFD_ASSERT (r_type < (unsigned int) R_OR1K_max); -+ cache_ptr->howto = & or1k_elf_howto_table[r_type]; -+} -+ -+ -+/* Return the relocation value for @tpoff relocations.. */ -+static bfd_vma -+tpoff (struct bfd_link_info *info, bfd_vma address) -+{ -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) -+ return 0; -+ -+ /* The thread pointer on or1k stores the address after the TCB where -+ the data is, just compute the difference. No need to compensate -+ for the size of TCB. */ -+ return (address - elf_hash_table (info)->tls_sec->vma); -+} -+ -+/* Relocate an Or1k ELF section. -+ -+ The RELOCATE_SECTION function is called by the new ELF backend linker -+ to handle the relocations for a section. -+ -+ The relocs are always passed as Rela structures; if the section -+ actually uses Rel structures, the r_addend field will always be -+ zero. -+ -+ This function is responsible for adjusting the section contents as -+ necessary, and (if using Rela relocs and generating a relocatable -+ output file) adjusting the reloc addend as necessary. -+ -+ This function does not have to worry about setting the reloc -+ address or the reloc symbol index. -+ -+ LOCAL_SYMS is a pointer to the swapped in local symbols. -+ -+ LOCAL_SECTIONS is an array giving the section in the input file -+ corresponding to the st_shndx field of each local symbol. -+ -+ The global hash table entry for the global symbols can be found -+ via elf_sym_hashes (input_bfd). -+ -+ When generating relocatable output, this function must handle -+ STB_LOCAL/STT_SECTION symbols specially. The output symbol is -+ going to be the section symbol corresponding to the output -+ section, which means that the addend must be adjusted -+ accordingly. */ -+ -+static bfd_boolean -+or1k_elf_relocate_section (bfd *output_bfd, -+ struct bfd_link_info *info, -+ bfd *input_bfd, -+ asection *input_section, -+ bfd_byte *contents, -+ Elf_Internal_Rela *relocs, -+ Elf_Internal_Sym *local_syms, -+ asection **local_sections) -+{ -+ Elf_Internal_Shdr *symtab_hdr; -+ struct elf_link_hash_entry **sym_hashes; -+ Elf_Internal_Rela *rel; -+ Elf_Internal_Rela *relend; -+ struct elf_or1k_link_hash_table *htab = or1k_elf_hash_table (info); -+ bfd *dynobj; -+ asection *sreloc; -+ bfd_vma *local_got_offsets; -+ asection *sgot; -+ -+ if (htab == NULL) -+ return FALSE; -+ -+ dynobj = htab->root.dynobj; -+ local_got_offsets = elf_local_got_offsets (input_bfd); -+ -+ sreloc = elf_section_data (input_section)->sreloc; -+ -+ sgot = htab->sgot; -+ -+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; -+ sym_hashes = elf_sym_hashes (input_bfd); -+ relend = relocs + input_section->reloc_count; -+ -+ for (rel = relocs; rel < relend; rel++) -+ { -+ reloc_howto_type *howto; -+ unsigned long r_symndx; -+ Elf_Internal_Sym *sym; -+ asection *sec; -+ struct elf_link_hash_entry *h; -+ bfd_vma relocation; -+ bfd_reloc_status_type r; -+ const char *name = NULL; -+ int r_type; -+ -+ r_type = ELF32_R_TYPE (rel->r_info); -+ r_symndx = ELF32_R_SYM (rel->r_info); -+ -+ if (r_type == R_OR1K_GNU_VTINHERIT -+ || r_type == R_OR1K_GNU_VTENTRY) -+ continue; -+ -+ if (r_type < 0 || r_type >= (int) R_OR1K_max) -+ { -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ } -+ -+ howto = or1k_elf_howto_table + ELF32_R_TYPE (rel->r_info); -+ h = NULL; -+ sym = NULL; -+ sec = NULL; -+ -+ if (r_symndx < symtab_hdr->sh_info) -+ { -+ sym = local_syms + r_symndx; -+ sec = local_sections[r_symndx]; -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); -+ -+ name = bfd_elf_string_from_elf_section -+ (input_bfd, symtab_hdr->sh_link, sym->st_name); -+ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; -+ } -+ else -+ { -+ bfd_boolean unresolved_reloc, warned; -+ -+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, -+ r_symndx, symtab_hdr, sym_hashes, -+ h, sec, relocation, -+ unresolved_reloc, warned); -+ } -+ -+ if (sec != NULL && discarded_section (sec)) -+ RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, -+ rel, 1, relend, howto, 0, contents); -+ -+ if (info->relocatable) -+ continue; -+ -+ switch (howto->type) -+ { -+ case R_OR1K_PLT26: -+ { -+ if (htab->splt != NULL && h != NULL -+ && h->plt.offset != (bfd_vma) -1) -+ { -+ relocation = (htab->splt->output_section->vma -+ + htab->splt->output_offset -+ + h->plt.offset); -+ } -+ break; -+ } -+ -+ case R_OR1K_GOT16: -+ /* Relocation is to the entry for this symbol in the global -+ offset table. */ -+ BFD_ASSERT (sgot != NULL); -+ if (h != NULL) -+ { -+ bfd_boolean dyn; -+ bfd_vma off; -+ -+ off = h->got.offset; -+ BFD_ASSERT (off != (bfd_vma) -1); -+ -+ dyn = htab->root.dynamic_sections_created; -+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) -+ || (info->shared -+ && SYMBOL_REFERENCES_LOCAL (info, h))) -+ { -+ /* This is actually a static link, or it is a -+ -Bsymbolic link and the symbol is defined -+ locally, or the symbol was forced to be local -+ because of a version file. We must initialize -+ this entry in the global offset table. Since the -+ offset must always be a multiple of 4, we use the -+ least significant bit to record whether we have -+ initialized it already. -+ -+ When doing a dynamic link, we create a .rela.got -+ relocation entry to initialize the value. This -+ is done in the finish_dynamic_symbol routine. */ -+ if ((off & 1) != 0) -+ off &= ~1; -+ else -+ { -+ /* Write entry in GOT. */ -+ bfd_put_32 (output_bfd, relocation, -+ sgot->contents + off); -+ /* Mark GOT entry as having been written. */ -+ h->got.offset |= 1; -+ } -+ } -+ -+ relocation = sgot->output_offset + off; -+ } -+ else -+ { -+ bfd_vma off; -+ bfd_byte *loc; -+ -+ BFD_ASSERT (local_got_offsets != NULL -+ && local_got_offsets[r_symndx] != (bfd_vma) -1); -+ -+ /* Get offset into GOT table. */ -+ off = local_got_offsets[r_symndx]; -+ -+ /* The offset must always be a multiple of 4. We use -+ the least significant bit to record whether we have -+ already processed this entry. */ -+ if ((off & 1) != 0) -+ off &= ~1; -+ else -+ { -+ /* Write entry in GOT. */ -+ bfd_put_32 (output_bfd, relocation, sgot->contents + off); -+ if (info->shared) -+ { -+ asection *srelgot; -+ Elf_Internal_Rela outrel; -+ -+ /* We need to generate a R_OR1K_RELATIVE reloc -+ for the dynamic linker. */ -+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); -+ BFD_ASSERT (srelgot != NULL); -+ -+ outrel.r_offset = (sgot->output_section->vma -+ + sgot->output_offset -+ + off); -+ outrel.r_info = ELF32_R_INFO (0, R_OR1K_RELATIVE); -+ outrel.r_addend = relocation; -+ loc = srelgot->contents; -+ loc += srelgot->reloc_count * sizeof (Elf32_External_Rela); -+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,loc); -+ ++srelgot->reloc_count; -+ } -+ -+ local_got_offsets[r_symndx] |= 1; -+ } -+ relocation = sgot->output_offset + off; -+ } -+ -+ /* Addend should be zero. */ -+ if (rel->r_addend != 0) -+ (*_bfd_error_handler) -+ (_("internal error: addend should be zero for R_OR1K_GOT16")); -+ -+ break; -+ -+ case R_OR1K_GOTOFF_LO16: -+ case R_OR1K_GOTOFF_HI16: -+ /* Relocation is offset from GOT. */ -+ BFD_ASSERT (sgot != NULL); -+ relocation -= sgot->output_section->vma; -+ break; -+ -+ case R_OR1K_INSN_REL_26: -+ case R_OR1K_HI_16_IN_INSN: -+ case R_OR1K_LO_16_IN_INSN: -+ case R_OR1K_32: -+ /* R_OR1K_16? */ -+ { -+ /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols -+ from removed linkonce sections, or sections discarded by -+ a linker script. */ -+ if (r_symndx == STN_UNDEF -+ || (input_section->flags & SEC_ALLOC) == 0) -+ break; -+ -+ if ((info->shared -+ && (h == NULL -+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT -+ || h->root.type != bfd_link_hash_undefweak) -+ && (howto->type != R_OR1K_INSN_REL_26 -+ || !SYMBOL_CALLS_LOCAL (info, h))) -+ || (!info->shared -+ && h != NULL -+ && h->dynindx != -1 -+ && !h->non_got_ref -+ && ((h->def_dynamic -+ && !h->def_regular) -+ || h->root.type == bfd_link_hash_undefweak -+ || h->root.type == bfd_link_hash_undefined))) -+ { -+ Elf_Internal_Rela outrel; -+ bfd_byte *loc; -+ bfd_boolean skip; -+ -+ /* When generating a shared object, these relocations -+ are copied into the output file to be resolved at run -+ time. */ -+ -+ BFD_ASSERT (sreloc != NULL); -+ -+ skip = FALSE; -+ -+ outrel.r_offset = -+ _bfd_elf_section_offset (output_bfd, info, input_section, -+ rel->r_offset); -+ if (outrel.r_offset == (bfd_vma) -1) -+ skip = TRUE; -+ else if (outrel.r_offset == (bfd_vma) -2) -+ skip = TRUE; -+ outrel.r_offset += (input_section->output_section->vma -+ + input_section->output_offset); -+ -+ if (skip) -+ memset (&outrel, 0, sizeof outrel); -+ /* h->dynindx may be -1 if the symbol was marked to -+ become local. */ -+ else if (h != NULL -+ && ((! info->symbolic && h->dynindx != -1) -+ || !h->def_regular)) -+ { -+ BFD_ASSERT (h->dynindx != -1); -+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); -+ outrel.r_addend = rel->r_addend; -+ } -+ else -+ { -+ if (r_type == R_OR1K_32) -+ { -+ outrel.r_info = ELF32_R_INFO (0, R_OR1K_RELATIVE); -+ outrel.r_addend = relocation + rel->r_addend; -+ } -+ else -+ { -+ BFD_FAIL (); -+ (*_bfd_error_handler) -+ (_("%B: probably compiled without -fPIC?"), -+ input_bfd); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ } -+ } -+ -+ loc = sreloc->contents; -+ loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela); -+ bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); -+ break; -+ } -+ break; -+ } -+ -+ case R_OR1K_TLS_LDM_HI16: -+ case R_OR1K_TLS_LDM_LO16: -+ case R_OR1K_TLS_LDO_HI16: -+ case R_OR1K_TLS_LDO_LO16: -+ /* TODO: implement support for local dynamic. */ -+ BFD_FAIL (); -+ (*_bfd_error_handler) -+ (_("%B: support for local dynamic not implemented"), -+ input_bfd); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ -+ -+ case R_OR1K_TLS_GD_HI16: -+ case R_OR1K_TLS_GD_LO16: -+ case R_OR1K_TLS_IE_HI16: -+ case R_OR1K_TLS_IE_LO16: -+ { -+ bfd_vma gotoff; -+ Elf_Internal_Rela rela; -+ bfd_byte *loc; -+ int dynamic; -+ -+ sreloc = bfd_get_section_by_name (dynobj, ".rela.got"); -+ -+ /* Mark as TLS related GOT entry by setting -+ bit 2 as well as bit 1. */ -+ if (h != NULL) -+ { -+ gotoff = h->got.offset; -+ h->got.offset |= 3; -+ } -+ else -+ { -+ gotoff = local_got_offsets[r_symndx]; -+ local_got_offsets[r_symndx] |= 3; -+ } -+ -+ /* Only process the relocation once. */ -+ if (gotoff & 1) -+ { -+ relocation = sgot->output_offset + (gotoff & ~3); -+ break; -+ } -+ -+ BFD_ASSERT (elf_hash_table (info)->hgot == NULL -+ || elf_hash_table (info)->hgot->root.u.def.value == 0); -+ -+ /* Dynamic entries will require relocations. if we do not need -+ them we will just use the default R_OR1K_NONE and -+ not set anything. */ -+ dynamic = info->shared -+ || (sec && (sec->flags & SEC_ALLOC) != 0 -+ && h != NULL -+ && (h->root.type == bfd_link_hash_defweak || !h->def_regular)); -+ -+ /* Shared GD. */ -+ if (dynamic && (howto->type == R_OR1K_TLS_GD_HI16 -+ || howto->type == R_OR1K_TLS_GD_LO16)) -+ { -+ int i; -+ -+ /* Add DTPMOD and DTPOFF GOT and rela entries. */ -+ for (i = 0; i < 2; ++i) -+ { -+ rela.r_offset = sgot->output_section->vma + -+ sgot->output_offset + gotoff + i*4; -+ if (h != NULL && h->dynindx != -1) -+ { -+ rela.r_info = ELF32_R_INFO (h->dynindx, -+ (i == 0 ? R_OR1K_TLS_DTPMOD : R_OR1K_TLS_DTPOFF)); -+ rela.r_addend = 0; -+ } -+ else -+ { -+ rela.r_info = ELF32_R_INFO (0, -+ (i == 0 ? R_OR1K_TLS_DTPMOD : R_OR1K_TLS_DTPOFF)); -+ rela.r_addend = tpoff (info, relocation); -+ } -+ -+ loc = sreloc->contents; -+ loc += sreloc->reloc_count++ * -+ sizeof (Elf32_External_Rela); -+ -+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); -+ bfd_put_32 (output_bfd, 0, sgot->contents + gotoff + i*4); -+ } -+ } -+ /* Static GD. */ -+ else if (howto->type == R_OR1K_TLS_GD_HI16 -+ || howto->type == R_OR1K_TLS_GD_LO16) -+ { -+ bfd_put_32 (output_bfd, 1, sgot->contents + gotoff); -+ bfd_put_32 (output_bfd, tpoff (info, relocation), -+ sgot->contents + gotoff + 4); -+ } -+ /* Shared IE. */ -+ else if (dynamic) -+ { -+ /* Add TPOFF GOT and rela entries. */ -+ rela.r_offset = sgot->output_section->vma + -+ sgot->output_offset + gotoff; -+ if (h != NULL && h->dynindx != -1) -+ { -+ rela.r_info = ELF32_R_INFO (h->dynindx, R_OR1K_TLS_TPOFF); -+ rela.r_addend = 0; -+ } -+ else -+ { -+ rela.r_info = ELF32_R_INFO (0, R_OR1K_TLS_TPOFF); -+ rela.r_addend = tpoff (info, relocation); -+ } -+ -+ loc = sreloc->contents; -+ loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela); -+ -+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); -+ bfd_put_32 (output_bfd, 0, sgot->contents + gotoff); -+ } -+ /* Static IE. */ -+ else -+ { -+ bfd_put_32 (output_bfd, tpoff (info, relocation), -+ sgot->contents + gotoff); -+ } -+ relocation = sgot->output_offset + gotoff; -+ break; -+ } -+ case R_OR1K_TLS_LE_HI16: -+ case R_OR1K_TLS_LE_LO16: -+ -+ /* Relocation is offset from TP. */ -+ relocation = tpoff (info, relocation); -+ break; -+ -+ case R_OR1K_TLS_DTPMOD: -+ case R_OR1K_TLS_DTPOFF: -+ case R_OR1K_TLS_TPOFF: -+ /* These are resolved dynamically on load and shouldn't -+ be used as linker input. */ -+ BFD_FAIL (); -+ (*_bfd_error_handler) -+ (_("%B: will not resolve runtime TLS relocation"), -+ input_bfd); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ -+ default: -+ break; -+ } -+ r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, -+ rel->r_offset, relocation, rel->r_addend); -+ -+ if (r != bfd_reloc_ok) -+ { -+ const char *msg = NULL; -+ -+ switch (r) -+ { -+ case bfd_reloc_overflow: -+ r = info->callbacks->reloc_overflow -+ (info, (h ? &h->root : NULL), name, howto->name, -+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset); -+ break; -+ -+ case bfd_reloc_undefined: -+ r = info->callbacks->undefined_symbol -+ (info, name, input_bfd, input_section, rel->r_offset, TRUE); -+ break; -+ -+ case bfd_reloc_outofrange: -+ msg = _("internal error: out of range error"); -+ break; -+ -+ case bfd_reloc_notsupported: -+ msg = _("internal error: unsupported relocation error"); -+ break; -+ -+ case bfd_reloc_dangerous: -+ msg = _("internal error: dangerous relocation"); -+ break; -+ -+ default: -+ msg = _("internal error: unknown error"); -+ break; -+ } -+ -+ if (msg) -+ r = info->callbacks->warning -+ (info, msg, name, input_bfd, input_section, rel->r_offset); -+ -+ if (!r) -+ return FALSE; -+ } -+ } -+ -+ return TRUE; -+} -+ -+/* Return the section that should be marked against GC for a given -+ relocation. */ -+ -+static asection * -+or1k_elf_gc_mark_hook (asection *sec, -+ struct bfd_link_info *info, -+ Elf_Internal_Rela *rel, -+ struct elf_link_hash_entry *h, -+ Elf_Internal_Sym *sym) -+{ -+ if (h != NULL) -+ switch (ELF32_R_TYPE (rel->r_info)) -+ { -+ case R_OR1K_GNU_VTINHERIT: -+ case R_OR1K_GNU_VTENTRY: -+ return NULL; -+ } -+ -+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); -+} -+ -+static bfd_boolean -+or1k_elf_gc_sweep_hook (bfd *abfd, -+ struct bfd_link_info *info ATTRIBUTE_UNUSED, -+ asection *sec, -+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED) -+{ -+ /* Update the got entry reference counts for the section being removed. */ -+ Elf_Internal_Shdr *symtab_hdr; -+ struct elf_link_hash_entry **sym_hashes; -+ bfd_signed_vma *local_got_refcounts; -+ const Elf_Internal_Rela *rel, *relend; -+ -+ elf_section_data (sec)->local_dynrel = NULL; -+ -+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -+ sym_hashes = elf_sym_hashes (abfd); -+ local_got_refcounts = elf_local_got_refcounts (abfd); -+ -+ relend = relocs + sec->reloc_count; -+ for (rel = relocs; rel < relend; rel++) -+ { -+ unsigned long r_symndx; -+ struct elf_link_hash_entry *h = NULL; -+ -+ r_symndx = ELF32_R_SYM (rel->r_info); -+ if (r_symndx >= symtab_hdr->sh_info) -+ { -+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ } -+ -+ switch (ELF32_R_TYPE (rel->r_info)) -+ { -+ case R_OR1K_GOT16: -+ if (h != NULL) -+ { -+ if (h->got.refcount > 0) -+ h->got.refcount--; -+ } -+ else -+ { -+ if (local_got_refcounts && local_got_refcounts[r_symndx] > 0) -+ local_got_refcounts[r_symndx]--; -+ } -+ break; -+ -+ default: -+ break; -+ } -+ } -+ return TRUE; -+} -+ -+/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up -+ shortcuts to them in our hash table. */ -+ -+static bfd_boolean -+create_got_section (bfd *dynobj, struct bfd_link_info *info) -+{ -+ struct elf_or1k_link_hash_table *htab; -+ asection *s; -+ -+ /* This function may be called more than once. */ -+ s = bfd_get_section_by_name (dynobj, ".got"); -+ if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0) -+ return TRUE; -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ if (! _bfd_elf_create_got_section (dynobj, info)) -+ return FALSE; -+ -+ htab->sgot = bfd_get_section_by_name (dynobj, ".got"); -+ htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); -+ htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); -+ -+ if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot) -+ abort (); -+ -+ if (! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC -+ | SEC_LOAD -+ | SEC_HAS_CONTENTS -+ | SEC_IN_MEMORY -+ | SEC_LINKER_CREATED -+ | SEC_READONLY) -+ || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* Look through the relocs for a section during the first phase. */ -+ -+static bfd_boolean -+or1k_elf_check_relocs (bfd *abfd, -+ struct bfd_link_info *info, -+ asection *sec, -+ const Elf_Internal_Rela *relocs) -+{ -+ Elf_Internal_Shdr *symtab_hdr; -+ struct elf_link_hash_entry **sym_hashes; -+ const Elf_Internal_Rela *rel; -+ -+ const Elf_Internal_Rela *rel_end; -+ struct elf_or1k_link_hash_table *htab; -+ bfd *dynobj; -+ asection *sreloc = NULL; -+ -+ if (info->relocatable) -+ return TRUE; -+ -+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -+ sym_hashes = elf_sym_hashes (abfd); -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ dynobj = htab->root.dynobj; -+ -+ rel_end = relocs + sec->reloc_count; -+ for (rel = relocs; rel < rel_end; rel++) -+ { -+ struct elf_link_hash_entry *h; -+ unsigned long r_symndx; -+ unsigned char tls_type; -+ -+ r_symndx = ELF32_R_SYM (rel->r_info); -+ if (r_symndx < symtab_hdr->sh_info) -+ h = NULL; -+ else -+ { -+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ -+ /* PR15323, ref flags aren't set for references in the same -+ object. */ -+ h->root.non_ir_ref = 1; -+ } -+ -+ switch (ELF32_R_TYPE (rel->r_info)) -+ { -+ case R_OR1K_TLS_GD_HI16: -+ case R_OR1K_TLS_GD_LO16: -+ tls_type = TLS_GD; -+ break; -+ case R_OR1K_TLS_LDM_HI16: -+ case R_OR1K_TLS_LDM_LO16: -+ case R_OR1K_TLS_LDO_HI16: -+ case R_OR1K_TLS_LDO_LO16: -+ tls_type = TLS_LD; -+ break; -+ case R_OR1K_TLS_IE_HI16: -+ case R_OR1K_TLS_IE_LO16: -+ tls_type = TLS_IE; -+ break; -+ case R_OR1K_TLS_LE_HI16: -+ case R_OR1K_TLS_LE_LO16: -+ tls_type = TLS_LE; -+ break; -+ default: -+ tls_type = TLS_NONE; -+ } -+ -+ /* Record TLS type. */ -+ if (h != NULL) -+ ((struct elf_or1k_link_hash_entry *) h)->tls_type = tls_type; -+ else -+ { -+ unsigned char *local_tls_type; -+ -+ /* This is a TLS type record for a local symbol. */ -+ local_tls_type = (unsigned char *) elf_or1k_local_tls_type (abfd); -+ if (local_tls_type == NULL) -+ { -+ bfd_size_type size; -+ -+ size = symtab_hdr->sh_info; -+ local_tls_type = bfd_zalloc (abfd, size); -+ if (local_tls_type == NULL) -+ return FALSE; -+ elf_or1k_local_tls_type (abfd) = local_tls_type; -+ } -+ local_tls_type[r_symndx] = tls_type; -+ } -+ -+ switch (ELF32_R_TYPE (rel->r_info)) -+ { -+ /* This relocation describes the C++ object vtable hierarchy. -+ Reconstruct it for later use during GC. */ -+ case R_OR1K_GNU_VTINHERIT: -+ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) -+ return FALSE; -+ break; -+ -+ /* This relocation describes which C++ vtable entries are actually -+ used. Record for later use during GC. */ -+ case R_OR1K_GNU_VTENTRY: -+ BFD_ASSERT (h != NULL); -+ if (h != NULL -+ && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) -+ return FALSE; -+ break; -+ -+ /* This relocation requires .plt entry. */ -+ case R_OR1K_PLT26: -+ if (h != NULL) -+ { -+ h->needs_plt = 1; -+ h->plt.refcount += 1; -+ } -+ break; -+ -+ case R_OR1K_GOT16: -+ case R_OR1K_GOTOFF_HI16: -+ case R_OR1K_GOTOFF_LO16: -+ case R_OR1K_TLS_GD_HI16: -+ case R_OR1K_TLS_GD_LO16: -+ case R_OR1K_TLS_IE_HI16: -+ case R_OR1K_TLS_IE_LO16: -+ if (htab->sgot == NULL) -+ { -+ if (dynobj == NULL) -+ htab->root.dynobj = dynobj = abfd; -+ if (! create_got_section (dynobj, info)) -+ return FALSE; -+ } -+ -+ if (ELF32_R_TYPE (rel->r_info) != R_OR1K_GOTOFF_HI16 && -+ ELF32_R_TYPE (rel->r_info) != R_OR1K_GOTOFF_LO16) -+ { -+ if (h != NULL) -+ h->got.refcount += 1; -+ else -+ { -+ bfd_signed_vma *local_got_refcounts; -+ -+ /* This is a global offset table entry for a local symbol. */ -+ local_got_refcounts = elf_local_got_refcounts (abfd); -+ if (local_got_refcounts == NULL) -+ { -+ bfd_size_type size; -+ -+ size = symtab_hdr->sh_info; -+ size *= sizeof (bfd_signed_vma); -+ local_got_refcounts = bfd_zalloc (abfd, size); -+ if (local_got_refcounts == NULL) -+ return FALSE; -+ elf_local_got_refcounts (abfd) = local_got_refcounts; -+ } -+ local_got_refcounts[r_symndx] += 1; -+ } -+ } -+ break; -+ -+ case R_OR1K_INSN_REL_26: -+ case R_OR1K_HI_16_IN_INSN: -+ case R_OR1K_LO_16_IN_INSN: -+ case R_OR1K_32: -+ /* R_OR1K_16? */ -+ { -+ if (h != NULL && !info->shared) -+ { -+ /* We may need a copy reloc. */ -+ h->non_got_ref = 1; -+ -+ /* We may also need a .plt entry. */ -+ h->plt.refcount += 1; -+ if (ELF32_R_TYPE (rel->r_info) != R_OR1K_INSN_REL_26) -+ h->pointer_equality_needed = 1; -+ } -+ -+ /* If we are creating a shared library, and this is a reloc -+ against a global symbol, or a non PC relative reloc -+ against a local symbol, then we need to copy the reloc -+ into the shared library. However, if we are linking with -+ -Bsymbolic, we do not need to copy a reloc against a -+ global symbol which is defined in an object we are -+ including in the link (i.e., DEF_REGULAR is set). At -+ this point we have not seen all the input files, so it is -+ possible that DEF_REGULAR is not set now but will be set -+ later (it is never cleared). In case of a weak definition, -+ DEF_REGULAR may be cleared later by a strong definition in -+ a shared library. We account for that possibility below by -+ storing information in the relocs_copied field of the hash -+ table entry. A similar situation occurs when creating -+ shared libraries and symbol visibility changes render the -+ symbol local. -+ -+ If on the other hand, we are creating an executable, we -+ may need to keep relocations for symbols satisfied by a -+ dynamic library if we manage to avoid copy relocs for the -+ symbol. */ -+ -+ if ((info->shared -+ && (sec->flags & SEC_ALLOC) != 0 -+ && (ELF32_R_TYPE (rel->r_info) != R_OR1K_INSN_REL_26 -+ || (h != NULL -+ && (!SYMBOLIC_BIND (info, h) -+ || h->root.type == bfd_link_hash_defweak -+ || !h->def_regular)))) -+ || (!info->shared -+ && (sec->flags & SEC_ALLOC) != 0 -+ && h != NULL -+ && (h->root.type == bfd_link_hash_defweak -+ || !h->def_regular))) -+ { -+ struct elf_or1k_dyn_relocs *p; -+ struct elf_or1k_dyn_relocs **head; -+ -+ /* When creating a shared object, we must copy these -+ relocs into the output file. We create a reloc -+ section in dynobj and make room for the reloc. */ -+ if (sreloc == NULL) -+ { -+ const char *name; -+ unsigned int strndx = elf_elfheader (abfd)->e_shstrndx; -+ unsigned int shnam = _bfd_elf_single_rel_hdr (sec)->sh_name; -+ -+ name = bfd_elf_string_from_elf_section (abfd, strndx, shnam); -+ if (name == NULL) -+ return FALSE; -+ -+ if (strncmp (name, ".rela", 5) != 0 -+ || strcmp (bfd_get_section_name (abfd, sec), -+ name + 5) != 0) -+ { -+ (*_bfd_error_handler) -+ (_("%B: bad relocation section name `%s\'"), -+ abfd, name); -+ } -+ -+ if (htab->root.dynobj == NULL) -+ htab->root.dynobj = abfd; -+ dynobj = htab->root.dynobj; -+ -+ sreloc = bfd_get_section_by_name (dynobj, name); -+ if (sreloc == NULL) -+ { -+ sreloc = _bfd_elf_make_dynamic_reloc_section -+ (sec, dynobj, 2, abfd, /*rela?*/ TRUE); -+ -+ if (sreloc == NULL) -+ return FALSE; -+ } -+ elf_section_data (sec)->sreloc = sreloc; -+ } -+ -+ /* If this is a global symbol, we count the number of -+ relocations we need for this symbol. */ -+ if (h != NULL) -+ head = &((struct elf_or1k_link_hash_entry *) h)->dyn_relocs; -+ else -+ { -+ /* Track dynamic relocs needed for local syms too. -+ We really need local syms available to do this -+ easily. Oh well. */ -+ -+ asection *s; -+ Elf_Internal_Sym *isym; -+ void *vpp; -+ -+ isym = bfd_sym_from_r_symndx (&htab->sym_sec, -+ abfd, r_symndx); -+ if (isym == NULL) -+ return FALSE; -+ -+ s = bfd_section_from_elf_index (abfd, isym->st_shndx); -+ if (s == NULL) -+ return FALSE; -+ -+ vpp = &elf_section_data (s)->local_dynrel; -+ head = (struct elf_or1k_dyn_relocs **) vpp; -+ } -+ -+ p = *head; -+ if (p == NULL || p->sec != sec) -+ { -+ bfd_size_type amt = sizeof *p; -+ p = ((struct elf_or1k_dyn_relocs *) -+ bfd_alloc (htab->root.dynobj, amt)); -+ if (p == NULL) -+ return FALSE; -+ p->next = *head; -+ *head = p; -+ p->sec = sec; -+ p->count = 0; -+ p->pc_count = 0; -+ } -+ -+ p->count += 1; -+ if (ELF32_R_TYPE (rel->r_info) == R_OR1K_INSN_REL_26) -+ p->pc_count += 1; -+ } -+ } -+ break; -+ } -+ } -+ -+ return TRUE; -+} -+ -+/* Finish up the dynamic sections. */ -+ -+static bfd_boolean -+or1k_elf_finish_dynamic_sections (bfd *output_bfd, -+ struct bfd_link_info *info) -+{ -+ bfd *dynobj; -+ asection *sdyn, *sgot; -+ struct elf_or1k_link_hash_table *htab; -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ dynobj = htab->root.dynobj; -+ -+ sgot = htab->sgotplt; -+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); -+ -+ if (htab->root.dynamic_sections_created) -+ { -+ asection *splt; -+ Elf32_External_Dyn *dyncon, *dynconend; -+ -+ BFD_ASSERT (sgot != NULL && sdyn != NULL); -+ -+ dyncon = (Elf32_External_Dyn *) sdyn->contents; -+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size); -+ -+ for (; dyncon < dynconend; dyncon++) -+ { -+ Elf_Internal_Dyn dyn; -+ asection *s; -+ -+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); -+ -+ switch (dyn.d_tag) -+ { -+ default: -+ continue; -+ -+ case DT_PLTGOT: -+ s = htab->sgot->output_section; -+ BFD_ASSERT (s != NULL); -+ dyn.d_un.d_ptr = s->vma; -+ break; -+ -+ case DT_JMPREL: -+ s = htab->srelplt->output_section; -+ BFD_ASSERT (s != NULL); -+ dyn.d_un.d_ptr = s->vma; -+ break; -+ -+ case DT_PLTRELSZ: -+ s = htab->srelplt->output_section; -+ BFD_ASSERT (s != NULL); -+ dyn.d_un.d_val = s->size; -+ break; -+ -+ case DT_RELASZ: -+ /* My reading of the SVR4 ABI indicates that the -+ procedure linkage table relocs (DT_JMPREL) should be -+ included in the overall relocs (DT_RELA). This is -+ what Solaris does. However, UnixWare can not handle -+ that case. Therefore, we override the DT_RELASZ entry -+ here to make it not include the JMPREL relocs. Since -+ the linker script arranges for .rela.plt to follow all -+ other relocation sections, we don't have to worry -+ about changing the DT_RELA entry. */ -+ if (htab->srelplt != NULL) -+ { -+ /* FIXME: this calculation sometimes produces -+ wrong result, the problem is that the dyn.d_un.d_val -+ is not always correct, needs investigation why -+ that happens. In the meantime, reading the -+ ".rela.dyn" section by name seems to yield -+ correct result. -+ -+ s = htab->srelplt->output_section; -+ dyn.d_un.d_val -= s->size; -+ */ -+ -+ s = bfd_get_section_by_name (output_bfd, ".rela.dyn"); -+ dyn.d_un.d_val = s ? s->size : 0; -+ } -+ break; -+ } -+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); -+ } -+ -+ -+ /* Fill in the first entry in the procedure linkage table. */ -+ splt = htab->splt; -+ if (splt && splt->size > 0) -+ { -+ if (info->shared) -+ { -+ bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD0, -+ splt->contents); -+ bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD1, -+ splt->contents + 4); -+ bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD2, -+ splt->contents + 8); -+ bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD3, -+ splt->contents + 12); -+ bfd_put_32 (output_bfd, PLT0_PIC_ENTRY_WORD4, -+ splt->contents + 16); -+ } -+ else -+ { -+ unsigned long addr; -+ /* addr = .got + 4 */ -+ addr = sgot->output_section->vma + sgot->output_offset + 4; -+ bfd_put_32 (output_bfd, -+ PLT0_ENTRY_WORD0 | ((addr >> 16) & 0xffff), -+ splt->contents); -+ bfd_put_32 (output_bfd, -+ PLT0_ENTRY_WORD1 | (addr & 0xffff), -+ splt->contents + 4); -+ bfd_put_32 (output_bfd, PLT0_ENTRY_WORD2, splt->contents + 8); -+ bfd_put_32 (output_bfd, PLT0_ENTRY_WORD3, splt->contents + 12); -+ bfd_put_32 (output_bfd, PLT0_ENTRY_WORD4, splt->contents + 16); -+ } -+ -+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4; -+ } -+ } -+ -+ /* Set the first entry in the global offset table to the address of -+ the dynamic section. */ -+ if (sgot && sgot->size > 0) -+ { -+ if (sdyn == NULL) -+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents); -+ else -+ bfd_put_32 (output_bfd, -+ sdyn->output_section->vma + sdyn->output_offset, -+ sgot->contents); -+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; -+ } -+ -+ if (htab->sgot && htab->sgot->size > 0) -+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4; -+ -+ return TRUE; -+} -+ -+/* Finish up dynamic symbol handling. We set the contents of various -+ dynamic sections here. */ -+ -+static bfd_boolean -+or1k_elf_finish_dynamic_symbol (bfd *output_bfd, -+ struct bfd_link_info *info, -+ struct elf_link_hash_entry *h, -+ Elf_Internal_Sym *sym) -+{ -+ struct elf_or1k_link_hash_table *htab; -+ bfd_byte *loc; -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ if (h->plt.offset != (bfd_vma) -1) -+ { -+ asection *splt; -+ asection *sgot; -+ asection *srela; -+ -+ bfd_vma plt_index; -+ bfd_vma got_offset; -+ bfd_vma got_addr; -+ Elf_Internal_Rela rela; -+ -+ /* This symbol has an entry in the procedure linkage table. Set -+ it up. */ -+ BFD_ASSERT (h->dynindx != -1); -+ -+ splt = htab->splt; -+ sgot = htab->sgotplt; -+ srela = htab->srelplt; -+ BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL); -+ -+ /* Get the index in the procedure linkage table which -+ corresponds to this symbol. This is the index of this symbol -+ in all the symbols for which we are making plt entries. The -+ first entry in the procedure linkage table is reserved. */ -+ plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; -+ -+ /* Get the offset into the .got table of the entry that -+ corresponds to this function. Each .got entry is 4 bytes. -+ The first three are reserved. */ -+ got_offset = (plt_index + 3) * 4; -+ got_addr = got_offset; -+ -+ /* Fill in the entry in the procedure linkage table. */ -+ if (! info->shared) -+ { -+ got_addr += htab->sgotplt->output_section->vma -+ + htab->sgotplt->output_offset; -+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD0 | ((got_addr >> 16) & 0xffff), -+ splt->contents + h->plt.offset); -+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD1 | (got_addr & 0xffff), -+ splt->contents + h->plt.offset + 4); -+ bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2, -+ splt->contents + h->plt.offset + 8); -+ bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD3, -+ splt->contents + h->plt.offset + 12); -+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD4 -+ | plt_index * sizeof (Elf32_External_Rela), -+ splt->contents + h->plt.offset + 16); -+ } -+ else -+ { -+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD0 | (got_addr & 0xffff), -+ splt->contents + h->plt.offset); -+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD1 -+ | plt_index * sizeof (Elf32_External_Rela), -+ splt->contents + h->plt.offset + 4); -+ bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD2, -+ splt->contents + h->plt.offset + 8); -+ bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD3, -+ splt->contents + h->plt.offset + 12); -+ bfd_put_32 (output_bfd, (bfd_vma) PLT_PIC_ENTRY_WORD4, -+ splt->contents + h->plt.offset + 16); -+ } -+ -+ /* Fill in the entry in the global offset table. */ -+ bfd_put_32 (output_bfd, -+ (splt->output_section->vma -+ + splt->output_offset), /* Same offset. */ -+ sgot->contents + got_offset); -+ -+ /* Fill in the entry in the .rela.plt section. */ -+ rela.r_offset = (sgot->output_section->vma -+ + sgot->output_offset -+ + got_offset); -+ rela.r_info = ELF32_R_INFO (h->dynindx, R_OR1K_JMP_SLOT); -+ rela.r_addend = 0; -+ loc = srela->contents; -+ loc += plt_index * sizeof (Elf32_External_Rela); -+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); -+ -+ if (!h->def_regular) -+ { -+ /* Mark the symbol as undefined, rather than as defined in -+ the .plt section. Leave the value alone. */ -+ sym->st_shndx = SHN_UNDEF; -+ } -+ -+ } -+ -+ if (h->got.offset != (bfd_vma) -1 -+ && (h->got.offset & 2) == 0) /* Homemade TLS check. */ -+ { -+ asection *sgot; -+ asection *srela; -+ Elf_Internal_Rela rela; -+ -+ /* This symbol has an entry in the global offset table. Set it -+ up. */ -+ sgot = htab->sgot; -+ srela = htab->srelgot; -+ BFD_ASSERT (sgot != NULL && srela != NULL); -+ -+ rela.r_offset = (sgot->output_section->vma -+ + sgot->output_offset -+ + (h->got.offset &~ 1)); -+ -+ /* If this is a -Bsymbolic link, and the symbol is defined -+ locally, we just want to emit a RELATIVE reloc. Likewise if -+ the symbol was forced to be local because of a version file. -+ The entry in the global offset table will already have been -+ initialized in the relocate_section function. */ -+ if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h)) -+ { -+ rela.r_info = ELF32_R_INFO (0, R_OR1K_RELATIVE); -+ rela.r_addend = (h->root.u.def.value -+ + h->root.u.def.section->output_section->vma -+ + h->root.u.def.section->output_offset); -+ } -+ else -+ { -+ BFD_ASSERT ((h->got.offset & 1) == 0); -+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); -+ rela.r_info = ELF32_R_INFO (h->dynindx, R_OR1K_GLOB_DAT); -+ rela.r_addend = 0; -+ } -+ -+ loc = srela->contents; -+ loc += srela->reloc_count * sizeof (Elf32_External_Rela); -+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); -+ ++srela->reloc_count; -+ } -+ -+ if (h->needs_copy) -+ { -+ asection *s; -+ Elf_Internal_Rela rela; -+ -+ /* This symbols needs a copy reloc. Set it up. */ -+ BFD_ASSERT (h->dynindx != -1 -+ && (h->root.type == bfd_link_hash_defined -+ || h->root.type == bfd_link_hash_defweak)); -+ -+ s = bfd_get_section_by_name (h->root.u.def.section->owner, -+ ".rela.bss"); -+ BFD_ASSERT (s != NULL); -+ -+ rela.r_offset = (h->root.u.def.value -+ + h->root.u.def.section->output_section->vma -+ + h->root.u.def.section->output_offset); -+ rela.r_info = ELF32_R_INFO (h->dynindx, R_OR1K_COPY); -+ rela.r_addend = 0; -+ loc = s->contents; -+ loc += s->reloc_count * sizeof (Elf32_External_Rela); -+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); -+ ++s->reloc_count; -+ } -+ -+ /* Mark some specially defined symbols as absolute. */ -+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 -+ || h == htab->root.hgot) -+ sym->st_shndx = SHN_ABS; -+ -+ return TRUE; -+} -+ -+static enum elf_reloc_type_class -+or1k_elf_reloc_type_class (const Elf_Internal_Rela *rela) -+{ -+ switch ((int) ELF32_R_TYPE (rela->r_info)) -+ { -+ case R_OR1K_RELATIVE: return reloc_class_relative; -+ case R_OR1K_JMP_SLOT: return reloc_class_plt; -+ case R_OR1K_COPY: return reloc_class_copy; -+ default: return reloc_class_normal; -+ } -+} -+ -+/* Adjust a symbol defined by a dynamic object and referenced by a -+ regular object. The current definition is in some section of the -+ dynamic object, but we're not including those sections. We have to -+ change the definition to something the rest of the link can -+ understand. */ -+ -+static bfd_boolean -+or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, -+ struct elf_link_hash_entry *h) -+{ -+ struct elf_or1k_link_hash_table *htab; -+ struct elf_or1k_link_hash_entry *eh; -+ struct elf_or1k_dyn_relocs *p; -+ bfd *dynobj; -+ asection *s; -+ -+ dynobj = elf_hash_table (info)->dynobj; -+ -+ /* Make sure we know what is going on here. */ -+ BFD_ASSERT (dynobj != NULL -+ && (h->needs_plt -+ || h->type == STT_GNU_IFUNC -+ || h->u.weakdef != NULL -+ || (h->def_dynamic -+ && h->ref_regular -+ && !h->def_regular))); -+ -+ /* If this is a function, put it in the procedure linkage table. We -+ will fill in the contents of the procedure linkage table later, -+ when we know the address of the .got section. */ -+ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) -+ || h->needs_plt) -+ { -+ if (! info->shared -+ && !h->def_dynamic -+ && !h->ref_dynamic -+ && h->root.type != bfd_link_hash_undefweak -+ && h->root.type != bfd_link_hash_undefined) -+ { -+ /* This case can occur if we saw a PLT reloc in an input -+ file, but the symbol was never referred to by a dynamic -+ object. In such a case, we don't actually need to build -+ a procedure linkage table, and we can just do a PCREL -+ reloc instead. */ -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ -+ return TRUE; -+ } -+ else -+ h->plt.offset = (bfd_vma) -1; -+ -+ /* If this is a weak symbol, and there is a real definition, the -+ processor independent code will have arranged for us to see the -+ real definition first, and we can just use the same value. */ -+ if (h->u.weakdef != NULL) -+ { -+ BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined -+ || h->u.weakdef->root.type == bfd_link_hash_defweak); -+ h->root.u.def.section = h->u.weakdef->root.u.def.section; -+ h->root.u.def.value = h->u.weakdef->root.u.def.value; -+ return TRUE; -+ } -+ -+ /* This is a reference to a symbol defined by a dynamic object which -+ is not a function. */ -+ -+ /* If we are creating a shared library, we must presume that the -+ only references to the symbol are via the global offset table. -+ For such cases we need not do anything here; the relocations will -+ be handled correctly by relocate_section. */ -+ if (info->shared) -+ return TRUE; -+ -+ /* If there are no references to this symbol that do not use the -+ GOT, we don't need to generate a copy reloc. */ -+ if (!h->non_got_ref) -+ return TRUE; -+ -+ /* If -z nocopyreloc was given, we won't generate them either. */ -+ if (info->nocopyreloc) -+ { -+ h->non_got_ref = 0; -+ return TRUE; -+ } -+ -+ eh = (struct elf_or1k_link_hash_entry *) h; -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ s = p->sec->output_section; -+ if (s != NULL && (s->flags & (SEC_READONLY | SEC_HAS_CONTENTS)) != 0) -+ break; -+ } -+ -+ /* If we didn't find any dynamic relocs in sections which needs the -+ copy reloc, then we'll be keeping the dynamic relocs and avoiding -+ the copy reloc. */ -+ if (p == NULL) -+ { -+ h->non_got_ref = 0; -+ return TRUE; -+ } -+ -+ /* We must allocate the symbol in our .dynbss section, which will -+ become part of the .bss section of the executable. There will be -+ an entry for this symbol in the .dynsym section. The dynamic -+ object will contain position independent code, so all references -+ from the dynamic object to this symbol will go through the global -+ offset table. The dynamic linker will use the .dynsym entry to -+ determine the address it must put in the global offset table, so -+ both the dynamic object and the regular object will refer to the -+ same memory location for the variable. */ -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ s = htab->sdynbss; -+ BFD_ASSERT (s != NULL); -+ -+ /* We must generate a R_OR1K_COPY reloc to tell the dynamic linker -+ to copy the initial value out of the dynamic object and into the -+ runtime process image. We need to remember the offset into the -+ .rela.bss section we are going to use. */ -+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) -+ { -+ asection *srel; -+ -+ srel = htab->srelbss; -+ BFD_ASSERT (srel != NULL); -+ srel->size += sizeof (Elf32_External_Rela); -+ h->needs_copy = 1; -+ } -+ -+ return _bfd_elf_adjust_dynamic_copy (h, s); -+} -+ -+/* Allocate space in .plt, .got and associated reloc sections for -+ dynamic relocs. */ -+ -+static bfd_boolean -+allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) -+{ -+ struct bfd_link_info *info; -+ struct elf_or1k_link_hash_table *htab; -+ struct elf_or1k_link_hash_entry *eh; -+ struct elf_or1k_dyn_relocs *p; -+ -+ if (h->root.type == bfd_link_hash_indirect) -+ return TRUE; -+ -+ info = (struct bfd_link_info *) inf; -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ eh = (struct elf_or1k_link_hash_entry *) h; -+ -+ if (htab->root.dynamic_sections_created -+ && h->plt.refcount > 0) -+ { -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h)) -+ { -+ asection *s = htab->splt; -+ -+ /* If this is the first .plt entry, make room for the special -+ first entry. */ -+ if (s->size == 0) -+ s->size = PLT_ENTRY_SIZE; -+ -+ h->plt.offset = s->size; -+ -+ /* If this symbol is not defined in a regular file, and we are -+ not generating a shared library, then set the symbol to this -+ location in the .plt. This is required to make function -+ pointers compare as equal between the normal executable and -+ the shared library. */ -+ if (! info->shared -+ && !h->def_regular) -+ { -+ h->root.u.def.section = s; -+ h->root.u.def.value = h->plt.offset; -+ } -+ -+ /* Make room for this entry. */ -+ s->size += PLT_ENTRY_SIZE; -+ -+ /* We also need to make an entry in the .got.plt section, which -+ will be placed in the .got section by the linker script. */ -+ htab->sgotplt->size += 4; -+ -+ /* We also need to make an entry in the .rel.plt section. */ -+ htab->srelplt->size += sizeof (Elf32_External_Rela); -+ } -+ else -+ { -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ } -+ else -+ { -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ -+ if (h->got.refcount > 0) -+ { -+ asection *s; -+ bfd_boolean dyn; -+ unsigned char tls_type; -+ -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ s = htab->sgot; -+ -+ h->got.offset = s->size; -+ -+ tls_type = ((struct elf_or1k_link_hash_entry *) h)->tls_type; -+ -+ /* TLS GD requires two GOT and two relocs. */ -+ if (tls_type == TLS_GD) -+ s->size += 8; -+ else -+ s->size += 4; -+ dyn = htab->root.dynamic_sections_created; -+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)) -+ { -+ if (tls_type == TLS_GD) -+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rela); -+ else -+ htab->srelgot->size += sizeof (Elf32_External_Rela); -+ } -+ } -+ else -+ h->got.offset = (bfd_vma) -1; -+ -+ if (eh->dyn_relocs == NULL) -+ return TRUE; -+ -+ /* In the shared -Bsymbolic case, discard space allocated for -+ dynamic pc-relative relocs against symbols which turn out to be -+ defined in regular objects. For the normal shared case, discard -+ space for pc-relative relocs that have become local due to symbol -+ visibility changes. */ -+ -+ if (info->shared) -+ { -+ if (SYMBOL_CALLS_LOCAL (info, h)) -+ { -+ struct elf_or1k_dyn_relocs **pp; -+ -+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL;) -+ { -+ p->count -= p->pc_count; -+ p->pc_count = 0; -+ if (p->count == 0) -+ *pp = p->next; -+ else -+ pp = &p->next; -+ } -+ } -+ -+ /* Also discard relocs on undefined weak syms with non-default -+ visibility. */ -+ if (eh->dyn_relocs != NULL -+ && h->root.type == bfd_link_hash_undefweak) -+ { -+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) -+ eh->dyn_relocs = NULL; -+ -+ /* Make sure undefined weak symbols are output as a dynamic -+ symbol in PIEs. */ -+ else if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ } -+ } -+ else -+ { -+ /* For the non-shared case, discard space for relocs against -+ symbols which turn out to need copy relocs or are not -+ dynamic. */ -+ -+ if (!h->non_got_ref -+ && ((h->def_dynamic -+ && !h->def_regular) -+ || (htab->root.dynamic_sections_created -+ && (h->root.type == bfd_link_hash_undefweak -+ || h->root.type == bfd_link_hash_undefined)))) -+ { -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ /* If that succeeded, we know we'll be keeping all the -+ relocs. */ -+ if (h->dynindx != -1) -+ goto keep; -+ } -+ -+ eh->dyn_relocs = NULL; -+ -+ keep: ; -+ } -+ -+ /* Finally, allocate space. */ -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ asection *sreloc = elf_section_data (p->sec)->sreloc; -+ sreloc->size += p->count * sizeof (Elf32_External_Rela); -+ } -+ -+ return TRUE; -+} -+ -+/* Find any dynamic relocs that apply to read-only sections. */ -+ -+static bfd_boolean -+readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf) -+{ -+ struct elf_or1k_link_hash_entry *eh; -+ struct elf_or1k_dyn_relocs *p; -+ -+ eh = (struct elf_or1k_link_hash_entry *) h; -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ asection *s = p->sec->output_section; -+ -+ if (s != NULL && (s->flags & SEC_READONLY) != 0) -+ { -+ struct bfd_link_info *info = (struct bfd_link_info *) inf; -+ -+ info->flags |= DF_TEXTREL; -+ -+ /* Not an error, just cut short the traversal. */ -+ return FALSE; -+ } -+ } -+ return TRUE; -+} -+ -+/* Set the sizes of the dynamic sections. */ -+ -+static bfd_boolean -+or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) -+{ -+ struct elf_or1k_link_hash_table *htab; -+ bfd *dynobj; -+ asection *s; -+ bfd_boolean relocs; -+ bfd *ibfd; -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ dynobj = htab->root.dynobj; -+ BFD_ASSERT (dynobj != NULL); -+ -+ if (htab->root.dynamic_sections_created) -+ { -+ /* Set the contents of the .interp section to the interpreter. */ -+ if (info->executable) -+ { -+ s = bfd_get_section_by_name (dynobj, ".interp"); -+ BFD_ASSERT (s != NULL); -+ s->size = sizeof ELF_DYNAMIC_INTERPRETER; -+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; -+ } -+ } -+ -+ /* Set up .got offsets for local syms, and space for local dynamic -+ relocs. */ -+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) -+ { -+ bfd_signed_vma *local_got; -+ bfd_signed_vma *end_local_got; -+ bfd_size_type locsymcount; -+ Elf_Internal_Shdr *symtab_hdr; -+ unsigned char *local_tls_type; -+ asection *srel; -+ -+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) -+ continue; -+ -+ for (s = ibfd->sections; s != NULL; s = s->next) -+ { -+ struct elf_or1k_dyn_relocs *p; -+ -+ for (p = ((struct elf_or1k_dyn_relocs *) -+ elf_section_data (s)->local_dynrel); -+ p != NULL; -+ p = p->next) -+ { -+ if (! bfd_is_abs_section (p->sec) -+ && bfd_is_abs_section (p->sec->output_section)) -+ { -+ /* Input section has been discarded, either because -+ it is a copy of a linkonce section or due to -+ linker script /DISCARD/, so we'll be discarding -+ the relocs too. */ -+ } -+ else if (p->count != 0) -+ { -+ srel = elf_section_data (p->sec)->sreloc; -+ srel->size += p->count * sizeof (Elf32_External_Rela); -+ if ((p->sec->output_section->flags & SEC_READONLY) != 0) -+ info->flags |= DF_TEXTREL; -+ } -+ } -+ } -+ -+ local_got = elf_local_got_refcounts (ibfd); -+ if (!local_got) -+ continue; -+ -+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; -+ locsymcount = symtab_hdr->sh_info; -+ end_local_got = local_got + locsymcount; -+ s = htab->sgot; -+ srel = htab->srelgot; -+ local_tls_type = (unsigned char *) elf_or1k_local_tls_type (ibfd); -+ for (; local_got < end_local_got; ++local_got) -+ { -+ if (*local_got > 0) -+ { -+ *local_got = s->size; -+ -+ /* TLS GD requires two GOT and two relocs. */ -+ if (local_tls_type != NULL && *local_tls_type == TLS_GD) -+ s->size += 8; -+ else -+ s->size += 4; -+ if (info->shared) -+ { -+ if (local_tls_type != NULL && *local_tls_type == TLS_GD) -+ srel->size += 2 * sizeof (Elf32_External_Rela); -+ else -+ srel->size += sizeof (Elf32_External_Rela); -+ } -+ } -+ else -+ -+ *local_got = (bfd_vma) -1; -+ -+ if (local_tls_type) -+ ++local_tls_type; -+ } -+ } -+ -+ /* Allocate global sym .plt and .got entries, and space for global -+ sym dynamic relocs. */ -+ elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info); -+ -+ /* We now have determined the sizes of the various dynamic sections. -+ Allocate memory for them. */ -+ relocs = FALSE; -+ for (s = dynobj->sections; s != NULL; s = s->next) -+ { -+ if ((s->flags & SEC_LINKER_CREATED) == 0) -+ continue; -+ -+ if (s == htab->splt -+ || s == htab->sgot -+ || s == htab->sgotplt -+ || s == htab->sdynbss) -+ { -+ /* Strip this section if we don't need it; see the -+ comment below. */ -+ } -+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela")) -+ { -+ if (s->size != 0 && s != htab->srelplt) -+ relocs = TRUE; -+ -+ /* We use the reloc_count field as a counter if we need -+ to copy relocs into the output file. */ -+ s->reloc_count = 0; -+ } -+ else -+ /* It's not one of our sections, so don't allocate space. */ -+ continue; -+ -+ if (s->size == 0) -+ { -+ /* If we don't need this section, strip it from the -+ output file. This is mostly to handle .rela.bss and -+ .rela.plt. We must create both sections in -+ create_dynamic_sections, because they must be created -+ before the linker maps input sections to output -+ sections. The linker does that before -+ adjust_dynamic_symbol is called, and it is that -+ function which decides whether anything needs to go -+ into these sections. */ -+ s->flags |= SEC_EXCLUDE; -+ continue; -+ } -+ -+ if ((s->flags & SEC_HAS_CONTENTS) == 0) -+ continue; -+ -+ /* Allocate memory for the section contents. We use bfd_zalloc -+ here in case unused entries are not reclaimed before the -+ section's contents are written out. This should not happen, -+ but this way if it does, we get a R_OR1K_NONE reloc instead -+ of garbage. */ -+ s->contents = bfd_zalloc (dynobj, s->size); -+ -+ if (s->contents == NULL) -+ return FALSE; -+ } -+ -+ if (htab->root.dynamic_sections_created) -+ { -+ /* Add some entries to the .dynamic section. We fill in the -+ values later, in or1k_elf_finish_dynamic_sections, but we -+ must add the entries now so that we get the correct size for -+ the .dynamic section. The DT_DEBUG entry is filled in by the -+ dynamic linker and used by the debugger. */ -+#define add_dynamic_entry(TAG, VAL) \ -+ _bfd_elf_add_dynamic_entry (info, TAG, VAL) -+ -+ if (info->executable) -+ { -+ if (! add_dynamic_entry (DT_DEBUG, 0)) -+ return FALSE; -+ } -+ -+ if (htab->splt->size != 0) -+ { -+ if (! add_dynamic_entry (DT_PLTGOT, 0) -+ || ! add_dynamic_entry (DT_PLTRELSZ, 0) -+ || ! add_dynamic_entry (DT_PLTREL, DT_RELA) -+ || ! add_dynamic_entry (DT_JMPREL, 0)) -+ return FALSE; -+ } -+ -+ if (relocs) -+ { -+ if (! add_dynamic_entry (DT_RELA, 0) -+ || ! add_dynamic_entry (DT_RELASZ, 0) -+ || ! add_dynamic_entry (DT_RELAENT, -+ sizeof (Elf32_External_Rela))) -+ return FALSE; -+ -+ /* If any dynamic relocs apply to a read-only section, -+ then we need a DT_TEXTREL entry. */ -+ if ((info->flags & DF_TEXTREL) == 0) -+ elf_link_hash_traverse (&htab->root, readonly_dynrelocs, -+ info); -+ -+ if ((info->flags & DF_TEXTREL) != 0) -+ { -+ if (! add_dynamic_entry (DT_TEXTREL, 0)) -+ return FALSE; -+ } -+ } -+ } -+ -+#undef add_dynamic_entry -+ return TRUE; -+} -+ -+/* Create dynamic sections when linking against a dynamic object. */ -+ -+static bfd_boolean -+or1k_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) -+{ -+ struct elf_or1k_link_hash_table *htab; -+ -+ htab = or1k_elf_hash_table (info); -+ if (htab == NULL) -+ return FALSE; -+ -+ if (!htab->sgot && !create_got_section (dynobj, info)) -+ return FALSE; -+ -+ if (!_bfd_elf_create_dynamic_sections (dynobj, info)) -+ return FALSE; -+ -+ htab->splt = bfd_get_section_by_name (dynobj, ".plt"); -+ htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt"); -+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss"); -+ if (!info->shared) -+ htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss"); -+ -+ if (!htab->splt || !htab->srelplt || !htab->sdynbss -+ || (!info->shared && !htab->srelbss)) -+ abort (); -+ -+ return TRUE; -+} -+ -+/* Copy the extra info we tack onto an elf_link_hash_entry. */ -+ -+static void -+or1k_elf_copy_indirect_symbol (struct bfd_link_info *info, -+ struct elf_link_hash_entry *dir, -+ struct elf_link_hash_entry *ind) -+{ -+ struct elf_or1k_link_hash_entry * edir; -+ struct elf_or1k_link_hash_entry * eind; -+ -+ edir = (struct elf_or1k_link_hash_entry *) dir; -+ eind = (struct elf_or1k_link_hash_entry *) ind; -+ -+ if (eind->dyn_relocs != NULL) -+ { -+ if (edir->dyn_relocs != NULL) -+ { -+ struct elf_or1k_dyn_relocs **pp; -+ struct elf_or1k_dyn_relocs *p; -+ -+ /* Add reloc counts against the indirect sym to the direct sym -+ list. Merge any entries against the same section. */ -+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL;) -+ { -+ struct elf_or1k_dyn_relocs *q; -+ -+ for (q = edir->dyn_relocs; q != NULL; q = q->next) -+ if (q->sec == p->sec) -+ { -+ q->pc_count += p->pc_count; -+ q->count += p->count; -+ *pp = p->next; -+ break; -+ } -+ if (q == NULL) -+ pp = &p->next; -+ } -+ *pp = edir->dyn_relocs; -+ } -+ -+ edir->dyn_relocs = eind->dyn_relocs; -+ eind->dyn_relocs = NULL; -+ } -+ -+ if (ind->root.type == bfd_link_hash_indirect) -+ { -+ if (dir->got.refcount <= 0) -+ { -+ edir->tls_type = eind->tls_type; -+ eind->tls_type = TLS_UNKNOWN; -+ } -+ } -+ -+ _bfd_elf_link_hash_copy_indirect (info, dir, ind); -+} -+ -+/* Set the right machine number. */ -+ -+static bfd_boolean -+or1k_elf_object_p (bfd *abfd) -+{ -+ unsigned long mach = bfd_mach_or1k; -+ -+ if (elf_elfheader (abfd)->e_flags & EF_OR1K_NODELAY) -+ mach = bfd_mach_or1knd; -+ -+ return bfd_default_set_arch_mach (abfd, bfd_arch_or1k, mach); -+} -+ -+/* Store the machine number in the flags field. */ -+ -+static void -+or1k_elf_final_write_processing (bfd *abfd, -+ bfd_boolean linker ATTRIBUTE_UNUSED) -+{ -+ switch (bfd_get_mach (abfd)) -+ { -+ default: -+ case bfd_mach_or1k: -+ break; -+ case bfd_mach_or1knd: -+ elf_elfheader (abfd)->e_flags |= EF_OR1K_NODELAY; -+ break; -+ } -+} -+ -+static bfd_boolean -+or1k_elf_set_private_flags (bfd *abfd, flagword flags) -+{ -+ BFD_ASSERT (!elf_flags_init (abfd) -+ || elf_elfheader (abfd)->e_flags == flags); -+ -+ elf_elfheader (abfd)->e_flags = flags; -+ elf_flags_init (abfd) = TRUE; -+ return TRUE; -+} -+ -+/* Make sure all input files are consistent with respect to -+ EF_OR1K_NODELAY flag setting. */ -+ -+static bfd_boolean -+elf32_or1k_merge_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ flagword out_flags; -+ flagword in_flags; -+ -+ in_flags = elf_elfheader (ibfd)->e_flags; -+ out_flags = elf_elfheader (obfd)->e_flags; -+ -+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour -+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour) -+ return TRUE; -+ -+ if (!elf_flags_init (obfd)) -+ { -+ elf_flags_init (obfd) = TRUE; -+ elf_elfheader (obfd)->e_flags = in_flags; -+ -+ return TRUE; -+ } -+ -+ if (in_flags == out_flags) -+ return TRUE; -+ -+ if ((in_flags & EF_OR1K_NODELAY) != (out_flags & EF_OR1K_NODELAY)) -+ { -+ (*_bfd_error_handler) -+ (_("%B: EF_OR1K_NODELAY flag mismatch with previous modules"), ibfd); -+ -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+ } -+ -+ return TRUE; -+ -+} -+ -+#define ELF_ARCH bfd_arch_or1k -+#define ELF_MACHINE_CODE EM_OR1K -+#define ELF_TARGET_ID OR1K_ELF_DATA -+#define ELF_MAXPAGESIZE 0x2000 -+ -+#define TARGET_BIG_SYM bfd_elf32_or1k_big_vec -+#define TARGET_BIG_NAME "elf32-or1k" -+ -+#define elf_info_to_howto_rel NULL -+#define elf_info_to_howto or1k_info_to_howto_rela -+#define elf_backend_relocate_section or1k_elf_relocate_section -+#define elf_backend_gc_mark_hook or1k_elf_gc_mark_hook -+#define elf_backend_gc_sweep_hook or1k_elf_gc_sweep_hook -+#define elf_backend_check_relocs or1k_elf_check_relocs -+#define elf_backend_reloc_type_class or1k_elf_reloc_type_class -+#define elf_backend_can_gc_sections 1 -+#define elf_backend_rela_normal 1 -+ -+#define bfd_elf32_mkobject elf_or1k_mkobject -+ -+#define bfd_elf32_bfd_merge_private_bfd_data elf32_or1k_merge_private_bfd_data -+#define bfd_elf32_bfd_set_private_flags or1k_elf_set_private_flags -+#define bfd_elf32_bfd_reloc_type_lookup or1k_reloc_type_lookup -+#define bfd_elf32_bfd_reloc_name_lookup or1k_reloc_name_lookup -+ -+#define elf_backend_object_p or1k_elf_object_p -+#define elf_backend_final_write_processing or1k_elf_final_write_processing -+#define elf_backend_can_refcount 1 -+ -+#define elf_backend_plt_readonly 1 -+#define elf_backend_want_got_plt 1 -+#define elf_backend_want_plt_sym 0 -+#define elf_backend_got_header_size 12 -+#define bfd_elf32_bfd_link_hash_table_create or1k_elf_link_hash_table_create -+#define elf_backend_copy_indirect_symbol or1k_elf_copy_indirect_symbol -+#define elf_backend_create_dynamic_sections or1k_elf_create_dynamic_sections -+#define elf_backend_finish_dynamic_sections or1k_elf_finish_dynamic_sections -+#define elf_backend_size_dynamic_sections or1k_elf_size_dynamic_sections -+#define elf_backend_adjust_dynamic_symbol or1k_elf_adjust_dynamic_symbol -+#define elf_backend_finish_dynamic_symbol or1k_elf_finish_dynamic_symbol -+ -+#include "elf32-target.h" -diff -rNU3 dist.orig/bfd/elf32-or32.c dist/bfd/elf32-or32.c ---- dist.orig/bfd/elf32-or32.c 2007-07-03 16:26:41.000000000 +0200 -+++ dist/bfd/elf32-or32.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,514 +0,0 @@ --/* OR32-specific support for 32-bit ELF -- Copyright 2002, 2004, 2005, 2007 Free Software Foundation, Inc. -- Contributed by Ivan Guzvinec -- -- 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 "elf-bfd.h" --#include "elf/or32.h" --#include "libiberty.h" -- --/* Try to minimize the amount of space occupied by relocation tables -- on the ROM (not that the ROM won't be swamped by other ELF overhead). */ --#define USE_REL 1 -- --/* Set the right machine number for an OR32 ELF file. */ -- --static bfd_boolean --or32_elf_object_p (bfd *abfd) --{ -- (void) bfd_default_set_arch_mach (abfd, bfd_arch_or32, 0); -- return TRUE; --} -- --/* The final processing done just before writing out an OR32 ELF object file. -- This gets the OR32 architecture right based on the machine number. */ -- --static void --or32_elf_final_write_processing (bfd *abfd, -- bfd_boolean linker ATTRIBUTE_UNUSED) --{ -- elf_elfheader (abfd)->e_flags &=~ EF_OR32_MACH; --} -- --static bfd_reloc_status_type --or32_elf_32_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) -- { -- unsigned long insn; -- bfd_size_type addr = reloc_entry->address; -- -- reloc_entry->address += input_section->output_offset; -- -- insn = bfd_get_32 (abfd, (bfd_byte *) data + addr); -- insn += symbol->section->output_section->vma; -- insn += symbol->section->output_offset; -- insn += symbol->value; -- bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); -- -- return bfd_reloc_ok; -- } -- -- return bfd_reloc_continue; --} -- --static bfd_reloc_status_type --or32_elf_16_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) -- { -- unsigned short insn; -- bfd_size_type addr = reloc_entry->address; -- -- reloc_entry->address += input_section->output_offset; -- -- insn = bfd_get_16 (abfd, (bfd_byte *) data + addr); -- insn += symbol->section->output_section->vma; -- insn += symbol->section->output_offset; -- insn += symbol->value; -- bfd_put_16 (abfd, insn, (bfd_byte *) data + addr); -- -- return bfd_reloc_ok; -- } -- -- return bfd_reloc_continue; --} -- --static bfd_reloc_status_type --or32_elf_8_reloc (bfd *abfd ATTRIBUTE_UNUSED, -- arelent *reloc_entry, -- asymbol *symbol, -- void * data, -- asection *input_section, -- bfd *output_bfd, -- char **error_message ATTRIBUTE_UNUSED) --{ -- if (output_bfd != NULL) -- { -- unsigned char insn; -- bfd_size_type addr = reloc_entry->address; -- -- reloc_entry->address += input_section->output_offset; -- -- insn = bfd_get_8 (abfd, (bfd_byte *) data + addr); -- insn += symbol->section->output_section->vma; -- insn += symbol->section->output_offset; -- insn += symbol->value; -- bfd_put_8 (abfd, insn, (bfd_byte *) data + addr); -- -- return bfd_reloc_ok; -- } -- -- return bfd_reloc_continue; --} -- --/* Do a R_OR32_CONSTH relocation. This has to be done in combination -- with a R_OR32_CONST reloc, because there is a carry from the LO16 to -- the HI16. Here we just save the information we need; we do the -- actual relocation when we see the LO16. OR32 ELF requires that the -- LO16 immediately follow the HI16. As a GNU extension, we permit an -- arbitrary number of HI16 relocs to be associated with a single LO16 -- reloc. This extension permits gcc to output the HI and LO relocs -- itself. This code is copied from the elf32-mips.c. */ -- --struct or32_consth --{ -- struct or32_consth *next; -- bfd_byte *addr; -- bfd_vma addend; --}; -- --/* FIXME: This should not be a static variable. */ -- --static struct or32_consth *or32_consth_list; -- --static bfd_reloc_status_type --or32_elf_consth_reloc (bfd *abfd ATTRIBUTE_UNUSED, -- arelent *reloc_entry, -- asymbol *symbol, -- void * data, -- asection *input_section, -- bfd *output_bfd, -- char **error_message ATTRIBUTE_UNUSED) --{ -- bfd_reloc_status_type ret; -- bfd_vma relocation; -- struct or32_consth *n; -- -- ret = bfd_reloc_ok; -- -- if (bfd_is_und_section (symbol->section) -- && output_bfd == NULL) -- ret = bfd_reloc_undefined; -- -- if (bfd_is_com_section (symbol->section)) -- relocation = 0; -- else -- relocation = symbol->value; -- -- relocation += symbol->section->output_section->vma; -- relocation += symbol->section->output_offset; -- relocation += reloc_entry->addend; -- -- if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) -- return bfd_reloc_outofrange; -- -- /* Save the information, and let LO16 do the actual relocation. */ -- n = bfd_malloc (sizeof *n); -- if (n == NULL) -- return bfd_reloc_outofrange; -- n->addr = (bfd_byte *) data + reloc_entry->address; -- n->addend = relocation; -- n->next = or32_consth_list; -- or32_consth_list = n; -- -- if (output_bfd != NULL) -- reloc_entry->address += input_section->output_offset; -- -- return ret; --} -- --/* Do a R_OR32_CONST relocation. This is a straightforward 16 bit -- inplace relocation; this function exists in order to do the -- R_OR32_CONSTH relocation described above. */ -- --static bfd_reloc_status_type --or32_elf_const_reloc (bfd *abfd, -- arelent *reloc_entry, -- asymbol *symbol, -- void * data, -- asection *input_section, -- bfd *output_bfd, -- char **error_message) --{ -- if (or32_consth_list != NULL) -- { -- struct or32_consth *l; -- -- l = or32_consth_list; -- while (l != NULL) -- { -- unsigned long insn; -- unsigned long val; -- unsigned long vallo; -- struct or32_consth *next; -- -- /* Do the HI16 relocation. Note that we actually don't need -- to know anything about the LO16 itself, except where to -- find the low 16 bits of the addend needed by the LO16. */ -- insn = bfd_get_32 (abfd, l->addr); -- vallo = (bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address) -- & 0xffff); -- val = ((insn & 0xffff) << 16) + vallo; -- val += l->addend; -- -- insn = (insn &~ 0xffff) | ((val >> 16) & 0xffff); -- bfd_put_32 (abfd, insn, l->addr); -- -- next = l->next; -- free (l); -- l = next; -- } -- -- or32_consth_list = NULL; -- } -- -- if (output_bfd != NULL) -- { -- unsigned long insn, tmp; -- bfd_size_type addr = reloc_entry->address; -- -- reloc_entry->address += input_section->output_offset; -- -- insn = bfd_get_32 (abfd, (bfd_byte *) data + addr); -- tmp = insn & 0x0000ffff; -- tmp += symbol->section->output_section->vma; -- tmp += symbol->section->output_offset; -- tmp += symbol->value; -- insn = (insn & 0xffff0000) | (tmp & 0x0000ffff); -- bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); -- -- return bfd_reloc_ok; -- } -- -- /* Now do the LO16 reloc in the usual way. */ -- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, -- input_section, output_bfd, error_message); --} -- --static bfd_reloc_status_type --or32_elf_jumptarg_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) -- { -- unsigned long insn, tmp; -- bfd_size_type addr = reloc_entry->address; -- -- reloc_entry->address += input_section->output_offset; -- -- insn = bfd_get_32 (abfd, (bfd_byte *) data + addr); -- tmp = insn | 0xfc000000; -- tmp -= (input_section->output_offset >> 2); -- insn = (insn & 0xfc000000) | (tmp & 0x03ffffff); -- bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); -- -- return bfd_reloc_ok; -- } -- -- return bfd_reloc_continue; --} -- --static reloc_howto_type elf_or32_howto_table[] = --{ -- /* This reloc does nothing. */ -- HOWTO (R_OR32_NONE, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 32, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- bfd_elf_generic_reloc, /* special_function */ -- "R_OR32_NONE", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard 32 bit relocation. */ -- HOWTO (R_OR32_32, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 32, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- or32_elf_32_reloc, /* special_function */ -- "R_OR32_32", /* name */ -- FALSE, /* partial_inplace */ -- 0xffffffff, /* src_mask */ -- 0xffffffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard 16 bit relocation. */ -- HOWTO (R_OR32_16, /* type */ -- 0, /* rightshift */ -- 1, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- or32_elf_16_reloc, /* special_function */ -- "R_OR32_16", /* name */ -- FALSE, /* partial_inplace */ -- 0x0000ffff, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard 8 bit relocation. */ -- HOWTO (R_OR32_8, /* type */ -- 0, /* rightshift */ -- 0, /* size (0 = byte, 1 = short, 2 = long) */ -- 8, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_bitfield, /* complain_on_overflow */ -- or32_elf_8_reloc, /* special_function */ -- "R_OR32_8", /* name */ -- FALSE, /* partial_inplace */ -- 0x000000ff, /* src_mask */ -- 0x000000ff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard low 16 bit relocation. */ -- HOWTO (R_OR32_CONST, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- or32_elf_const_reloc, /* special_function */ -- "R_OR32_CONST", /* name */ -- FALSE, /* partial_inplace */ -- 0x0000ffff, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard high 16 bit relocation. */ -- HOWTO (R_OR32_CONSTH, /* type */ -- 16, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 16, /* bitsize */ -- TRUE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- or32_elf_consth_reloc, /* special_function */ -- "R_OR32_CONSTH", /* name */ -- FALSE, /* partial_inplace */ -- 0xffff0000, /* src_mask */ -- 0x0000ffff, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* A standard branch relocation. */ -- HOWTO (R_OR32_JUMPTARG, /* type */ -- 2, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 28, /* bitsize */ -- TRUE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_signed, /* complain_on_overflow */ -- or32_elf_jumptarg_reloc,/* special_function */ -- "R_OR32_JUMPTARG", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0x03ffffff, /* dst_mask */ -- TRUE), /* pcrel_offset */ -- -- /* GNU extension to record C++ vtable hierarchy. */ -- HOWTO (R_OR32_GNU_VTINHERIT, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 0, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- NULL, /* special_function */ -- "R_OR32_GNU_VTINHERIT", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ -- -- /* GNU extension to record C++ vtable member usage. */ -- HOWTO (R_OR32_GNU_VTENTRY, /* type */ -- 0, /* rightshift */ -- 2, /* size (0 = byte, 1 = short, 2 = long) */ -- 0, /* bitsize */ -- FALSE, /* pc_relative */ -- 0, /* bitpos */ -- complain_overflow_dont, /* complain_on_overflow */ -- _bfd_elf_rel_vtable_reloc_fn, /* special_function */ -- "R_OR32_GNU_VTENTRY", /* name */ -- FALSE, /* partial_inplace */ -- 0, /* src_mask */ -- 0, /* dst_mask */ -- FALSE), /* pcrel_offset */ --}; -- --/* Map BFD reloc types to OR32 ELF reloc types. */ -- --struct or32_reloc_map --{ -- bfd_reloc_code_real_type bfd_reloc_val; -- unsigned char elf_reloc_val; --}; -- --static const struct or32_reloc_map or32_reloc_map[] = --{ -- { BFD_RELOC_NONE, R_OR32_NONE }, -- { BFD_RELOC_32, R_OR32_32 }, -- { BFD_RELOC_16, R_OR32_16 }, -- { BFD_RELOC_8, R_OR32_8 }, -- { BFD_RELOC_LO16, R_OR32_CONST }, -- { BFD_RELOC_HI16, R_OR32_CONSTH }, -- { BFD_RELOC_32_GOT_PCREL, R_OR32_JUMPTARG }, -- { BFD_RELOC_VTABLE_INHERIT, R_OR32_GNU_VTINHERIT }, -- { BFD_RELOC_VTABLE_ENTRY, R_OR32_GNU_VTENTRY }, --}; -- --static reloc_howto_type * --bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, -- bfd_reloc_code_real_type code) --{ -- unsigned int i; -- -- for (i = ARRAY_SIZE (or32_reloc_map); i--;) -- if (or32_reloc_map[i].bfd_reloc_val == code) -- return &elf_or32_howto_table[or32_reloc_map[i].elf_reloc_val]; -- -- return NULL; --} -- --static reloc_howto_type * --bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, -- const char *r_name) --{ -- unsigned int i; -- -- for (i = 0; -- i < sizeof (elf_or32_howto_table) / sizeof (elf_or32_howto_table[0]); -- i++) -- if (elf_or32_howto_table[i].name != NULL -- && strcasecmp (elf_or32_howto_table[i].name, r_name) == 0) -- return &elf_or32_howto_table[i]; -- -- return NULL; --} -- --/* Set the howto pointer for an OR32 ELF reloc. */ -- --static void --or32_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, -- arelent *cache_ptr, -- Elf_Internal_Rela *dst) --{ -- unsigned int r_type; -- -- r_type = ELF32_R_TYPE (dst->r_info); -- BFD_ASSERT (r_type < (unsigned int) R_OR32_max); -- cache_ptr->howto = &elf_or32_howto_table[r_type]; --} -- --#define TARGET_LITTLE_SYM bfd_elf32_or32_little_vec --#define TARGET_LITTLE_NAME "elf32-littleor32" --#define TARGET_BIG_SYM bfd_elf32_or32_big_vec --#define TARGET_BIG_NAME "elf32-or32" --#define ELF_ARCH bfd_arch_or32 --#define ELF_MACHINE_CODE EM_OR32 --#define ELF_MAXPAGESIZE 0x1000 -- --#define elf_info_to_howto 0 --#define elf_info_to_howto_rel or32_info_to_howto_rel --#define elf_backend_object_p or32_elf_object_p --#define elf_backend_final_write_processing \ -- or32_elf_final_write_processing -- --#include "elf32-target.h" -diff -rNU3 dist.orig/bfd/elf32-ppc.c dist/bfd/elf32-ppc.c ---- dist.orig/bfd/elf32-ppc.c 2013-03-25 09:06:19.000000000 +0100 -+++ dist/bfd/elf32-ppc.c 2015-10-18 13:11:12.000000000 +0200 -@@ -3898,7 +3898,7 @@ - sec->has_tls_get_addr_call = 1; - } - -- switch (r_type) -+ switch ((int)r_type) - { - case R_PPC_TLSGD: - case R_PPC_TLSLD: -@@ -7766,7 +7766,7 @@ - howto = NULL; - if (r_type < R_PPC_max) - howto = ppc_elf_howto_table[r_type]; -- switch (r_type) -+ switch ((int)r_type) - { - default: - info->callbacks->einfo -diff -rNU3 dist.orig/bfd/elf32-sh.c dist/bfd/elf32-sh.c ---- dist.orig/bfd/elf32-sh.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elf32-sh.c 2015-10-18 13:11:12.000000000 +0200 -@@ -2808,6 +2808,7 @@ - /* Make sure we know what is going on here. */ - BFD_ASSERT (htab->root.dynobj != NULL - && (h->needs_plt -+ || h->type == STT_GNU_IFUNC - || h->u.weakdef != NULL - || (h->def_dynamic - && h->ref_regular -@@ -2816,7 +2817,7 @@ - /* If this is a function, put it in the procedure linkage table. We - will fill in the contents of the procedure linkage table later, - when we know the address of the .got section. */ -- if (h->type == STT_FUNC -+ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) - || h->needs_plt) - { - if (h->plt.refcount <= 0 -@@ -3285,6 +3286,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist.orig/bfd/elf32-vax.c dist/bfd/elf32-vax.c ---- dist.orig/bfd/elf32-vax.c 2012-09-04 15:32:53.000000000 +0200 -+++ dist/bfd/elf32-vax.c 2015-10-18 13:11:13.000000000 +0200 -@@ -490,6 +490,24 @@ - return TRUE; - } - -+/* Copy vax-specific data from one module to another */ -+static bfd_boolean -+elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ flagword in_flags; -+ -+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour -+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour) -+ return TRUE; -+ -+ in_flags = elf_elfheader (ibfd)->e_flags; -+ -+ elf_elfheader (obfd)->e_flags = in_flags; -+ elf_flags_init (obfd) = TRUE; -+ -+ return TRUE; -+} -+ - /* Merge backend specific data from an object file to the output - object file when linking. */ - static bfd_boolean -@@ -752,7 +770,13 @@ - return FALSE; - - if (sec->flags & SEC_READONLY) -- info->flags |= DF_TEXTREL; -+ { -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ sec->name); -+ info->flags |= DF_TEXTREL; -+ } - } - - sreloc->size += sizeof (Elf32_External_Rela); -@@ -922,6 +946,7 @@ - /* Make sure we know what is going on here. */ - BFD_ASSERT (dynobj != NULL - && (h->needs_plt -+ || h->type == STT_GNU_IFUNC - || h->u.weakdef != NULL - || (h->def_dynamic - && h->ref_regular -@@ -930,7 +955,7 @@ - /* If this is a function, put it in the procedure linkage table. We - will fill in the contents of the procedure linkage table later, - when we know the address of the .got section. */ -- if (h->type == STT_FUNC -+ if ((h->type == STT_FUNC || h->type == STT_GNU_IFUNC) - || h->needs_plt) - { - if (h->plt.refcount <= 0 -@@ -1186,7 +1211,12 @@ - continue; - - /* Allocate memory for the section contents. */ -- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size); -+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc. -+ Unused entries should be reclaimed before the section's contents -+ are written out, but at the moment this does not happen. Thus in -+ order to prevent writing out garbage, we initialise the section's -+ contents to zero. */ -+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); - if (s->contents == NULL) - return FALSE; - } -@@ -1285,6 +1315,7 @@ - - if (!elf_hash_table (info)->dynamic_sections_created - || (info->shared && info->symbolic) -+ || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT - || h->forced_local) - { - h->got.refcount = 0; -@@ -1305,9 +1336,7 @@ - - dyn = elf_hash_table (info)->dynamic_sections_created; - /* Allocate space in the .got and .rela.got sections. */ -- if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT -- && (info->shared -- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))) -+ if (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)) - { - sgot->size += 4; - srelgot->size += sizeof (Elf32_External_Rela); -@@ -1631,9 +1660,9 @@ - { - relocate = TRUE; - outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE); -- BFD_ASSERT (bfd_get_signed_32 (input_bfd, -- &contents[rel->r_offset]) == 0); -- outrel.r_addend = relocation + rel->r_addend; -+ outrel.r_addend = bfd_get_signed_32(input_bfd, -+ &contents[rel->r_offset]) -+ + relocation + rel->r_addend; - } - else - { -@@ -1672,6 +1701,9 @@ - } - } - -+ if (input_section->flags & SEC_CODE) -+ info->flags |= DF_TEXTREL; -+ - if ((input_section->flags & SEC_CODE) != 0 - || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32 - && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE -@@ -2051,12 +2083,15 @@ - #define TARGET_LITTLE_SYM bfd_elf32_vax_vec - #define TARGET_LITTLE_NAME "elf32-vax" - #define ELF_MACHINE_CODE EM_VAX --#define ELF_MAXPAGESIZE 0x1000 -+#define ELF_MAXPAGESIZE 0x10000 - - #define elf_backend_create_dynamic_sections \ - _bfd_elf_create_dynamic_sections - #define bfd_elf32_bfd_link_hash_table_create \ - elf_vax_link_hash_table_create -+#define bfd_elf32_bfd_copy_private_bfd_data \ -+ elf32_vax_copy_private_bfd_data -+ - #define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link - - #define elf_backend_check_relocs elf_vax_check_relocs -diff -rNU3 dist.orig/bfd/elf64-alpha.c dist/bfd/elf64-alpha.c ---- dist.orig/bfd/elf64-alpha.c 2012-07-24 23:06:58.000000000 +0200 -+++ dist/bfd/elf64-alpha.c 2015-10-18 13:11:13.000000000 +0200 -@@ -100,6 +100,11 @@ - #define PLT_ENTRY_SIZE \ - (elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE) - -+/* ld --traditional-format uses this older format instead. */ -+#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */ -+#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */ -+#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */ -+ - #define MAX_GOT_SIZE (64*1024) - - #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so" -@@ -4821,6 +4826,32 @@ - plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE) - / NEW_PLT_ENTRY_SIZE); - } -+ else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ long hi, lo; -+ -+ /* decompose the reloc offset for the plt for ldah+lda */ -+ hi = plt_index * sizeof(Elf64_External_Rela); -+ lo = ((hi & 0xffff) ^ 0x8000) - 0x8000; -+ hi = (hi - lo) >> 16; -+ -+ insn = INSN_ABO (INSN_LDAH, 28, 31, hi); -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset); -+ -+ insn = INSN_ABO (INSN_LDA, 28, 28, lo); -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset + 4); -+ -+ disp = -(gotent->plt_offset + 12); -+ insn = INSN_AD (INSN_BR, 31, disp); -+ -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset + 8); -+ -+ plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE) -+ / OLD_PLT_ENTRY_SIZE); -+ } - else - { - disp = -(gotent->plt_offset + 4); -diff -rNU3 dist.orig/bfd/elf64-mips.c dist/bfd/elf64-mips.c ---- dist.orig/bfd/elf64-mips.c 2012-09-04 16:13:07.000000000 +0200 -+++ dist/bfd/elf64-mips.c 2015-10-18 13:11:13.000000000 +0200 -@@ -123,6 +123,8 @@ - (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); - static bfd_boolean mips_elf64_object_p - (bfd *); -+static bfd_boolean mips_elf64_is_local_label_name -+ (bfd *, const char *); - static irix_compat_t elf64_mips_irix_compat - (bfd *); - static bfd_boolean elf64_mips_grok_prstatus -@@ -3917,7 +3919,18 @@ - bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; - } -+ -+/* MIPS ELF local labels start with "$L". */ -+static bfd_boolean -+mips_elf64_is_local_label_name (bfd *abfd, const char *name) -+{ -+ if (name[0] == '$' && name[1] == 'L') -+ return TRUE; - -+ /* We accept the generic ELF local label syntax as well. */ -+ return _bfd_elf_is_local_label_name (abfd, name); -+} -+ - /* Depending on the target vector we generate some version of Irix - executables or "normal" MIPS ELF ABI executables. */ - static irix_compat_t -@@ -4141,9 +4154,8 @@ - - #define elf_backend_write_section _bfd_mips_elf_write_section - --/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit -- MIPS-specific function only applies to IRIX5, which had no 64-bit -- ABI. */ -+#define bfd_elf64_bfd_is_local_label_name \ -+ mips_elf64_is_local_label_name - #define bfd_elf64_bfd_is_target_special_symbol \ - _bfd_mips_elf_is_target_special_symbol - #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line -diff -rNU3 dist.orig/bfd/elf64-ppc.c dist/bfd/elf64-ppc.c ---- dist.orig/bfd/elf64-ppc.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elf64-ppc.c 2015-10-18 13:11:13.000000000 +0200 -@@ -3618,9 +3618,6 @@ - struct ppc_link_hash_entry *h; - struct plt_entry *plt_ent; - -- /* And the reloc addend that this was derived from. */ -- bfd_vma addend; -- - /* Where this stub is being called from, or, in the case of combined - stub sections, the first input section in the group. */ - asection *id_sec; -@@ -9112,6 +9109,10 @@ - { - struct bfd_link_info *info = inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -@@ -9192,7 +9193,13 @@ - srel = htab->reliplt; - srel->size += p->count * sizeof (Elf64_External_Rela); - if ((p->sec->output_section->flags & SEC_READONLY) != 0) -- info->flags |= DF_TEXTREL; -+ { -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ p->sec->output_section->name); -+ info->flags |= DF_TEXTREL; -+ } - } - } - } -@@ -11659,7 +11666,6 @@ - } - stub_entry->h = hash; - stub_entry->plt_ent = plt_ent; -- stub_entry->addend = irela->r_addend; - - if (stub_entry->h != NULL) - htab->stub_globals += 1; -@@ -12900,60 +12906,96 @@ - { - bfd_boolean can_plt_call = FALSE; - -+ /* All of these stubs will modify r2, so there must be a -+ branch and link followed by a nop. The nop is -+ replaced by an insn to restore r2. */ - if (rel->r_offset + 8 <= input_section->size) - { -- unsigned long nop; -- nop = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); -- if (nop == NOP -- || nop == CROR_151515 || nop == CROR_313131) -- { -- if (h != NULL -- && (h == htab->tls_get_addr_fd -- || h == htab->tls_get_addr) -- && !htab->no_tls_get_addr_opt) -+ unsigned long br; -+ -+ br = bfd_get_32 (input_bfd, -+ contents + rel->r_offset); -+ if ((br & 1) != 0) -+ { -+ unsigned long nop; -+ -+ nop = bfd_get_32 (input_bfd, -+ contents + rel->r_offset + 4); -+ if (nop == NOP -+ || nop == CROR_151515 || nop == CROR_313131) - { -- /* Special stub used, leave nop alone. */ -+ if (h != NULL -+ && (h == htab->tls_get_addr_fd -+ || h == htab->tls_get_addr) -+ && !htab->no_tls_get_addr_opt) -+ { -+ /* Special stub used, leave nop alone. */ -+ } -+ else -+ bfd_put_32 (input_bfd, LD_R2_40R1, -+ contents + rel->r_offset + 4); -+ can_plt_call = TRUE; - } -- else -- bfd_put_32 (input_bfd, LD_R2_40R1, -- contents + rel->r_offset + 4); -- can_plt_call = TRUE; - } - } - -- if (!can_plt_call) -+ if (!can_plt_call && h != NULL) - { -- if (stub_entry->stub_type == ppc_stub_plt_call -- || stub_entry->stub_type == ppc_stub_plt_call_r2save) -- { -- /* If this is a plain branch rather than a branch -- and link, don't require a nop. However, don't -- allow tail calls in a shared library as they -- will result in r2 being corrupted. */ -- unsigned long br; -- br = bfd_get_32 (input_bfd, contents + rel->r_offset); -- if (info->executable && (br & 1) == 0) -- can_plt_call = TRUE; -- else -- stub_entry = NULL; -- } -- else if (h != NULL -- && strcmp (h->elf.root.root.string, -- ".__libc_start_main") == 0) -+ const char *name = h->elf.root.root.string; -+ -+ if (*name == '.') -+ ++name; -+ -+ if (strncmp (name, "__libc_start_main", 17) == 0 -+ && (name[17] == 0 || name[17] == '@')) - { -- /* Allow crt1 branch to go via a toc adjusting stub. */ -+ /* Allow crt1 branch to go via a toc adjusting -+ stub. Other calls that never return could do -+ the same, if we could detect such. */ - can_plt_call = TRUE; - } -- else -+ } -+ -+ if (!can_plt_call) -+ { -+ /* g++ as of 20130507 emits self-calls without a -+ following nop. This is arguably wrong since we -+ have conflicting information. On the one hand a -+ global symbol and on the other a local call -+ sequence, but don't error for this special case. -+ It isn't possible to cheaply verify we have -+ exactly such a call. Allow all calls to the same -+ section. */ -+ asection *code_sec = sec; -+ -+ if (get_opd_info (sec) != NULL) - { -- info->callbacks->einfo -- (_("%P: %H: call to `%T' lacks nop, can't restore toc; " -- "recompile with -fPIC"), -- input_bfd, input_section, rel->r_offset, sym_name); -+ bfd_vma off = (relocation + addend -+ - sec->output_section->vma -+ - sec->output_offset); - -- bfd_set_error (bfd_error_bad_value); -- ret = FALSE; -+ opd_entry_value (sec, off, &code_sec, NULL, FALSE); - } -+ if (code_sec == input_section) -+ can_plt_call = TRUE; -+ } -+ -+ if (!can_plt_call) -+ { -+ -+ if (stub_entry->stub_type == ppc_stub_plt_call -+ || stub_entry->stub_type == ppc_stub_plt_call_r2save) -+ info->callbacks->einfo -+ (_("%P: %H: call to `%T' lacks nop, can't restore toc; " -+ "recompile with -fPIC"), -+ input_bfd, input_section, rel->r_offset, sym_name); -+ else -+ info->callbacks->einfo -+ (_("%P: %H: call to `%T' lacks nop, can't restore toc; " -+ "(-mcmodel=small toc adjust stub)"), -+ input_bfd, input_section, rel->r_offset, sym_name); -+ bfd_set_error (bfd_error_bad_value); -+ ret = FALSE; - } - - if (can_plt_call -diff -rNU3 dist.orig/bfd/elf64-x86-64.c dist/bfd/elf64-x86-64.c ---- dist.orig/bfd/elf64-x86-64.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elf64-x86-64.c 2015-10-18 13:11:13.000000000 +0200 -@@ -2589,6 +2589,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - if (info->warn_shared_textrel && info->shared) -diff -rNU3 dist.orig/bfd/elflink.c dist/bfd/elflink.c ---- dist.orig/bfd/elflink.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elflink.c 2015-10-18 13:11:13.000000000 +0200 -@@ -1442,7 +1442,10 @@ - if (!(oldbfd != NULL - && (oldbfd->flags & BFD_PLUGIN) != 0 - && (abfd->flags & BFD_PLUGIN) == 0)) -- *skip = TRUE; -+ { -+ newdef = FALSE; -+ *skip = TRUE; -+ } - - /* Merge st_other. If the symbol already has a dynamic index, - but visibility says it should not be visible, turn it into a -@@ -10183,7 +10186,14 @@ - if (bed->s->arch_size == 32) - irel[0].r_info = ELF32_R_INFO (indx, howto->type); - else -- irel[0].r_info = ELF64_R_INFO (indx, howto->type); -+#ifdef BFD64 -+ { -+ bfd_uint64_t indx64 = indx; -+ irel[0].r_info = ELF64_R_INFO (indx64, howto->type); -+ } -+#else -+ BFD_FAIL(); -+#endif - - rel_hdr = reldata->hdr; - erel = rel_hdr->contents; -diff -rNU3 dist.orig/bfd/elfn32-mips.c dist/bfd/elfn32-mips.c ---- dist.orig/bfd/elfn32-mips.c 2012-09-04 16:13:08.000000000 +0200 -+++ dist/bfd/elfn32-mips.c 2015-10-18 13:11:13.000000000 +0200 -@@ -81,6 +81,8 @@ - (bfd *, Elf_Internal_Note *); - static bfd_boolean elf32_mips_grok_psinfo - (bfd *, Elf_Internal_Note *); -+static bfd_boolean mips_elf_n32_is_local_label_name -+ (bfd *, const char *); - static irix_compat_t elf_n32_mips_irix_compat - (bfd *); - -@@ -3241,6 +3243,17 @@ - return TRUE; - } - -+/* MIPS ELF local labels start with "$L". */ -+static bfd_boolean -+mips_elf_n32_is_local_label_name (bfd *abfd, const char *name) -+{ -+ if (name[0] == '$' && name[1] == 'L') -+ return TRUE; -+ -+ /* We accept the generic ELF local label syntax as well. */ -+ return _bfd_elf_is_local_label_name (abfd, name); -+} -+ - /* Depending on the target vector we generate some version of Irix - executables or "normal" MIPS ELF ABI executables. */ - static irix_compat_t -@@ -3364,6 +3377,9 @@ - #define elf_backend_write_section _bfd_mips_elf_write_section - #define elf_backend_mips_irix_compat elf_n32_mips_irix_compat - #define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto -+ -+#define bfd_elf32_bfd_is_local_label_name \ -+ mips_elf_n32_is_local_label_name - #define bfd_elf32_bfd_is_target_special_symbol \ - _bfd_mips_elf_is_target_special_symbol - #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line -diff -rNU3 dist.orig/bfd/elfnn-riscv.c dist/bfd/elfnn-riscv.c ---- dist.orig/bfd/elfnn-riscv.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/elfnn-riscv.c 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,2957 @@ -+/* RISC-V-specific support for NN-bit ELF. -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on TILE-Gx and MIPS targets. -+ -+ 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. */ -+ -+ -+/* This file handles RISC-V ELF targets. */ -+ -+#include "sysdep.h" -+#include "bfd.h" -+#include "libbfd.h" -+#include "bfdlink.h" -+#include "genlink.h" -+#include "elf-bfd.h" -+#include "elfxx-riscv.h" -+#include "elf/riscv.h" -+#include "opcode/riscv.h" -+ -+#define ARCH_SIZE NN -+ -+#define MINUS_ONE ((bfd_vma)0 - 1) -+ -+#define RISCV_ELF_LOG_WORD_BYTES (ARCH_SIZE == 32 ? 2 : 3) -+ -+#define RISCV_ELF_WORD_BYTES (1 << RISCV_ELF_LOG_WORD_BYTES) -+ -+/* The name of the dynamic interpreter. This is put in the .interp -+ section. */ -+ -+#define ELF64_DYNAMIC_INTERPRETER "/lib/ld.so.1" -+#define ELF32_DYNAMIC_INTERPRETER "/lib32/ld.so.1" -+ -+/* The RISC-V linker needs to keep track of the number of relocs that it -+ decides to copy as dynamic relocs in check_relocs for each symbol. -+ This is so that it can later discard them if they are found to be -+ unnecessary. We store the information in a field extending the -+ regular ELF linker hash table. */ -+ -+struct riscv_elf_dyn_relocs -+{ -+ struct riscv_elf_dyn_relocs *next; -+ -+ /* The input section of the reloc. */ -+ asection *sec; -+ -+ /* Total number of relocs copied for the input section. */ -+ bfd_size_type count; -+ -+ /* Number of pc-relative relocs copied for the input section. */ -+ bfd_size_type pc_count; -+}; -+ -+/* RISC-V ELF linker hash entry. */ -+ -+struct riscv_elf_link_hash_entry -+{ -+ struct elf_link_hash_entry elf; -+ -+ /* Track dynamic relocs copied for this symbol. */ -+ struct riscv_elf_dyn_relocs *dyn_relocs; -+ -+#define GOT_UNKNOWN 0 -+#define GOT_NORMAL 1 -+#define GOT_TLS_GD 2 -+#define GOT_TLS_IE 4 -+#define GOT_TLS_LE 8 -+ char tls_type; -+}; -+ -+#define riscv_elf_hash_entry(ent) \ -+ ((struct riscv_elf_link_hash_entry *)(ent)) -+ -+struct _bfd_riscv_elf_obj_tdata -+{ -+ struct elf_obj_tdata root; -+ -+ /* tls_type for each local got entry. */ -+ char *local_got_tls_type; -+}; -+ -+#define _bfd_riscv_elf_tdata(abfd) \ -+ ((struct _bfd_riscv_elf_obj_tdata *) (abfd)->tdata.any) -+ -+#define _bfd_riscv_elf_local_got_tls_type(abfd) \ -+ (_bfd_riscv_elf_tdata (abfd)->local_got_tls_type) -+ -+#define _bfd_riscv_elf_tls_type(abfd, h, symndx) \ -+ (*((h) != NULL ? &riscv_elf_hash_entry(h)->tls_type \ -+ : &_bfd_riscv_elf_local_got_tls_type (abfd) [symndx])) -+ -+#define is_riscv_elf(bfd) \ -+ (bfd_get_flavour (bfd) == bfd_target_elf_flavour \ -+ && elf_tdata (bfd) != NULL \ -+ && elf_object_id (bfd) == RISCV_ELF_DATA) -+ -+#include "elf/common.h" -+#include "elf/internal.h" -+ -+struct riscv_elf_link_hash_table -+{ -+ struct elf_link_hash_table elf; -+ -+ /* Short-cuts to get to dynamic linker sections. */ -+ asection *sdynbss; -+ asection *srelbss; -+ asection *sdyntdata; -+ -+ /* Small local sym to section mapping cache. */ -+ struct sym_cache sym_cache; -+}; -+ -+ -+/* Get the RISC-V ELF linker hash table from a link_info structure. */ -+#define riscv_elf_hash_table(p) \ -+ (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ -+ == RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL) -+ -+static void -+riscv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, -+ arelent *cache_ptr, -+ Elf_Internal_Rela *dst) -+{ -+ cache_ptr->howto = riscv_elf_rtype_to_howto (ELFNN_R_TYPE (dst->r_info)); -+} -+ -+static void -+riscv_elf_append_rela (bfd *abfd, asection *s, Elf_Internal_Rela *rel) -+{ -+ const struct elf_backend_data *bed; -+ bfd_byte *loc; -+ -+ bed = get_elf_backend_data (abfd); -+ loc = s->contents + (s->reloc_count++ * bed->s->sizeof_rela); -+ bed->s->swap_reloca_out (abfd, rel, loc); -+} -+ -+/* PLT/GOT stuff */ -+ -+#define PLT_HEADER_INSNS 8 -+#define PLT_ENTRY_INSNS 4 -+#define PLT_HEADER_SIZE (PLT_HEADER_INSNS * 4) -+#define PLT_ENTRY_SIZE (PLT_ENTRY_INSNS * 4) -+ -+#define GOT_ENTRY_SIZE RISCV_ELF_WORD_BYTES -+ -+#define GOTPLT_HEADER_SIZE (2 * GOT_ENTRY_SIZE) -+ -+#define sec_addr(sec) ((sec)->output_section->vma + (sec)->output_offset) -+ -+static bfd_vma -+riscv_elf_got_plt_val (bfd_vma plt_index, struct bfd_link_info *info) -+{ -+ return sec_addr (riscv_elf_hash_table (info)->elf.sgotplt) -+ + GOTPLT_HEADER_SIZE + (plt_index * GOT_ENTRY_SIZE); -+} -+ -+#if ARCH_SIZE == 32 -+# define MATCH_LREG MATCH_LW -+#else -+# define MATCH_LREG MATCH_LD -+#endif -+ -+/* The format of the first PLT entry. */ -+ -+static void -+riscv_make_plt0_entry(bfd_vma gotplt_addr, bfd_vma addr, uint32_t *entry) -+{ -+ /* auipc t2, %hi(.got.plt) -+ sub t1, t1, t0 # shifted .got.plt offset + hdr size + 12 -+ l[w|d] t3, %lo(.got.plt)(t2) # _dl_runtime_resolve -+ addi t1, t1, -(hdr size + 12) # shifted .got.plt offset -+ addi t0, t2, %lo(.got.plt) # &.got.plt -+ srli t1, t1, log2(16/PTRSIZE) # .got.plt offset -+ l[w|d] t0, PTRSIZE(t0) # link map -+ jr t3 */ -+ -+ entry[0] = RISCV_UTYPE (AUIPC, X_T2, RISCV_PCREL_HIGH_PART (gotplt_addr, addr)); -+ entry[1] = RISCV_RTYPE (SUB, X_T1, X_T1, X_T0); -+ entry[2] = RISCV_ITYPE (LREG, X_T3, X_T2, RISCV_PCREL_LOW_PART (gotplt_addr, addr)); -+ entry[3] = RISCV_ITYPE (ADDI, X_T1, X_T1, -(PLT_HEADER_SIZE + 12)); -+ entry[4] = RISCV_ITYPE (ADDI, X_T0, X_T2, RISCV_PCREL_LOW_PART (gotplt_addr, addr)); -+ entry[5] = RISCV_ITYPE (SRLI, X_T1, X_T1, 4 - RISCV_ELF_LOG_WORD_BYTES); -+ entry[6] = RISCV_ITYPE (LREG, X_T0, X_T0, RISCV_ELF_WORD_BYTES); -+ entry[7] = RISCV_ITYPE (JALR, 0, X_T3, 0); -+} -+ -+/* The format of subsequent PLT entries. */ -+ -+static void -+riscv_make_plt_entry(bfd_vma got_address, bfd_vma addr, uint32_t *entry) -+{ -+ /* auipc t1, %hi(.got.plt entry) -+ l[w|d] t0, %lo(.got.plt entry)(t1) -+ jalr t1, t0 -+ nop */ -+ -+ entry[0] = RISCV_UTYPE (AUIPC, X_T1, RISCV_PCREL_HIGH_PART (got_address, addr)); -+ entry[1] = RISCV_ITYPE (LREG, X_T0, X_T1, RISCV_PCREL_LOW_PART(got_address, addr)); -+ entry[2] = RISCV_ITYPE (JALR, X_T1, X_T0, 0); -+ entry[3] = RISCV_NOP; -+} -+ -+/* Create an entry in an RISC-V ELF linker hash table. */ -+ -+static struct bfd_hash_entry * -+link_hash_newfunc (struct bfd_hash_entry *entry, -+ struct bfd_hash_table *table, const char *string) -+{ -+ /* Allocate the structure if it has not already been allocated by a -+ subclass. */ -+ if (entry == NULL) -+ { -+ entry = -+ bfd_hash_allocate (table, -+ sizeof (struct riscv_elf_link_hash_entry)); -+ if (entry == NULL) -+ return entry; -+ } -+ -+ /* Call the allocation method of the superclass. */ -+ entry = _bfd_elf_link_hash_newfunc (entry, table, string); -+ if (entry != NULL) -+ { -+ struct riscv_elf_link_hash_entry *eh; -+ -+ eh = (struct riscv_elf_link_hash_entry *) entry; -+ eh->dyn_relocs = NULL; -+ eh->tls_type = GOT_UNKNOWN; -+ } -+ -+ return entry; -+} -+ -+/* Create a RISC-V ELF linker hash table. */ -+ -+static struct bfd_link_hash_table * -+riscv_elf_link_hash_table_create (bfd *abfd) -+{ -+ struct riscv_elf_link_hash_table *ret; -+ bfd_size_type amt = sizeof (struct riscv_elf_link_hash_table); -+ -+ ret = (struct riscv_elf_link_hash_table *) bfd_zmalloc (amt); -+ if (ret == NULL) -+ return NULL; -+ -+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, -+ sizeof (struct riscv_elf_link_hash_entry), -+ RISCV_ELF_DATA)) -+ { -+ free (ret); -+ return NULL; -+ } -+ -+ return &ret->elf.root; -+} -+ -+/* Create the .got section. */ -+ -+static bfd_boolean -+riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) -+{ -+ flagword flags; -+ asection *s, *s_got; -+ struct elf_link_hash_entry *h; -+ const struct elf_backend_data *bed = get_elf_backend_data (abfd); -+ struct elf_link_hash_table *htab = elf_hash_table (info); -+ -+ /* This function may be called more than once. */ -+ s = bfd_get_linker_section (abfd, ".got"); -+ if (s != NULL) -+ return TRUE; -+ -+ flags = bed->dynamic_sec_flags; -+ -+ s = bfd_make_section_anyway_with_flags (abfd, -+ (bed->rela_plts_and_copies_p -+ ? ".rela.got" : ".rel.got"), -+ (bed->dynamic_sec_flags -+ | SEC_READONLY)); -+ if (s == NULL -+ || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) -+ return FALSE; -+ htab->srelgot = s; -+ -+ s = s_got = bfd_make_section_anyway_with_flags (abfd, ".got", flags); -+ if (s == NULL -+ || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) -+ return FALSE; -+ htab->sgot = s; -+ -+ /* The first bit of the global offset table is the header. */ -+ s->size += bed->got_header_size; -+ -+ if (bed->want_got_plt) -+ { -+ s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); -+ if (s == NULL -+ || !bfd_set_section_alignment (abfd, s, -+ bed->s->log_file_align)) -+ return FALSE; -+ htab->sgotplt = s; -+ -+ /* Reserve room for the header. */ -+ s->size += GOTPLT_HEADER_SIZE; -+ } -+ -+ if (bed->want_got_sym) -+ { -+ /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got -+ section. We don't do this in the linker script because we don't want -+ to define the symbol if we are not creating a global offset -+ table. */ -+ h = _bfd_elf_define_linkage_sym (abfd, info, s_got, -+ "_GLOBAL_OFFSET_TABLE_"); -+ elf_hash_table (info)->hgot = h; -+ if (h == NULL) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and -+ .rela.bss sections in DYNOBJ, and set up shortcuts to them in our -+ hash table. */ -+ -+static bfd_boolean -+riscv_elf_create_dynamic_sections (bfd *dynobj, -+ struct bfd_link_info *info) -+{ -+ struct riscv_elf_link_hash_table *htab; -+ -+ htab = riscv_elf_hash_table (info); -+ BFD_ASSERT (htab != NULL); -+ -+ if (!riscv_elf_create_got_section (dynobj, info)) -+ return FALSE; -+ -+ if (!_bfd_elf_create_dynamic_sections (dynobj, info)) -+ return FALSE; -+ -+ htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss"); -+ if (!info->shared) -+ { -+ htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss"); -+ htab->sdyntdata = -+ bfd_make_section_anyway_with_flags (dynobj, ".tdata.dyn", -+ SEC_ALLOC | SEC_THREAD_LOCAL); -+ } -+ -+ if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss -+ || (!info->shared && (!htab->srelbss || !htab->sdyntdata))) -+ abort (); -+ -+ return TRUE; -+} -+ -+/* Copy the extra info we tack onto an elf_link_hash_entry. */ -+ -+static void -+riscv_elf_copy_indirect_symbol (struct bfd_link_info *info, -+ struct elf_link_hash_entry *dir, -+ struct elf_link_hash_entry *ind) -+{ -+ struct riscv_elf_link_hash_entry *edir, *eind; -+ -+ edir = (struct riscv_elf_link_hash_entry *) dir; -+ eind = (struct riscv_elf_link_hash_entry *) ind; -+ -+ if (eind->dyn_relocs != NULL) -+ { -+ if (edir->dyn_relocs != NULL) -+ { -+ struct riscv_elf_dyn_relocs **pp; -+ struct riscv_elf_dyn_relocs *p; -+ -+ /* Add reloc counts against the indirect sym to the direct sym -+ list. Merge any entries against the same section. */ -+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) -+ { -+ struct riscv_elf_dyn_relocs *q; -+ -+ for (q = edir->dyn_relocs; q != NULL; q = q->next) -+ if (q->sec == p->sec) -+ { -+ q->pc_count += p->pc_count; -+ q->count += p->count; -+ *pp = p->next; -+ break; -+ } -+ if (q == NULL) -+ pp = &p->next; -+ } -+ *pp = edir->dyn_relocs; -+ } -+ -+ edir->dyn_relocs = eind->dyn_relocs; -+ eind->dyn_relocs = NULL; -+ } -+ -+ if (ind->root.type == bfd_link_hash_indirect -+ && dir->got.refcount <= 0) -+ { -+ edir->tls_type = eind->tls_type; -+ eind->tls_type = GOT_UNKNOWN; -+ } -+ _bfd_elf_link_hash_copy_indirect (info, dir, ind); -+} -+ -+static bfd_boolean -+riscv_elf_record_tls_type (bfd *abfd, struct elf_link_hash_entry *h, -+ unsigned long symndx, char tls_type) -+{ -+ char *new_tls_type = &_bfd_riscv_elf_tls_type (abfd, h, symndx); -+ *new_tls_type |= tls_type; -+ if ((*new_tls_type & GOT_NORMAL) && (*new_tls_type & ~GOT_NORMAL)) -+ { -+ (*_bfd_error_handler) -+ (_("%B: `%s' accessed both as normal and thread local symbol"), -+ abfd, h ? h->root.root.string : ""); -+ return FALSE; -+ } -+ return TRUE; -+} -+ -+static bfd_boolean -+riscv_elf_record_got_reference (bfd *abfd, struct bfd_link_info *info, -+ struct elf_link_hash_entry *h, long symndx) -+{ -+ struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); -+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -+ -+ if (htab->elf.sgot == NULL) -+ { -+ if (!riscv_elf_create_got_section (htab->elf.dynobj, info)) -+ return FALSE; -+ } -+ -+ if (h != NULL) -+ { -+ h->got.refcount += 1; -+ return TRUE; -+ } -+ -+ /* This is a global offset table entry for a local symbol. */ -+ if (elf_local_got_refcounts (abfd) == NULL) -+ { -+ bfd_size_type size = symtab_hdr->sh_info * (sizeof (bfd_vma) + 1); -+ if (!(elf_local_got_refcounts (abfd) = bfd_zalloc (abfd, size))) -+ return FALSE; -+ _bfd_riscv_elf_local_got_tls_type (abfd) -+ = (char *) (elf_local_got_refcounts (abfd) + symtab_hdr->sh_info); -+ } -+ elf_local_got_refcounts (abfd) [symndx] += 1; -+ -+ return TRUE; -+} -+ -+static bfd_boolean -+bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h) -+{ -+ (*_bfd_error_handler) -+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"), -+ abfd, riscv_elf_rtype_to_howto (r_type)->name, -+ h != NULL ? h->root.root.string : "a local symbol"); -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+} -+/* Look through the relocs for a section during the first phase, and -+ allocate space in the global offset table or procedure linkage -+ table. */ -+ -+static bfd_boolean -+riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, -+ asection *sec, const Elf_Internal_Rela *relocs) -+{ -+ struct riscv_elf_link_hash_table *htab; -+ Elf_Internal_Shdr *symtab_hdr; -+ struct elf_link_hash_entry **sym_hashes; -+ const Elf_Internal_Rela *rel; -+ asection *sreloc = NULL; -+ -+ if (info->relocatable) -+ return TRUE; -+ -+ htab = riscv_elf_hash_table (info); -+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -+ sym_hashes = elf_sym_hashes (abfd); -+ -+ if (htab->elf.dynobj == NULL) -+ htab->elf.dynobj = abfd; -+ -+ for (rel = relocs; rel < relocs + sec->reloc_count; rel++) -+ { -+ unsigned int r_type; -+ unsigned long r_symndx; -+ struct elf_link_hash_entry *h; -+ -+ r_symndx = ELFNN_R_SYM (rel->r_info); -+ r_type = ELFNN_R_TYPE (rel->r_info); -+ -+ if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) -+ { -+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"), -+ abfd, r_symndx); -+ return FALSE; -+ } -+ -+ if (r_symndx < symtab_hdr->sh_info) -+ h = NULL; -+ else -+ { -+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ -+ /* PR15323, ref flags aren't set for references in the same -+ object. */ -+ h->root.non_ir_ref = 1; -+ } -+ -+ switch (r_type) -+ { -+ case R_RISCV_TLS_GD_HI20: -+ if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) -+ || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_GD)) -+ return FALSE; -+ break; -+ -+ case R_RISCV_TLS_GOT_HI20: -+ if (info->shared) -+ info->flags |= DF_STATIC_TLS; -+ if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) -+ || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE)) -+ return FALSE; -+ break; -+ -+ case R_RISCV_GOT_HI20: -+ if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) -+ || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_NORMAL)) -+ return FALSE; -+ break; -+ -+ case R_RISCV_CALL_PLT: -+ /* This symbol requires a procedure linkage table entry. We -+ actually build the entry in adjust_dynamic_symbol, -+ because this might be a case of linking PIC code without -+ linking in any dynamic objects, in which case we don't -+ need to generate a procedure linkage table after all. */ -+ -+ if (h != NULL) -+ { -+ h->needs_plt = 1; -+ h->plt.refcount += 1; -+ } -+ break; -+ -+ case R_RISCV_CALL: -+ case R_RISCV_JAL: -+ case R_RISCV_BRANCH: -+ case R_RISCV_PCREL_HI20: -+ /* In shared libs, these relocs are known to bind locally. */ -+ if (info->shared) -+ break; -+ goto static_reloc; -+ -+ case R_RISCV_TPREL_HI20: -+ if (!info->executable) -+ return bad_static_reloc (abfd, r_type, h); -+ if (h != NULL) -+ riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE); -+ goto static_reloc; -+ -+ case R_RISCV_HI20: -+ if (info->shared) -+ return bad_static_reloc (abfd, r_type, h); -+ /* Fall through. */ -+ -+ case R_RISCV_COPY: -+ case R_RISCV_JUMP_SLOT: -+ case R_RISCV_RELATIVE: -+ case R_RISCV_64: -+ case R_RISCV_32: -+ /* Fall through. */ -+ -+ static_reloc: -+ if (h != NULL) -+ h->non_got_ref = 1; -+ -+ if (h != NULL && !info->shared) -+ { -+ /* We may need a .plt entry if the function this reloc -+ refers to is in a shared lib. */ -+ h->plt.refcount += 1; -+ } -+ -+ /* If we are creating a shared library, and this is a reloc -+ against a global symbol, or a non PC relative reloc -+ against a local symbol, then we need to copy the reloc -+ into the shared library. However, if we are linking with -+ -Bsymbolic, we do not need to copy a reloc against a -+ global symbol which is defined in an object we are -+ including in the link (i.e., DEF_REGULAR is set). At -+ this point we have not seen all the input files, so it is -+ possible that DEF_REGULAR is not set now but will be set -+ later (it is never cleared). In case of a weak definition, -+ DEF_REGULAR may be cleared later by a strong definition in -+ a shared library. We account for that possibility below by -+ storing information in the relocs_copied field of the hash -+ table entry. A similar situation occurs when creating -+ shared libraries and symbol visibility changes render the -+ symbol local. -+ -+ If on the other hand, we are creating an executable, we -+ may need to keep relocations for symbols satisfied by a -+ dynamic library if we manage to avoid copy relocs for the -+ symbol. */ -+ if ((info->shared -+ && (sec->flags & SEC_ALLOC) != 0 -+ && (! riscv_elf_rtype_to_howto (r_type)->pc_relative -+ || (h != NULL -+ && (! info->symbolic -+ || h->root.type == bfd_link_hash_defweak -+ || !h->def_regular)))) -+ || (!info->shared -+ && (sec->flags & SEC_ALLOC) != 0 -+ && h != NULL -+ && (h->root.type == bfd_link_hash_defweak -+ || !h->def_regular))) -+ { -+ struct riscv_elf_dyn_relocs *p; -+ struct riscv_elf_dyn_relocs **head; -+ -+ /* When creating a shared object, we must copy these -+ relocs into the output file. We create a reloc -+ section in dynobj and make room for the reloc. */ -+ if (sreloc == NULL) -+ { -+ sreloc = _bfd_elf_make_dynamic_reloc_section -+ (sec, htab->elf.dynobj, RISCV_ELF_LOG_WORD_BYTES, -+ abfd, /*rela?*/ TRUE); -+ -+ if (sreloc == NULL) -+ return FALSE; -+ } -+ -+ /* If this is a global symbol, we count the number of -+ relocations we need for this symbol. */ -+ if (h != NULL) -+ head = &((struct riscv_elf_link_hash_entry *) h)->dyn_relocs; -+ else -+ { -+ /* Track dynamic relocs needed for local syms too. -+ We really need local syms available to do this -+ easily. Oh well. */ -+ -+ asection *s; -+ void *vpp; -+ Elf_Internal_Sym *isym; -+ -+ isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ abfd, r_symndx); -+ if (isym == NULL) -+ return FALSE; -+ -+ s = bfd_section_from_elf_index (abfd, isym->st_shndx); -+ if (s == NULL) -+ s = sec; -+ -+ vpp = &elf_section_data (s)->local_dynrel; -+ head = (struct riscv_elf_dyn_relocs **) vpp; -+ } -+ -+ p = *head; -+ if (p == NULL || p->sec != sec) -+ { -+ bfd_size_type amt = sizeof *p; -+ p = ((struct riscv_elf_dyn_relocs *) -+ bfd_alloc (htab->elf.dynobj, amt)); -+ if (p == NULL) -+ return FALSE; -+ p->next = *head; -+ *head = p; -+ p->sec = sec; -+ p->count = 0; -+ p->pc_count = 0; -+ } -+ -+ p->count += 1; -+ p->pc_count += riscv_elf_rtype_to_howto (r_type)->pc_relative; -+ } -+ -+ break; -+ -+ case R_RISCV_GNU_VTINHERIT: -+ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) -+ return FALSE; -+ break; -+ -+ case R_RISCV_GNU_VTENTRY: -+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) -+ return FALSE; -+ break; -+ -+ default: -+ break; -+ } -+ } -+ -+ return TRUE; -+} -+ -+static asection * -+riscv_elf_gc_mark_hook (asection *sec, -+ struct bfd_link_info *info, -+ Elf_Internal_Rela *rel, -+ struct elf_link_hash_entry *h, -+ Elf_Internal_Sym *sym) -+{ -+ if (h != NULL) -+ switch (ELFNN_R_TYPE (rel->r_info)) -+ { -+ case R_RISCV_GNU_VTINHERIT: -+ case R_RISCV_GNU_VTENTRY: -+ return NULL; -+ } -+ -+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); -+} -+ -+/* Update the got entry reference counts for the section being removed. */ -+static bfd_boolean -+riscv_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, -+ asection *sec, const Elf_Internal_Rela *relocs) -+{ -+ const Elf_Internal_Rela *rel, *relend; -+ Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (abfd); -+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (abfd); -+ bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (abfd); -+ -+ if (info->relocatable) -+ return TRUE; -+ -+ elf_section_data (sec)->local_dynrel = NULL; -+ -+ for (rel = relocs, relend = relocs + sec->reloc_count; rel < relend; rel++) -+ { -+ unsigned long r_symndx; -+ struct elf_link_hash_entry *h = NULL; -+ -+ r_symndx = ELFNN_R_SYM (rel->r_info); -+ if (r_symndx >= symtab_hdr->sh_info) -+ { -+ struct riscv_elf_link_hash_entry *eh; -+ struct riscv_elf_dyn_relocs **pp; -+ struct riscv_elf_dyn_relocs *p; -+ -+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ eh = (struct riscv_elf_link_hash_entry *) h; -+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) -+ if (p->sec == sec) -+ { -+ /* Everything must go for SEC. */ -+ *pp = p->next; -+ break; -+ } -+ } -+ -+ switch (ELFNN_R_TYPE (rel->r_info)) -+ { -+ case R_RISCV_GOT_HI20: -+ case R_RISCV_TLS_GOT_HI20: -+ case R_RISCV_TLS_GD_HI20: -+ if (h != NULL) -+ { -+ if (h->got.refcount > 0) -+ h->got.refcount--; -+ } -+ else -+ { -+ if (local_got_refcounts && -+ local_got_refcounts[r_symndx] > 0) -+ local_got_refcounts[r_symndx]--; -+ } -+ break; -+ -+ case R_RISCV_HI20: -+ case R_RISCV_PCREL_HI20: -+ case R_RISCV_COPY: -+ case R_RISCV_JUMP_SLOT: -+ case R_RISCV_RELATIVE: -+ case R_RISCV_64: -+ case R_RISCV_32: -+ case R_RISCV_BRANCH: -+ case R_RISCV_CALL: -+ case R_RISCV_JAL: -+ if (info->shared) -+ break; -+ /* Fall through. */ -+ -+ case R_RISCV_CALL_PLT: -+ if (h != NULL) -+ { -+ if (h->plt.refcount > 0) -+ h->plt.refcount--; -+ } -+ break; -+ -+ default: -+ break; -+ } -+ } -+ -+ return TRUE; -+} -+ -+/* Adjust a symbol defined by a dynamic object and referenced by a -+ regular object. The current definition is in some section of the -+ dynamic object, but we're not including those sections. We have to -+ change the definition to something the rest of the link can -+ understand. */ -+ -+static bfd_boolean -+riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, -+ struct elf_link_hash_entry *h) -+{ -+ struct riscv_elf_link_hash_table *htab; -+ struct riscv_elf_link_hash_entry * eh; -+ struct riscv_elf_dyn_relocs *p; -+ bfd *dynobj; -+ asection *s; -+ -+ htab = riscv_elf_hash_table (info); -+ BFD_ASSERT (htab != NULL); -+ -+ dynobj = htab->elf.dynobj; -+ -+ /* Make sure we know what is going on here. */ -+ BFD_ASSERT (dynobj != NULL -+ && (h->needs_plt -+ || h->type == STT_GNU_IFUNC -+ || h->u.weakdef != NULL -+ || (h->def_dynamic -+ && h->ref_regular -+ && !h->def_regular))); -+ -+ /* If this is a function, put it in the procedure linkage table. We -+ will fill in the contents of the procedure linkage table later -+ (although we could actually do it here). */ -+ if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt) -+ { -+ if (h->plt.refcount <= 0 -+ || SYMBOL_CALLS_LOCAL (info, h) -+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT -+ && h->root.type == bfd_link_hash_undefweak)) -+ { -+ /* This case can occur if we saw a R_RISCV_CALL_PLT reloc in an -+ input file, but the symbol was never referred to by a dynamic -+ object, or if all references were garbage collected. In such -+ a case, we don't actually need to build a PLT entry. */ -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ -+ return TRUE; -+ } -+ else -+ h->plt.offset = (bfd_vma) -1; -+ -+ /* If this is a weak symbol, and there is a real definition, the -+ processor independent code will have arranged for us to see the -+ real definition first, and we can just use the same value. */ -+ if (h->u.weakdef != NULL) -+ { -+ BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined -+ || h->u.weakdef->root.type == bfd_link_hash_defweak); -+ h->root.u.def.section = h->u.weakdef->root.u.def.section; -+ h->root.u.def.value = h->u.weakdef->root.u.def.value; -+ return TRUE; -+ } -+ -+ /* This is a reference to a symbol defined by a dynamic object which -+ is not a function. */ -+ -+ /* If we are creating a shared library, we must presume that the -+ only references to the symbol are via the global offset table. -+ For such cases we need not do anything here; the relocations will -+ be handled correctly by relocate_section. */ -+ if (info->shared) -+ return TRUE; -+ -+ /* If there are no references to this symbol that do not use the -+ GOT, we don't need to generate a copy reloc. */ -+ if (!h->non_got_ref) -+ return TRUE; -+ -+ /* If -z nocopyreloc was given, we won't generate them either. */ -+ if (info->nocopyreloc) -+ { -+ h->non_got_ref = 0; -+ return TRUE; -+ } -+ -+ eh = (struct riscv_elf_link_hash_entry *) h; -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ s = p->sec->output_section; -+ if (s != NULL && (s->flags & SEC_READONLY) != 0) -+ break; -+ } -+ -+ /* If we didn't find any dynamic relocs in read-only sections, then -+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */ -+ if (p == NULL) -+ { -+ h->non_got_ref = 0; -+ return TRUE; -+ } -+ -+ /* We must allocate the symbol in our .dynbss section, which will -+ become part of the .bss section of the executable. There will be -+ an entry for this symbol in the .dynsym section. The dynamic -+ object will contain position independent code, so all references -+ from the dynamic object to this symbol will go through the global -+ offset table. The dynamic linker will use the .dynsym entry to -+ determine the address it must put in the global offset table, so -+ both the dynamic object and the regular object will refer to the -+ same memory location for the variable. */ -+ -+ /* We must generate a R_RISCV_COPY reloc to tell the dynamic linker -+ to copy the initial value out of the dynamic object and into the -+ runtime process image. We need to remember the offset into the -+ .rel.bss section we are going to use. */ -+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) -+ { -+ htab->srelbss->size += sizeof (ElfNN_External_Rela); -+ h->needs_copy = 1; -+ } -+ -+ if (eh->tls_type & ~GOT_NORMAL) -+ return _bfd_elf_adjust_dynamic_copy (h, htab->sdyntdata); -+ -+ return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss); -+} -+ -+/* Allocate space in .plt, .got and associated reloc sections for -+ dynamic relocs. */ -+ -+static bfd_boolean -+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) -+{ -+ struct bfd_link_info *info; -+ struct riscv_elf_link_hash_table *htab; -+ struct riscv_elf_link_hash_entry *eh; -+ struct riscv_elf_dyn_relocs *p; -+ -+ if (h->root.type == bfd_link_hash_indirect) -+ return TRUE; -+ -+ info = (struct bfd_link_info *) inf; -+ htab = riscv_elf_hash_table (info); -+ BFD_ASSERT (htab != NULL); -+ -+ if (htab->elf.dynamic_sections_created -+ && h->plt.refcount > 0) -+ { -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h)) -+ { -+ asection *s = htab->elf.splt; -+ -+ if (s->size == 0) -+ s->size = PLT_HEADER_SIZE; -+ -+ h->plt.offset = s->size; -+ -+ /* Make room for this entry. */ -+ s->size += PLT_ENTRY_SIZE; -+ -+ /* We also need to make an entry in the .got.plt section. */ -+ htab->elf.sgotplt->size += GOT_ENTRY_SIZE; -+ -+ /* We also need to make an entry in the .rela.plt section. */ -+ htab->elf.srelplt->size += sizeof (ElfNN_External_Rela); -+ -+ /* If this symbol is not defined in a regular file, and we are -+ not generating a shared library, then set the symbol to this -+ location in the .plt. This is required to make function -+ pointers compare as equal between the normal executable and -+ the shared library. */ -+ if (! info->shared -+ && !h->def_regular) -+ { -+ h->root.u.def.section = s; -+ h->root.u.def.value = h->plt.offset; -+ } -+ } -+ else -+ { -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ } -+ else -+ { -+ h->plt.offset = (bfd_vma) -1; -+ h->needs_plt = 0; -+ } -+ -+ if (h->got.refcount > 0) -+ { -+ asection *s; -+ bfd_boolean dyn; -+ int tls_type = riscv_elf_hash_entry(h)->tls_type; -+ -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ s = htab->elf.sgot; -+ h->got.offset = s->size; -+ dyn = htab->elf.dynamic_sections_created; -+ if (tls_type & (GOT_TLS_GD | GOT_TLS_IE)) -+ { -+ /* TLS_GD needs two dynamic relocs and two GOT slots. */ -+ if (tls_type & GOT_TLS_GD) -+ { -+ s->size += 2 * RISCV_ELF_WORD_BYTES; -+ htab->elf.srelgot->size += 2 * sizeof (ElfNN_External_Rela); -+ } -+ -+ /* TLS_IE needs one dynamic reloc and one GOT slot. */ -+ if (tls_type & GOT_TLS_IE) -+ { -+ s->size += RISCV_ELF_WORD_BYTES; -+ htab->elf.srelgot->size += sizeof (ElfNN_External_Rela); -+ } -+ } -+ else -+ { -+ s->size += RISCV_ELF_WORD_BYTES; -+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)) -+ htab->elf.srelgot->size += sizeof (ElfNN_External_Rela); -+ } -+ } -+ else -+ h->got.offset = (bfd_vma) -1; -+ -+ eh = (struct riscv_elf_link_hash_entry *) h; -+ if (eh->dyn_relocs == NULL) -+ return TRUE; -+ -+ /* In the shared -Bsymbolic case, discard space allocated for -+ dynamic pc-relative relocs against symbols which turn out to be -+ defined in regular objects. For the normal shared case, discard -+ space for pc-relative relocs that have become local due to symbol -+ visibility changes. */ -+ -+ if (info->shared) -+ { -+ if (SYMBOL_CALLS_LOCAL (info, h)) -+ { -+ struct riscv_elf_dyn_relocs **pp; -+ -+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) -+ { -+ p->count -= p->pc_count; -+ p->pc_count = 0; -+ if (p->count == 0) -+ *pp = p->next; -+ else -+ pp = &p->next; -+ } -+ } -+ -+ /* Also discard relocs on undefined weak syms with non-default -+ visibility. */ -+ if (eh->dyn_relocs != NULL -+ && h->root.type == bfd_link_hash_undefweak) -+ { -+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) -+ eh->dyn_relocs = NULL; -+ -+ /* Make sure undefined weak symbols are output as a dynamic -+ symbol in PIEs. */ -+ else if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ } -+ } -+ else -+ { -+ /* For the non-shared case, discard space for relocs against -+ symbols which turn out to need copy relocs or are not -+ dynamic. */ -+ -+ if (!h->non_got_ref -+ && ((h->def_dynamic -+ && !h->def_regular) -+ || (htab->elf.dynamic_sections_created -+ && (h->root.type == bfd_link_hash_undefweak -+ || h->root.type == bfd_link_hash_undefined)))) -+ { -+ /* Make sure this symbol is output as a dynamic symbol. -+ Undefined weak syms won't yet be marked as dynamic. */ -+ if (h->dynindx == -1 -+ && !h->forced_local) -+ { -+ if (! bfd_elf_link_record_dynamic_symbol (info, h)) -+ return FALSE; -+ } -+ -+ /* If that succeeded, we know we'll be keeping all the -+ relocs. */ -+ if (h->dynindx != -1) -+ goto keep; -+ } -+ -+ eh->dyn_relocs = NULL; -+ -+ keep: ; -+ } -+ -+ /* Finally, allocate space. */ -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ asection *sreloc = elf_section_data (p->sec)->sreloc; -+ sreloc->size += p->count * sizeof (ElfNN_External_Rela); -+ } -+ -+ return TRUE; -+} -+ -+/* Find any dynamic relocs that apply to read-only sections. */ -+ -+static bfd_boolean -+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf) -+{ -+ struct riscv_elf_link_hash_entry *eh; -+ struct riscv_elf_dyn_relocs *p; -+ -+ eh = (struct riscv_elf_link_hash_entry *) h; -+ for (p = eh->dyn_relocs; p != NULL; p = p->next) -+ { -+ asection *s = p->sec->output_section; -+ -+ if (s != NULL && (s->flags & SEC_READONLY) != 0) -+ { -+ ((struct bfd_link_info *) inf)->flags |= DF_TEXTREL; -+ -+ /* Short-circuit the traversal. */ -+ return FALSE; -+ } -+ } -+ return TRUE; -+} -+ -+static bfd_boolean -+riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+{ -+ struct riscv_elf_link_hash_table *htab; -+ bfd *dynobj; -+ asection *s; -+ bfd *ibfd; -+ -+ htab = riscv_elf_hash_table (info); -+ BFD_ASSERT (htab != NULL); -+ dynobj = htab->elf.dynobj; -+ BFD_ASSERT (dynobj != NULL); -+ -+ if (elf_hash_table (info)->dynamic_sections_created) -+ { -+ /* Set the contents of the .interp section to the interpreter. */ -+ if (info->executable) -+ { -+ s = bfd_get_linker_section (dynobj, ".interp"); -+ BFD_ASSERT (s != NULL); -+ s->size = strlen (ELFNN_DYNAMIC_INTERPRETER) + 1; -+ s->contents = (unsigned char *) ELFNN_DYNAMIC_INTERPRETER; -+ } -+ } -+ -+ /* Set up .got offsets for local syms, and space for local dynamic -+ relocs. */ -+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) -+ { -+ bfd_signed_vma *local_got; -+ bfd_signed_vma *end_local_got; -+ char *local_tls_type; -+ bfd_size_type locsymcount; -+ Elf_Internal_Shdr *symtab_hdr; -+ asection *srel; -+ -+ if (! is_riscv_elf (ibfd)) -+ continue; -+ -+ for (s = ibfd->sections; s != NULL; s = s->next) -+ { -+ struct riscv_elf_dyn_relocs *p; -+ -+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next) -+ { -+ if (!bfd_is_abs_section (p->sec) -+ && bfd_is_abs_section (p->sec->output_section)) -+ { -+ /* Input section has been discarded, either because -+ it is a copy of a linkonce section or due to -+ linker script /DISCARD/, so we'll be discarding -+ the relocs too. */ -+ } -+ else if (p->count != 0) -+ { -+ srel = elf_section_data (p->sec)->sreloc; -+ srel->size += p->count * sizeof (ElfNN_External_Rela); -+ if ((p->sec->output_section->flags & SEC_READONLY) != 0) -+ info->flags |= DF_TEXTREL; -+ } -+ } -+ } -+ -+ local_got = elf_local_got_refcounts (ibfd); -+ if (!local_got) -+ continue; -+ -+ symtab_hdr = &elf_symtab_hdr (ibfd); -+ locsymcount = symtab_hdr->sh_info; -+ end_local_got = local_got + locsymcount; -+ local_tls_type = _bfd_riscv_elf_local_got_tls_type (ibfd); -+ s = htab->elf.sgot; -+ srel = htab->elf.srelgot; -+ for (; local_got < end_local_got; ++local_got, ++local_tls_type) -+ { -+ if (*local_got > 0) -+ { -+ *local_got = s->size; -+ s->size += RISCV_ELF_WORD_BYTES; -+ if (*local_tls_type & GOT_TLS_GD) -+ s->size += RISCV_ELF_WORD_BYTES; -+ if (info->shared -+ || (*local_tls_type & (GOT_TLS_GD | GOT_TLS_IE))) -+ srel->size += sizeof (ElfNN_External_Rela); -+ } -+ else -+ *local_got = (bfd_vma) -1; -+ } -+ } -+ -+ /* Allocate global sym .plt and .got entries, and space for global -+ sym dynamic relocs. */ -+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info); -+ -+ if (htab->elf.sgotplt) -+ { -+ struct elf_link_hash_entry *got; -+ got = elf_link_hash_lookup (elf_hash_table (info), -+ "_GLOBAL_OFFSET_TABLE_", -+ FALSE, FALSE, FALSE); -+ -+ /* Don't allocate .got.plt section if there are no GOT nor PLT -+ entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ -+ if ((got == NULL -+ || !got->ref_regular_nonweak) -+ && (htab->elf.sgotplt->size == GOTPLT_HEADER_SIZE) -+ && (htab->elf.splt == NULL -+ || htab->elf.splt->size == 0) -+ && (htab->elf.sgot == NULL -+ || (htab->elf.sgot->size -+ == get_elf_backend_data (output_bfd)->got_header_size))) -+ htab->elf.sgotplt->size = 0; -+ } -+ -+ /* The check_relocs and adjust_dynamic_symbol entry points have -+ determined the sizes of the various dynamic sections. Allocate -+ memory for them. */ -+ for (s = dynobj->sections; s != NULL; s = s->next) -+ { -+ if ((s->flags & SEC_LINKER_CREATED) == 0) -+ continue; -+ -+ if (s == htab->elf.splt -+ || s == htab->elf.sgot -+ || s == htab->elf.sgotplt -+ || s == htab->sdynbss) -+ { -+ /* Strip this section if we don't need it; see the -+ comment below. */ -+ } -+ else if (strncmp (s->name, ".rela", 5) == 0) -+ { -+ if (s->size != 0) -+ { -+ /* We use the reloc_count field as a counter if we need -+ to copy relocs into the output file. */ -+ s->reloc_count = 0; -+ } -+ } -+ else -+ { -+ /* It's not one of our sections. */ -+ continue; -+ } -+ -+ if (s->size == 0) -+ { -+ /* If we don't need this section, strip it from the -+ output file. This is mostly to handle .rela.bss and -+ .rela.plt. We must create both sections in -+ create_dynamic_sections, because they must be created -+ before the linker maps input sections to output -+ sections. The linker does that before -+ adjust_dynamic_symbol is called, and it is that -+ function which decides whether anything needs to go -+ into these sections. */ -+ s->flags |= SEC_EXCLUDE; -+ continue; -+ } -+ -+ if ((s->flags & SEC_HAS_CONTENTS) == 0) -+ continue; -+ -+ /* Allocate memory for the section contents. Zero the memory -+ for the benefit of .rela.plt, which has 4 unused entries -+ at the beginning, and we don't want garbage. */ -+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); -+ if (s->contents == NULL) -+ return FALSE; -+ } -+ -+ if (elf_hash_table (info)->dynamic_sections_created) -+ { -+ /* Add some entries to the .dynamic section. We fill in the -+ values later, in riscv_elf_finish_dynamic_sections, but we -+ must add the entries now so that we get the correct size for -+ the .dynamic section. The DT_DEBUG entry is filled in by the -+ dynamic linker and used by the debugger. */ -+#define add_dynamic_entry(TAG, VAL) \ -+ _bfd_elf_add_dynamic_entry (info, TAG, VAL) -+ -+ if (info->executable) -+ { -+ if (!add_dynamic_entry (DT_DEBUG, 0)) -+ return FALSE; -+ } -+ -+ if (htab->elf.srelplt->size != 0) -+ { -+ if (!add_dynamic_entry (DT_PLTGOT, 0) -+ || !add_dynamic_entry (DT_PLTRELSZ, 0) -+ || !add_dynamic_entry (DT_PLTREL, DT_RELA) -+ || !add_dynamic_entry (DT_JMPREL, 0)) -+ return FALSE; -+ } -+ -+ if (!add_dynamic_entry (DT_RELA, 0) -+ || !add_dynamic_entry (DT_RELASZ, 0) -+ || !add_dynamic_entry (DT_RELAENT, sizeof (ElfNN_External_Rela))) -+ return FALSE; -+ -+ /* If any dynamic relocs apply to a read-only section, -+ then we need a DT_TEXTREL entry. */ -+ if ((info->flags & DF_TEXTREL) == 0) -+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info); -+ -+ if (info->flags & DF_TEXTREL) -+ { -+ if (!add_dynamic_entry (DT_TEXTREL, 0)) -+ return FALSE; -+ } -+ } -+#undef add_dynamic_entry -+ -+ return TRUE; -+} -+ -+#define TP_OFFSET 0 -+#define DTP_OFFSET 0x800 -+ -+/* Return the relocation value for a TLS dtp-relative reloc. */ -+ -+static bfd_vma -+dtpoff (struct bfd_link_info *info, bfd_vma address) -+{ -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) -+ return 0; -+ return address - elf_hash_table (info)->tls_sec->vma - DTP_OFFSET; -+} -+ -+/* Return the relocation value for a static TLS tp-relative relocation. */ -+ -+static bfd_vma -+tpoff (struct bfd_link_info *info, bfd_vma address) -+{ -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) -+ return 0; -+ return address - elf_hash_table (info)->tls_sec->vma - TP_OFFSET; -+} -+ -+/* Return the global pointer's value, or 0 if it is not in use. */ -+ -+static bfd_vma -+riscv_global_pointer_value (struct bfd_link_info *info) -+{ -+ struct bfd_link_hash_entry *h; -+ -+ h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); -+ if (h == NULL || h->type != bfd_link_hash_defined) -+ return 0; -+ -+ return h->u.def.value + sec_addr (h->u.def.section); -+} -+ -+/* Emplace a static relocation. */ -+ -+static bfd_reloc_status_type -+perform_relocation (const reloc_howto_type *howto, -+ const Elf_Internal_Rela *rel, -+ bfd_vma value, -+ asection *input_section, -+ bfd *input_bfd, -+ bfd_byte *contents) -+{ -+ if (howto->pc_relative) -+ value -= sec_addr (input_section) + rel->r_offset; -+ value += rel->r_addend; -+ -+ switch (ELFNN_R_TYPE (rel->r_info)) -+ { -+ case R_RISCV_HI20: -+ case R_RISCV_TPREL_HI20: -+ case R_RISCV_PCREL_HI20: -+ case R_RISCV_GOT_HI20: -+ case R_RISCV_TLS_GOT_HI20: -+ case R_RISCV_TLS_GD_HI20: -+ value = ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)); -+ break; -+ -+ case R_RISCV_LO12_I: -+ case R_RISCV_TPREL_LO12_I: -+ case R_RISCV_PCREL_LO12_I: -+ value = ENCODE_ITYPE_IMM (value); -+ break; -+ -+ case R_RISCV_LO12_S: -+ case R_RISCV_TPREL_LO12_S: -+ case R_RISCV_PCREL_LO12_S: -+ value = ENCODE_STYPE_IMM (value); -+ break; -+ -+ case R_RISCV_CALL: -+ case R_RISCV_CALL_PLT: -+ if (!VALID_UTYPE_IMM (RISCV_CONST_HIGH_PART (value))) -+ return bfd_reloc_overflow; -+ value = ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)) -+ | (ENCODE_ITYPE_IMM (value) << 32); -+ break; -+ -+ case R_RISCV_JAL: -+ if (!VALID_UJTYPE_IMM (value)) -+ return bfd_reloc_overflow; -+ value = ENCODE_UJTYPE_IMM (value); -+ break; -+ -+ case R_RISCV_BRANCH: -+ if (!VALID_SBTYPE_IMM (value)) -+ return bfd_reloc_overflow; -+ value = ENCODE_SBTYPE_IMM (value); -+ break; -+ -+ case R_RISCV_32: -+ case R_RISCV_64: -+ case R_RISCV_ADD8: -+ case R_RISCV_ADD16: -+ case R_RISCV_ADD32: -+ case R_RISCV_ADD64: -+ case R_RISCV_SUB8: -+ case R_RISCV_SUB16: -+ case R_RISCV_SUB32: -+ case R_RISCV_SUB64: -+ case R_RISCV_TLS_DTPREL32: -+ case R_RISCV_TLS_DTPREL64: -+ break; -+ -+ default: -+ return bfd_reloc_notsupported; -+ } -+ -+ bfd_vma word = bfd_get (howto->bitsize, input_bfd, contents + rel->r_offset); -+ word = (word & ~howto->dst_mask) | (value & howto->dst_mask); -+ bfd_put (howto->bitsize, input_bfd, word, contents + rel->r_offset); -+ -+ return bfd_reloc_ok; -+} -+ -+/* Remember all PC-relative high-part relocs we've encountered to help us -+ later resolve the corresponding low-part relocs. */ -+ -+typedef struct { -+ bfd_vma address; -+ bfd_vma value; -+} riscv_pcrel_hi_reloc; -+ -+typedef struct riscv_pcrel_lo_reloc { -+ asection *input_section; -+ struct bfd_link_info *info; -+ reloc_howto_type *howto; -+ const Elf_Internal_Rela *reloc; -+ bfd_vma addr; -+ const char *name; -+ bfd_byte *contents; -+ struct riscv_pcrel_lo_reloc *next; -+} riscv_pcrel_lo_reloc; -+ -+typedef struct { -+ htab_t hi_relocs; -+ riscv_pcrel_lo_reloc *lo_relocs; -+} riscv_pcrel_relocs; -+ -+static hashval_t -+riscv_pcrel_reloc_hash (const void *entry) -+{ -+ const riscv_pcrel_hi_reloc *e = entry; -+ return (hashval_t)(e->address >> 2); -+} -+ -+static bfd_boolean -+riscv_pcrel_reloc_eq (const void *entry1, const void *entry2) -+{ -+ const riscv_pcrel_hi_reloc *e1 = entry1, *e2 = entry2; -+ return e1->address == e2->address; -+} -+ -+static bfd_boolean -+riscv_init_pcrel_relocs (riscv_pcrel_relocs *p) -+{ -+ -+ p->lo_relocs = NULL; -+ p->hi_relocs = htab_create (1024, riscv_pcrel_reloc_hash, -+ riscv_pcrel_reloc_eq, free); -+ return p->hi_relocs != NULL; -+} -+ -+static void -+riscv_free_pcrel_relocs (riscv_pcrel_relocs *p) -+{ -+ riscv_pcrel_lo_reloc *cur = p->lo_relocs; -+ while (cur != NULL) -+ { -+ riscv_pcrel_lo_reloc *next = cur->next; -+ free (cur); -+ cur = next; -+ } -+ -+ htab_delete (p->hi_relocs); -+} -+ -+static bfd_boolean -+riscv_record_pcrel_hi_reloc (riscv_pcrel_relocs *p, bfd_vma addr, bfd_vma value) -+{ -+ riscv_pcrel_hi_reloc entry = {addr, value - addr}; -+ riscv_pcrel_hi_reloc **slot = -+ (riscv_pcrel_hi_reloc **) htab_find_slot (p->hi_relocs, &entry, INSERT); -+ BFD_ASSERT (*slot == NULL); -+ *slot = (riscv_pcrel_hi_reloc *) bfd_malloc (sizeof (riscv_pcrel_hi_reloc)); -+ if (*slot == NULL) -+ return FALSE; -+ **slot = entry; -+ return TRUE; -+} -+ -+static bfd_boolean -+riscv_record_pcrel_lo_reloc (riscv_pcrel_relocs *p, -+ asection *input_section, -+ struct bfd_link_info *info, -+ reloc_howto_type *howto, -+ const Elf_Internal_Rela *reloc, -+ bfd_vma addr, -+ const char *name, -+ bfd_byte *contents) -+{ -+ riscv_pcrel_lo_reloc *entry; -+ entry = (riscv_pcrel_lo_reloc *) bfd_malloc (sizeof (riscv_pcrel_lo_reloc)); -+ if (entry == NULL) -+ return FALSE; -+ *entry = (riscv_pcrel_lo_reloc) {input_section, info, howto, reloc, addr, -+ name, contents, p->lo_relocs}; -+ p->lo_relocs = entry; -+ return TRUE; -+} -+ -+static bfd_boolean -+riscv_resolve_pcrel_lo_relocs (riscv_pcrel_relocs *p) -+{ -+ riscv_pcrel_lo_reloc *r; -+ for (r = p->lo_relocs; r != NULL; r = r->next) -+ { -+ bfd *input_bfd = r->input_section->owner; -+ riscv_pcrel_hi_reloc search = {r->addr, 0}; -+ riscv_pcrel_hi_reloc *entry = htab_find (p->hi_relocs, &search); -+ if (entry == NULL) -+ return ((*r->info->callbacks->reloc_overflow) -+ (r->info, NULL, r->name, r->howto->name, (bfd_vma) 0, -+ input_bfd, r->input_section, r->reloc->r_offset)); -+ -+ perform_relocation (r->howto, r->reloc, entry->value, r->input_section, -+ input_bfd, r->contents); -+ } -+ -+ return TRUE; -+} -+ -+/* Relocate a RISC-V ELF section. -+ -+ The RELOCATE_SECTION function is called by the new ELF backend linker -+ to handle the relocations for a section. -+ -+ The relocs are always passed as Rela structures. -+ -+ This function is responsible for adjusting the section contents as -+ necessary, and (if generating a relocatable output file) adjusting -+ the reloc addend as necessary. -+ -+ This function does not have to worry about setting the reloc -+ address or the reloc symbol index. -+ -+ LOCAL_SYMS is a pointer to the swapped in local symbols. -+ -+ LOCAL_SECTIONS is an array giving the section in the input file -+ corresponding to the st_shndx field of each local symbol. -+ -+ The global hash table entry for the global symbols can be found -+ via elf_sym_hashes (input_bfd). -+ -+ When generating relocatable output, this function must handle -+ STB_LOCAL/STT_SECTION symbols specially. The output symbol is -+ going to be the section symbol corresponding to the output -+ section, which means that the addend must be adjusted -+ accordingly. */ -+ -+static bfd_boolean -+riscv_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, -+ bfd *input_bfd, asection *input_section, -+ bfd_byte *contents, Elf_Internal_Rela *relocs, -+ Elf_Internal_Sym *local_syms, -+ asection **local_sections) -+{ -+ Elf_Internal_Rela *rel; -+ Elf_Internal_Rela *relend; -+ riscv_pcrel_relocs pcrel_relocs; -+ bfd_boolean ret = FALSE; -+ asection *sreloc = elf_section_data (input_section)->sreloc; -+ struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); -+ Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (input_bfd); -+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); -+ bfd_vma *local_got_offsets = elf_local_got_offsets (input_bfd); -+ -+ if (!riscv_init_pcrel_relocs (&pcrel_relocs)) -+ return FALSE; -+ -+ relend = relocs + input_section->reloc_count; -+ for (rel = relocs; rel < relend; rel++) -+ { -+ unsigned long r_symndx; -+ struct elf_link_hash_entry *h; -+ Elf_Internal_Sym *sym; -+ asection *sec; -+ bfd_vma relocation; -+ bfd_reloc_status_type r = bfd_reloc_ok; -+ const char *name; -+ bfd_vma off, ie_off; -+ bfd_boolean unresolved_reloc, is_ie = FALSE; -+ bfd_vma pc = sec_addr (input_section) + rel->r_offset; -+ int r_type = ELFNN_R_TYPE (rel->r_info), tls_type; -+ reloc_howto_type *howto = riscv_elf_rtype_to_howto (r_type); -+ const char *msg = NULL; -+ -+ if (r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY) -+ continue; -+ -+ /* This is a final link. */ -+ r_symndx = ELFNN_R_SYM (rel->r_info); -+ h = NULL; -+ sym = NULL; -+ sec = NULL; -+ unresolved_reloc = FALSE; -+ if (r_symndx < symtab_hdr->sh_info) -+ { -+ sym = local_syms + r_symndx; -+ sec = local_sections[r_symndx]; -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); -+ } -+ else -+ { -+ bfd_boolean warned; -+ /* bfd_boolean ignored; */ -+ -+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, -+ r_symndx, symtab_hdr, sym_hashes, -+ h, sec, relocation, -+ unresolved_reloc, warned /*, ignored */); -+ if (warned) -+ { -+ /* To avoid generating warning messages about truncated -+ relocations, set the relocation's address to be the same as -+ the start of this section. */ -+ if (input_section->output_section != NULL) -+ relocation = input_section->output_section->vma; -+ else -+ relocation = 0; -+ } -+ } -+ -+ if (sec != NULL && discarded_section (sec)) -+ RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, -+ rel, 1, relend, howto, 0, contents); -+ -+ if (info->relocatable) -+ continue; -+ -+ if (h != NULL) -+ name = h->root.root.string; -+ else -+ { -+ name = (bfd_elf_string_from_elf_section -+ (input_bfd, symtab_hdr->sh_link, sym->st_name)); -+ if (name == NULL || *name == '\0') -+ name = bfd_section_name (input_bfd, sec); -+ } -+ -+ switch (r_type) -+ { -+ case R_RISCV_NONE: -+ case R_RISCV_TPREL_ADD: -+ case R_RISCV_COPY: -+ case R_RISCV_JUMP_SLOT: -+ case R_RISCV_RELATIVE: -+ /* These require nothing of us at all. */ -+ continue; -+ -+ case R_RISCV_BRANCH: -+ case R_RISCV_HI20: -+ /* These require no special handling beyond perform_relocation. */ -+ break; -+ -+ case R_RISCV_GOT_HI20: -+ if (h != NULL) -+ { -+ bfd_boolean dyn; -+ -+ off = h->got.offset; -+ BFD_ASSERT (off != (bfd_vma) -1); -+ dyn = elf_hash_table (info)->dynamic_sections_created; -+ -+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) -+ || (info->shared -+ && SYMBOL_REFERENCES_LOCAL (info, h))) -+ { -+ /* This is actually a static link, or it is a -+ -Bsymbolic link and the symbol is defined -+ locally, or the symbol was forced to be local -+ because of a version file. We must initialize -+ this entry in the global offset table. Since the -+ offset must always be a multiple of the word size, -+ we use the least significant bit to record whether -+ we have initialized it already. -+ -+ When doing a dynamic link, we create a .rela.got -+ relocation entry to initialize the value. This -+ is done in the finish_dynamic_symbol routine. */ -+ if ((off & 1) != 0) -+ off &= ~1; -+ else -+ { -+ bfd_put_NN (output_bfd, relocation, -+ htab->elf.sgot->contents + off); -+ h->got.offset |= 1; -+ } -+ } -+ else -+ unresolved_reloc = FALSE; -+ } -+ else -+ { -+ BFD_ASSERT (local_got_offsets != NULL -+ && local_got_offsets[r_symndx] != (bfd_vma) -1); -+ -+ off = local_got_offsets[r_symndx]; -+ -+ /* The offset must always be a multiple of 8 on 64-bit. -+ We use the least significant bit to record -+ whether we have already processed this entry. */ -+ if ((off & 1) != 0) -+ off &= ~1; -+ else -+ { -+ if (info->shared) -+ { -+ asection *s; -+ Elf_Internal_Rela outrel; -+ -+ /* We need to generate a R_RISCV_RELATIVE reloc -+ for the dynamic linker. */ -+ s = htab->elf.srelgot; -+ BFD_ASSERT (s != NULL); -+ -+ outrel.r_offset = sec_addr (htab->elf.sgot) + off; -+ outrel.r_info = -+ ELFNN_R_INFO (0, R_RISCV_RELATIVE); -+ outrel.r_addend = relocation; -+ relocation = 0; -+ riscv_elf_append_rela (output_bfd, s, &outrel); -+ } -+ -+ bfd_put_NN (output_bfd, relocation, -+ htab->elf.sgot->contents + off); -+ local_got_offsets[r_symndx] |= 1; -+ } -+ } -+ relocation = sec_addr (htab->elf.sgot) + off; -+ if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, relocation)) -+ r = bfd_reloc_overflow; -+ break; -+ -+ case R_RISCV_ADD8: -+ case R_RISCV_ADD16: -+ case R_RISCV_ADD32: -+ case R_RISCV_ADD64: -+ { -+ bfd_vma old_value = bfd_get (howto->bitsize, input_bfd, -+ contents + rel->r_offset); -+ relocation = old_value + relocation; -+ } -+ break; -+ -+ case R_RISCV_SUB8: -+ case R_RISCV_SUB16: -+ case R_RISCV_SUB32: -+ case R_RISCV_SUB64: -+ { -+ bfd_vma old_value = bfd_get (howto->bitsize, input_bfd, -+ contents + rel->r_offset); -+ relocation = old_value - relocation; -+ } -+ break; -+ -+ case R_RISCV_CALL_PLT: -+ case R_RISCV_CALL: -+ case R_RISCV_JAL: -+ if (info->shared && h != NULL && h->plt.offset != MINUS_ONE) -+ { -+ /* Refer to the PLT entry. */ -+ relocation = sec_addr (htab->elf.splt) + h->plt.offset; -+ unresolved_reloc = FALSE; -+ } -+ break; -+ -+ case R_RISCV_TPREL_HI20: -+ relocation = tpoff (info, relocation); -+ break; -+ -+ case R_RISCV_TPREL_LO12_I: -+ case R_RISCV_TPREL_LO12_S: -+ relocation = tpoff (info, relocation); -+ if (VALID_ITYPE_IMM (relocation + rel->r_addend)) -+ { -+ /* We can use tp as the base register. */ -+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset); -+ insn &= ~(OP_MASK_RS1 << OP_SH_RS1); -+ insn |= X_TP << OP_SH_RS1; -+ bfd_put_32 (input_bfd, insn, contents + rel->r_offset); -+ } -+ break; -+ -+ case R_RISCV_LO12_I: -+ case R_RISCV_LO12_S: -+ { -+ bfd_vma gp = riscv_global_pointer_value (info); -+ bfd_boolean x0_base = VALID_ITYPE_IMM (relocation + rel->r_addend); -+ if (x0_base || VALID_ITYPE_IMM (relocation + rel->r_addend - gp)) -+ { -+ /* We can use x0 or gp as the base register. */ -+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset); -+ insn &= ~(OP_MASK_RS1 << OP_SH_RS1); -+ if (!x0_base) -+ { -+ rel->r_addend -= gp; -+ insn |= X_GP << OP_SH_RS1; -+ } -+ bfd_put_32 (input_bfd, insn, contents + rel->r_offset); -+ } -+ break; -+ } -+ -+ case R_RISCV_PCREL_HI20: -+ if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, -+ relocation + rel->r_addend)) -+ r = bfd_reloc_overflow; -+ break; -+ -+ case R_RISCV_PCREL_LO12_I: -+ case R_RISCV_PCREL_LO12_S: -+ if (riscv_record_pcrel_lo_reloc (&pcrel_relocs, input_section, info, -+ howto, rel, relocation, name, -+ contents)) -+ continue; -+ r = bfd_reloc_overflow; -+ break; -+ -+ case R_RISCV_TLS_DTPREL32: -+ case R_RISCV_TLS_DTPREL64: -+ relocation = dtpoff (info, relocation); -+ break; -+ -+ case R_RISCV_32: -+ case R_RISCV_64: -+ if ((input_section->flags & SEC_ALLOC) == 0) -+ break; -+ -+ if ((info->shared -+ && (h == NULL -+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT -+ || h->root.type != bfd_link_hash_undefweak) -+ && (! howto->pc_relative -+ || !SYMBOL_CALLS_LOCAL (info, h))) -+ || (!info->shared -+ && h != NULL -+ && h->dynindx != -1 -+ && !h->non_got_ref -+ && ((h->def_dynamic -+ && !h->def_regular) -+ || h->root.type == bfd_link_hash_undefweak -+ || h->root.type == bfd_link_hash_undefined))) -+ { -+ Elf_Internal_Rela outrel; -+ bfd_boolean skip_static_relocation, skip_dynamic_relocation; -+ -+ /* When generating a shared object, these relocations -+ are copied into the output file to be resolved at run -+ time. */ -+ -+ outrel.r_offset = -+ _bfd_elf_section_offset (output_bfd, info, input_section, -+ rel->r_offset); -+ skip_static_relocation = outrel.r_offset != (bfd_vma) -2; -+ skip_dynamic_relocation = outrel.r_offset >= (bfd_vma) -2; -+ outrel.r_offset += sec_addr (input_section); -+ -+ if (skip_dynamic_relocation) -+ memset (&outrel, 0, sizeof outrel); -+ else if (h != NULL && h->dynindx != -1 -+ && !(info->shared -+ && SYMBOLIC_BIND (info, h) -+ && h->def_regular)) -+ { -+ outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type); -+ outrel.r_addend = rel->r_addend; -+ } -+ else -+ { -+ outrel.r_info = ELFNN_R_INFO (0, R_RISCV_RELATIVE); -+ outrel.r_addend = relocation + rel->r_addend; -+ } -+ -+ riscv_elf_append_rela (output_bfd, sreloc, &outrel); -+ if (skip_static_relocation) -+ continue; -+ } -+ break; -+ -+ case R_RISCV_TLS_GOT_HI20: -+ is_ie = TRUE; -+ /* Fall through. */ -+ -+ case R_RISCV_TLS_GD_HI20: -+ if (h != NULL) -+ { -+ off = h->got.offset; -+ h->got.offset |= 1; -+ } -+ else -+ { -+ off = local_got_offsets[r_symndx]; -+ local_got_offsets[r_symndx] |= 1; -+ } -+ -+ tls_type = _bfd_riscv_elf_tls_type (input_bfd, h, r_symndx); -+ BFD_ASSERT (tls_type & (GOT_TLS_IE | GOT_TLS_GD)); -+ /* If this symbol is referenced by both GD and IE TLS, the IE -+ reference's GOT slot follows the GD reference's slots. */ -+ ie_off = 0; -+ if ((tls_type & GOT_TLS_GD) && (tls_type & GOT_TLS_IE)) -+ ie_off = 2 * GOT_ENTRY_SIZE; -+ -+ if ((off & 1) != 0) -+ off &= ~1; -+ else -+ { -+ Elf_Internal_Rela outrel; -+ int indx = 0; -+ bfd_boolean need_relocs = FALSE; -+ -+ if (htab->elf.srelgot == NULL) -+ abort (); -+ -+ if (h != NULL) -+ { -+ bfd_boolean dyn; -+ dyn = htab->elf.dynamic_sections_created; -+ -+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) -+ && (!info->shared -+ || !SYMBOL_REFERENCES_LOCAL (info, h))) -+ { -+ indx = h->dynindx; -+ } -+ } -+ -+ /* The GOT entries have not been initialized yet. Do it -+ now, and emit any relocations. */ -+ if ((info->shared || indx != 0) -+ && (h == NULL -+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT -+ || h->root.type != bfd_link_hash_undefweak)) -+ need_relocs = TRUE; -+ -+ if (tls_type & GOT_TLS_GD) -+ { -+ if (need_relocs) -+ { -+ outrel.r_offset = sec_addr (htab->elf.sgot) + off; -+ outrel.r_addend = 0; -+ outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_DTPMODNN); -+ bfd_put_NN (output_bfd, 0, -+ htab->elf.sgot->contents + off); -+ riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel); -+ if (indx == 0) -+ { -+ BFD_ASSERT (! unresolved_reloc); -+ bfd_put_NN (output_bfd, -+ dtpoff (info, relocation), -+ (htab->elf.sgot->contents + off + -+ RISCV_ELF_WORD_BYTES)); -+ } -+ else -+ { -+ bfd_put_NN (output_bfd, 0, -+ (htab->elf.sgot->contents + off + -+ RISCV_ELF_WORD_BYTES)); -+ outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_DTPRELNN); -+ outrel.r_offset += RISCV_ELF_WORD_BYTES; -+ riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel); -+ } -+ } -+ else -+ { -+ /* If we are not emitting relocations for a -+ general dynamic reference, then we must be in a -+ static link or an executable link with the -+ symbol binding locally. Mark it as belonging -+ to module 1, the executable. */ -+ bfd_put_NN (output_bfd, 1, -+ htab->elf.sgot->contents + off); -+ bfd_put_NN (output_bfd, -+ dtpoff (info, relocation), -+ (htab->elf.sgot->contents + off + -+ RISCV_ELF_WORD_BYTES)); -+ } -+ } -+ -+ if (tls_type & GOT_TLS_IE) -+ { -+ if (need_relocs) -+ { -+ bfd_put_NN (output_bfd, 0, -+ htab->elf.sgot->contents + off + ie_off); -+ outrel.r_offset = sec_addr (htab->elf.sgot) -+ + off + ie_off; -+ outrel.r_addend = 0; -+ if (indx == 0) -+ outrel.r_addend = tpoff (info, relocation); -+ outrel.r_info = ELFNN_R_INFO (indx, R_RISCV_TLS_TPRELNN); -+ riscv_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel); -+ } -+ else -+ { -+ bfd_put_NN (output_bfd, tpoff (info, relocation), -+ htab->elf.sgot->contents + off + ie_off); -+ } -+ } -+ } -+ -+ BFD_ASSERT (off < (bfd_vma) -2); -+ relocation = sec_addr (htab->elf.sgot) + off + (is_ie ? ie_off : 0); -+ if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, relocation)) -+ r = bfd_reloc_overflow; -+ unresolved_reloc = FALSE; -+ break; -+ -+ default: -+ r = bfd_reloc_notsupported; -+ } -+ -+ /* Dynamic relocs are not propagated for SEC_DEBUGGING sections -+ because such sections are not SEC_ALLOC and thus ld.so will -+ not process them. */ -+ if (unresolved_reloc -+ && !((input_section->flags & SEC_DEBUGGING) != 0 -+ && h->def_dynamic) -+ && _bfd_elf_section_offset (output_bfd, info, input_section, -+ rel->r_offset) != (bfd_vma) -1) -+ { -+ (*_bfd_error_handler) -+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), -+ input_bfd, -+ input_section, -+ (long) rel->r_offset, -+ howto->name, -+ h->root.root.string); -+ continue; -+ } -+ -+ if (r == bfd_reloc_ok) -+ r = perform_relocation (howto, rel, relocation, input_section, -+ input_bfd, contents); -+ -+ switch (r) -+ { -+ case bfd_reloc_ok: -+ continue; -+ -+ case bfd_reloc_overflow: -+ r = info->callbacks->reloc_overflow -+ (info, (h ? &h->root : NULL), name, howto->name, -+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset); -+ break; -+ -+ case bfd_reloc_undefined: -+ r = info->callbacks->undefined_symbol -+ (info, name, input_bfd, input_section, rel->r_offset, -+ TRUE); -+ break; -+ -+ case bfd_reloc_outofrange: -+ msg = _("internal error: out of range error"); -+ break; -+ -+ case bfd_reloc_notsupported: -+ msg = _("internal error: unsupported relocation error"); -+ break; -+ -+ case bfd_reloc_dangerous: -+ msg = _("internal error: dangerous relocation"); -+ break; -+ -+ default: -+ msg = _("internal error: unknown error"); -+ break; -+ } -+ -+ if (msg) -+ r = info->callbacks->warning -+ (info, msg, name, input_bfd, input_section, rel->r_offset); -+ goto out; -+ } -+ -+ ret = riscv_resolve_pcrel_lo_relocs (&pcrel_relocs); -+out: -+ riscv_free_pcrel_relocs (&pcrel_relocs); -+ return ret; -+} -+ -+/* Finish up dynamic symbol handling. We set the contents of various -+ dynamic sections here. */ -+ -+static bfd_boolean -+riscv_elf_finish_dynamic_symbol (bfd *output_bfd, -+ struct bfd_link_info *info, -+ struct elf_link_hash_entry *h, -+ Elf_Internal_Sym *sym) -+{ -+ struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); -+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); -+ -+ if (h->plt.offset != (bfd_vma) -1) -+ { -+ /* We've decided to create a PLT entry for this symbol. */ -+ bfd_byte *loc; -+ bfd_vma i, header_address, plt_idx, got_address; -+ uint32_t plt_entry[PLT_ENTRY_INSNS]; -+ Elf_Internal_Rela rela; -+ -+ BFD_ASSERT (h->dynindx != -1); -+ -+ /* Calculate the address of the PLT header. */ -+ header_address = sec_addr (htab->elf.splt); -+ -+ /* Calculate the index of the entry. */ -+ plt_idx = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE; -+ -+ /* Calculate the address of the .got.plt entry. */ -+ got_address = riscv_elf_got_plt_val (plt_idx, info); -+ -+ /* Find out where the .plt entry should go. */ -+ loc = htab->elf.splt->contents + h->plt.offset; -+ -+ /* Fill in the PLT entry itself. */ -+ riscv_make_plt_entry (got_address, header_address + h->plt.offset, -+ plt_entry); -+ for (i = 0; i < PLT_ENTRY_INSNS; i++) -+ bfd_put_32 (output_bfd, plt_entry[i], loc + 4*i); -+ -+ /* Fill in the initial value of the .got.plt entry. */ -+ loc = htab->elf.sgotplt->contents -+ + (got_address - sec_addr (htab->elf.sgotplt)); -+ bfd_put_NN (output_bfd, sec_addr (htab->elf.splt), loc); -+ -+ /* Fill in the entry in the .rela.plt section. */ -+ rela.r_offset = got_address; -+ rela.r_addend = 0; -+ rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_JUMP_SLOT); -+ -+ loc = htab->elf.srelplt->contents + plt_idx * sizeof (ElfNN_External_Rela); -+ bed->s->swap_reloca_out (output_bfd, &rela, loc); -+ -+ if (!h->def_regular) -+ { -+ /* Mark the symbol as undefined, rather than as defined in -+ the .plt section. Leave the value alone. */ -+ sym->st_shndx = SHN_UNDEF; -+ /* If the symbol is weak, we do need to clear the value. -+ Otherwise, the PLT entry would provide a definition for -+ the symbol even if the symbol wasn't defined anywhere, -+ and so the symbol would never be NULL. */ -+ if (!h->ref_regular_nonweak) -+ sym->st_value = 0; -+ } -+ } -+ -+ if (h->got.offset != (bfd_vma) -1 -+ && !(riscv_elf_hash_entry(h)->tls_type & (GOT_TLS_GD | GOT_TLS_IE))) -+ { -+ asection *sgot; -+ asection *srela; -+ Elf_Internal_Rela rela; -+ -+ /* This symbol has an entry in the GOT. Set it up. */ -+ -+ sgot = htab->elf.sgot; -+ srela = htab->elf.srelgot; -+ BFD_ASSERT (sgot != NULL && srela != NULL); -+ -+ rela.r_offset = sec_addr (sgot) + (h->got.offset &~ (bfd_vma) 1); -+ -+ /* If this is a -Bsymbolic link, and the symbol is defined -+ locally, we just want to emit a RELATIVE reloc. Likewise if -+ the symbol was forced to be local because of a version file. -+ The entry in the global offset table will already have been -+ initialized in the relocate_section function. */ -+ if (info->shared -+ && (info->symbolic || h->dynindx == -1) -+ && h->def_regular) -+ { -+ asection *sec = h->root.u.def.section; -+ rela.r_info = ELFNN_R_INFO (0, R_RISCV_RELATIVE); -+ rela.r_addend = (h->root.u.def.value -+ + sec->output_section->vma -+ + sec->output_offset); -+ } -+ else -+ { -+ BFD_ASSERT (h->dynindx != -1); -+ rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_NN); -+ rela.r_addend = 0; -+ } -+ -+ bfd_put_NN (output_bfd, 0, -+ sgot->contents + (h->got.offset & ~(bfd_vma) 1)); -+ riscv_elf_append_rela (output_bfd, srela, &rela); -+ } -+ -+ if (h->needs_copy) -+ { -+ Elf_Internal_Rela rela; -+ -+ /* This symbols needs a copy reloc. Set it up. */ -+ BFD_ASSERT (h->dynindx != -1); -+ -+ rela.r_offset = sec_addr (h->root.u.def.section) + h->root.u.def.value; -+ rela.r_info = ELFNN_R_INFO (h->dynindx, R_RISCV_COPY); -+ rela.r_addend = 0; -+ riscv_elf_append_rela (output_bfd, htab->srelbss, &rela); -+ } -+ -+ /* Mark some specially defined symbols as absolute. */ -+ if (/*h == htab->elf.hdynamic*/ -+ strcmp (h->root.root.string, "_DYNAMIC") == 0 -+ || (h == htab->elf.hgot || h == htab->elf.hplt)) -+ sym->st_shndx = SHN_ABS; -+ -+ return TRUE; -+} -+ -+/* Finish up the dynamic sections. */ -+ -+static bfd_boolean -+riscv_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, -+ bfd *dynobj, asection *sdyn) -+{ -+ struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); -+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); -+ size_t dynsize = bed->s->sizeof_dyn; -+ bfd_byte *dyncon, *dynconend; -+ -+ dynconend = sdyn->contents + sdyn->size; -+ for (dyncon = sdyn->contents; dyncon < dynconend; dyncon += dynsize) -+ { -+ Elf_Internal_Dyn dyn; -+ asection *s; -+ -+ bed->s->swap_dyn_in (dynobj, dyncon, &dyn); -+ -+ switch (dyn.d_tag) -+ { -+ case DT_PLTGOT: -+ s = htab->elf.sgotplt; -+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; -+ break; -+ case DT_JMPREL: -+ s = htab->elf.srelplt; -+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; -+ break; -+ case DT_PLTRELSZ: -+ s = htab->elf.srelplt; -+ dyn.d_un.d_val = s->size; -+ break; -+ default: -+ continue; -+ } -+ -+ bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); -+ } -+ return TRUE; -+} -+ -+static bfd_boolean -+riscv_elf_finish_dynamic_sections (bfd *output_bfd, -+ struct bfd_link_info *info) -+{ -+ bfd *dynobj; -+ asection *sdyn; -+ struct riscv_elf_link_hash_table *htab; -+ -+ htab = riscv_elf_hash_table (info); -+ BFD_ASSERT (htab != NULL); -+ dynobj = htab->elf.dynobj; -+ -+ sdyn = bfd_get_linker_section (dynobj, ".dynamic"); -+ -+ if (elf_hash_table (info)->dynamic_sections_created) -+ { -+ asection *splt; -+ bfd_boolean ret; -+ -+ splt = htab->elf.splt; -+ BFD_ASSERT (splt != NULL && sdyn != NULL); -+ -+ ret = riscv_finish_dyn (output_bfd, info, dynobj, sdyn); -+ -+ if (ret != TRUE) -+ return ret; -+ -+ /* Fill in the head and tail entries in the procedure linkage table. */ -+ if (splt->size > 0) -+ { -+ int i; -+ uint32_t plt_header[PLT_HEADER_INSNS]; -+ riscv_make_plt0_entry (sec_addr (htab->elf.sgotplt), -+ sec_addr (splt), plt_header); -+ -+ for (i = 0; i < PLT_HEADER_INSNS; i++) -+ bfd_put_32 (output_bfd, plt_header[i], splt->contents + 4*i); -+ } -+ -+ elf_section_data (splt->output_section)->this_hdr.sh_entsize -+ = PLT_ENTRY_SIZE; -+ } -+ -+ if (htab->elf.sgotplt) -+ { -+ if (bfd_is_abs_section (htab->elf.sgotplt->output_section)) -+ { -+ (*_bfd_error_handler) -+ (_("discarded output section: `%A'"), htab->elf.sgotplt); -+ return FALSE; -+ } -+ -+ if (htab->elf.sgotplt->size > 0) -+ { -+ /* Write the first two entries in .got.plt, needed for the dynamic -+ linker. */ -+ bfd_put_NN (output_bfd, (bfd_vma) -1, htab->elf.sgotplt->contents); -+ bfd_put_NN (output_bfd, (bfd_vma) 0, -+ htab->elf.sgotplt->contents + GOT_ENTRY_SIZE); -+ } -+ -+ elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = -+ GOT_ENTRY_SIZE; -+ } -+ -+ if (htab->elf.sgot) -+ { -+ if (htab->elf.sgot->size > 0) -+ { -+ /* Set the first entry in the global offset table to the address of -+ the dynamic section. */ -+ bfd_vma val = sdyn ? sec_addr (sdyn) : 0; -+ bfd_put_NN (output_bfd, val, htab->elf.sgot->contents); -+ } -+ -+ elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = -+ GOT_ENTRY_SIZE; -+ } -+ -+ return TRUE; -+} -+ -+/* Return address for Ith PLT stub in section PLT, for relocation REL -+ or (bfd_vma) -1 if it should not be included. */ -+ -+static bfd_vma -+riscv_elf_plt_sym_val (bfd_vma i, const asection *plt, -+ const arelent *rel ATTRIBUTE_UNUSED) -+{ -+ return plt->vma + PLT_HEADER_SIZE + i * PLT_ENTRY_SIZE; -+} -+ -+static enum elf_reloc_type_class -+riscv_reloc_type_class (/*const struct bfd_link_info *info ATTRIBUTE_UNUSED, -+ const asection *rel_sec ATTRIBUTE_UNUSED,*/ -+ const Elf_Internal_Rela *rela) -+{ -+ switch (ELFNN_R_TYPE (rela->r_info)) -+ { -+ case R_RISCV_RELATIVE: -+ return reloc_class_relative; -+ case R_RISCV_JUMP_SLOT: -+ return reloc_class_plt; -+ case R_RISCV_COPY: -+ return reloc_class_copy; -+ default: -+ return reloc_class_normal; -+ } -+} -+ -+/* Return true if bfd machine EXTENSION is an extension of machine BASE. */ -+ -+static bfd_boolean -+riscv_mach_extends_p (unsigned long base, unsigned long extension) -+{ -+ return extension == base; -+} -+ -+/* Merge backend specific data from an object file to the output -+ object file when linking. */ -+ -+static bfd_boolean -+_bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ flagword old_flags; -+ flagword new_flags; -+ -+ if (!is_riscv_elf (ibfd) || !is_riscv_elf (obfd)) -+ return TRUE; -+ -+ if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0) -+ { -+ (*_bfd_error_handler) -+ (_("%B: ABI is incompatible with that of the selected emulation"), -+ ibfd); -+ return FALSE; -+ } -+ -+ if (!_bfd_elf_merge_object_attributes (ibfd, obfd)) -+ return FALSE; -+ -+ new_flags = elf_elfheader (ibfd)->e_flags; -+ old_flags = elf_elfheader (obfd)->e_flags; -+ -+ if (! elf_flags_init (obfd)) -+ { -+ elf_flags_init (obfd) = TRUE; -+ elf_elfheader (obfd)->e_flags = new_flags; -+ elf_elfheader (obfd)->e_ident[EI_CLASS] -+ = elf_elfheader (ibfd)->e_ident[EI_CLASS]; -+ -+ if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) -+ && (bfd_get_arch_info (obfd)->the_default -+ || riscv_mach_extends_p (bfd_get_mach (obfd), -+ bfd_get_mach (ibfd)))) -+ { -+ if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), -+ bfd_get_mach (ibfd))) -+ return FALSE; -+ } -+ -+ return TRUE; -+ } -+ -+ /* Check flag compatibility. */ -+ -+ if (new_flags == old_flags) -+ return TRUE; -+ -+ /* Don't link RV32 and RV64. */ -+ if (elf_elfheader (ibfd)->e_ident[EI_CLASS] -+ != elf_elfheader (obfd)->e_ident[EI_CLASS]) -+ { -+ (*_bfd_error_handler) -+ (_("%B: ELF class mismatch: can't link 32- and 64-bit modules"), ibfd); -+ goto fail; -+ } -+ -+ /* Warn about any other mismatches. */ -+ if (new_flags != old_flags) -+ { -+ if (!EF_IS_RISCV_EXT_Xcustom (new_flags) && -+ !EF_IS_RISCV_EXT_Xcustom (old_flags)) -+ { -+ (*_bfd_error_handler) -+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), -+ ibfd, (unsigned long) new_flags, -+ (unsigned long) old_flags); -+ goto fail; -+ } -+ else if (EF_IS_RISCV_EXT_Xcustom(new_flags)) -+ EF_SET_RISCV_EXT (elf_elfheader (obfd)->e_flags, -+ EF_GET_RISCV_EXT (old_flags)); -+ } -+ -+ return TRUE; -+ -+fail: -+ bfd_set_error (bfd_error_bad_value); -+ return FALSE; -+} -+ -+/* Delete some bytes from a section while relaxing. */ -+ -+static bfd_boolean -+riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count) -+{ -+ unsigned int i, symcount; -+ bfd_vma toaddr = sec->size; -+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (abfd); -+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr; -+ unsigned int sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec); -+ struct bfd_elf_section_data *data = elf_section_data (sec); -+ bfd_byte *contents = data->this_hdr.contents; -+ -+ /* Actually delete the bytes. */ -+ sec->size -= count; -+ memmove (contents + addr, contents + addr + count, toaddr - addr - count); -+ -+ /* Adjust the location of all of the relocs. Note that we need not -+ adjust the addends, since all PC-relative references must be against -+ symbols, which we will adjust below. */ -+ for (i = 0; i < sec->reloc_count; i++) -+ if (data->relocs[i].r_offset > addr && data->relocs[i].r_offset < toaddr) -+ data->relocs[i].r_offset -= count; -+ -+ /* Adjust the local symbols defined in this section. */ -+ for (i = 0; i < symtab_hdr->sh_info; i++) -+ { -+ Elf_Internal_Sym *sym = (Elf_Internal_Sym *) symtab_hdr->contents + i; -+ if (sym->st_shndx == sec_shndx) -+ { -+ /* If the symbol is in the range of memory we just moved, we -+ have to adjust its value. */ -+ if (sym->st_value > addr && sym->st_value <= toaddr) -+ sym->st_value -= count; -+ -+ /* If the symbol *spans* the bytes we just deleted (i.e. its -+ *end* is in the moved bytes but its *start* isn't), then we -+ must adjust its size. */ -+ if (sym->st_value <= addr -+ && sym->st_value + sym->st_size > addr -+ && sym->st_value + sym->st_size <= toaddr) -+ sym->st_size -= count; -+ } -+ } -+ -+ /* Now adjust the global symbols defined in this section. */ -+ symcount = ((symtab_hdr->sh_size / sizeof(ElfNN_External_Sym)) -+ - symtab_hdr->sh_info); -+ -+ for (i = 0; i < symcount; i++) -+ { -+ struct elf_link_hash_entry *sym_hash = sym_hashes[i]; -+ -+ if ((sym_hash->root.type == bfd_link_hash_defined -+ || sym_hash->root.type == bfd_link_hash_defweak) -+ && sym_hash->root.u.def.section == sec) -+ { -+ /* As above, adjust the value if needed. */ -+ if (sym_hash->root.u.def.value > addr -+ && sym_hash->root.u.def.value <= toaddr) -+ sym_hash->root.u.def.value -= count; -+ -+ /* As above, adjust the size if needed. */ -+ if (sym_hash->root.u.def.value <= addr -+ && sym_hash->root.u.def.value + sym_hash->size > addr -+ && sym_hash->root.u.def.value + sym_hash->size <= toaddr) -+ sym_hash->size -= count; -+ } -+ } -+ -+ return TRUE; -+} -+ -+/* Relax AUIPC + JALR into JAL. */ -+ -+static bfd_boolean -+_bfd_riscv_relax_call (bfd *abfd, asection *sec, -+ struct bfd_link_info *link_info, -+ Elf_Internal_Rela *rel, -+ bfd_vma symval, -+ bfd_boolean *again) -+{ -+ bfd_byte *contents = elf_section_data (sec)->this_hdr.contents; -+ bfd_signed_vma foff = symval - (sec_addr (sec) + rel->r_offset); -+ bfd_boolean near_zero = (symval + RISCV_IMM_REACH/2) < RISCV_IMM_REACH; -+ bfd_vma auipc, jalr; -+ int r_type; -+ -+ /* See if this function call can be shortened. */ -+ if (!VALID_UJTYPE_IMM (foff) && !(!link_info->shared && near_zero)) -+ return TRUE; -+ -+ /* Shorten the function call. */ -+ BFD_ASSERT (rel->r_offset + 8 <= sec->size); -+ -+ auipc = bfd_get_32 (abfd, contents + rel->r_offset); -+ jalr = bfd_get_32 (abfd, contents + rel->r_offset + 4); -+ -+ if (VALID_UJTYPE_IMM (foff)) -+ { -+ /* Relax to JAL rd, addr. */ -+ r_type = R_RISCV_JAL; -+ auipc = (jalr & (OP_MASK_RD << OP_SH_RD)) | MATCH_JAL; -+ } -+ else /* near_zero */ -+ { -+ /* Relax to JALR rd, x0, addr. */ -+ r_type = R_RISCV_LO12_I; -+ auipc = (jalr & (OP_MASK_RD << OP_SH_RD)) | MATCH_JALR; -+ } -+ -+ /* Replace the R_RISCV_CALL reloc. */ -+ rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), r_type); -+ /* Replace the AUIPC. */ -+ bfd_put_32 (abfd, auipc, contents + rel->r_offset); -+ -+ /* Delete unnecessary JALR. */ -+ *again = TRUE; -+ return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + 4, 4); -+} -+ -+/* Relax non-PIC global variable references. */ -+ -+static bfd_boolean -+_bfd_riscv_relax_lui (bfd *abfd, asection *sec, -+ struct bfd_link_info *link_info, -+ Elf_Internal_Rela *rel, -+ bfd_vma symval, -+ bfd_boolean *again) -+{ -+ bfd_vma gp = riscv_global_pointer_value (link_info); -+ -+ /* Bail out if this symbol isn't in range of either gp or x0. */ -+ if (!VALID_ITYPE_IMM (symval - gp) && !(symval < RISCV_IMM_REACH/2)) -+ return TRUE; -+ -+ /* We can delete the unnecessary AUIPC. The corresponding LO12 reloc -+ will be converted to GPREL during relocation. */ -+ BFD_ASSERT (rel->r_offset + 4 <= sec->size); -+ rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); -+ -+ *again = TRUE; -+ return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4); -+} -+ -+/* Relax non-PIC TLS references. */ -+ -+static bfd_boolean -+_bfd_riscv_relax_tls_le (bfd *abfd, asection *sec, -+ struct bfd_link_info *link_info, -+ Elf_Internal_Rela *rel, -+ bfd_vma symval, -+ bfd_boolean *again) -+{ -+ /* See if this symbol is in range of tp. */ -+ if (RISCV_CONST_HIGH_PART (tpoff (link_info, symval)) != 0) -+ return TRUE; -+ -+ /* We can delete the unnecessary LUI and tp add. The LO12 reloc will be -+ made directly tp-relative. */ -+ BFD_ASSERT (rel->r_offset + 4 <= sec->size); -+ rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); -+ -+ *again = TRUE; -+ return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4); -+} -+ -+/* Implement R_RISCV_ALIGN by deleting excess alignment NOPs. */ -+ -+static bfd_boolean -+_bfd_riscv_relax_align (bfd *abfd, asection *sec, -+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED, -+ Elf_Internal_Rela *rel, -+ bfd_vma symval, -+ bfd_boolean *again ATTRIBUTE_UNUSED) -+{ -+ bfd_vma alignment = 1; -+ while (alignment <= rel->r_addend) -+ alignment *= 2; -+ -+ symval -= rel->r_addend; -+ bfd_vma aligned_addr = ((symval - 1) & ~(alignment - 1)) + alignment; -+ bfd_vma nop_bytes_needed = aligned_addr - symval; -+ -+ /* Make sure there are enough NOPs to actually achieve the alignment. */ -+ if (rel->r_addend < nop_bytes_needed) -+ return FALSE; -+ -+ /* Delete the reloc. */ -+ rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); -+ -+ /* If the number of NOPs is already correct, there's nothing to do. */ -+ if (nop_bytes_needed == rel->r_addend) -+ return TRUE; -+ -+ /* Delete the excess NOPs. */ -+ return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, -+ rel->r_addend - nop_bytes_needed); -+} -+ -+/* Relax a section. Pass 0 shortens code sequences unless disabled. -+ Pass 1, which cannot be disabled, handles code alignment directives. */ -+ -+static bfd_boolean -+_bfd_riscv_relax_section (bfd *abfd, asection *sec, -+ struct bfd_link_info *info, bfd_boolean *again) -+{ -+ Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (abfd); -+ struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); -+ struct bfd_elf_section_data *data = elf_section_data (sec); -+ Elf_Internal_Rela *relocs; -+ bfd_boolean ret = FALSE; -+ unsigned int i; -+ -+ *again = FALSE; -+ -+ if (info->relocatable -+ || (sec->flags & SEC_RELOC) == 0 -+ || sec->reloc_count == 0 -+ || (/*info->disable_target_specific_optimizations*/ 0 -+ && info->relax_pass == 0)) -+ return TRUE; -+ -+ /* Read this BFD's relocs if we haven't done so already. */ -+ if (data->relocs) -+ relocs = data->relocs; -+ else if (!(relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, -+ info->keep_memory))) -+ goto fail; -+ -+ /* Examine and consider relaxing each reloc. */ -+ for (i = 0; i < sec->reloc_count; i++) -+ { -+ Elf_Internal_Rela *rel = data->relocs + i; -+ typeof(&_bfd_riscv_relax_call) relax_func = NULL; -+ int type = ELFNN_R_TYPE (rel->r_info); -+ bfd_vma symval; -+ -+ if (info->relax_pass == 0) -+ { -+ if (type == R_RISCV_CALL || type == R_RISCV_CALL_PLT) -+ relax_func = _bfd_riscv_relax_call; -+ else if (type == R_RISCV_HI20) -+ relax_func = _bfd_riscv_relax_lui; -+ else if (type == R_RISCV_TPREL_HI20 || type == R_RISCV_TPREL_ADD) -+ relax_func = _bfd_riscv_relax_tls_le; -+ } -+ else if (type == R_RISCV_ALIGN) -+ relax_func = _bfd_riscv_relax_align; -+ -+ if (!relax_func) -+ continue; -+ -+ data->relocs = relocs; -+ -+ /* Read this BFD's contents if we haven't done so already. */ -+ if (!data->this_hdr.contents -+ && !bfd_malloc_and_get_section (abfd, sec, &data->this_hdr.contents)) -+ goto fail; -+ -+ /* Read this BFD's symbols if we haven't done so already. */ -+ if (symtab_hdr->sh_info != 0 -+ && !symtab_hdr->contents -+ && !(symtab_hdr->contents = -+ (unsigned char *) bfd_elf_get_elf_syms (abfd, symtab_hdr, -+ symtab_hdr->sh_info, -+ 0, NULL, NULL, NULL))) -+ goto fail; -+ -+ /* Get the value of the symbol referred to by the reloc. */ -+ if (ELFNN_R_SYM (rel->r_info) < symtab_hdr->sh_info) -+ { -+ /* A local symbol. */ -+ Elf_Internal_Sym *isym = ((Elf_Internal_Sym *) symtab_hdr->contents -+ + ELFNN_R_SYM (rel->r_info)); -+ -+ if (isym->st_shndx == SHN_UNDEF) -+ symval = sec_addr (sec) + rel->r_offset; -+ else -+ { -+ asection *isec; -+ BFD_ASSERT (isym->st_shndx < elf_numsections (abfd)); -+ isec = elf_elfsections (abfd)[isym->st_shndx]->bfd_section; -+ if (sec_addr (isec) == 0) -+ continue; -+ symval = sec_addr (isec) + isym->st_value; -+ } -+ } -+ else -+ { -+ unsigned long indx; -+ struct elf_link_hash_entry *h; -+ -+ indx = ELFNN_R_SYM (rel->r_info) - symtab_hdr->sh_info; -+ h = elf_sym_hashes (abfd)[indx]; -+ -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ -+ if (h->plt.offset != MINUS_ONE) -+ symval = sec_addr (htab->elf.splt) + h->plt.offset; -+ else if (h->root.type == bfd_link_hash_undefweak) -+ symval = 0; -+ else if (h->root.u.def.section->output_section == NULL -+ || (h->root.type != bfd_link_hash_defined -+ && h->root.type != bfd_link_hash_defweak)) -+ continue; -+ else -+ symval = sec_addr (h->root.u.def.section) + h->root.u.def.value; -+ } -+ -+ symval += rel->r_addend; -+ -+ if (!relax_func (abfd, sec, info, rel, symval, again)) -+ goto fail; -+ } -+ -+ ret = TRUE; -+ -+fail: -+ if (relocs != data->relocs) -+ free (relocs); -+ -+ return ret; -+} -+ -+#define ELF_ARCH bfd_arch_riscv -+#define ELF_TARGET_ID RISCV_ELF_DATA -+#define ELF_MACHINE_CODE EM_RISCV -+#define ELF_MAXPAGESIZE 0x2000 -+#define ELF_COMMONPAGESIZE 0x2000 -+ -+#define TARGET_LITTLE_SYM bfd_elfNN_riscv_vec -+#define TARGET_LITTLE_NAME "elfNN-littleriscv" -+ -+#define elf_backend_reloc_type_class riscv_reloc_type_class -+ -+#define bfd_elfNN_bfd_reloc_name_lookup riscv_reloc_name_lookup -+#define bfd_elfNN_bfd_link_hash_table_create riscv_elf_link_hash_table_create -+#define bfd_elfNN_bfd_reloc_type_lookup riscv_reloc_type_lookup -+#define bfd_elfNN_bfd_merge_private_bfd_data \ -+ _bfd_riscv_elf_merge_private_bfd_data -+ -+#define elf_backend_copy_indirect_symbol riscv_elf_copy_indirect_symbol -+#define elf_backend_create_dynamic_sections riscv_elf_create_dynamic_sections -+#define elf_backend_check_relocs riscv_elf_check_relocs -+#define elf_backend_adjust_dynamic_symbol riscv_elf_adjust_dynamic_symbol -+#define elf_backend_size_dynamic_sections riscv_elf_size_dynamic_sections -+#define elf_backend_relocate_section riscv_elf_relocate_section -+#define elf_backend_finish_dynamic_symbol riscv_elf_finish_dynamic_symbol -+#define elf_backend_finish_dynamic_sections riscv_elf_finish_dynamic_sections -+#define elf_backend_gc_mark_hook riscv_elf_gc_mark_hook -+#define elf_backend_gc_sweep_hook riscv_elf_gc_sweep_hook -+#define elf_backend_plt_sym_val riscv_elf_plt_sym_val -+#define elf_info_to_howto_rel NULL -+#define elf_info_to_howto riscv_info_to_howto_rela -+#define bfd_elfNN_bfd_relax_section _bfd_riscv_relax_section -+ -+#define elf_backend_init_index_section _bfd_elf_init_1_index_section -+ -+#define elf_backend_can_gc_sections 1 -+#define elf_backend_can_refcount 1 -+#define elf_backend_want_got_plt 1 -+#define elf_backend_plt_readonly 1 -+#define elf_backend_plt_alignment 4 -+#define elf_backend_want_plt_sym 1 -+#define elf_backend_got_header_size (ARCH_SIZE / 8) -+#define elf_backend_rela_normal 1 -+#define elf_backend_default_execstack 0 -+ -+#include "elfNN-target.h" -diff -rNU3 dist.orig/bfd/elfxx-mips.c dist/bfd/elfxx-mips.c ---- dist.orig/bfd/elfxx-mips.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elfxx-mips.c 2015-10-18 13:11:13.000000000 +0200 -@@ -8191,10 +8191,24 @@ - reloc types into the output file as R_MIPS_REL32 - relocs. Make room for this reloc in .rel(a).dyn. */ - mips_elf_allocate_dynamic_relocations (dynobj, info, 1); -- if (MIPS_ELF_READONLY_SECTION (sec)) -- /* We tell the dynamic linker that there are -- relocations against the text segment. */ -- info->flags |= DF_TEXTREL; -+ /* In the N32 and 64-bit ABIs there may be multiple -+ consecutive relocations for the same offset. If we have -+ a R_MIPS_GPREL32 followed by a R_MIPS_64 then that -+ relocation is complete and needs no futher adjustment. */ -+ if ((rel == relocs -+ || rel[-1].r_offset != rel->r_offset -+ || r_type != R_MIPS_64 -+ || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32) -+ && MIPS_ELF_READONLY_SECTION (sec)) -+ { -+ /* We tell the dynamic linker that there are -+ relocations against the text segment. */ -+ info->flags |= DF_TEXTREL; -+ info->callbacks->warning -+ (info, -+ _("relocation emitted against readonly section"), -+ NULL, abfd, sec, rel->r_offset); -+ } - } - else - { -@@ -8612,6 +8626,7 @@ - /* Make sure we know what is going on here. */ - BFD_ASSERT (dynobj != NULL - && (h->needs_plt -+ || h->type == STT_GNU_IFUNC - || h->u.weakdef != NULL - || (h->def_dynamic - && h->ref_regular -diff -rNU3 dist.orig/bfd/elfxx-riscv.c dist/bfd/elfxx-riscv.c ---- dist.orig/bfd/elfxx-riscv.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/elfxx-riscv.c 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,730 @@ -+/* RISC-V-specific support for ELF. -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on TILE-Gx and MIPS targets. -+ -+ 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 "elf-bfd.h" -+#include "elf/riscv.h" -+#include "opcode/riscv.h" -+#include "libiberty.h" -+#include "elfxx-riscv.h" -+#include -+ -+#define MINUS_ONE ((bfd_vma)0 - 1) -+ -+/* The relocation table used for SHT_RELA sections. */ -+ -+static reloc_howto_type howto_table[] = -+{ -+ /* No relocation. */ -+ HOWTO (R_RISCV_NONE, /* type */ -+ 0, /* rightshift */ -+ 0, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_NONE", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 32 bit relocation. */ -+ HOWTO (R_RISCV_32, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_32", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 64 bit relocation. */ -+ HOWTO (R_RISCV_64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_64", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Relocation against a local symbol in a shared object. */ -+ HOWTO (R_RISCV_RELATIVE, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_RELATIVE", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0xffffffff, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_COPY, /* type */ -+ 0, /* rightshift */ -+ 0, /* this one is variable size */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_COPY", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0x0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_JUMP_SLOT, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_bitfield, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_JUMP_SLOT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0x0, /* src_mask */ -+ 0x0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Dynamic TLS relocations. */ -+ HOWTO (R_RISCV_TLS_DTPMOD32, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_DTPMOD32", /* name */ -+ FALSE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_TLS_DTPMOD64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_DTPMOD64", /* name */ -+ FALSE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_TLS_DTPREL32, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_DTPREL32", /* name */ -+ TRUE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_TLS_DTPREL64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_DTPREL64", /* name */ -+ TRUE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_TLS_TPREL32, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_TPREL32", /* name */ -+ FALSE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ HOWTO (R_RISCV_TLS_TPREL64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_TPREL64", /* name */ -+ FALSE, /* partial_inplace */ -+ MINUS_ONE, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ EMPTY_HOWTO (12), -+ EMPTY_HOWTO (13), -+ EMPTY_HOWTO (14), -+ EMPTY_HOWTO (15), -+ -+ /* 12-bit PC-relative branch offset. */ -+ HOWTO (R_RISCV_BRANCH, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_BRANCH", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_SBTYPE_IMM(-1U),/* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* 20-bit PC-relative jump offset. */ -+ HOWTO (R_RISCV_JAL, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ /* This needs complex overflow -+ detection, because the upper 36 -+ bits must match the PC + 4. */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_JAL", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UJTYPE_IMM(-1U), /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* 32-bit PC-relative function call (AUIPC/JALR). */ -+ HOWTO (R_RISCV_CALL, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_CALL", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U) | ((bfd_vma) ENCODE_ITYPE_IMM(-1U) << 32), /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* 32-bit PC-relative function call (AUIPC/JALR). */ -+ HOWTO (R_RISCV_CALL_PLT, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_CALL_PLT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U) | ((bfd_vma) ENCODE_ITYPE_IMM(-1U) << 32), /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* High 20 bits of 32-bit PC-relative GOT access. */ -+ HOWTO (R_RISCV_GOT_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_GOT_HI20", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 20 bits of 32-bit PC-relative TLS IE GOT access. */ -+ HOWTO (R_RISCV_TLS_GOT_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_GOT_HI20", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 20 bits of 32-bit PC-relative TLS GD GOT reference. */ -+ HOWTO (R_RISCV_TLS_GD_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TLS_GD_HI20", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 20 bits of 32-bit PC-relative reference. */ -+ HOWTO (R_RISCV_PCREL_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ TRUE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_PCREL_HI20", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+ -+ /* Low 12 bits of a 32-bit PC-relative load or add. */ -+ HOWTO (R_RISCV_PCREL_LO12_I, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_PCREL_LO12_I",/* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_ITYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Low 12 bits of a 32-bit PC-relative store. */ -+ HOWTO (R_RISCV_PCREL_LO12_S, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_PCREL_LO12_S",/* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_STYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 20 bits of 32-bit absolute address. */ -+ HOWTO (R_RISCV_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_HI20", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 12 bits of 32-bit load or add. */ -+ HOWTO (R_RISCV_LO12_I, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_LO12_I", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_ITYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 12 bits of 32-bit store. */ -+ HOWTO (R_RISCV_LO12_S, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_LO12_S", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_STYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* High 20 bits of TLS LE thread pointer offset. */ -+ HOWTO (R_RISCV_TPREL_HI20, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TPREL_HI20", /* name */ -+ TRUE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_UTYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Low 12 bits of TLS LE thread pointer offset for loads and adds. */ -+ HOWTO (R_RISCV_TPREL_LO12_I, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TPREL_LO12_I",/* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_ITYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Low 12 bits of TLS LE thread pointer offset for stores. */ -+ HOWTO (R_RISCV_TPREL_LO12_S, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_signed, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TPREL_LO12_S",/* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ ENCODE_STYPE_IMM(-1U), /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* TLS LE thread pointer usage. */ -+ HOWTO (R_RISCV_TPREL_ADD, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont,/* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_TPREL_ADD", /* name */ -+ TRUE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 8-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_ADD8, /* type */ -+ 0, /* rightshift */ -+ 0, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_ADD8", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 16-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_ADD16, /* type */ -+ 0, /* rightshift */ -+ 1, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_ADD16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 32-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_ADD32, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_ADD32", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 64-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_ADD64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_ADD64", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 8-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_SUB8, /* type */ -+ 0, /* rightshift */ -+ 0, /* size (0 = byte, 1 = short, 2 = long) */ -+ 8, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_SUB8", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 16-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_SUB16, /* type */ -+ 0, /* rightshift */ -+ 1, /* size (0 = byte, 1 = short, 2 = long) */ -+ 16, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_SUB16", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 32-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_SUB32, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 32, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_SUB32", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* 64-bit in-place addition, for local label subtraction. */ -+ HOWTO (R_RISCV_SUB64, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 64, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_SUB64", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ MINUS_ONE, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* GNU extension to record C++ vtable hierarchy */ -+ HOWTO (R_RISCV_GNU_VTINHERIT, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont,/* complain_on_overflow */ -+ NULL, /* special_function */ -+ "R_RISCV_GNU_VTINHERIT", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* GNU extension to record C++ vtable member usage */ -+ HOWTO (R_RISCV_GNU_VTENTRY, /* type */ -+ 0, /* rightshift */ -+ 4, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont,/* complain_on_overflow */ -+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ -+ "R_RISCV_GNU_VTENTRY", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ -+ /* Indicates an alignment statement. The addend field encodes how many -+ bytes of NOPs follow the statement. The desired alignment is the -+ addend rounded up to the next power of two. */ -+ HOWTO (R_RISCV_ALIGN, /* type */ -+ 0, /* rightshift */ -+ 2, /* size (0 = byte, 1 = short, 2 = long) */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_RISCV_ALIGN", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ TRUE), /* pcrel_offset */ -+}; -+ -+/* A mapping from BFD reloc types to RISC-V ELF reloc types. */ -+ -+struct elf_reloc_map { -+ bfd_reloc_code_real_type bfd_val; -+ enum elf_riscv_reloc_type elf_val; -+}; -+ -+static const struct elf_reloc_map riscv_reloc_map[] = -+{ -+ { BFD_RELOC_NONE, R_RISCV_NONE }, -+ { BFD_RELOC_32, R_RISCV_32 }, -+ { BFD_RELOC_64, R_RISCV_64 }, -+ { BFD_RELOC_RISCV_ADD8, R_RISCV_ADD8 }, -+ { BFD_RELOC_RISCV_ADD16, R_RISCV_ADD16 }, -+ { BFD_RELOC_RISCV_ADD32, R_RISCV_ADD32 }, -+ { BFD_RELOC_RISCV_ADD64, R_RISCV_ADD64 }, -+ { BFD_RELOC_RISCV_SUB8, R_RISCV_SUB8 }, -+ { BFD_RELOC_RISCV_SUB16, R_RISCV_SUB16 }, -+ { BFD_RELOC_RISCV_SUB32, R_RISCV_SUB32 }, -+ { BFD_RELOC_RISCV_SUB64, R_RISCV_SUB64 }, -+ { BFD_RELOC_CTOR, R_RISCV_64 }, -+ { BFD_RELOC_12_PCREL, R_RISCV_BRANCH }, -+ { BFD_RELOC_RISCV_HI20, R_RISCV_HI20 }, -+ { BFD_RELOC_RISCV_LO12_I, R_RISCV_LO12_I }, -+ { BFD_RELOC_RISCV_LO12_S, R_RISCV_LO12_S }, -+ { BFD_RELOC_RISCV_PCREL_LO12_I, R_RISCV_PCREL_LO12_I }, -+ { BFD_RELOC_RISCV_PCREL_LO12_S, R_RISCV_PCREL_LO12_S }, -+ { BFD_RELOC_RISCV_CALL, R_RISCV_CALL }, -+ { BFD_RELOC_RISCV_CALL_PLT, R_RISCV_CALL_PLT }, -+ { BFD_RELOC_RISCV_PCREL_HI20, R_RISCV_PCREL_HI20 }, -+ { BFD_RELOC_RISCV_JMP, R_RISCV_JAL }, -+ { BFD_RELOC_RISCV_GOT_HI20, R_RISCV_GOT_HI20 }, -+ { BFD_RELOC_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD32 }, -+ { BFD_RELOC_RISCV_TLS_DTPREL32, R_RISCV_TLS_DTPREL32 }, -+ { BFD_RELOC_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPMOD64 }, -+ { BFD_RELOC_RISCV_TLS_DTPREL64, R_RISCV_TLS_DTPREL64 }, -+ { BFD_RELOC_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL32 }, -+ { BFD_RELOC_RISCV_TLS_TPREL64, R_RISCV_TLS_TPREL64 }, -+ { BFD_RELOC_RISCV_TPREL_HI20, R_RISCV_TPREL_HI20 }, -+ { BFD_RELOC_RISCV_TPREL_ADD, R_RISCV_TPREL_ADD }, -+ { BFD_RELOC_RISCV_TPREL_LO12_S, R_RISCV_TPREL_LO12_S }, -+ { BFD_RELOC_RISCV_TPREL_LO12_I, R_RISCV_TPREL_LO12_I }, -+ { BFD_RELOC_RISCV_TLS_GOT_HI20, R_RISCV_TLS_GOT_HI20 }, -+ { BFD_RELOC_RISCV_TLS_GD_HI20, R_RISCV_TLS_GD_HI20 }, -+ { BFD_RELOC_RISCV_ALIGN, R_RISCV_ALIGN }, -+}; -+ -+/* Given a BFD reloc type, return a howto structure. */ -+ -+reloc_howto_type * -+riscv_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, -+ bfd_reloc_code_real_type code) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < ARRAY_SIZE (riscv_reloc_map); i++) -+ if (riscv_reloc_map[i].bfd_val == code) -+ return &howto_table[(int) riscv_reloc_map[i].elf_val]; -+ -+ bfd_set_error (bfd_error_bad_value); -+ return NULL; -+} -+ -+reloc_howto_type * -+riscv_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, -+ const char *r_name) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < ARRAY_SIZE (howto_table); i++) -+ if (howto_table[i].name && strcasecmp (howto_table[i].name, r_name) == 0) -+ return &howto_table[i]; -+ -+ return NULL; -+} -+ -+reloc_howto_type * -+riscv_elf_rtype_to_howto (unsigned int r_type) -+{ -+ if ((unsigned int)r_type >= ARRAY_SIZE (howto_table)) -+ { -+ (*_bfd_error_handler)(_("unrecognized relocation (0x%x)"), r_type); -+ bfd_set_error (bfd_error_bad_value); -+ return NULL; -+ } -+ return &howto_table[r_type]; -+} -diff -rNU3 dist.orig/bfd/elfxx-riscv.h dist/bfd/elfxx-riscv.h ---- dist.orig/bfd/elfxx-riscv.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/bfd/elfxx-riscv.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,34 @@ -+/* RISC-V ELF specific backend routines. -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ 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 "elf/common.h" -+#include "elf/internal.h" -+ -+extern reloc_howto_type * -+riscv_reloc_name_lookup (bfd *, const char *); -+ -+extern reloc_howto_type * -+riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -+ -+extern reloc_howto_type * -+riscv_elf_rtype_to_howto (unsigned int r_type); -diff -rNU3 dist.orig/bfd/elfxx-sparc.c dist/bfd/elfxx-sparc.c ---- dist.orig/bfd/elfxx-sparc.c 2013-03-25 09:06:20.000000000 +0100 -+++ dist/bfd/elfxx-sparc.c 2015-10-18 13:11:13.000000000 +0200 -@@ -2508,6 +2508,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -@@ -3460,10 +3464,8 @@ - memset (&outrel, 0, sizeof outrel); - /* h->dynindx may be -1 if the symbol was marked to - become local. */ -- else if (h != NULL && -- h->dynindx != -1 -- && (! is_plt -- || !info->shared -+ else if (h != NULL && h->dynindx != -1 && ! is_plt -+ && (!info->shared - || !SYMBOLIC_BIND (info, h) - || !h->def_regular)) - { -diff -rNU3 dist.orig/bfd/libbfd.h dist/bfd/libbfd.h ---- dist.orig/bfd/libbfd.h 2012-09-04 14:53:42.000000000 +0200 -+++ dist/bfd/libbfd.h 2015-10-18 13:11:13.000000000 +0200 -@@ -2295,8 +2295,65 @@ - "BFD_RELOC_860_HIGH", - "BFD_RELOC_860_HIGOT", - "BFD_RELOC_860_HIGOTOFF", -- "BFD_RELOC_OPENRISC_ABS_26", -- "BFD_RELOC_OPENRISC_REL_26", -+ "BFD_RELOC_OR1K_REL_26", -+ "BFD_RELOC_OR1K_GOTPC_HI16", -+ "BFD_RELOC_OR1K_GOTPC_LO16", -+ "BFD_RELOC_OR1K_GOT16", -+ "BFD_RELOC_OR1K_PLT26", -+ "BFD_RELOC_OR1K_GOTOFF_HI16", -+ "BFD_RELOC_OR1K_GOTOFF_LO16", -+ "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_LDM_HI16", -+ "BFD_RELOC_OR1K_TLS_LDM_LO16", -+ "BFD_RELOC_OR1K_TLS_LDO_HI16", -+ "BFD_RELOC_OR1K_TLS_LDO_LO16", -+ "BFD_RELOC_OR1K_TLS_IE_HI16", -+ "BFD_RELOC_OR1K_TLS_IE_LO16", -+ "BFD_RELOC_OR1K_TLS_LE_HI16", -+ "BFD_RELOC_OR1K_TLS_LE_LO16", -+ "BFD_RELOC_OR1K_TLS_TPOFF", -+ "BFD_RELOC_OR1K_TLS_DTPOFF", -+ "BFD_RELOC_OR1K_TLS_DTPMOD", -+ "BFD_RELOC_RISCV_ADD32", -+ "BFD_RELOC_RISCV_ADD64", -+ "BFD_RELOC_RISCV_SUB32", -+ "BFD_RELOC_RISCV_SUB64", -+ "BFD_RELOC_RISCV_HI20", -+ "BFD_RELOC_RISCV_LO12_I", -+ "BFD_RELOC_RISCV_LO12_S", -+ "BFD_RELOC_RISCV_PCREL_LO12_I", -+ "BFD_RELOC_RISCV_PCREL_LO12_S", -+ "BFD_RELOC_RISCV_CALL", -+ "BFD_RELOC_RISCV_CALL_PLT", -+ "BFD_RELOC_RISCV_PCREL_HI20", -+ "BFD_RELOC_RISCV_JMP", -+ "BFD_RELOC_RISCV_GOT_HI20", -+ "BFD_RELOC_RISCV_GOT_LO12", -+ "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_TPREL_HI20", -+ "BFD_RELOC_RISCV_TPREL_ADD", -+ "BFD_RELOC_RISCV_TPREL_LO12_S", -+ "BFD_RELOC_RISCV_TPREL_LO12_I", -+ "BFD_RELOC_RISCV_TLS_IE_HI20", -+ "BFD_RELOC_RISCV_TLS_IE_LO12", -+ "BFD_RELOC_RISCV_TLS_IE_ADD", -+ "BFD_RELOC_RISCV_TLS_IE_LO12_S", -+ "BFD_RELOC_RISCV_TLS_IE_LO12_I", -+ "BFD_RELOC_RISCV_TLS_GOT_HI20", -+ "BFD_RELOC_RISCV_TLS_GOT_LO12", -+ "BFD_RELOC_RISCV_TLS_GD_HI20", -+ "BFD_RELOC_RISCV_TLS_GD_LO12", -+ "BFD_RELOC_RISCV_TLS_PCREL_LO12", - "BFD_RELOC_H8_DIR16A8", - "BFD_RELOC_H8_DIR16R8", - "BFD_RELOC_H8_DIR24A8", -@@ -2313,6 +2370,7 @@ - "BFD_RELOC_XC16X_SEG", - "BFD_RELOC_XC16X_SOF", - "BFD_RELOC_VAX_GLOB_DAT", -+ "BFD_RELOC_VAX_GLOB_REF", - "BFD_RELOC_VAX_JMP_SLOT", - "BFD_RELOC_VAX_RELATIVE", - "BFD_RELOC_MT_PC16", -diff -rNU3 dist.orig/bfd/reloc.c dist/bfd/reloc.c ---- dist.orig/bfd/reloc.c 2012-09-04 14:53:42.000000000 +0200 -+++ dist/bfd/reloc.c 2015-10-18 13:11:13.000000000 +0200 -@@ -1776,6 +1776,17 @@ - Relocations used by 68K ELF. - - ENUM -+ BFD_RELOC_VAX_GLOB_DAT -+ENUMX -+ BFD_RELOC_VAX_GLOB_REF -+ENUMX -+ BFD_RELOC_VAX_JMP_SLOT -+ENUMX -+ BFD_RELOC_VAX_RELATIVE -+ENUMDOC -+ Relocations used by VAX ELF. -+ -+ENUM - BFD_RELOC_32_BASEREL - ENUMX - BFD_RELOC_16_BASEREL -diff -rNU3 dist.orig/bfd/targets.c dist/bfd/targets.c ---- dist.orig/bfd/targets.c 2012-09-04 14:53:42.000000000 +0200 -+++ dist/bfd/targets.c 2015-10-18 13:11:13.000000000 +0200 -@@ -670,13 +670,14 @@ - extern const bfd_target bfd_elf32_ntradbigmips_freebsd_vec; - extern const bfd_target bfd_elf32_ntradlittlemips_freebsd_vec; - extern const bfd_target bfd_elf32_openrisc_vec; --extern const bfd_target bfd_elf32_or32_big_vec; -+extern const bfd_target bfd_elf32_or1k_big_vec; - extern const bfd_target bfd_elf32_pj_vec; - extern const bfd_target bfd_elf32_pjl_vec; - extern const bfd_target bfd_elf32_powerpc_vec; - extern const bfd_target bfd_elf32_powerpcle_vec; - extern const bfd_target bfd_elf32_powerpc_freebsd_vec; - extern const bfd_target bfd_elf32_powerpc_vxworks_vec; -+extern const bfd_target bfd_elf32_riscv_vec; - extern const bfd_target bfd_elf32_rl78_vec; - extern const bfd_target bfd_elf32_rx_le_vec; - extern const bfd_target bfd_elf32_rx_be_vec; -@@ -729,8 +730,8 @@ - extern const bfd_target bfd_elf64_alpha_freebsd_vec; - extern const bfd_target bfd_elf64_alpha_vec; - extern const bfd_target bfd_elf64_big_generic_vec; --extern const bfd_target bfd_elf64_bigmips_vec; - extern const bfd_target bfd_elf64_bigaarch64_vec; -+extern const bfd_target bfd_elf64_bigmips_vec; - extern const bfd_target bfd_elf64_hppa_linux_vec; - extern const bfd_target bfd_elf64_hppa_vec; - extern const bfd_target bfd_elf64_ia64_big_vec; -@@ -738,12 +739,13 @@ - extern const bfd_target bfd_elf64_ia64_little_vec; - extern const bfd_target bfd_elf64_ia64_vms_vec; - extern const bfd_target bfd_elf64_little_generic_vec; --extern const bfd_target bfd_elf64_littlemips_vec; - extern const bfd_target bfd_elf64_littleaarch64_vec; -+extern const bfd_target bfd_elf64_littlemips_vec; - extern const bfd_target bfd_elf64_mmix_vec; - extern const bfd_target bfd_elf64_powerpc_vec; - extern const bfd_target bfd_elf64_powerpcle_vec; - extern const bfd_target bfd_elf64_powerpc_freebsd_vec; -+extern const bfd_target bfd_elf64_riscv_vec; - extern const bfd_target bfd_elf64_s390_vec; - extern const bfd_target bfd_elf64_sh64_vec; - extern const bfd_target bfd_elf64_sh64l_vec; -@@ -833,7 +835,7 @@ - extern const bfd_target nlm32_powerpc_vec; - extern const bfd_target nlm32_sparc_vec; - extern const bfd_target oasys_vec; --extern const bfd_target or32coff_big_vec; -+extern const bfd_target or1kcoff_big_vec; - extern const bfd_target pc532machaout_vec; - extern const bfd_target pc532netbsd_vec; - extern const bfd_target pdp11_aout_vec; -@@ -1046,13 +1048,14 @@ - &bfd_elf32_ntradlittlemips_freebsd_vec, - #endif - &bfd_elf32_openrisc_vec, -- &bfd_elf32_or32_big_vec, -+ &bfd_elf32_or1k_big_vec, - &bfd_elf32_pj_vec, - &bfd_elf32_pjl_vec, - &bfd_elf32_powerpc_vec, - &bfd_elf32_powerpc_vxworks_vec, - &bfd_elf32_powerpcle_vec, - &bfd_elf32_powerpc_freebsd_vec, -+ &bfd_elf32_riscv_vec, - &bfd_elf32_rl78_vec, - &bfd_elf32_rx_be_vec, - &bfd_elf32_rx_be_ns_vec, -@@ -1106,8 +1109,8 @@ - &bfd_elf64_alpha_freebsd_vec, - &bfd_elf64_alpha_vec, - &bfd_elf64_big_generic_vec, -- &bfd_elf64_bigmips_vec, - &bfd_elf64_bigaarch64_vec, -+ &bfd_elf64_bigmips_vec, - &bfd_elf64_hppa_linux_vec, - &bfd_elf64_hppa_vec, - &bfd_elf64_ia64_big_vec, -@@ -1115,12 +1118,13 @@ - &bfd_elf64_ia64_little_vec, - &bfd_elf64_ia64_vms_vec, - &bfd_elf64_little_generic_vec, -- &bfd_elf64_littlemips_vec, - &bfd_elf64_littleaarch64_vec, -+ &bfd_elf64_littlemips_vec, - &bfd_elf64_mmix_vec, - &bfd_elf64_powerpc_vec, - &bfd_elf64_powerpcle_vec, - &bfd_elf64_powerpc_freebsd_vec, -+ &bfd_elf64_riscv_vec, - &bfd_elf64_s390_vec, - &bfd_elf64_sh64_vec, - &bfd_elf64_sh64l_vec, -@@ -1252,7 +1256,7 @@ - &oasys_vec, - #endif - /* Entry for the OpenRISC family. */ -- &or32coff_big_vec, -+ &or1kcoff_big_vec, - - &pc532machaout_vec, - &pc532netbsd_vec, -diff -rNU3 dist.orig/binutils/Makefile.in dist/binutils/Makefile.in ---- dist.orig/binutils/Makefile.in 2012-05-18 00:23:39.000000000 +0200 -+++ dist/binutils/Makefile.in 2015-10-18 13:11:13.000000000 +0200 -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# Makefile.in generated by automake 1.11 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -49,10 +49,12 @@ - DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(srcdir)/config.in \ -- $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in arparse.h \ -- arparse.c arlex.c defparse.h defparse.c deflex.c nlmheader.h \ -- nlmheader.c arparse.h arparse.c arlex.c mcparse.h mcparse.c \ -- rcparse.h rcparse.c $(srcdir)/../depcomp $(srcdir)/../ylwrap -+ $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs \ -+ $(top_srcdir)/po/Make-in arparse.h arparse.c arlex.c \ -+ defparse.h defparse.c deflex.c nlmheader.h nlmheader.c \ -+ arparse.h arparse.c arlex.c mcparse.h mcparse.c rcparse.h \ -+ rcparse.c $(srcdir)/../depcomp $(srcdir)/../depcomp \ -+ $(srcdir)/../ylwrap $(srcdir)/../ylwrap - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ - $(top_srcdir)/../config/zlib.m4 \ -@@ -385,6 +387,7 @@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_ECHO = @lt_ECHO@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -931,7 +934,7 @@ - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @fail= failcom='exit 1'; \ -+ @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -956,7 +959,7 @@ - fi; test -z "$$fail" - - $(RECURSIVE_CLEAN_TARGETS): -- @fail= failcom='exit 1'; \ -+ @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -diff -rNU3 dist.orig/binutils/aclocal.m4 dist/binutils/aclocal.m4 ---- dist.orig/binutils/aclocal.m4 2012-05-18 00:23:39.000000000 +0200 -+++ dist/binutils/aclocal.m4 2015-10-18 13:11:13.000000000 +0200 -@@ -1,4 +1,4 @@ --# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -+# generated automatically by aclocal 1.11 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -@@ -19,6 +19,31 @@ - If you have problems, you may need to regenerate the build system entirely. - To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -+# isc-posix.m4 serial 2 (gettext-0.11.2) -+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. -+ -+# This test replaces the one in autoconf. -+# Currently this macro should have the same name as the autoconf macro -+# because gettext's gettext.m4 (distributed in the automake package) -+# still uses it. Otherwise, the use in gettext.m4 makes autoheader -+# give these diagnostics: -+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX -+ -+undefine([AC_ISC_POSIX]) -+ -+AC_DEFUN([AC_ISC_POSIX], -+ [ -+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. -+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) -+ ] -+) -+ - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation -@@ -34,7 +59,7 @@ - [am__api_version='1.11' - dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to - dnl require some minimum version. Point them to the right macro. --m4_if([$1], [1.11.1], [], -+m4_if([$1], [1.11], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -50,7 +75,7 @@ - # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. - # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], --[AM_AUTOMAKE_VERSION([1.11.1])dnl -+[AM_AUTOMAKE_VERSION([1.11])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -diff -rNU3 dist.orig/binutils/bucomm.c dist/binutils/bucomm.c ---- dist.orig/binutils/bucomm.c 2012-06-29 14:59:49.000000000 +0200 -+++ dist/binutils/bucomm.c 2015-10-18 13:11:13.000000000 +0200 -@@ -580,7 +580,14 @@ - file_name, strerror (errno)); - } - else if (! S_ISREG (statbuf.st_mode)) -- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); -+ { -+ if (!S_ISCHR(statbuf.st_mode)) -+ { -+ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); -+ return 0; -+ } -+ return statbuf.st_size ? statbuf.st_size : 1; -+ } - else if (statbuf.st_size < 0) - non_fatal (_("Warning: '%s' has negative size, probably it is too large"), - file_name); -diff -rNU3 dist.orig/binutils/doc/Makefile.am dist/binutils/doc/Makefile.am ---- dist.orig/binutils/doc/Makefile.am 2010-01-06 17:52:14.000000000 +0100 -+++ dist/binutils/doc/Makefile.am 2015-10-18 13:11:13.000000000 +0200 -@@ -42,6 +42,8 @@ - - # Man page generation from texinfo - addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_addr2line.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod - -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -49,6 +51,8 @@ - rm -f addr2line.pod - - ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ar.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod - -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -56,6 +60,8 @@ - rm -f ar.pod - - dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_dlltool.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod - -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -63,6 +69,8 @@ - rm -f dlltool.pod - - nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nlmconv.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod - -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -70,6 +78,8 @@ - rm -f nlmconv.pod - - nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nm.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod - -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -77,6 +87,8 @@ - rm -f nm.pod - - objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objcopy.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod - -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -84,6 +96,8 @@ - rm -f objcopy.pod - - objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objdump.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod - -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -91,6 +105,8 @@ - rm -f objdump.pod - - ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ranlib.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod - -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -98,6 +114,8 @@ - rm -f ranlib.pod - - readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_readelf.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod - -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -105,6 +123,8 @@ - rm -f readelf.pod - - size.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_size.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod - -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -112,6 +132,8 @@ - rm -f size.pod - - strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strings.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod - -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -119,6 +141,8 @@ - rm -f strings.pod - - strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strip.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod - -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -133,6 +157,8 @@ - rm -f elfedit.pod - - windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windres.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod - -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -140,6 +166,8 @@ - rm -f windres.pod - - windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windmc.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod - -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -147,6 +175,8 @@ - rm -f windmc.pod - - cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_cxxfilt.man: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod - -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -diff -rNU3 dist.orig/binutils/doc/Makefile.in dist/binutils/doc/Makefile.in ---- dist.orig/binutils/doc/Makefile.in 2012-09-04 14:53:44.000000000 +0200 -+++ dist/binutils/doc/Makefile.in 2015-10-18 13:11:13.000000000 +0200 -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# Makefile.in generated by automake 1.11 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -242,6 +242,7 @@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_ECHO = @lt_ECHO@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -349,6 +350,8 @@ - -rm -rf .libs _libs - - binutils.info: binutils.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_binutils.info: binutils.texi - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -735,6 +738,8 @@ - - # Man page generation from texinfo - addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_addr2line.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod - -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -742,6 +747,8 @@ - rm -f addr2line.pod - - ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ar.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod - -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -749,6 +756,8 @@ - rm -f ar.pod - - dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_dlltool.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod - -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -756,6 +765,8 @@ - rm -f dlltool.pod - - nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nlmconv.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod - -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -763,6 +774,8 @@ - rm -f nlmconv.pod - - nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nm.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod - -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -770,6 +783,8 @@ - rm -f nm.pod - - objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objcopy.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod - -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -777,6 +792,8 @@ - rm -f objcopy.pod - - objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objdump.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod - -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -784,6 +801,8 @@ - rm -f objdump.pod - - ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ranlib.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod - -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -791,6 +810,8 @@ - rm -f ranlib.pod - - readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_readelf.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod - -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -798,6 +819,8 @@ - rm -f readelf.pod - - size.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_size.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod - -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -805,6 +828,8 @@ - rm -f size.pod - - strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strings.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod - -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -812,6 +837,8 @@ - rm -f strings.pod - - strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strip.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod - -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -819,6 +846,8 @@ - rm -f strip.pod - - elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_elfedit.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod - -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -826,6 +855,8 @@ - rm -f elfedit.pod - - windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windres.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod - -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -833,6 +864,8 @@ - rm -f windres.pod - - windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windmc.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod - -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -840,6 +873,8 @@ - rm -f windmc.pod - - cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_cxxfilt.man: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod - -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -diff -rNU3 dist.orig/binutils/doc/readelf.1 dist/binutils/doc/readelf.1 ---- dist.orig/binutils/doc/readelf.1 2013-03-25 10:10:25.000000000 +0100 -+++ dist/binutils/doc/readelf.1 2015-10-18 13:11:13.000000000 +0200 -@@ -146,6 +146,7 @@ - [\fB\-r\fR|\fB\-\-relocs\fR] - [\fB\-u\fR|\fB\-\-unwind\fR] - [\fB\-d\fR|\fB\-\-dynamic\fR] -+ [\fB\-f\fR|\fB\-\-special-files\fR] - [\fB\-V\fR|\fB\-\-version\-info\fR] - [\fB\-A\fR|\fB\-\-arch\-specific\fR] - [\fB\-D\fR|\fB\-\-use\-dynamic\fR] -@@ -282,6 +283,13 @@ - .IX Item "--dynamic" - .PD - Displays the contents of the file's dynamic section, if it has one. -+.IP "\fB\-f\fR" 4 -+.IX Item "-f" -+.PD 0 -+.IP "\fB\-\-special-files\fR" 4 -+.IX Item "--special-files" -+.PD -+Allows processing of non-plain files. - .IP "\fB\-V\fR" 4 - .IX Item "-V" - .PD 0 -diff -rNU3 dist.orig/binutils/doc/strings.1 dist/binutils/doc/strings.1 ---- dist.orig/binutils/doc/strings.1 2013-03-25 10:10:26.000000000 +0100 -+++ dist/binutils/doc/strings.1 2015-10-18 13:11:13.000000000 +0200 -@@ -208,7 +208,7 @@ - characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR = - single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR = - 16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit --littleendian. Useful for finding wide character strings. (\fBl\fR -+littleendian. Useful for finding wide-character strings. (\fBl\fR - and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings). - .IP "\fB\-T\fR \fIbfdname\fR" 4 - .IX Item "-T bfdname" -diff -rNU3 dist.orig/binutils/objcopy.c dist/binutils/objcopy.c ---- dist.orig/binutils/objcopy.c 2013-03-25 09:06:21.000000000 +0100 -+++ dist/binutils/objcopy.c 2015-10-18 13:11:13.000000000 +0200 -@@ -30,6 +30,8 @@ - #include "filenames.h" - #include "fnmatch.h" - #include "elf-bfd.h" -+#include -+#include - #include "libbfd.h" - #include "coff/internal.h" - #include "libcoff.h" -diff -rNU3 dist.orig/binutils/readelf.c dist/binutils/readelf.c ---- dist.orig/binutils/readelf.c 2013-03-25 09:06:21.000000000 +0100 -+++ dist/binutils/readelf.c 2015-10-18 13:11:13.000000000 +0200 -@@ -126,13 +126,14 @@ - #include "elf/mep.h" - #include "elf/microblaze.h" - #include "elf/mips.h" -+#include "elf/riscv.h" - #include "elf/mmix.h" - #include "elf/mn10200.h" - #include "elf/mn10300.h" - #include "elf/moxie.h" - #include "elf/mt.h" - #include "elf/msp430.h" --#include "elf/or32.h" -+#include "elf/or1k.h" - #include "elf/pj.h" - #include "elf/ppc.h" - #include "elf/ppc64.h" -@@ -184,6 +185,7 @@ - static Elf_Internal_Dyn * dynamic_section; - static Elf_Internal_Shdr * symtab_shndx_hdr; - static int show_name; -+static int do_special_files; - static int do_dynamic; - static int do_syms; - static int do_dyn_syms; -@@ -555,8 +557,7 @@ - case EM_MIPS: - case EM_MIPS_RS3_LE: - case EM_CYGNUS_M32R: -- case EM_OPENRISC: -- case EM_OR32: -+ case EM_OR1K: - case EM_SCORE: - case EM_XGATE: - return FALSE; -@@ -604,6 +605,7 @@ - case EM_NIOS32: - case EM_PPC64: - case EM_PPC: -+ case EM_RISCV: - case EM_RL78: - case EM_RX: - case EM_S390: -@@ -1134,9 +1136,8 @@ - rtype = elf_h8_reloc_type (type); - break; - -- case EM_OPENRISC: -- case EM_OR32: -- rtype = elf_or32_reloc_type (type); -+ case EM_OR1K: -+ rtype = elf_or1k_reloc_type (type); - break; - - case EM_PJ: -@@ -1234,6 +1235,10 @@ - rtype = elf_microblaze_reloc_type (type); - break; - -+ case EM_RISCV: -+ rtype = elf_riscv_reloc_type (type); -+ break; -+ - case EM_RL78: - rtype = elf_rl78_reloc_type (type); - break; -@@ -1941,8 +1946,7 @@ - case EM_S390: return "IBM S/390"; - case EM_SCORE: return "SUNPLUS S+Core"; - case EM_XSTORMY16: return "Sanyo XStormy16 CPU core"; -- case EM_OPENRISC: -- case EM_OR32: return "OpenRISC"; -+ case EM_OR1K: return "OpenRISC"; - case EM_ARC_A5: return "ARC International ARCompact processor"; - case EM_CRX: return "National Semiconductor CRX microprocessor"; - case EM_ADAPTEVA_EPIPHANY: return "Adapteva EPIPHANY"; -@@ -2005,6 +2009,7 @@ - case EM_CR16: - case EM_MICROBLAZE: - case EM_MICROBLAZE_OLD: return "Xilinx MicroBlaze"; -+ case EM_RISCV: return "RISC-V"; - case EM_RL78: return "Renesas RL78"; - case EM_RX: return "Renesas RX"; - case EM_METAG: return "Imagination Technologies META processor architecture"; -@@ -2488,6 +2493,14 @@ - strcat (buf, ", fdpic"); - break; - -+ case EM_RISCV: -+ { -+ unsigned int riscv_extension = EF_GET_RISCV_EXT(e_flags); -+ strcat (buf, ", "); -+ strcat (buf, riscv_elf_flag_to_name (riscv_extension)); -+ } -+ break; -+ - case EM_SH: - switch ((e_flags & EF_SH_MACH_MASK)) - { -@@ -3198,6 +3211,7 @@ - {"relocs", no_argument, 0, 'r'}, - {"notes", no_argument, 0, 'n'}, - {"dynamic", no_argument, 0, 'd'}, -+ {"special-files", no_argument, 0, 'f'}, - {"arch-specific", no_argument, 0, 'A'}, - {"version-info", no_argument, 0, 'V'}, - {"use-dynamic", no_argument, 0, 'D'}, -@@ -3243,6 +3257,7 @@ - -r --relocs Display the relocations (if present)\n\ - -u --unwind Display the unwind info (if present)\n\ - -d --dynamic Display the dynamic section (if present)\n\ -+ -f --special-files Process non-plain files too\n\ - -V --version-info Display the version sections (if present)\n\ - -A --arch-specific Display architecture specific information (if any)\n\ - -c --archive-index Display the symbol/file index in an archive\n\ -@@ -3362,7 +3377,7 @@ - usage (stderr); - - while ((c = getopt_long -- (argc, argv, "ADHINR:SVWacdeghi:lnp:rstuvw::x:", options, NULL)) != EOF) -+ (argc, argv, "ADHINR:SVWacdefghi:lnp:rstuvw::x:", options, NULL)) != EOF) - { - switch (c) - { -@@ -3412,6 +3427,9 @@ - case 'u': - do_unwind++; - break; -+ case 'f': -+ do_special_files++; -+ break; - case 'h': - do_header++; - break; -@@ -3801,7 +3819,7 @@ - if (elf_header.e_phnum > 1) - printf (_("\nProgram Headers:\n")); - else -- printf (_("\nProgram Headers:\n")); -+ printf (_("\nProgram Header:\n")); - - if (is_32bit_elf) - printf -@@ -6974,6 +6992,11 @@ - - remaining = 4; - } -+ else -+ { -+ addr.section = SHN_UNDEF; -+ addr.offset = 0; -+ } - - if ((word & 0x80000000) == 0) - { -@@ -8842,6 +8865,20 @@ - } - - static const char * -+get_alpha_symbol_other (unsigned int other) -+{ -+ switch (other) -+ { -+ case STO_ALPHA_NOPV: -+ return "NOPV"; -+ case STO_ALPHA_STD_GPLOAD: -+ return "STD GPLOAD"; -+ default: -+ return NULL; -+ } -+} -+ -+static const char * - get_mips_symbol_other (unsigned int other) - { - switch (other) -@@ -8935,6 +8972,9 @@ - - switch (elf_header.e_machine) - { -+ case EM_ALPHA: -+ result = get_alpha_symbol_other (other); -+ break; - case EM_MIPS: - result = get_mips_symbol_other (other); - break; -@@ -9902,9 +9942,8 @@ - case EM_ALTERA_NIOS2: - case EM_NIOS32: - return reloc_type == 1; /* R_NIOS_32. */ -- case EM_OPENRISC: -- case EM_OR32: -- return reloc_type == 1; /* R_OR32_32. */ -+ case EM_OR1K: -+ return reloc_type == 1; /* R_OR1K_32. */ - case EM_PARISC: - return (reloc_type == 1 /* R_PARISC_DIR32. */ - || reloc_type == 41); /* R_PARISC_SECREL32. */ -@@ -9915,6 +9954,8 @@ - return reloc_type == 1; /* R_PPC64_ADDR32. */ - case EM_PPC: - return reloc_type == 1; /* R_PPC_ADDR32. */ -+ case EM_RISCV: -+ return reloc_type == 1; /* R_RISCV_32. */ - case EM_RL78: - return reloc_type == 1; /* R_RL78_DIR32. */ - case EM_RX: -@@ -10015,6 +10056,8 @@ - case EM_L1OM: - case EM_K1OM: - return reloc_type == 2; /* R_X86_64_PC32. */ -+ case EM_VAX: -+ return reloc_type == 4; /* R_VAX_PCREL32. */ - case EM_XTENSA_OLD: - case EM_XTENSA: - return reloc_type == 14; /* R_XTENSA_32_PCREL. */ -@@ -10046,6 +10089,8 @@ - return reloc_type == 80; /* R_PARISC_DIR64. */ - case EM_PPC64: - return reloc_type == 38; /* R_PPC64_ADDR64. */ -+ case EM_RISCV: -+ return reloc_type == 2; /* R_RISCV_64. */ - case EM_SPARC32PLUS: - case EM_SPARCV9: - case EM_SPARC: -@@ -10187,6 +10232,7 @@ - case EM_ADAPTEVA_EPIPHANY: - case EM_PPC: /* R_PPC_NONE. */ - case EM_PPC64: /* R_PPC64_NONE. */ -+ case EM_RISCV: /* R_RISCV_NONE. */ - case EM_ARM: /* R_ARM_NONE. */ - case EM_IA_64: /* R_IA64_NONE. */ - case EM_SH: /* R_SH_NONE. */ -@@ -12665,6 +12711,48 @@ - return buff; - } - -+static int -+process_netbsd_elf_note (Elf_Internal_Note * pnote) -+{ -+ unsigned int version; -+ -+ switch (pnote->type) -+ { -+ case NT_NETBSD_IDENT: -+ version = byte_get((unsigned char *)pnote->descdata, sizeof(version)); -+ if ((version / 10000) % 100) -+ printf (" NetBSD\t0x%08lx\tIDENT %u (%u.%u%s%c)\n", pnote->descsz, -+ version, version / 100000000, (version / 1000000) % 100, -+ (version / 10000) % 100 > 26 ? "Z" : "", -+ 'A' + (version / 10000) % 26); -+ else -+ printf (" NetBSD\t\t0x%08lx\tIDENT %u (%u.%u.%u)\n", pnote->descsz, -+ version, version / 100000000, (version / 1000000) % 100, -+ (version / 100) % 100); -+ return 1; -+ case NT_NETBSD_MARCH: -+ printf (" NetBSD\t\t0x%08lx\tMARCH <%s>\n", pnote->descsz, -+ pnote->descdata); -+ return 1; -+ case NT_NETBSD_PAX: -+ version = byte_get((unsigned char *)pnote->descdata, sizeof(version)); -+ printf (" NetBSD\t\t0x%08lx\tPaX <%s%s%s%s%s%s>\n", pnote->descsz, -+ ((version & NT_NETBSD_PAX_MPROTECT) ? "+mprotect" : ""), -+ ((version & NT_NETBSD_PAX_NOMPROTECT) ? "-mprotect" : ""), -+ ((version & NT_NETBSD_PAX_GUARD) ? "+guard" : ""), -+ ((version & NT_NETBSD_PAX_NOGUARD) ? "-guard" : ""), -+ ((version & NT_NETBSD_PAX_ASLR) ? "+ASLR" : ""), -+ ((version & NT_NETBSD_PAX_NOASLR) ? "-ASLR" : "")); -+ return 1; -+ default: -+ break; -+ } -+ -+ printf (" NetBSD\t0x%08lx\tUnknown note type: (0x%08lx)\n", pnote->descsz, -+ pnote->type); -+ return 1; -+} -+ - static int - print_gnu_note (Elf_Internal_Note *pnote) - { -@@ -12765,6 +12853,23 @@ - } - break; - -+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. -+ There's also old PT___GETREGS40 == mach + 1 for old reg -+ structure which lacks GBR. */ -+ case EM_SH: -+ switch (e_type) -+ { -+ case NT_NETBSDCORE_FIRSTMACH + 1: -+ return _("PT___GETREGS40 (old reg structure)"); -+ case NT_NETBSDCORE_FIRSTMACH + 3: -+ return _("PT_GETREGS (reg structure)"); -+ case NT_NETBSDCORE_FIRSTMACH + 5: -+ return _("PT_GETFPREGS (fpreg structure)"); -+ default: -+ break; -+ } -+ break; -+ - /* On all other arch's, PT_GETREGS == mach+1 and - PT_GETFPREGS == mach+3. */ - default: -@@ -12971,6 +13076,14 @@ - /* GNU-specific object file notes. */ - nt = get_gnu_elf_note_type (pnote->type); - -+ else if (const_strneq (pnote->namedata, "NetBSD")) -+ /* NetBSD-specific core file notes. */ -+ return process_netbsd_elf_note (pnote); -+ -+ else if (const_strneq (pnote->namedata, "PaX")) -+ /* NetBSD-specific core file notes. */ -+ return process_netbsd_elf_note (pnote); -+ - else if (const_strneq (pnote->namedata, "NetBSD-CORE")) - /* NetBSD-specific core file notes. */ - nt = get_netbsd_elfcore_note_type (pnote->type); -@@ -13710,7 +13823,7 @@ - return 1; - } - -- if (! S_ISREG (statbuf.st_mode)) -+ if (!do_special_files && ! S_ISREG (statbuf.st_mode)) - { - error (_("'%s' is not an ordinary file\n"), file_name); - return 1; -diff -rNU3 dist.orig/binutils/strings.c dist/binutils/strings.c ---- dist.orig/binutils/strings.c 2012-02-09 05:51:44.000000000 +0100 -+++ dist/binutils/strings.c 2015-10-18 13:11:13.000000000 +0200 -@@ -598,7 +598,7 @@ - else - #elif !BFD_HOST_64BIT_LONG - if (start != (unsigned long) start) -- printf ("++%7ld ", (unsigned long) start); -+ printf ("++%7llu ", (unsigned long) start); - else - #endif - printf ("%7ld ", (long) start); -diff -rNU3 dist.orig/config.guess dist/config.guess ---- dist.orig/config.guess 2011-06-06 12:36:06.000000000 +0200 -+++ dist/config.guess 2015-10-18 13:11:13.000000000 +0200 -@@ -160,14 +160,28 @@ - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; -+ coldfire) machine=m5407-unknown ;; -+ earm*eb*) machine=armeb-unknown ;; -+ earm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -- # to ELF recently, or will in the future. -+ # to ELF recently, or will in the future and ABI. - case "${UNAME_MACHINE_ARCH}" in -+ coldfire) os=netbsdelf ;; -+ earm*) -+ eval $set_cc_for_build -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ os=netbsdelf-eabi -+ else -+ os=netbsdelf-eabihf -+ fi -+ ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -diff -rNU3 dist.orig/config.sub dist/config.sub ---- dist.orig/config.sub 2012-04-25 17:53:25.000000000 +0200 -+++ dist/config.sub 2015-10-18 13:11:13.000000000 +0200 -@@ -122,9 +122,9 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -- knetbsd*-gnu* | netbsd*-gnu* | \ -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \ -+ netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -300,7 +300,7 @@ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ -- | or32 \ -+ | or1k | or1knd \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -@@ -332,12 +332,21 @@ - basic_machine=$basic_machine-unknown - os=-none - ;; -- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) -+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | m5407 \ -+ | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - -+ riscv32-*) -+ basic_machine=riscv32-ucb -+ ;; -+ -+ riscv*-*) -+ basic_machine=riscv-ucb -+ ;; -+ - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; -@@ -375,7 +384,7 @@ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -@@ -388,6 +397,7 @@ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ -+ | m5200-* | m5407-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -@@ -528,15 +538,6 @@ - basic_machine=powerpc-ibm - os=-cnk - ;; -- c54x-*) -- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; -- c55x-*) -- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; -- c6x-*) -- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - c90) - basic_machine=c90-cray - os=-unicos -@@ -916,8 +917,11 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- openrisc | openrisc-*) -- basic_machine=or32-unknown -+ or1k | or1k-*) -+ basic_machine=or1k-unknown -+ ;; -+ or1knd | or1knd-*) -+ basic_machine=or1knd-unknown - ;; - os400) - basic_machine=powerpc-ibm -@@ -1543,15 +1547,6 @@ - c4x-* | tic4x-*) - os=-coff - ;; -- tic54x-*) -- os=-coff -- ;; -- tic55x-*) -- os=-coff -- ;; -- tic6x-*) -- os=-coff -- ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1583,8 +1578,11 @@ - mips*-*) - os=-elf - ;; -- or32-*) -- os=-coff -+ or1k-*) -+ os=-elf -+ ;; -+ or1knd-*) -+ os=-elf - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 -diff -rNU3 dist.orig/cpu/openrisc.cpu dist/cpu/openrisc.cpu ---- dist.orig/cpu/openrisc.cpu 2011-08-22 17:25:07.000000000 +0200 -+++ dist/cpu/openrisc.cpu 1970-01-01 01:00:00.000000000 +0100 -@@ -1,774 +0,0 @@ --; OpenRISC family. -*- Scheme -*- --; Copyright 2000, 2001, 2011 Free Software Foundation, Inc. --; Contributed by Johan Rydberg, jrydberg@opencores.org --; --; 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 2 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 "simplify.inc") -- --; OpenRISC 1000 is an architecture of a family of open source, --; synthesizeable RISC microprocessor cores. It is a 32-bit load --; and store RISC architecture designed with emphasis on speed, --; compact instruction set and scalability. OpenRISC 1000 targets --; wide range of embedded environments. -- --(define-arch -- (name openrisc) -- (comment "OpenRISC 1000") -- (insn-lsb0? #t) -- (machs openrisc or1300) -- (isas or32) --) -- -- --; Attributes -- --; An attribute to describe if a model has insn and/or data caches. --(define-attr -- (for model) -- (type enum) -- (name HAS-CACHE) -- (comment "if this model has caches") -- (values DATA-CACHE INSN-CACHE) --) -- --; An attribute to describe if an insn can be in the delay slot or not. --(define-attr -- (for insn) -- (type boolean) -- (name NOT-IN-DELAY-SLOT) -- (comment "insn can't go in delay slot") --) -- --; IDOC attribute for instruction documentation. -- --(define-attr -- (for insn) -- (type enum) -- (name IDOC) -- (comment "insn kind for documentation") -- (attrs META) -- (values -- (MEM - () "Memory") -- (ALU - () "ALU") -- (FPU - () "FPU") -- (BR - () "Branch") -- (PRIV - () "Priviledged") -- (MISC - () "Miscellaneous") -- ) --) -- --; Enum for exception vectors. --(define-enum -- (name e-exception) -- (comment "exception vectors") -- (attrs) -- (prefix E_) -- (values (("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -) ("EXTINT" -) ("ALIGN" -) -- ("ILLEGAL" -) ("PEINT" -) ("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -) -- ("SYSCALL" -) ("BREAK" -) ("RESERVED" -))) --) -- -- --; Instruction set parameters. -- --(define-isa -- ; Name of the ISA. -- (name or32) -- -- ; Base insturction length. The insns is always 32 bits wide. -- (base-insn-bitsize 32) -- -- ; Address of insn in delay slot -- (setup-semantics (set-quiet (reg h-delay-insn) (add pc 4))) --) -- -- --; CPU family definitions. -- --(define-cpu -- ; CPU names must be distinct from the architecture name and machine names. -- ; The "b" suffix stands for "base" and is the convention. -- ; The "f" suffix stands for "family" and is the convention. -- (name openriscbf) -- (comment "OpenRISC base family") -- (endian big) -- (word-bitsize 32) --) -- --; Generic machine --(define-mach -- (name openrisc) -- (comment "Generic OpenRISC cpu") -- (cpu openriscbf) -- (bfd-name "openrisc") --) -- --; OpenRISC 1300 machine --(define-mach -- (name or1300) -- (comment "OpenRISC 1300") -- (cpu openriscbf) -- (bfd-name "openrisc:1300") --) -- -- --; Model descriptions -- --; Generic OpenRISC model --(define-model -- (name openrisc-1) (comment "OpenRISC generic model") (attrs) -- (mach openrisc) -- -- ; Nothing special about this. -- (unit u-exec "Execution Unit" () 1 1 () () () ()) --) -- --; OpenRISC 1320 --(define-model -- (name or1320-1) (comment "OpenRISC 1320 model") -- -- ; This model has both instruction and data cache -- (attrs (HAS-CACHE INSN-CACHE,DATA-CACHE)) -- (mach or1300) -- -- ; Nothing special about this. -- (unit u-exec "Execution Unit" () 1 1 () () () ()) --) -- -- --; Instruction fields. -- --; Attributes: --; . PCREL-ADDR pc relative value (for reloc and disassembly purposes) --; . ABS-ADDR absolute address (for reloc and disassembly purposes?) --; . RESERVED bits are not used to decode insn, must be all 0 -- --; Instruction classes. --(dnf f-class "insn class" () 31 2) --(dnf f-sub "sub class" () 29 4) -- --; Register fields. --(dnf f-r1 "r1" () 25 5) --(dnf f-r2 "r2" () 20 5) --(dnf f-r3 "r3" () 15 5) -- --; Immediates. --(df f-simm16 "signed imm (16)" () 15 16 INT #f #f) --(dnf f-uimm16 "unsigned imm (16)" () 15 16) --(dnf f-uimm5 "unsigned imm (5)" () 4 5) --(df f-hi16 "high 16" () 15 16 INT #f #f) --(df f-lo16 "low 16" () 15 16 INT #f #f) -- --; Sub fields --(dnf f-op1 "op1" () 31 2) --(dnf f-op2 "op2" () 29 4) --(dnf f-op3 "op3" () 25 2) --(dnf f-op4 "op4" () 23 3) --(dnf f-op5 "op3" () 25 5) --(dnf f-op6 "op4" () 7 3) --(dnf f-op7 "op5" () 3 4) -- --(dnf f-i16-1 "uimm16-1" () 10 11) --(dnf f-i16-2 "uimm16-2" () 25 5) -- --; PC relative, 26-bit (2 shifted to right) --(df f-disp26 "disp26" (PCREL-ADDR) 25 26 INT -- ((value pc) (sra WI (sub WI value pc) (const 2))) -- ((value pc) (add WI (sll WI value (const 2)) pc))) -- --; absolute, 26-bit (2 shifted to right) --(df f-abs26 "abs26" (ABS-ADDR) 25 26 INT -- ((value pc) (sra WI pc (const 2))) -- ((value pc) (sll WI value (const 2)))) -- --(define-multi-ifield -- (name f-i16nc) -- (comment "16 bit signed") -- (attrs SIGN-OPT) -- (mode HI) -- (subfields f-i16-1 f-i16-2) -- (insert (sequence () -- (set (ifield f-i16-2) (and (sra (ifield f-i16nc) -- (const 11)) -- (const #x1f))) -- (set (ifield f-i16-1) (and (ifield f-i16nc) -- (const #x7ff))))) -- (extract (sequence () -- (set (ifield f-i16nc) (c-raw-call SI "@arch@_sign_extend_16bit" -- (or (sll (ifield f-i16-2) -- (const 11)) -- (ifield f-i16-1)))))) --) -- -- --; Enums. -- --; insn-class: bits 31-30 --(define-normal-insn-enum insn-class "FIXME" () OP1_ f-class -- (.map .str (.iota 4)) --) -- --(define-normal-insn-enum insn-sub "FIXME" () OP2_ f-sub -- (.map .str (.iota 16)) --) -- --(define-normal-insn-enum insn-op3 "FIXME" () OP3_ f-op3 -- (.map .str (.iota 4)) --) -- --(define-normal-insn-enum insn-op4 "FIXME" () OP4_ f-op4 -- (.map .str (.iota 8)) --) -- --(define-normal-insn-enum insn-op5 "FIXME" () OP5_ f-op5 -- (.map .str (.iota 32)) --) -- --(define-normal-insn-enum insn-op6 "FIXME" () OP6_ f-op6 -- (.map .str (.iota 8)) --) -- --(define-normal-insn-enum insn-op7 "FIXME" () OP7_ f-op7 -- (.map .str (.iota 16)) --) -- -- -- --; Hardware pieces. --; These entries list the elements of the raw hardware. --; They're also used to provide tables and other elements of the assembly --; language. -- --(dnh h-pc "program counter" (PC PROFILE) (pc) () () ()) -- --(define-hardware -- (name h-gr) (comment "general registers") (attrs PROFILE) -- (type register WI (32)) -- (indices keyword "" -- ((r0 0) (r1 1) (r2 2) (r3 3) (r4 4) (r5 5) (r6 6) (r7 7) -- (r8 8) (r9 9) (r10 10) (r11 11) (r12 12) (r13 13) (r14 14) -- (r15 15) (r16 16) (r17 17) (r18 18) (r19 19) (r20 20) -- (r21 21) (r22 22) (r23 23) (r24 24) (r25 25) (r26 26) -- (r27 27) (r28 28) (r29 29) (r30 30) (r31 31) (lr 11) -- (sp 1) (fp 2))) --) -- --(define-hardware -- (name h-sr) (comment "special registers") -- (type register WI (#x20000)) -- (get (index) (c-call SI "@arch@_h_sr_get_handler" index)) -- (set (index newval) (c-call VOID "@arch@_h_sr_set_handler" index newval)) --) -- --(dnh h-hi16 "high 16 bits" () (immediate (INT 16)) () () ()) --(dnh h-lo16 "low 16 bits" () (immediate (INT 16)) () () ()) -- --(dsh h-cbit "condition bit" () (register BI)) --(dsh h-delay-insn "delay insn addr" () (register SI)) -- -- --; Instruction operands. -- --(dnop sr "special register" (SEM-ONLY) h-sr f-nil) --(dnop cbit "condition bit" (SEM-ONLY) h-cbit f-nil) --(dnop simm-16 "16 bit signed immediate" () h-sint f-simm16) --(dnop uimm-16 "16 bit unsigned immediate" () h-uint f-uimm16) --(dnop disp-26 "pc-rel 26 bit" () h-iaddr f-disp26) --(dnop abs-26 "abs 26 bit" () h-iaddr f-abs26) --(dnop uimm-5 "imm5" () h-uint f-uimm5) -- --(dnop rD "destination register" () h-gr f-r1) --(dnop rA "source register A" () h-gr f-r2) --(dnop rB "source register B" () h-gr f-r3) -- --(dnop op-f-23 "f-op23" () h-uint f-op4) --(dnop op-f-3 "f-op3" () h-uint f-op5) -- --; For hi(foo). --(define-operand -- (name hi16) (comment "high 16 bit immediate, sign optional") -- (attrs SIGN-OPT) -- (type h-hi16) -- (index f-simm16) -- (handlers (parse "hi16")) --) -- --; For lo(foo) --(define-operand -- (name lo16) (comment "low 16 bit immediate, sign optional") -- (attrs SIGN-OPT) -- (type h-lo16) -- (index f-lo16) -- (handlers (parse "lo16")) --) -- --(define-operand -- (name ui16nc) -- (comment "16 bit immediate, sign optional") -- (attrs) -- (type h-lo16) -- (index f-i16nc) -- (handlers (parse "lo16")) --) -- -- --; Instructions. -- --; Branch releated instructions -- --(dni l-j "jump (absolute iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.j ${abs-26}" -- (+ OP1_0 OP2_0 abs-26) -- -- ; We execute the delay slot before doin' the real branch -- (delay 1 (set pc abs-26)) -- () --) -- --(dni l-jal "jump and link (absolute iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.jal ${abs-26}" -- (+ OP1_0 OP2_1 abs-26) -- -- ; We execute the delay slot before doin' the real branch -- ; Set LR to (delay insn addr + 4) -- (sequence () -- (set (reg h-gr 11) (add (reg h-delay-insn) 4)) -- (delay 1 (set pc abs-26))) -- () --) -- --(dni l-jr "jump register (absolute iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.jr $rA" -- (+ OP1_0 OP2_5 OP3_0 OP4_0 rA uimm-16) -- -- ; We execute the delay slot before doin' the real branch -- (delay 1 (set pc rA)) -- () --) -- --(dni l-jalr "jump register and link (absolute iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.jalr $rA" -- (+ OP1_0 OP2_5 OP3_0 OP4_1 rA uimm-16) -- -- ; We save the value of rA in a temporary slot before setting -- ; the link register. This because "l.jalr r11" would cause -- ; a forever-and-ever loop otherwise. -- ; -- ; We execute the delay slot before doin' the real branch -- (sequence ((WI tmp-slot)) -- (set tmp-slot rA) -- (set (reg h-gr 11) (add (reg h-delay-insn) 4)) -- (delay 1 (set pc tmp-slot))) -- () --) -- --(dni l-bal "branch and link (pc relative iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.bal ${disp-26}" -- (+ OP1_0 OP2_2 disp-26) -- -- ; We execute the delay slot before doin' the real branch -- ; Set LR to (delay insn addr + 4) -- (sequence () -- (set (reg h-gr 11) (add (reg h-delay-insn) 4)) -- (delay 1 (set pc disp-26))) -- () --) -- --(dni l-bnf "branch if condition bit not set (pc relative iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.bnf ${disp-26}" -- (+ OP1_0 OP2_3 disp-26) -- -- ; We execute the delay slot before doin' the real branch -- (if (eq cbit 0) -- (sequence () -- (delay 1 (set pc disp-26)))) -- () --) -- --(dni l-bf "branch if condition bit is set (pc relative iaddr)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.bf ${disp-26}" -- (+ OP1_0 OP2_4 disp-26) -- -- ; We execute the delay slot before doin' the real branch -- (if (eq cbit 1) -- (sequence () -- (delay 1 (set pc disp-26)))) -- () --) -- --(dni l-brk "break (exception)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.brk ${uimm-16}" -- (+ OP1_0 OP2_5 OP3_3 OP4_0 rA uimm-16) -- -- ; FIXME should we do it like this ?? -- (c-call VOID "@cpu@_cpu_brk" uimm-16) -- () --) -- --(dni l-rfe "return from exception" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.rfe $rA" -- (+ OP1_0 OP2_5 OP3_0 OP4_2 rA uimm-16) -- (sequence () -- (delay 1 (set pc (c-call SI "@cpu@_cpu_rfe" rA)))) -- () --) -- --(dni l-sys "syscall (exception)" -- ; This function may not be in delay slot -- (NOT-IN-DELAY-SLOT) -- -- "l.sys ${uimm-16}" -- (+ OP1_0 OP2_5 OP3_2 OP4_0 rA uimm-16) -- (sequence() -- (delay 1 (set pc (c-call SI "@cpu@_except" pc -- #xc00 uimm-16)))) -- () --) -- -- --; Misc instructions -- --(dni l-nop "nop" -- () -- "l.nop" -- (+ OP1_0 OP2_5 OP3_1 OP4_0 rA uimm-16) -- (nop) -- () --) -- --(dnmi l-ret "ret" () -- "l.ret" -- (emit l-jr (rA 11) (uimm-16 0)) --) -- --(dni l-movhi "movhi" -- (DELAY-SLOT) -- "l.movhi $rD,$hi16" -- (+ OP1_0 OP2_6 hi16 rD rA) -- (set rD (sll WI hi16 (const 16))) -- () --) -- -- --; System releated instructions -- --(dni l-mfsr "mfsr" -- (DELAY-SLOT) -- "l.mfsr $rD,$rA" -- (+ OP1_0 OP2_7 rD rA uimm-16) -- (set rD (c-call SI "@cpu@_cpu_mfsr" rA)) -- () --) -- --(dni l-mtsr "mtsr" -- (DELAY-SLOT) -- "l.mtsr $rA,$rB" -- (+ OP1_1 OP2_0 rA rB rD (f-i16-1 0)) -- (c-call VOID "@cpu@_cpu_mtsr" rA rB) -- () --) -- -- -- --; Load instructions -- --(dni l-lw "load word" -- (DELAY-SLOT) -- "l.lw $rD,${simm-16}($rA)" -- (+ OP1_2 OP2_0 rD rA simm-16) -- (set rD (mem SI (add rA simm-16))) -- () --) -- --(dni l-lbz "load byte (zero extend)" -- (DELAY-SLOT) -- "l.lbz $rD,${simm-16}($rA)" -- (+ OP1_2 OP2_1 rD rA simm-16) -- (set rD (zext SI (mem QI (add rA simm-16)))) -- () --) -- --(dni l-lbs "load byte (sign extend)" -- (DELAY-SLOT) -- "l.lbs $rD,${simm-16}($rA)" -- (+ OP1_2 OP2_2 rD rA simm-16) -- (set rD (ext SI (mem QI (add rA simm-16)))) -- () --) -- --(dni l-lhz "load halfword (zero extend)" -- (DELAY-SLOT) -- "l.lhz $rD,${simm-16}($rA)" -- (+ OP1_2 OP2_3 rD simm-16 rA) -- (set rD (zext SI (mem HI (add rA simm-16)))) -- () --) -- --(dni l-lhs "load halfword (sign extend)" -- (DELAY-SLOT) -- "l.lhs $rD,${simm-16}($rA)" -- (+ OP1_2 OP2_4 rD rA simm-16) -- (set rD (ext SI (mem HI (add rA simm-16)))) -- () --) -- -- --; Store instructions --; --; We have to use a multi field since the integer is splited over 2 fields -- --(define-pmacro (store-insn mnemonic op2-op mode-op) -- (begin -- (dni (.sym l- mnemonic) -- (.str "l." mnemonic " imm(reg)/reg") -- (DELAY-SLOT) -- (.str "l." mnemonic " ${ui16nc}($rA),$rB") -- (+ OP1_3 op2-op rB rD ui16nc) -- (set (mem mode-op (add rA ui16nc)) rB) -- () -- ) -- ) --) -- --(store-insn sw OP2_5 SI) --(store-insn sb OP2_6 QI) --(store-insn sh OP2_7 HI) -- -- -- --; Shift and rotate instructions -- --; Reserved fields. --(dnf f-f-15-8 "nop" (RESERVED) 15 8) --(dnf f-f-10-3 "nop" (RESERVED) 10 3) --(dnf f-f-4-1 "nop" (RESERVED) 4 1) --(dnf f-f-7-3 "nop" (RESERVED) 7 3) -- --(define-pmacro (shift-insn mnemonic op4-op) -- (begin -- (dni (.sym l- mnemonic) -- (.str "l." mnemonic " reg/reg/reg") -- () -- (.str "l." mnemonic " $rD,$rA,$rB") -- (+ OP1_3 OP2_8 rD rA rB (f-f-10-3 0) op4-op (f-f-4-1 0) OP7_8) -- (set rD (mnemonic rA rB)) -- () -- ) -- (dni (.sym l- mnemonic "i") -- (.str "l." mnemonic " reg/reg/imm") -- () -- (.str "l." mnemonic "i $rD,$rA,${uimm-5}") -- (+ OP1_2 OP2_13 rD rA (f-f-15-8 0) op4-op uimm-5) -- (set rD (mnemonic rA uimm-5)) -- () -- ) -- ) --) -- --(shift-insn sll OP6_0) --(shift-insn srl OP6_1) --(shift-insn sra OP6_2) --(shift-insn ror OP6_4) -- -- --; Arethmetic insns -- --; Reserved fields. --(dnf f-f-10-7 "nop" (RESERVED) 10 7) -- --(define-pmacro (ar-insn-u mnemonic op2-op op5-op) -- (begin -- (dni (.sym l- mnemonic) -- (.str "l." mnemonic " reg/reg/reg") -- () -- (.str "l." mnemonic " $rD,$rA,$rB") -- (+ OP1_3 OP2_8 rD rA rB (f-f-10-7 0) op5-op) -- (set rD (mnemonic rA rB)) -- () -- ) -- (dni (.sym l- mnemonic "i") -- (.str "l." mnemonic " reg/reg/lo16") -- () -- (.str "l." mnemonic "i $rD,$rA,$lo16") -- (+ OP1_2 op2-op rD rA lo16) -- (set rD (mnemonic rA (and lo16 #xffff))) -- () -- ) -- ) --) -- --(define-pmacro (ar-insn-s mnemonic op2-op op5-op) -- (begin -- (dni (.sym l- mnemonic) -- (.str "l." mnemonic " reg/reg/reg") -- () -- (.str "l." mnemonic " $rD,$rA,$rB") -- (+ OP1_3 OP2_8 rD rA rB (f-f-10-7 0) op5-op) -- (set rD (mnemonic rA rB)) -- () -- ) -- (dni (.sym l- mnemonic "i") -- (.str "l." mnemonic " reg/reg/lo16") -- () -- (.str "l." mnemonic "i $rD,$rA,$lo16") -- (+ OP1_2 op2-op rD rA lo16) -- (set rD (mnemonic rA lo16)) -- () -- ) -- ) --) -- --(ar-insn-s add OP2_5 OP7_0) --;;(ar-op-s addc OP2_5 OP7_0) --(ar-insn-s sub OP2_7 OP7_2) --(ar-insn-u and OP2_8 OP7_3) --(ar-insn-u or OP2_9 OP7_4) --(ar-insn-u xor OP2_10 OP7_5) --(ar-insn-u mul OP2_11 OP7_6) --;;(ar-op-u mac OP2_12 OP7_7) -- -- --(dni l-div "divide (signed)" -- (DELAY-SLOT) -- "l.div $rD,$rA,$rB" -- (+ OP1_3 OP2_8 rD rA rB (f-f-10-7 0) OP7_9) -- (if VOID (eq rB (const 0)) -- (c-call VOID "@arch@_cpu_trap" pc (enum SI E_ILLEGAL)) -- (set rD (div rA rB))) -- () --) -- --(dni l-divu "divide (unsigned)" -- (DELAY-SLOT) -- "l.divu $rD,$rA,$rB" -- (+ OP1_3 OP2_8 rD rA rB (f-f-10-7 0) OP7_10) -- (if VOID (eq rB (const 0)) -- (c-call VOID "@arch@_cpu_trap" pc (enum SI E_ILLEGAL)) -- (set rD (udiv rA rB))) -- () --) -- -- --; Compare instructions -- --; Reserved fields. --(dnf f-f-10-11 "nop" (RESERVED) 10 11) -- --; Register compare (both signed and unsigned) --(define-pmacro (sf-insn-r op1-op op2-op op3-op op3-op-2 sem-op) -- (begin -- (dni (.sym l- "sf" (.sym sem-op "s")) -- (.str "l." mnemonic " reg/reg") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) "s $rA,$rB") -- (+ op1-op op2-op op3-op-2 rA rB (f-f-10-11 0)) -- (set cbit (sem-op rA rB)) -- () -- ) -- (dni (.sym l- "sf" (.sym sem-op "u")) -- (.str "l." mnemonic " reg/reg") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) "u $rA,$rB") -- (+ op1-op op2-op op3-op rA rB (f-f-10-11 0)) -- (set cbit (sem-op rA rB)) -- () -- ) -- ) --) -- --; Immediate compare (both signed and unsigned) --(define-pmacro (sf-insn-i op1-op op2-op op3-op op3-op-2 sem-op) -- (begin -- (dni (.sym l- "sf" (.sym sem-op "si")) -- (.str "l." mnemonic "si reg/imm") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) "si $rA,${simm-16}") -- (+ op1-op op2-op op3-op-2 rA simm-16) -- (set cbit (sem-op rA simm-16)) -- () -- ) -- (dni (.sym l- "sf" (.sym sem-op "ui")) -- (.str "l." mnemonic "ui reg/imm") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) "ui $rA,${uimm-16}") -- (+ op1-op op2-op op3-op rA uimm-16) -- (set cbit (sem-op rA uimm-16)) -- () -- ) -- ) --) -- --(define-pmacro (sf-insn op5-op sem-op) -- (begin -- (dni (.sym l- "sf" sem-op) -- (.str "l." mnemonic " reg/reg") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) " $rA,$rB") -- (+ OP1_3 OP2_9 op5-op rA rB (f-f-10-11 0)) -- (set cbit (sem-op rA rB)) -- () -- ) -- (dni (.sym l- "sf" (.sym sem-op "i")) -- (.str "l." mnemonic "i reg/imm") -- (DELAY-SLOT) -- (.str "l.sf" (.str sem-op) "i $rA,${simm-16}") -- (+ OP1_2 OP2_14 op5-op rA simm-16) -- (set cbit (sem-op rA simm-16)) -- () -- ) -- ) --) -- -- --(sf-insn-r OP1_3 OP2_9 OP5_2 OP5_6 gt) --(sf-insn-r OP1_3 OP2_9 OP5_3 OP5_7 ge) --(sf-insn-r OP1_3 OP2_9 OP5_4 OP5_8 lt) --(sf-insn-r OP1_3 OP2_9 OP5_5 OP5_9 le) -- --(sf-insn-i OP1_2 OP2_14 OP5_2 OP5_6 gt) --(sf-insn-i OP1_2 OP2_14 OP5_3 OP5_7 ge) --(sf-insn-i OP1_2 OP2_14 OP5_4 OP5_8 lt) --(sf-insn-i OP1_2 OP2_14 OP5_5 OP5_9 le) -- --(sf-insn OP5_0 eq) --(sf-insn OP5_1 ne) -diff -rNU3 dist.orig/cpu/openrisc.opc dist/cpu/openrisc.opc ---- dist.orig/cpu/openrisc.opc 2011-08-22 17:25:07.000000000 +0200 -+++ dist/cpu/openrisc.opc 1970-01-01 01:00:00.000000000 +0100 -@@ -1,164 +0,0 @@ --/* OpenRISC opcode support. -*- C -*- -- Copyright 2000, 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -- -- Contributed by Red Hat Inc; -- -- This file is part of the GNU Binutils. -- -- 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. */ -- --/* This file is an addendum to or32.cpu. Heavy use of C code isn't -- appropriate in .cpu files, so it resides here. This especially applies -- to assembly/disassembly where parsing/printing can be quite involved. -- Such things aren't really part of the specification of the cpu, per se, -- so .cpu files provide the general framework and .opc files handle the -- nitty-gritty details as necessary. -- -- Each section is delimited with start and end markers. -- -- -opc.h additions use: "-- opc.h" -- -opc.c additions use: "-- opc.c" -- -asm.c additions use: "-- asm.c" -- -dis.c additions use: "-- dis.c" -- -ibd.h additions use: "-- ibd.h" */ -- --/* -- opc.h */ --#undef CGEN_DIS_HASH_SIZE --#define CGEN_DIS_HASH_SIZE 64 --#undef CGEN_DIS_HASH --#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2) -- --extern long openrisc_sign_extend_16bit (long); --/* -- */ -- --/* -- opc.c */ --/* -- */ -- --/* -- asm.c */ -- --static const char * MISSING_CLOSING_PARENTHESIS = N_("missing `)'"); -- --#define CGEN_VERBOSE_ASSEMBLER_ERRORS -- --long --openrisc_sign_extend_16bit (long value) --{ -- return ((value & 0xffff) ^ 0x8000) - 0x8000; --} -- --/* Handle hi(). */ -- --static const char * --parse_hi16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) --{ -- const char *errmsg; -- enum cgen_parse_operand_result result_type; -- unsigned long ret; -- -- if (**strp == '#') -- ++*strp; -- -- if (strncasecmp (*strp, "hi(", 3) == 0) -- { -- bfd_vma value; -- -- *strp += 3; -- errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16, -- & result_type, & value); -- if (**strp != ')') -- return MISSING_CLOSING_PARENTHESIS; -- -- ++*strp; -- if (errmsg == NULL -- && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -- value >>= 16; -- ret = value; -- } -- else -- { -- if (**strp == '-') -- { -- long value; -- -- errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -- ret = value; -- } -- else -- { -- unsigned long value; -- -- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value); -- ret = value; -- } -- } -- -- *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000; -- return errmsg; --} -- --/* Handle lo(). */ -- --static const char * --parse_lo16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) --{ -- const char *errmsg; -- enum cgen_parse_operand_result result_type; -- unsigned long ret; -- -- if (**strp == '#') -- ++*strp; -- -- if (strncasecmp (*strp, "lo(", 3) == 0) -- { -- bfd_vma value; -- -- *strp += 3; -- errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16, -- & result_type, & value); -- if (**strp != ')') -- return MISSING_CLOSING_PARENTHESIS; -- -- ++*strp; -- ret = value; -- } -- else -- { -- if (**strp == '-') -- { -- long value; -- -- errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -- ret = value; -- } -- else -- { -- unsigned long value; -- -- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value); -- ret = value; -- } -- } -- -- *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000; -- return errmsg; --} -- --/* -- */ -- --/* -- ibd.h */ --extern long openrisc_sign_extend_16bit (long); -- --/* -- */ -diff -rNU3 dist.orig/cpu/or1k.cpu dist/cpu/or1k.cpu ---- dist.orig/cpu/or1k.cpu 1970-01-01 01:00:00.000000000 +0100 -+++ dist/cpu/or1k.cpu 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,131 @@ -+; OpenRISC 1000 architecture. -*- Scheme -*- -+; Copyright 2000-2014 Free Software Foundation, Inc. -+; Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org -+; Modified by Julius Baxter, juliusbaxter@gmail.com -+; Modified by Peter Gavin, pgavin@gmail.com -+; -+; 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, see -+ -+(include "simplify.inc") -+ -+; The OpenRISC family is a set of RISC microprocessor architectures with an -+; emphasis on scalability and is targetted at embedded use. -+; The CPU RTL development is a collaborative open source effort. -+; http://opencores.org/or1k -+; http://openrisc.net -+ -+(define-arch -+ (name or1k) -+ (comment "OpenRISC 1000") -+ (default-alignment aligned) -+ (insn-lsb0? #t) -+ (machs or32 or32nd or64 or64nd) -+ (isas openrisc) -+) -+ -+; Instruction set parameters. -+(define-isa -+ ; Name of the ISA. -+ (name openrisc) -+ ; Base insturction length. The insns are always 32 bits wide. -+ (base-insn-bitsize 32) -+ ) -+ -+(define-pmacro OR32-MACHS or32,or32nd) -+(define-pmacro OR64-MACHS or64,or64nd) -+(define-pmacro ORBIS-MACHS or32,or32nd,or64,or64nd) -+(define-pmacro ORFPX-MACHS or32,or32nd,or64,or64nd) -+(define-pmacro ORFPX32-MACHS or32,or32nd,or64,or64nd) -+(define-pmacro ORFPX64-MACHS or64,or64nd) -+ -+(define-attr -+ (for model) -+ (type boolean) -+ (name NO-DELAY-SLOT) -+ (comment "does not have delay slots") -+ ) -+ -+(if (keep-mach? (or32 or32nd)) -+ (begin -+ (define-cpu -+ (name or1k32bf) -+ (comment "OpenRISC 1000 32-bit CPU family") -+ (insn-endian big) -+ (data-endian big) -+ (word-bitsize 32) -+ (file-transform "") -+ ) -+ -+ (define-mach -+ (name or32) -+ (comment "Generic OpenRISC 1000 32-bit CPU") -+ (cpu or1k32bf) -+ (bfd-name "or1k") -+ ) -+ -+ (define-mach -+ (name or32nd) -+ (comment "Generic OpenRISC 1000 32-bit CPU") -+ (cpu or1k32bf) -+ (bfd-name "or1knd") -+ ) -+ -+ ; OpenRISC 1200 - 32-bit or1k CPU implementation -+ (define-model -+ (name or1200) (comment "OpenRISC 1200 model") -+ (attrs) -+ (mach or32) -+ (unit u-exec "Execution Unit" () 1 1 () () () ()) -+ ) -+ -+ ; OpenRISC 1200 - 32-bit or1k CPU implementation -+ (define-model -+ (name or1200nd) (comment "OpenRISC 1200 model") -+ (attrs NO-DELAY-SLOT) -+ (mach or32nd) -+ (unit u-exec "Execution Unit" () 1 1 () () () ()) -+ ) -+ ) -+ ) -+ -+(if (keep-mach? (or64 or64nd)) -+ (begin -+ (define-cpu -+ (name or1k64bf) -+ (comment "OpenRISC 1000 64-bit CPU family") -+ (insn-endian big) -+ (data-endian big) -+ (word-bitsize 64) -+ (file-transform "64") -+ ) -+ -+ (define-mach -+ (name or64) -+ (comment "Generic OpenRISC 1000 64-bit CPU") -+ (cpu or1k64bf) -+ (bfd-name "or1k64") -+ ) -+ -+ (define-mach -+ (name or64nd) -+ (comment "Generic OpenRISC 1000 ND 64-bit CPU") -+ (cpu or1k64bf) -+ (bfd-name "or1k64nd") -+ ) -+ ) -+ ) -+ -+(include "or1kcommon.cpu") -+(include "or1korbis.cpu") -+(include "or1korfpx.cpu") -diff -rNU3 dist.orig/cpu/or1k.opc dist/cpu/or1k.opc ---- dist.orig/cpu/or1k.opc 1970-01-01 01:00:00.000000000 +0100 -+++ dist/cpu/or1k.opc 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,421 @@ -+/* OpenRISC 1000 opcode support. -*- C -*- -+ Copyright 2000-2014 Free Software Foundation, Inc. -+ -+ Originally ontributed for OR32 by Red Hat Inc; -+ -+ This file is part of the GNU Binutils. -+ -+ 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, see . */ -+ -+/* This file is an addendum to or1k.cpu. Heavy use of C code isn't -+ appropriate in .cpu files, so it resides here. This especially applies -+ to assembly/disassembly where parsing/printing can be quite involved. -+ Such things aren't really part of the specification of the cpu, per se, -+ so .cpu files provide the general framework and .opc files handle the -+ nitty-gritty details as necessary. -+ -+ Each section is delimited with start and end markers. -+ -+ -opc.h additions use: "-- opc.h" -+ -opc.c additions use: "-- opc.c" -+ -asm.c additions use: "-- asm.c" -+ -dis.c additions use: "-- dis.c" -+ -ibd.h additions use: "-- ibd.h" */ -+ -+/* -- opc.h */ -+ -+#undef CGEN_DIS_HASH_SIZE -+#define CGEN_DIS_HASH_SIZE 256 -+#undef CGEN_DIS_HASH -+#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2) -+ -+/* -- */ -+ -+/* -- opc.c */ -+/* -- */ -+ -+/* -- asm.c */ -+ -+static const char * MISSING_CLOSING_PARENTHESIS = N_("missing `)'"); -+ -+#define CGEN_VERBOSE_ASSEMBLER_ERRORS -+ -+static const char * -+parse_disp26 (CGEN_CPU_DESC cd, -+ const char ** strp, -+ int opindex, -+ int opinfo, -+ enum cgen_parse_operand_result * resultp, -+ bfd_vma * valuep) -+{ -+ const char *errmsg = NULL; -+ enum cgen_parse_operand_result result_type; -+ -+ if (strncasecmp (*strp, "plt(", 4) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 4; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_OR1K_PLT26, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 2) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ return cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep); -+} -+ -+static const char * -+parse_simm16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) -+{ -+ const char *errmsg; -+ enum cgen_parse_operand_result result_type; -+ long ret; -+ -+ if (**strp == '#') -+ ++*strp; -+ -+ if (strncasecmp (*strp, "hi(", 3) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 3; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16, -+ & result_type, & value); -+ if (**strp != ')') -+ errmsg = MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ -+ ret = value; -+ -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ { -+ ret >>= 16; -+ ret &= 0xffff; -+ ret = (ret ^ 0x8000) - 0x8000; -+ } -+ } -+ else if (strncasecmp (*strp, "lo(", 3) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 3; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ -+ ret = value; -+ -+ if (result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ { -+ ret &= 0xffff; -+ ret = (ret ^ 0x8000) - 0x8000; -+ } -+ } -+ else if (strncasecmp (*strp, "got(", 4) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 4; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_OR1K_GOT16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotpchi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTPC_HI16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotpclo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTPC_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotoffhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTOFF_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotofflo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTOFF_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsgdhi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_GD_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsgdlo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_GD_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsldmhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDM_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsldmlo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDM_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "dtpoffhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDO_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "dtpofflo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDO_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gottpoffhi(", 11) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 11; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_IE_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gottpofflo(", 11) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 11; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_IE_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tpoffhi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LE_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tpofflo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LE_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else -+ { -+ long value; -+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -+ ret = value; -+ } -+ -+ if (errmsg == NULL) -+ *valuep = ret; -+ -+ return errmsg; -+} -+ -+static const char * -+parse_uimm16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, unsigned long * valuep) -+{ -+ const char *errmsg = parse_simm16(cd, strp, opindex, (long *) valuep); -+ -+ if (errmsg == NULL) -+ *valuep &= 0xffff; -+ return errmsg; -+} -+ -+/* -- */ -+ -+/* -- ibd.h */ -+ -+/* -- */ -diff -rNU3 dist.orig/cpu/or1kcommon.cpu dist/cpu/or1kcommon.cpu ---- dist.orig/cpu/or1kcommon.cpu 1970-01-01 01:00:00.000000000 +0100 -+++ dist/cpu/or1kcommon.cpu 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,360 @@ -+; OpenRISC 1000 32-bit CPU hardware description. -*- Scheme -*- -+; Copyright 2000-2014 Free Software Foundation, Inc. -+; Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org -+; Modified by Julius Baxter, juliusbaxter@gmail.com -+; -+; 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, see -+ -+; Hardware pieces. -+; These entries list the elements of the raw hardware. -+; They're also used to provide tables and other elements of the assembly -+; language. -+ -+(define-hardware -+ (name h-pc) -+ (comment "program counter") -+ (attrs PC (MACH ORBIS-MACHS)) -+ (type pc UWI) -+ ) -+ -+(define-pmacro REG-INDICES -+ ((r0 0) -+ (r1 1) -+ (r2 2) -+ (r3 3) -+ (r4 4) -+ (r5 5) -+ (r6 6) -+ (r7 7) -+ (r8 8) -+ (r9 9) -+ (r10 10) -+ (r11 11) -+ (r12 12) -+ (r13 13) -+ (r14 14) -+ (r15 15) -+ (r16 16) -+ (r17 17) -+ (r18 18) -+ (r19 19) -+ (r20 20) -+ (r21 21) -+ (r22 22) -+ (r23 23) -+ (r24 24) -+ (r25 25) -+ (r26 26) -+ (r27 27) -+ (r28 28) -+ (r29 29) -+ (r30 30) -+ (r31 31) -+ (lr 9) -+ (sp 1) -+ (fp 2)) -+ ) -+ -+(define-hardware -+ (name h-fsr) -+ (comment "floating point registers (single, virtual)") -+ (attrs VIRTUAL (MACH ORFPX32-MACHS)) -+ (type register SF (32)) -+ (indices keyword "" REG-INDICES) -+ (get (index) (subword SF (trunc SI (reg h-gpr index)) 0)) -+ (set (index newval) (set UWI (reg h-gpr index) (zext UWI (subword SI newval 0)))) -+ ) -+ -+(define-hardware -+ (name h-fdr) (comment "floating point registers (double, virtual)") -+ (attrs VIRTUAL (MACH ORFPX64-MACHS)) -+ (type register DF (32)) -+ (indices keyword "" REG-INDICES) -+ (get (index) (subword DF (trunc DI (reg h-gpr index)) 0)) -+ (set (index newval) (set UDI (reg h-gpr index) (zext UDI (subword DI newval 0)))) -+ ) -+ -+(define-hardware -+ (name h-spr) (comment "special purpose registers") -+ (attrs VIRTUAL (MACH ORBIS-MACHS)) -+ (type register UWI (#x20000)) -+ (get (index) (c-call UWI "@cpu@_h_spr_get_raw" index)) -+ (set (index newval) (c-call VOID "@cpu@_h_spr_set_raw" index newval)) -+) -+ -+(define-pmacro spr-shift 11) -+(define-pmacro (spr-address spr-group spr-index) -+ (or (sll UWI (enum UWI (.sym "SPR-GROUP-" spr-group)) spr-shift) -+ (enum UWI (.sym "SPR-INDEX-" spr-group "-" spr-index)))) -+ -+(define-hardware -+ (name h-gpr) (comment "general registers") -+ (attrs (MACH ORBIS-MACHS)) -+ (type register UWI (32)) -+ (indices keyword "" REG-INDICES) -+ (get (index) (reg UWI h-spr (add index (spr-address SYS GPR0)))) -+ (set (index newval) (set UWI (reg UWI h-spr (add index (spr-address SYS GPR0))) newval)) -+ ) -+ -+(define-normal-enum -+ except-number -+ "Exception numbers" -+ () -+ EXCEPT- -+ (("NONE" #x00) -+ ("RESET" #x01) -+ ("BUSERR" #x02) -+ ("DPF" #x03) -+ ("IPF" #x04) -+ ("TICK" #x05) -+ ("ALIGN" #x06) -+ ("ILLEGAL" #x07) -+ ("INT" #x08) -+ ("DTLBMISS" #x09) -+ ("ITLBMISS" #x0a) -+ ("RANGE" #x0b) -+ ("SYSCALL" #x0c) -+ ("FPE" #x0d) -+ ("TRAP" #x0e) -+ ) -+ ) -+ -+(define-pmacro (raise-exception exnum) -+ (c-call VOID "@cpu@_exception" pc exnum)) -+ -+(define-normal-enum -+ spr-groups -+ "special purpose register groups" -+ () -+ SPR-GROUP- -+ (("SYS" #x0) -+ ("DMMU" #x1) -+ ("IMMU" #x2) -+ ("DCACHE" #x3) -+ ("ICACHE" #x4) -+ ("MAC" #x5) -+ ("DEBUG" #x6) -+ ("PERF" #x7) -+ ("POWER" #x8) -+ ("PIC" #x9) -+ ("TICK" #xa) -+ ("FPU" #xb) -+ ) -+ ) -+ -+(define-pmacro (spr-reg-info) -+ (.splice -+ (SYS VR #x000 "version register") -+ (SYS UPR #x001 "unit present register") -+ (SYS CPUCFGR #x002 "cpu configuration register") -+ (SYS DMMUCFGR #x003 "Data MMU configuration register") -+ (SYS IMMUCFGR #x004 "Insn MMU configuration register") -+ (SYS DCCFGR #x005 "Data cache configuration register") -+ (SYS ICCFGR #x006 "Insn cache configuration register") -+ (SYS DCFGR #x007 "Debug configuration register") -+ (SYS PCCFGR #x008 "Performance counters configuration register") -+ (SYS NPC #x010 "Next program counter") -+ (SYS SR #x011 "Supervision Regsiter") -+ (SYS PPC #x012 "Previous program counter") -+ (SYS FPCSR #x014 "Floating point control status register") -+ (.unsplice -+ (.map (.pmacro (n) (.splice SYS (.sym "EPCR" n) (.add n #x20) (.str "Exception PC register " n))) -+ (.iota #x10))) -+ (.unsplice -+ (.map (.pmacro (n) (.splice SYS (.sym "EEAR" n) (.add n #x30) (.str "Exception effective address register " n))) -+ (.iota #x10))) -+ (.unsplice -+ (.map (.pmacro (n) (.splice SYS (.sym "ESR" n) (.add n #x40) (.str "Exception supervision register " n))) -+ (.iota #x10))) -+ (.unsplice -+ (.map (.pmacro (n) (.splice SYS (.sym "GPR" n) (.add n #x400) (.str "General purpose register " n))) -+ (.iota #x200))) -+ -+ (MAC MACLO #x001 "Multiply and accumulate result (low)") -+ (MAC MACHI #x002 "Multiply and accumulate result (high)") -+ (TICK TTMR #x000 "Tick timer mode register") -+ ) -+ ) -+ -+(define-normal-enum -+ spr-reg-indices -+ "special purpose register indicies" -+ () -+ SPR-INDEX- -+ (.map (.pmacro (args) -+ (.apply (.pmacro (group index n comment) -+ ((.sym group "-" index) n)) -+ args) -+ ) -+ (spr-reg-info) -+ ) -+ ) -+ -+(define-pmacro (define-h-spr-reg spr-group spr-index n spr-comment) -+ (define-hardware -+ (name (.sym "h-" (.downcase spr-group) "-" (.downcase spr-index))) -+ (comment spr-comment) -+ (attrs VIRTUAL (MACH ORBIS-MACHS)) -+ (type register UWI) -+ (get () (reg UWI h-spr (spr-address spr-group spr-index))) -+ (set (newval) (set (reg UWI h-spr (spr-address spr-group spr-index)) newval)) -+ ) -+ ) -+(.splice begin (.unsplice (.map (.pmacro (args) (.apply define-h-spr-reg args)) (spr-reg-info)))) -+ -+(define-pmacro (spr-field-info) -+ ((SYS VR REV 5 0 "revision field") -+ (SYS VR CFG 23 16 "configuration template field") -+ (SYS VR VER 31 24 "version field") -+ (SYS UPR UP 0 0 "UPR present bit") -+ (SYS UPR DCP 1 1 "data cache present bit") -+ (SYS UPR ICP 2 2 "insn cache present bit") -+ (SYS UPR DMP 3 3 "data MMU present bit") -+ (SYS UPR MP 4 4 "MAC unit present bit") -+ (SYS UPR IMP 5 5 "insn MMU present bit") -+ (SYS UPR DUP 6 6 "debug unit present bit") -+ (SYS UPR PCUP 7 7 "performance counters unit present bit") -+ (SYS UPR PICP 8 8 "programmable interrupt controller present bit") -+ (SYS UPR PMP 9 9 "power management present bit") -+ (SYS UPR TTP 10 10 "tick timer present bit") -+ (SYS UPR CUP 31 24 "custom units present field") -+ (SYS CPUCFGR NSGR 3 0 "number of shadow GPR files field") -+ (SYS CPUCFGR CGF 4 4 "custom GPR file bit") -+ (SYS CPUCFGR OB32S 5 5 "ORBIS32 supported bit") -+ (SYS CPUCFGR OB64S 6 6 "ORBIS64 supported bit") -+ (SYS CPUCFGR OF32S 7 7 "ORFPX32 supported bit") -+ (SYS CPUCFGR OF64S 8 8 "ORFPX64 supported bit") -+ (SYS CPUCFGR OV64S 9 9 "ORVDX64 supported bit") -+ (SYS CPUCFGR ND 10 10 "no transfer delay bit") -+ (SYS SR SM 0 0 "supervisor mode bit") -+ (SYS SR TEE 1 1 "tick timer exception enabled bit") -+ (SYS SR IEE 2 2 "interrupt exception enabled bit") -+ (SYS SR DCE 3 3 "data cache enabled bit") -+ (SYS SR ICE 4 4 "insn cache enabled bit") -+ (SYS SR DME 5 5 "data MMU enabled bit") -+ (SYS SR IME 6 6 "insn MMU enabled bit") -+ (SYS SR LEE 7 7 "little endian enabled bit") -+ (SYS SR CE 8 8 "CID enable bit") -+ (SYS SR F 9 9 "flag bit") -+ (SYS SR CY 10 10 "carry bit") -+ (SYS SR OV 11 11 "overflow bit") -+ (SYS SR OVE 12 12 "overflow exception enabled bit") -+ (SYS SR DSX 13 13 "delay slot exception bit") -+ (SYS SR EPH 14 14 "exception prefix high bit") -+ (SYS SR FO 15 15 "fixed one bit") -+ (SYS SR SUMRA 16 16 "SPRs user mode read access bit") -+ (SYS SR CID 31 28 "context ID field") -+ (SYS FPCSR FPEE 0 0 "floating point exceptions enabled bit") -+ (SYS FPCSR RM 2 1 "floating point rounding mode field") -+ (SYS FPCSR OVF 3 3 "floating point overflow flag bit") -+ (SYS FPCSR UNF 4 4 "floating point underflow bit") -+ (SYS FPCSR SNF 5 5 "floating point SNAN flag bit") -+ (SYS FPCSR QNF 6 6 "floating point QNAN flag bit") -+ (SYS FPCSR ZF 7 7 "floating point zero flag bit") -+ (SYS FPCSR IXF 8 8 "floating point inexact flag bit") -+ (SYS FPCSR IVF 9 9 "floating point invalid flag bit") -+ (SYS FPCSR INF 10 10 "floating point infinity flag bit") -+ (SYS FPCSR DZF 11 11 "floating point divide by zero flag bit") -+ ) -+ ) -+ -+(define-normal-enum -+ spr-field-msbs -+ "SPR field msb positions" -+ () -+ SPR-FIELD-MSB- -+ (.map (.pmacro (args) -+ (.apply (.pmacro (group index field msb lsb comment) -+ ((.sym group "-" index "-" field) msb) -+ ) -+ args -+ ) -+ ) -+ (spr-field-info) -+ ) -+ ) -+ -+(define-normal-enum -+ spr-field-lsbs -+ "SPR field lsb positions" -+ () -+ SPR-FIELD-SIZE- -+ (.map (.pmacro (args) -+ (.apply (.pmacro (group index field msb lsb comment) -+ ((.sym group "-" index "-" field) lsb) -+ ) -+ args -+ ) -+ ) -+ (spr-field-info) -+ ) -+ ) -+ -+(define-normal-enum -+ spr-field-masks -+ "SPR field masks" -+ () -+ SPR-FIELD-MASK- -+ (.map (.pmacro (args) -+ (.apply (.pmacro (group index field msb lsb comment) -+ (.splice (.str group "-" index "-" field) (.sll (.inv (.sll (.inv 0) (.add (.sub msb lsb) 1))) lsb)) -+ ) -+ args -+ ) -+ ) -+ (spr-field-info) -+ ) -+ ) -+ -+(define-pmacro (define-h-spr-field spr-group spr-index spr-field spr-field-msb spr-field-lsb spr-field-comment) -+ (.let ((spr-field-name (.sym "h-" (.downcase spr-group) "-" (.downcase spr-index) "-" (.downcase spr-field))) -+ ) -+ (begin -+ (define-hardware -+ (name spr-field-name) -+ (comment spr-field-comment) -+ (attrs VIRTUAL (MACH ORBIS-MACHS)) -+ (type register UWI) -+ (get () (c-call UWI "@cpu@_h_spr_field_get_raw" (spr-address spr-group spr-index) spr-field-msb spr-field-lsb)) -+ (set (value) (c-call VOID "@cpu@_h_spr_field_set_raw" (spr-address spr-group spr-index) spr-field-msb spr-field-lsb value)) -+ ) -+ ) -+ ) -+ ) -+(.splice begin (.unsplice (.map (.pmacro (args) (.apply define-h-spr-field args)) (spr-field-info)))) -+ -+(define-attr -+ (type boolean) -+ (for insn) -+ (name DELAYED-CTI) -+ (comment "delayed control transfer instruction") -+ (values #f #t) -+ (default #f) -+ ) -+ -+(define-attr -+ (for insn) -+ (type boolean) -+ (name NOT-IN-DELAY-SLOT) -+ (comment "instruction cannot be in delay slot") -+ (values #f #t) -+ (default #f) -+ ) -+ -+(define-attr -+ (for insn) -+ (type boolean) -+ (name FORCED-CTI) -+ (comment "instruction may forcefully transfer control (e.g., rfe)") -+ ) -diff -rNU3 dist.orig/cpu/or1korbis.cpu dist/cpu/or1korbis.cpu ---- dist.orig/cpu/or1korbis.cpu 1970-01-01 01:00:00.000000000 +0100 -+++ dist/cpu/or1korbis.cpu 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,1145 @@ -+; OpenRISC Basic Instruction Set 32-bit (ORBIS) -*- Scheme -*- -+; Copyright 2000-2014 Free Software Foundation, Inc. -+; Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org -+; Modified by Julius Baxter, juliusbaxter@gmail.com -+; Modified by Peter Gavin, pgavin@gmail.com -+; -+; 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, see -+ -+; Instruction fields. -+ -+; Hardware for immediate operands -+(dnh h-simm16 "16-bit signed immediate" ((MACH ORBIS-MACHS)) (immediate (INT 16)) () () ()) -+(dnh h-uimm16 "16-bit unsigned immediate" () (immediate (UINT 16)) () () ()) -+(dnh h-uimm6 "6-bit unsigned immediate" () (immediate (UINT 6)) () () ()) -+ -+; Hardware for the (internal) atomic registers -+(dsh h-atomic-reserve "atomic reserve flag" () (register BI)) -+(dsh h-atomic-address "atomic reserve address" () (register SI)) -+ -+; Instruction classes. -+(dnf f-opcode "insn opcode" ((MACH ORBIS-MACHS)) 31 6) -+ -+; Register fields. -+(dnf f-r1 "r1" ((MACH ORBIS-MACHS)) 25 5) -+(dnf f-r2 "r2" ((MACH ORBIS-MACHS)) 20 5) -+(dnf f-r3 "r3" ((MACH ORBIS-MACHS)) 15 5) -+ -+; Sub fields -+(dnf f-op-25-2 "op-25-2" ((MACH ORBIS-MACHS)) 25 2) ;; nop -+(dnf f-op-25-5 "op-25-5" ((MACH ORBIS-MACHS)) 25 5) ;; sys, trap, *sync, sf* -+(dnf f-op-16-1 "op-16-1" ((MACH ORBIS-MACHS)) 16 1) ;; movhi,macrc -+(dnf f-op-7-4 "op-7-4" ((MACH ORBIS-MACHS)) 7 4) -+(dnf f-op-3-4 "op-3-4" ((MACH ORBIS-MACHS)) 3 4) -+(dnf f-op-9-2 "op-9-2" ((MACH ORBIS-MACHS)) 9 2) ;; alu ops upper opcode -+(dnf f-op-9-4 "op-9-4" ((MACH ORBIS-MACHS)) 9 4) ;; -+(dnf f-op-7-8 "op-7-8" ((MACH ORBIS-MACHS)) 7 8) -+(dnf f-op-7-2 "op-7-2" ((MACH ORBIS-MACHS)) 7 2) ;; alu lower upper opc,shroti -+ -+; Reserved fields -+(dnf f-resv-25-26 "resv-25-26" ((MACH ORBIS-MACHS) RESERVED) 25 26) -+(dnf f-resv-25-10 "resv-25-10" ((MACH ORBIS-MACHS) RESERVED) 25 10) -+(dnf f-resv-25-5 "resv-25-5" ((MACH ORBIS-MACHS) RESERVED) 25 5) -+(dnf f-resv-23-8 "resv-23-8" ((MACH ORBIS-MACHS) RESERVED) 23 8) -+(dnf f-resv-20-21 "resv-20-21" ((MACH ORBIS-MACHS) RESERVED) 20 21) -+(dnf f-resv-20-5 "resv-20-5" ((MACH ORBIS-MACHS) RESERVED) 20 5) -+(dnf f-resv-20-4 "resv-20-4" ((MACH ORBIS-MACHS) RESERVED) 20 4) -+(dnf f-resv-15-8 "resv-15-8" ((MACH ORBIS-MACHS) RESERVED) 15 8) -+(dnf f-resv-15-6 "resv-15-6" ((MACH ORBIS-MACHS) RESERVED) 15 6) -+(dnf f-resv-10-11 "resv-10-11" ((MACH ORBIS-MACHS) RESERVED) 10 11) -+(dnf f-resv-10-7 "resv-10-7" ((MACH ORBIS-MACHS) RESERVED) 10 7) -+(dnf f-resv-10-3 "resv-10-3" ((MACH ORBIS-MACHS) RESERVED) 10 3) -+(dnf f-resv-10-1 "resv-10-1" ((MACH ORBIS-MACHS) RESERVED) 10 1) -+(dnf f-resv-7-4 "resv-7-4" ((MACH ORBIS-MACHS) RESERVED) 7 4) -+(dnf f-resv-5-2 "resv-5-2" ((MACH ORBIS-MACHS) RESERVED) 5 2) -+ -+(dnf f-imm16-25-5 "imm16-25-5" ((MACH ORBIS-MACHS)) 25 5) -+(dnf f-imm16-10-11 "imm16-10-11" ((MACH ORBIS-MACHS)) 10 11) -+ -+; PC relative, 26-bit (2 shifted to right) -+(df f-disp26 -+ "disp26" -+ ((MACH ORBIS-MACHS) PCREL-ADDR) -+ 25 -+ 26 -+ INT -+ ((value pc) (sra SI (sub IAI value pc) (const 2))) -+ ((value pc) (add IAI (sll IAI value (const 2)) pc)) -+ ) -+ -+; Immediates. -+(dnf f-uimm16 "uimm16" ((MACH ORBIS-MACHS)) 15 16) -+(df f-simm16 "simm16" ((MACH ORBIS-MACHS) SIGN-OPT) 15 16 INT #f #f) -+(dnf f-uimm6 "uimm6" ((MACH ORBIS-MACHS)) 5 6) ;; shroti -+ -+(define-multi-ifield -+ (name f-uimm16-split) -+ (comment "16-bit split unsigned immediate") -+ (attrs (MACH ORBIS-MACHS)) -+ (mode UINT) -+ (subfields f-imm16-25-5 f-imm16-10-11) -+ (insert (sequence () -+ (set (ifield f-imm16-25-5) -+ (and (srl (ifield f-uimm16-split) -+ (const 11)) -+ (const #x1f))) -+ (set (ifield f-imm16-10-11) -+ (and (ifield f-uimm16-split) -+ (const #x7ff))))) -+ (extract -+ (set (ifield f-uimm16-split) -+ (trunc UHI -+ (or (sll (ifield f-imm16-25-5) -+ (const 11)) -+ (ifield f-imm16-10-11))))) -+ ) -+ -+(define-multi-ifield -+ (name f-simm16-split) -+ (comment "16-bit split signed immediate") -+ (attrs (MACH ORBIS-MACHS) SIGN-OPT) -+ (mode INT) -+ (subfields f-imm16-25-5 f-imm16-10-11) -+ (insert (sequence () -+ (set (ifield f-imm16-25-5) -+ (and (sra (ifield f-simm16-split) -+ (const 11)) -+ (const #x1f))) -+ (set (ifield f-imm16-10-11) -+ (and (ifield f-simm16-split) -+ (const #x7ff))))) -+ (extract -+ (set (ifield f-simm16-split) -+ (trunc HI -+ (or (sll (ifield f-imm16-25-5) -+ (const 11)) -+ (ifield f-imm16-10-11))))) -+ ) -+ -+; Enums. -+ -+; insn-opcode: bits 31-26 -+(define-normal-insn-enum -+ insn-opcode "insn main opcode enums" ((MACH ORBIS-MACHS)) OPC_ f-opcode -+ (("J" #x00) -+ ("JAL" #x01) -+ ("BNF" #x03) -+ ("BF" #x04) -+ ("NOP" #x05) -+ ("MOVHIMACRC" #x06) -+ ("SYSTRAPSYNCS" #x08) -+ ("RFE" #x09) -+ ("VECTOR" #x0a) -+ ("JR" #x11) -+ ("JALR" #x12) -+ ("MACI" #x13) -+ ("LWA" #x1b) -+ ("CUST1" #x1c) -+ ("CUST2" #x1d) -+ ("CUST3" #x1e) -+ ("CUST4" #x1f) -+ ("LD" #x20) -+ ("LWZ" #x21) -+ ("LWS" #x22) -+ ("LBZ" #x23) -+ ("LBS" #x24) -+ ("LHZ" #x25) -+ ("LHS" #x26) -+ ("ADDI" #x27) -+ ("ADDIC" #x28) -+ ("ANDI" #x29) -+ ("ORI" #x2a) -+ ("XORI" #x2b) -+ ("MULI" #x2c) -+ ("MFSPR" #x2d) -+ ("SHROTI" #x2e) -+ ("SFI" #x2f) -+ ("MTSPR" #x30) -+ ("MAC" #x31) -+ ("FLOAT" #x32) -+ ("SWA" #x33) -+ ("SD" #x34) -+ ("SW" #x35) -+ ("SB" #x36) -+ ("SH" #x37) -+ ("ALU" #x38) -+ ("SF" #x39) -+ ("CUST5" #x3c) -+ ("CUST6" #x3d) -+ ("CUST7" #x3e) -+ ("CUST8" #x3f) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-systrapsyncs -+ "systrapsync insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_SYSTRAPSYNCS_ f-op-25-5 -+ (("SYSCALL" #x00 ) -+ ("TRAP" #x08 ) -+ ("MSYNC" #x10 ) -+ ("PSYNC" #x14 ) -+ ("CSYNC" #x18 ) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-movehimacrc -+ "movhi/macrc insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_MOVHIMACRC_ f-op-16-1 -+ (("MOVHI" #x0) -+ ("MACRC" #x1) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-mac -+ "multiply/accumulate insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_MAC_ f-op-3-4 -+ (("MAC" #x1) -+ ("MSB" #x2) -+ ) -+ ) -+ -+(define-normal-insn-enum insn-opcode-shorts -+ "shift/rotate insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_SHROTS_ f-op-7-2 -+ (("SLL" #x0 ) -+ ("SRL" #x1 ) -+ ("SRA" #x2 ) -+ ("ROR" #x3 ) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-extbhs -+ "extend byte/half opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_EXTBHS_ f-op-9-4 -+ (("EXTHS" #x0) -+ ("EXTBS" #x1) -+ ("EXTHZ" #x2) -+ ("EXTBZ" #x3) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-extws -+ "extend word opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_EXTWS_ f-op-9-4 -+ (("EXTWS" #x0) -+ ("EXTWZ" #x1) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-alu-regreg -+ "alu reg/reg insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_ALU_REGREG_ f-op-3-4 -+ (("ADD" #x0) -+ ("ADDC" #x1) -+ ("SUB" #x2) -+ ("AND" #x3) -+ ("OR" #x4) -+ ("XOR" #x5) -+ ("MUL" #x6) -+ ("SHROT" #x8) -+ ("DIV" #x9) -+ ("DIVU" #xA) -+ ("MULU" #xB) -+ ("EXTBH" #xC) -+ ("EXTW" #xD) -+ ("CMOV" #xE) -+ ("FFL1" #xF) -+ ) -+) -+ -+(define-normal-insn-enum insn-opcode-setflag -+ "setflag insn opcode enums" ((MACH ORBIS-MACHS)) -+ OPC_SF_ f-op-25-5 -+ (("EQ" #x00) -+ ("NE" #x01) -+ ("GTU" #x02) -+ ("GEU" #x03) -+ ("LTU" #x04) -+ ("LEU" #x05) -+ ("GTS" #x0A) -+ ("GES" #x0B) -+ ("LTS" #x0C) -+ ("LES" #x0D) -+ ) -+) -+ -+ -+; Instruction operands. -+ -+(dnop sys-sr "supervision register" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr f-nil) -+(dnop sys-esr0 "exception supervision register 0" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-esr0 f-nil) -+(dnop sys-epcr0 "exception PC register 0" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-epcr0 f-nil) -+ -+(dnop sys-sr-lee "SR little endian enable bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr-lee f-nil) -+(dnop sys-sr-f "SR flag bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr-f f-nil) -+(dnop sys-sr-cy "SR carry bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr-cy f-nil) -+(dnop sys-sr-ov "SR overflow bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr-ov f-nil) -+(dnop sys-sr-ove "SR overflow exception enable bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-sr-ove f-nil) -+(dnop sys-cpucfgr-ob64s "CPUCFGR ORBIS64 supported bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-cpucfgr-ob64s f-nil) -+(dnop sys-cpucfgr-nd "CPUCFGR no delay bit" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-cpucfgr-nd f-nil) -+(dnop sys-fpcsr-rm "floating point round mode" ((MACH ORBIS-MACHS) SEM-ONLY) h-sys-fpcsr-rm f-nil) -+ -+(dnop mac-machi "MAC HI result register" ((MACH ORBIS-MACHS) SEM-ONLY) h-mac-machi f-nil) -+(dnop mac-maclo "MAC LO result register" ((MACH ORBIS-MACHS) SEM-ONLY) h-mac-maclo f-nil) -+ -+(dnop atomic-reserve "atomic reserve flag" ((MACH ORBIS-MACHS) SEM-ONLY) h-atomic-reserve f-nil) -+(dnop atomic-address "atomic address" ((MACH ORBIS-MACHS) SEM-ONLY) h-atomic-address f-nil) -+ -+(dnop uimm6 "uimm6" ((MACH ORBIS-MACHS)) h-uimm6 f-uimm6) -+ -+(dnop rD "destination register" ((MACH ORBIS-MACHS)) h-gpr f-r1) -+(dnop rA "source register A" ((MACH ORBIS-MACHS)) h-gpr f-r2) -+(dnop rB "source register B" ((MACH ORBIS-MACHS)) h-gpr f-r3) -+ -+(define-operand -+ (name disp26) -+ (comment "pc-rel 26 bit") -+ (attrs (MACH ORBIS-MACHS)) -+ (type h-iaddr) -+ (index f-disp26) -+ (handlers (parse "disp26")) -+ ) -+ -+(define-operand -+ (name simm16) -+ (comment "16-bit signed immediate") -+ (attrs (MACH ORBIS-MACHS) SIGN-OPT) -+ (type h-simm16) -+ (index f-simm16) -+ (handlers (parse "simm16")) -+ ) -+ -+(define-operand -+ (name uimm16) -+ (comment "16-bit unsigned immediate") -+ (attrs (MACH ORBIS-MACHS)) -+ (type h-uimm16) -+ (index f-uimm16) -+ (handlers (parse "uimm16")) -+ ) -+ -+(define-operand -+ (name simm16-split) -+ (comment "split 16-bit signed immediate") -+ (attrs (MACH ORBIS-MACHS) SIGN-OPT) -+ (type h-simm16) -+ (index f-simm16-split) -+ (handlers (parse "simm16")) -+) -+ -+(define-operand -+ (name uimm16-split) -+ (comment "split 16-bit unsigned immediate") -+ (attrs (MACH ORBIS-MACHS)) -+ (type h-uimm16) -+ (index f-uimm16-split) -+ (handlers (parse "uimm16")) -+) -+ -+; Instructions. -+ -+; Branch releated instructions -+ -+(define-pmacro (cti-link-return) -+ (set IAI (reg h-gpr 9) (add pc (if sys-cpucfgr-nd 4 8))) -+ ) -+(define-pmacro (cti-transfer-control condition target) -+ ;; this mess is necessary because we're -+ ;; skipping the delay slot, but it's -+ ;; actually the start of the next basic -+ ;; block -+ (sequence () -+ (if condition -+ (delay 1 (set IAI pc target)) -+ (if sys-cpucfgr-nd -+ (delay 1 (set IAI pc (add pc 4)))) -+ ) -+ (if sys-cpucfgr-nd -+ (skip 1) -+ ) -+ ) -+ ) -+ -+(define-pmacro -+ (define-cti -+ cti-name -+ cti-comment -+ cti-attrs -+ cti-syntax -+ cti-format -+ cti-semantics) -+ (begin -+ (dni -+ cti-name -+ cti-comment -+ (.splice (MACH ORBIS-MACHS) DELAYED-CTI NOT-IN-DELAY-SLOT (.unsplice cti-attrs)) -+ cti-syntax -+ cti-format -+ (cti-semantics) -+ () -+ ) -+ ) -+ ) -+ -+(define-cti -+ l-j -+ "jump (pc-relative iaddr)" -+ (!COND-CTI UNCOND-CTI) -+ "l.j ${disp26}" -+ (+ OPC_J disp26) -+ (.pmacro () -+ (cti-transfer-control 1 disp26) -+ ) -+ ) -+ -+(define-cti -+ l-jal -+ "jump and link (pc-relative iaddr)" -+ (!COND-CTI UNCOND-CTI) -+ "l.jal ${disp26}" -+ (+ OPC_JAL disp26) -+ (.pmacro () -+ (sequence () -+ (cti-link-return) -+ (cti-transfer-control 1 disp26) -+ ) -+ ) -+ ) -+ -+(define-cti -+ l-jr -+ "jump register (absolute iaddr)" -+ (!COND-CTI UNCOND-CTI) -+ "l.jr $rB" -+ (+ OPC_JR (f-resv-25-10 0) rB (f-resv-10-11 0)) -+ (.pmacro () -+ (cti-transfer-control 1 rB) -+ ) -+ ) -+ -+(define-cti -+ l-jalr -+ "jump register and link (absolute iaddr)" -+ (!COND-CTI UNCOND-CTI) -+ "l.jalr $rB" -+ (+ OPC_JALR (f-resv-25-10 0) rB (f-resv-10-11 0) ) -+ (.pmacro () -+ (sequence () -+ (cti-link-return) -+ (cti-transfer-control 1 rB) -+ ) -+ ) -+ ) -+ -+(define-cti -+ l-bnf -+ "branch if condition bit not set (pc relative iaddr)" -+ (COND-CTI !UNCOND-CTI) -+ "l.bnf ${disp26}" -+ (+ OPC_BNF disp26) -+ (.pmacro () -+ (cti-transfer-control (not sys-sr-f) disp26) -+ ) -+ ) -+ -+(define-cti -+ l-bf -+ "branch if condition bit set (pc relative iaddr)" -+ (COND-CTI !UNCOND-CTI) -+ "l.bf ${disp26}" -+ (+ OPC_BF disp26) -+ (.pmacro () -+ (cti-transfer-control sys-sr-f disp26) -+ ) -+ ) -+ -+(dni l-trap "trap (exception)" -+ ((MACH ORBIS-MACHS) NOT-IN-DELAY-SLOT) -+ "l.trap ${uimm16}" -+ (+ OPC_SYSTRAPSYNCS OPC_SYSTRAPSYNCS_TRAP (f-resv-20-5 0) uimm16) -+ ; Do exception entry handling in C function, PC set based on SR state -+ (raise-exception EXCEPT-TRAP) -+ () -+) -+ -+ -+(dni l-sys "syscall (exception)" -+ ; This function may not be in delay slot -+ ((MACH ORBIS-MACHS) NOT-IN-DELAY-SLOT) -+ -+ "l.sys ${uimm16}" -+ (+ OPC_SYSTRAPSYNCS OPC_SYSTRAPSYNCS_SYSCALL (f-resv-20-5 0) uimm16) -+ ; Do exception entry handling in C function, PC set based on SR state -+ (raise-exception EXCEPT-SYSCALL) -+ () -+) -+ -+(dni l-msync "memory sync" -+ ((MACH ORBIS-MACHS)) -+ "l.msync" -+ (+ OPC_SYSTRAPSYNCS OPC_SYSTRAPSYNCS_MSYNC (f-resv-20-21 0)) -+ (nop) -+ () -+) -+ -+(dni l-psync "pipeline sync" -+ ((MACH ORBIS-MACHS)) -+ "l.psync" -+ (+ OPC_SYSTRAPSYNCS OPC_SYSTRAPSYNCS_PSYNC (f-resv-20-21 0)) -+ (nop) -+ () -+) -+ -+(dni l-csync "context sync" -+ ((MACH ORBIS-MACHS)) -+ "l.csync" -+ (+ OPC_SYSTRAPSYNCS OPC_SYSTRAPSYNCS_CSYNC (f-resv-20-21 0)) -+ (nop) -+ () -+) -+ -+(dni l-rfe "return from exception" -+ ; This function may not be in delay slot -+ ((MACH ORBIS-MACHS) NOT-IN-DELAY-SLOT FORCED-CTI) -+ -+ "l.rfe" -+ (+ OPC_RFE (f-resv-25-26 0)) -+ (c-call VOID "@cpu@_rfe") -+ () -+) -+ -+ -+; Misc instructions -+ -+; l.nop with immediate must be first so it handles all l.nops in sim -+(dni l-nop-imm "nop uimm16" -+ ((MACH ORBIS-MACHS)) -+ "l.nop ${uimm16}" -+ (+ OPC_NOP (f-op-25-2 #x1) (f-resv-23-8 0) uimm16) -+ (c-call VOID "@cpu@_nop" (zext UWI uimm16)) -+ () -+ ) -+ -+(if (application-is? SIMULATOR) -+ (begin) -+ (begin -+ (dni l-nop "nop" -+ ((MACH ORBIS-MACHS)) -+ "l.nop" -+ (+ OPC_NOP (f-op-25-2 #x1) (f-resv-23-8 0) uimm16) -+ (nop) -+ () -+ ) -+ ) -+) -+ -+(dni l-movhi "movhi reg/uimm16" -+ ((MACH ORBIS-MACHS)) -+ "l.movhi $rD,$uimm16" -+ (+ OPC_MOVHIMACRC rD (f-resv-20-4 0) OPC_MOVHIMACRC_MOVHI uimm16) -+ (set UWI rD (sll UWI (zext UWI uimm16) (const 16))) -+ () -+) -+ -+(dni l-macrc "macrc reg" -+ ((MACH ORBIS-MACHS)) -+ "l.macrc $rD" -+ (+ OPC_MOVHIMACRC rD (f-resv-20-4 0) OPC_MOVHIMACRC_MACRC (f-uimm16 0)) -+ (sequence () -+ (set UWI rD mac-maclo) -+ (set UWI mac-maclo 0) -+ (set UWI mac-machi 0) -+ ) -+ () -+ ) -+ -+ -+; System releated instructions -+ -+(dni l-mfspr "mfspr" -+ ((MACH ORBIS-MACHS)) -+ "l.mfspr $rD,$rA,${uimm16}" -+ (+ OPC_MFSPR rD rA uimm16) -+ (set UWI rD (c-call UWI "@cpu@_mfspr" (or rA (zext UWI uimm16)))) -+ () -+) -+ -+(dni l-mtspr "mtspr" -+ ((MACH ORBIS-MACHS)) -+ "l.mtspr $rA,$rB,${uimm16-split}" -+ (+ OPC_MTSPR rA rB uimm16-split ) -+ (c-call VOID "@cpu@_mtspr" (or rA (zext WI uimm16-split)) rB) -+ () -+) -+ -+ -+; Load instructions -+(define-pmacro (load-store-addr base offset size) -+ (c-call AI "@cpu@_make_load_store_addr" base (ext SI offset) size)) -+ -+(dni l-lwz "l.lwz reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lwz $rD,${simm16}($rA)" -+ (+ OPC_LWZ rD rA simm16) -+ (set UWI rD (zext UWI (mem USI (load-store-addr rA simm16 4)))) -+ () -+) -+ -+ -+(dni l-lws "l.lws reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lws $rD,${simm16}($rA)" -+ (+ OPC_LWS rD rA simm16) -+ (set WI rD (ext WI (mem SI (load-store-addr rA simm16 4)))) -+ () -+) -+ -+(dni l-lwa "l.lwa reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lwa $rD,${simm16}($rA)" -+ (+ OPC_LWA rD rA simm16) -+ (sequence () -+ (set UWI rD (zext UWI (mem USI (load-store-addr rA simm16 4)))) -+ (set atomic-reserve (const 1)) -+ (set atomic-address (load-store-addr rA simm16 4)) -+ ) -+ () -+) -+ -+(dni l-lbz "l.lbz reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lbz $rD,${simm16}($rA)" -+ (+ OPC_LBZ rD rA simm16) -+ (set UWI rD (zext UWI (mem UQI (load-store-addr rA simm16 1)))) -+ () -+) -+ -+(dni l-lbs "l.lbs reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lbs $rD,${simm16}($rA)" -+ (+ OPC_LBS rD rA simm16) -+ (set WI rD (ext WI (mem QI (load-store-addr rA simm16 1)))) -+ () -+) -+ -+(dni l-lhz "l.lhz reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lhz $rD,${simm16}($rA)" -+ (+ OPC_LHZ rD simm16 rA) -+ (set UWI rD (zext UWI (mem UHI (load-store-addr rA simm16 2)))) -+ () -+) -+ -+(dni l-lhs "l.lhs reg/simm16(reg)" -+ ((MACH ORBIS-MACHS)) -+ "l.lhs $rD,${simm16}($rA)" -+ (+ OPC_LHS rD rA simm16) -+ (set WI rD (ext WI (mem HI (load-store-addr rA simm16 2)))) -+ () -+) -+ -+ -+; Store instructions -+ -+(define-pmacro (store-insn mnemonic opc-op mode size) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " simm16(reg)/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " ${simm16-split}($rA),$rB") -+ (+ opc-op rA rB simm16-split) -+ (sequence ((SI addr)) -+ (set addr (load-store-addr rA simm16-split size)) -+ (set mode (mem mode addr) (trunc mode rB)) -+ (if (eq (and addr #xffffffc) atomic-address) -+ (set atomic-reserve (const 0)) -+ ) -+ ) -+ () -+ ) -+ ) -+) -+ -+(store-insn sw OPC_SW USI 4) -+(store-insn sb OPC_SB UQI 1) -+(store-insn sh OPC_SH UHI 2) -+ -+(dni l-swa "l.swa simm16(reg)/reg" -+ ((MACH ORBIS-MACHS)) -+ "l.swa ${simm16-split}($rA),$rB" -+ (+ OPC_SWA rA rB simm16) -+ (sequence ((SI addr) (BI flag)) -+ (set addr (load-store-addr rA simm16-split 4)) -+ (set sys-sr-f (and atomic-reserve (eq addr atomic-address))) -+ (if sys-sr-f -+ (set USI (mem USI addr) (trunc USI rB)) -+ ) -+ (set atomic-reserve (const 0)) -+ ) -+ () -+) -+ -+ -+; Shift and rotate instructions -+ -+(define-pmacro (shift-insn mnemonic) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " reg/reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-3 0) (.sym OPC_SHROTS_ (.upcase mnemonic)) (f-resv-5-2 0) -+ OPC_ALU_REGREG_SHROT ) -+ (set UWI rD (mnemonic rA rB)) -+ () -+ ) -+ (dni (.sym l- mnemonic "i") -+ (.str "l." mnemonic " reg/reg/uimm6") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic "i $rD,$rA,${uimm6}") -+ (+ OPC_SHROTI rD rA (f-resv-15-8 0) (.sym OPC_SHROTS_ (.upcase mnemonic)) uimm6) -+ (set rD (mnemonic rA uimm6)) -+ () -+ ) -+ ) -+) -+ -+(shift-insn sll) -+(shift-insn srl) -+(shift-insn sra) -+(shift-insn ror) -+ -+ -+; Arithmetic insns -+ -+; ALU op macro -+(define-pmacro (alu-insn mnemonic) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " reg/reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-7 0) (.sym OPC_ALU_REGREG_ (.upcase mnemonic))) -+ (set rD (mnemonic rA rB)) -+ () -+ ) -+ ) -+) -+ -+(alu-insn and) -+(alu-insn or) -+(alu-insn xor) -+ -+(define-pmacro (alu-carry-insn mnemonic) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " reg/reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x00) (.sym OPC_ALU_REGREG_ (.upcase mnemonic))) -+ (sequence () -+ (sequence () -+ (set BI sys-sr-cy ((.sym mnemonic "c-cflag") WI rA rB 0)) -+ (set BI sys-sr-ov ((.sym mnemonic "c-oflag") WI rA rB 0)) -+ (set rD (mnemonic WI rA rB)) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+ ) -+ ) -+ ) -+ -+(alu-carry-insn add) -+(alu-carry-insn sub) -+ -+(dni (l-addc) "l.addc reg/reg/reg" -+ ((MACH ORBIS-MACHS)) -+ ("l.addc $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x00) OPC_ALU_REGREG_ADDC) -+ (sequence () -+ (sequence ((BI tmp-sys-sr-cy)) -+ (set BI tmp-sys-sr-cy sys-sr-cy) -+ (set BI sys-sr-cy (addc-cflag WI rA rB tmp-sys-sr-cy)) -+ (set BI sys-sr-ov (addc-oflag WI rA rB tmp-sys-sr-cy)) -+ (set rD (addc WI rA rB tmp-sys-sr-cy)) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni (l-mul) "l.mul reg/reg/reg" -+ ((MACH ORBIS-MACHS)) -+ ("l.mul $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x30) OPC_ALU_REGREG_MUL) -+ (sequence () -+ (sequence () -+ ; 2's complement overflow -+ (set BI sys-sr-ov (mul-o2flag WI rA rB)) -+ ; 1's complement overflow -+ (set BI sys-sr-cy (mul-o1flag WI rA rB)) -+ (set rD (mul WI rA rB)) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni (l-mulu) "l.mulu reg/reg/reg" -+ ((MACH ORBIS-MACHS)) -+ ("l.mulu $rD,$rA,$rB") -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x30) OPC_ALU_REGREG_MULU) -+ (sequence () -+ (sequence () -+ ; 2's complement overflow -+ (set BI sys-sr-ov 0) -+ ; 1's complement overflow -+ (set BI sys-sr-cy (mul-o1flag UWI rA rB)) -+ (set rD (mul UWI rA rB)) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni l-div "divide (signed)" -+ ((MACH ORBIS-MACHS)) -+ "l.div $rD,$rA,$rB" -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x30) OPC_ALU_REGREG_DIV) -+ (sequence () -+ (if (ne rB 0) -+ (sequence () -+ (set BI sys-sr-cy 0) -+ (set WI rD (div WI rA rB)) -+ ) -+ (set BI sys-sr-cy 1) -+ ) -+ (set BI sys-sr-ov 0) -+ (if (andif sys-sr-cy sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni l-divu "divide (unsigned)" -+ ((MACH ORBIS-MACHS)) -+ "l.divu $rD,$rA,$rB" -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x30) OPC_ALU_REGREG_DIVU) -+ (sequence () -+ (if (ne rB 0) -+ (sequence () -+ (set BI sys-sr-cy 0) -+ (set rD (udiv UWI rA rB)) -+ ) -+ (set BI sys-sr-cy 1) -+ ) -+ (set BI sys-sr-ov 0) -+ (if (andif sys-sr-cy sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni l-ff1 "find first '1'" -+ ((MACH ORBIS-MACHS)) -+ "l.ff1 $rD,$rA" -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x00) OPC_ALU_REGREG_FFL1) -+ (set rD (c-call UWI "@cpu@_ff1" rA)) -+ () -+) -+ -+(dni l-fl1 "find last '1'" -+ ((MACH ORBIS-MACHS)) -+ "l.fl1 $rD,$rA" -+ (+ OPC_ALU rD rA rB (f-resv-10-7 #x10) OPC_ALU_REGREG_FFL1) -+ (set rD (c-call UWI "@cpu@_fl1" rA)) -+ () -+) -+ -+ -+(define-pmacro (alu-insn-simm mnemonic) -+ (begin -+ (dni (.sym l- mnemonic "i") -+ (.str "l." mnemonic " reg/reg/simm16") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic "i $rD,$rA,$simm16") -+ (+ (.sym OPC_ (.upcase mnemonic) "I") rD rA simm16) -+ (set rD (mnemonic rA (ext WI simm16))) -+ () -+ ) -+ ) -+) -+ -+(define-pmacro (alu-insn-uimm mnemonic) -+ (begin -+ (dni (.sym l- mnemonic "i") -+ (.str "l." mnemonic " reg/reg/uimm16") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic "i $rD,$rA,$uimm16") -+ (+ (.sym OPC_ (.upcase mnemonic) "I") rD rA uimm16) -+ (set rD (mnemonic rA (zext UWI uimm16))) -+ () -+ ) -+ ) -+) -+ -+(alu-insn-uimm and) -+(alu-insn-uimm or) -+(alu-insn-simm xor) -+ -+(define-pmacro (alu-carry-insn-simm mnemonic) -+ (begin -+ (dni (.sym l- mnemonic "i") -+ (.str "l." mnemonic "i reg/reg/simm16") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic "i $rD,$rA,$simm16") -+ (+ (.sym OPC_ (.upcase mnemonic) "I") rD rA simm16) -+ (sequence () -+ (sequence () -+ (set BI sys-sr-cy ((.sym mnemonic "c-cflag") WI rA (ext WI simm16) 0)) -+ (set BI sys-sr-ov ((.sym mnemonic "c-oflag") WI rA (ext WI simm16) 0)) -+ (set rD (mnemonic WI rA (ext WI simm16))) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+ ) -+ ) -+ ) -+ -+(alu-carry-insn-simm add) -+ -+(dni (l-addic) -+ ("l.addic reg/reg/simm16") -+ ((MACH ORBIS-MACHS)) -+ ("l.addic $rD,$rA,$simm16") -+ (+ OPC_ADDIC rD rA simm16) -+ (sequence () -+ (sequence ((BI tmp-sys-sr-cy)) -+ (set BI tmp-sys-sr-cy sys-sr-cy) -+ (set BI sys-sr-cy (addc-cflag WI rA (ext WI simm16) tmp-sys-sr-cy)) -+ (set BI sys-sr-ov (addc-oflag WI rA (ext WI simm16) tmp-sys-sr-cy)) -+ (set WI rD (addc WI rA (ext WI simm16) tmp-sys-sr-cy)) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+) -+ -+(dni (l-muli) -+ "l.muli reg/reg/simm16" -+ ((MACH ORBIS-MACHS)) -+ ("l.muli $rD,$rA,$simm16") -+ (+ OPC_MULI rD rA simm16) -+ (sequence () -+ (sequence () -+ ; 2's complement overflow -+ (set sys-sr-ov (mul-o2flag WI rA (ext WI simm16))) -+ ; 1's complement overflow -+ (set sys-sr-cy (mul-o1flag UWI rA (ext UWI simm16))) -+ (set rD (mul WI rA (ext WI simm16))) -+ ) -+ (if (andif sys-sr-ov sys-sr-ove) -+ (raise-exception EXCEPT-RANGE)) -+ ) -+ () -+ ) -+ -+(define-pmacro (extbh-insn mnemonic extop extmode truncmode) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " $rD,$rA") -+ (+ OPC_ALU rD rA (f-resv-15-6 0) (.sym OPC_EXTBHS_ (.upcase mnemonic)) (f-resv-5-2 0) OPC_ALU_REGREG_EXTBH) -+ (set rD (extop extmode (trunc truncmode rA))) -+ () -+ ) -+ ) -+ ) -+ -+(extbh-insn exths ext WI HI) -+(extbh-insn extbs ext WI QI) -+(extbh-insn exthz zext UWI UHI) -+(extbh-insn extbz zext UWI UQI) -+ -+(define-pmacro (extw-insn mnemonic extop extmode truncmode) -+ (begin -+ (dni (.sym l- mnemonic) -+ (.str "l." mnemonic " reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l." mnemonic " $rD,$rA") -+ (+ OPC_ALU rD rA (f-resv-15-6 0) (.sym OPC_EXTWS_ (.upcase mnemonic)) (f-resv-5-2 0) OPC_ALU_REGREG_EXTW) -+ (set rD (extop extmode (trunc truncmode rA))) -+ () -+ ) -+ ) -+ ) -+ -+(extw-insn extws ext WI SI) -+(extw-insn extwz zext USI USI) -+ -+(dni l-cmov -+ "l.cmov reg/reg/reg" -+ ((MACH ORBIS-MACHS)) -+ "l.cmov $rD,$rA,$rB" -+ (+ OPC_ALU rD rA rB (f-resv-10-1 0) (f-op-9-2 0) (f-resv-7-4 0) OPC_ALU_REGREG_CMOV) -+ (if sys-sr-f -+ (set UWI rD rA) -+ (set UWI rD rB) -+ ) -+ () -+ ) -+ -+; Compare instructions -+ -+; Ordering compare -+(define-pmacro (sf-insn op) -+ (begin -+ (dni (.sym l- "sf" op "s") ; l-sfgts -+ (.str "l.sf" op "s reg/reg") ; "l.sfgts reg/reg" -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op "s $rA,$rB") ; "l.sfgts $rA,$rB" -+ (+ OPC_SF (.sym "OPC_SF_" (.upcase op) "S") rA rB (f-resv-10-11 0)) ; (+ OPC_SF OPC_SF_GTS rA rB (f-resv-10-11 0)) -+ (set sys-sr-f (op WI rA rB)) ; (set sys-sr-f (gt WI rA rB)) -+ () -+ ) -+ (dni (.sym l- "sf" op "si") ; l-sfgtsi -+ (.str "l.sf" op "si reg/simm16") ; "l.sfgtsi reg/simm16" -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op "si $rA,$simm16") ; "l.sfgtsi $rA,$simm16" -+ (+ OPC_SFI (.sym "OPC_SF_" (.upcase op) "S") rA simm16) ; (+ OPC_SFI OPC_SF_GTS rA simm16) -+ (set sys-sr-f (op WI rA (ext WI simm16))) ; (set sys-sr-f (gt WI rA (ext WI simm16))) -+ () -+ ) -+ (dni (.sym l- "sf" op "u") ; l-sfgtu -+ (.str "l.sf" op "u reg/reg") ; "l.sfgtu reg/reg" -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op "u $rA,$rB") ; "l.sfgtu $rA,$rB" -+ (+ OPC_SF (.sym "OPC_SF_" (.upcase op) "U") rA rB (f-resv-10-11 0)) ; (+ OPC_SF OPC_SF_GTU rA rB (f-resv-10-11 0)) -+ (set sys-sr-f ((.sym op "u") WI rA rB)) ; (set sys-sr-f (gtu WI rA rB)) -+ () -+ ) -+ ; immediate is sign extended even for unsigned compare -+ (dni (.sym l- "sf" op "ui") ; l-sfgtui -+ (.str "l.sf" op "ui reg/simm16") ; "l.sfgtui reg/uimm16" -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op "ui $rA,$simm16") ; "l.sfgtui $rA,$simm16" -+ (+ OPC_SFI (.sym "OPC_SF_" (.upcase op) "U") rA simm16) ; (+ OPC_SFI OPC_SF_GTU rA simm16) -+ (set sys-sr-f ((.sym op "u") WI rA (ext WI simm16))) ; (set sys-sr-f (gtu WI rA (ext WI simm16))) -+ () -+ ) -+ ) -+ ) -+ -+(sf-insn gt) -+(sf-insn ge) -+(sf-insn lt) -+(sf-insn le) -+ -+; Equality compare -+(define-pmacro (sf-insn-eq op) -+ (begin -+ (dni (.sym l- "sf" op) -+ (.str "l." op " reg/reg") -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op " $rA,$rB") -+ (+ OPC_SF (.sym "OPC_SF_" (.upcase op)) rA rB (f-resv-10-11 0)) -+ (set sys-sr-f (op WI rA rB)) -+ () -+ ) -+ (dni (.sym l- "sf" op "i") -+ (.str "l.sf" op "i reg/simm16") -+ ((MACH ORBIS-MACHS)) -+ (.str "l.sf" op "i $rA,$simm16") -+ (+ OPC_SFI (.sym "OPC_SF_" (.upcase op)) rA simm16) -+ (set sys-sr-f (op WI rA (ext WI simm16))) -+ () -+ ) -+ ) -+) -+ -+(sf-insn-eq eq) -+(sf-insn-eq ne) -+ -+(dni l-mac -+ "l.mac reg/reg" -+ ((MACH ORBIS-MACHS)) -+ "l.mac $rA,$rB" -+ (+ OPC_MAC (f-op-25-5 0) rA rB (f-resv-10-7 0) OPC_MAC_MAC) -+ (sequence ((WI prod) (DI result)) -+ (set WI prod (mul WI rA rB)) -+ (set DI result (add (join DI SI mac-machi mac-maclo) (ext DI prod))) -+ (set SI mac-machi (subword SI result 0)) -+ (set SI mac-maclo (subword SI result 1)) -+ ) -+ () -+ ) -+ -+(dni l-msb -+ "l.msb reg/reg" -+ ((MACH ORBIS-MACHS)) -+ "l.msb $rA,$rB" -+ (+ OPC_MAC (f-op-25-5 0) rA rB (f-resv-10-7 0) OPC_MAC_MSB) -+ (sequence ((WI prod) (DI result)) -+ (set WI prod (mul WI rA rB)) -+ (set DI result (sub (join DI SI mac-machi mac-maclo) (ext DI prod))) -+ (set SI mac-machi (subword SI result 0)) -+ (set SI mac-maclo (subword SI result 1)) -+ ) -+ () -+ ) -+ -+(dni l-maci -+ "l.maci reg/simm16" -+ ((MACH ORBIS-MACHS)) -+ "l.maci $rA,${simm16}" -+ (+ OPC_MACI (f-resv-25-5 0) rA simm16) -+ (sequence ((WI prod) (DI result)) -+ (set WI prod (mul WI (ext WI simm16) rA)) -+ (set DI result (add (join DI SI mac-machi mac-maclo) (ext DI prod))) -+ (set SI mac-machi (subword SI result 0)) -+ (set SI mac-maclo (subword SI result 1)) -+ ) -+ () -+ ) -+ -+(define-pmacro (cust-insn cust-num) -+ (begin -+ (dni (.sym l- "cust" cust-num) -+ (.str "l.cust" cust-num) -+ ((MACH ORBIS-MACHS)) -+ (.str "l.cust" cust-num) -+ (+ (.sym OPC_CUST cust-num) (f-resv-25-26 0)) -+ (nop) -+ () -+ ) -+ ) -+ ) -+ -+(cust-insn "1") -+(cust-insn "2") -+(cust-insn "3") -+(cust-insn "4") -+(cust-insn "5") -+(cust-insn "6") -+(cust-insn "7") -+(cust-insn "8") -diff -rNU3 dist.orig/cpu/or1korfpx.cpu dist/cpu/or1korfpx.cpu ---- dist.orig/cpu/or1korfpx.cpu 1970-01-01 01:00:00.000000000 +0100 -+++ dist/cpu/or1korfpx.cpu 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,222 @@ -+; OpenRISC 1000 architecture. -*- Scheme -*- -+; Copyright 2000-2014 Free Software Foundation, Inc. -+; Contributed by Peter Gavin, pgavin@gmail.com -+; -+; 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, see -+ -+; Initial ORFPX32 instruction set -+ -+; I'm not sure how CGEN handles rounding in FP operations, except for -+; in conversions to/from integers. So lf.add, lf.sub, lf.mul, and -+; lf.div do not round according to the FPCSR RM field. -+; NaN, overflow, and underflow are not yet handled either. -+ -+(define-normal-insn-enum insn-opcode-float-regreg -+ "floating point reg/reg insn opcode enums" () -+ OPC_FLOAT_REGREG_ f-op-7-8 -+ (("ADD_S" #x00) -+ ("SUB_S" #x01) -+ ("MUL_S" #x02) -+ ("DIV_S" #x03) -+ ("ITOF_S" #x04) -+ ("FTOI_S" #x05) -+ ("REM_S" #x06) -+ ("MADD_S" #x07) -+ ("SFEQ_S" #x08) -+ ("SFNE_S" #x09) -+ ("SFGT_S" #x0a) -+ ("SFGE_S" #x0b) -+ ("SFLT_S" #x0c) -+ ("SFLE_S" #x0d) -+ ("ADD_D" #x10) -+ ("SUB_D" #x11) -+ ("MUL_D" #x12) -+ ("DIV_D" #x13) -+ ("ITOF_D" #x14) -+ ("FTOI_D" #x15) -+ ("REM_D" #x16) -+ ("MADD_D" #x17) -+ ("SFEQ_D" #x18) -+ ("SFNE_D" #x19) -+ ("SFGT_D" #x1a) -+ ("SFGE_D" #x1b) -+ ("SFLT_D" #x1c) -+ ("SFLE_D" #x1d) -+ ("CUST1_S" #xd0) -+ ("CUST1_D" #xe0) -+ ) -+ ) -+ -+(dnop rDSF "destination register (single floating point mode)" () h-fsr f-r1) -+(dnop rASF "source register A (single floating point mode)" () h-fsr f-r2) -+(dnop rBSF "source register B (single floating point mode)" () h-fsr f-r3) -+ -+(dnop rDDF "destination register (double floating point mode)" ((MACH ORFPX64-MACHS)) h-fdr f-r1) -+(dnop rADF "source register A (double floating point mode)" ((MACH ORFPX64-MACHS)) h-fdr f-r1) -+(dnop rBDF "source register B (double floating point mode)" ((MACH ORFPX64-MACHS)) h-fdr f-r1) -+ -+(define-pmacro (float-regreg-insn mnemonic) -+ (begin -+ (dni (.sym lf- mnemonic -s) -+ (.str "lf." mnemonic ".s reg/reg/reg") -+ ((MACH ORFPX-MACHS)) -+ (.str "lf." mnemonic ".s $rDSF,$rASF,$rBSF") -+ (+ OPC_FLOAT rDSF rASF rBSF (f-resv-10-3 0) (.sym OPC_FLOAT_REGREG_ (.upcase mnemonic) _S)) -+ (set SF rDSF (mnemonic SF rASF rBSF)) -+ () -+ ) -+ (dni (.sym lf- mnemonic -d) -+ (.str "lf." mnemonic ".d reg/reg/reg") -+ ((MACH ORFPX64-MACHS)) -+ (.str "lf." mnemonic ".d $rDDF,$rADF,$rBDF") -+ (+ OPC_FLOAT rDDF rADF rBDF (f-resv-10-3 0) (.sym OPC_FLOAT_REGREG_ (.upcase mnemonic) _D)) -+ (set DF rDDF (mnemonic DF rADF rBDF)) -+ () -+ ) -+ ) -+ ) -+ -+(float-regreg-insn add) -+(float-regreg-insn sub) -+(float-regreg-insn mul) -+(float-regreg-insn div) -+ -+(dni lf-rem-s -+ "lf.rem.s reg/reg/reg" -+ ((MACH ORFPX-MACHS)) -+ "lf.rem.s $rDSF,$rASF,$rBSF" -+ (+ OPC_FLOAT rDSF rASF rBSF (f-resv-10-3 0) OPC_FLOAT_REGREG_REM_S) -+ (set SF rDSF (rem SF rASF rBSF)) -+ () -+ ) -+(dni lf-rem-d -+ "lf.rem.d reg/reg/reg" -+ ((MACH ORFPX64-MACHS)) -+ "lf.rem.d $rDDF,$rADF,$rBDF" -+ (+ OPC_FLOAT rDDF rADF rBDF (f-resv-10-3 0) OPC_FLOAT_REGREG_REM_D) -+ (set DF rDDF (mod DF rADF rBDF)) -+ () -+ ) -+ -+(define-pmacro (get-rounding-mode) -+ (case INT sys-fpcsr-rm -+ ((0) 1) ; TIES-TO-EVEN -- I'm assuming this is what is meant by "round to nearest" -+ ((1) 3) ; TOWARD-ZERO -+ ((2) 4) ; TOWARD-POSITIVE -+ (else 5) ; TOWARD-NEGATIVE -+ ) -+ ) -+ -+(dni lf-itof-s -+ "lf.itof.s reg/reg" -+ ((MACH ORFPX-MACHS)) -+ "lf.itof.s $rDSF,$rA" -+ (+ OPC_FLOAT rDSF rA (f-r3 0) (f-resv-10-3 0) OPC_FLOAT_REGREG_ITOF_S) -+ (set SF rDSF (float SF (get-rounding-mode) (trunc SI rA))) -+ () -+ ) -+(dni lf-itof-d -+ "lf.itof.d reg/reg" -+ ((MACH ORFPX64-MACHS)) -+ "lf.itof.d $rDSF,$rA" -+ (+ OPC_FLOAT rDSF rA (f-r3 0) (f-resv-10-3 0) OPC_FLOAT_REGREG_ITOF_D) -+ (set DF rDDF (float DF (get-rounding-mode) rA)) -+ () -+ ) -+ -+(dni lf-ftoi-s -+ "lf.ftoi.s reg/reg" -+ ((MACH ORFPX-MACHS)) -+ "lf.ftoi.s $rD,$rASF" -+ (+ OPC_FLOAT rD rASF (f-r3 0) (f-resv-10-3 0) OPC_FLOAT_REGREG_FTOI_S) -+ (set WI rD (ext WI (fix SI (get-rounding-mode) rASF))) -+ () -+ ) -+ -+(dni lf-ftoi-d -+ "lf.ftoi.d reg/reg" -+ ((MACH ORFPX64-MACHS)) -+ "lf.ftoi.d $rD,$rADF" -+ (+ OPC_FLOAT rD rADF (f-r3 0) (f-resv-10-3 0) OPC_FLOAT_REGREG_FTOI_D) -+ (set DI rD (fix DI (get-rounding-mode) rADF)) -+ () -+ ) -+ -+(define-pmacro (float-setflag-insn mnemonic) -+ (begin -+ (dni (.sym lf- mnemonic -s) -+ (.str "lf.sf" mnemonic ".s reg/reg") -+ ((MACH ORFPX-MACHS)) -+ (.str "lf.sf" mnemonic ".s $rASF,$rBSF") -+ (+ OPC_FLOAT (f-r1 0) rASF rBSF (f-resv-10-3 0) (.sym OPC_FLOAT_REGREG_SF (.upcase mnemonic) _S)) -+ (set BI sys-sr-f (mnemonic SF rASF rBSF)) -+ () -+ ) -+ (dni (.sym lf- mnemonic -d) -+ (.str "lf.sf" mnemonic ".d reg/reg") -+ ((MACH ORFPX64-MACHS)) -+ (.str "lf.sf" mnemonic ".d $rASF,$rBSF") -+ (+ OPC_FLOAT (f-r1 0) rASF rBSF (f-resv-10-3 0) (.sym OPC_FLOAT_REGREG_SF (.upcase mnemonic) _D)) -+ (set BI sys-sr-f (mnemonic DF rADF rBDF)) -+ () -+ ) -+ ) -+ ) -+ -+(float-setflag-insn eq) -+(float-setflag-insn ne) -+(float-setflag-insn ge) -+(float-setflag-insn gt) -+(float-setflag-insn lt) -+(float-setflag-insn le) -+ -+(dni lf-madd-s -+ "lf.madd.s reg/reg/reg" -+ ((MACH ORFPX-MACHS)) -+ "lf.madd.s $rDSF,$rASF,$rBSF" -+ (+ OPC_FLOAT rDSF rASF rBSF (f-resv-10-3 0) OPC_FLOAT_REGREG_MADD_S) -+ (set SF rDSF (add SF (mul SF rASF rBSF) rDSF)) -+ () -+ ) -+(dni lf-madd-d -+ "lf.madd.d reg/reg/reg" -+ ((MACH ORFPX64-MACHS)) -+ "lf.madd.d $rDDF,$rADF,$rBDF" -+ (+ OPC_FLOAT rDDF rADF rBDF (f-resv-10-3 0) OPC_FLOAT_REGREG_MADD_D) -+ (set DF rDDF (add DF (mul DF rADF rBDF) rDDF)) -+ () -+ ) -+ -+(define-pmacro (float-cust-insn cust-num) -+ (begin -+ (dni (.sym "lf-cust" cust-num "-s") -+ (.str "lf.cust" cust-num ".s") -+ ((MACH ORFPX-MACHS)) -+ (.str "lf.cust" cust-num ".s $rASF,$rBSF") -+ (+ OPC_FLOAT (f-resv-25-5 0) rASF rBSF (f-resv-10-3 0) (.sym "OPC_FLOAT_REGREG_CUST" cust-num "_S")) -+ (nop) -+ () -+ ) -+ (dni (.sym "lf-cust" cust-num "-d") -+ (.str "lf.cust" cust-num ".d") -+ ((MACH ORFPX64-MACHS)) -+ (.str "lf.cust" cust-num ".d") -+ (+ OPC_FLOAT (f-resv-25-5 0) rADF rBDF (f-resv-10-3 0) (.sym "OPC_FLOAT_REGREG_CUST" cust-num "_D")) -+ (nop) -+ () -+ ) -+ ) -+ ) -+ -+(float-cust-insn "1") -diff -rNU3 dist.orig/gas/Makefile.am dist/gas/Makefile.am ---- dist.orig/gas/Makefile.am 2012-09-04 14:53:45.000000000 +0200 -+++ dist/gas/Makefile.am 2015-10-18 13:11:13.000000000 +0200 -@@ -147,11 +147,11 @@ - config/tc-msp430.c \ - config/tc-mt.c \ - config/tc-ns32k.c \ -- config/tc-openrisc.c \ -- config/tc-or32.c \ -+ config/tc-or1k.c \ - config/tc-pdp11.c \ - config/tc-pj.c \ - config/tc-ppc.c \ -+ config/tc-riscv.c \ - config/tc-rl78.c \ - config/tc-rx.c \ - config/tc-s390.c \ -@@ -216,11 +216,11 @@ - config/tc-msp430.h \ - config/tc-mt.h \ - config/tc-ns32k.h \ -- config/tc-openrisc.h \ -- config/tc-or32.h \ -+ config/tc-or1k.h \ - config/tc-pdp11.h \ - config/tc-pj.h \ - config/tc-ppc.h \ -+ config/tc-riscv.h \ - config/tc-rl78.h \ - config/tc-rx.h \ - config/tc-s390.h \ -diff -rNU3 dist.orig/gas/Makefile.in dist/gas/Makefile.in ---- dist.orig/gas/Makefile.in 2012-09-04 14:53:45.000000000 +0200 -+++ dist/gas/Makefile.in 2015-10-18 13:11:13.000000000 +0200 -@@ -415,11 +415,11 @@ - config/tc-msp430.c \ - config/tc-mt.c \ - config/tc-ns32k.c \ -- config/tc-openrisc.c \ -- config/tc-or32.c \ -+ config/tc-or1k.c \ - config/tc-pdp11.c \ - config/tc-pj.c \ - config/tc-ppc.c \ -+ config/tc-riscv.c \ - config/tc-rl78.c \ - config/tc-rx.c \ - config/tc-s390.c \ -@@ -484,11 +484,11 @@ - config/tc-msp430.h \ - config/tc-mt.h \ - config/tc-ns32k.h \ -- config/tc-openrisc.h \ -- config/tc-or32.h \ -+ config/tc-or1k.h \ - config/tc-pdp11.h \ - config/tc-pj.h \ - config/tc-ppc.h \ -+ config/tc-riscv.h \ - config/tc-rl78.h \ - config/tc-rx.h \ - config/tc-s390.h \ -@@ -835,11 +835,11 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-msp430.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-mt.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-ns32k.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-openrisc.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-or32.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-or1k.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-pdp11.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-pj.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-ppc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-riscv.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-rl78.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-rx.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc-s390.Po@am__quote@ -@@ -1447,33 +1447,19 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-ns32k.obj `if test -f 'config/tc-ns32k.c'; then $(CYGPATH_W) 'config/tc-ns32k.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-ns32k.c'; fi` - --tc-openrisc.o: config/tc-openrisc.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-openrisc.o -MD -MP -MF $(DEPDIR)/tc-openrisc.Tpo -c -o tc-openrisc.o `test -f 'config/tc-openrisc.c' || echo '$(srcdir)/'`config/tc-openrisc.c --@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-openrisc.Tpo $(DEPDIR)/tc-openrisc.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-openrisc.c' object='tc-openrisc.o' libtool=no @AMDEPBACKSLASH@ -+tc-or1k.o: config/tc-or1k.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-or1k.o -MD -MP -MF $(DEPDIR)/tc-or1k.Tpo -c -o tc-or1k.o `test -f 'config/tc-or1k.c' || echo '$(srcdir)/'`config/tc-or1k.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-or1k.Tpo $(DEPDIR)/tc-or1k.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-or1k.c' object='tc-or1k.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-or1k.o `test -f 'config/tc-or1k.c' || echo '$(srcdir)/'`config/tc-or1k.c -+ -+tc-or1k.obj: config/tc-or1k.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-or1k.obj -MD -MP -MF $(DEPDIR)/tc-or1k.Tpo -c -o tc-or1k.obj `if test -f 'config/tc-or1k.c'; then $(CYGPATH_W) 'config/tc-or1k.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-or1k.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-or1k.Tpo $(DEPDIR)/tc-or1k.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-or1k.c' object='tc-or1k.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-openrisc.o `test -f 'config/tc-openrisc.c' || echo '$(srcdir)/'`config/tc-openrisc.c -- --tc-openrisc.obj: config/tc-openrisc.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-openrisc.obj -MD -MP -MF $(DEPDIR)/tc-openrisc.Tpo -c -o tc-openrisc.obj `if test -f 'config/tc-openrisc.c'; then $(CYGPATH_W) 'config/tc-openrisc.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-openrisc.c'; fi` --@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-openrisc.Tpo $(DEPDIR)/tc-openrisc.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-openrisc.c' object='tc-openrisc.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-openrisc.obj `if test -f 'config/tc-openrisc.c'; then $(CYGPATH_W) 'config/tc-openrisc.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-openrisc.c'; fi` -- --tc-or32.o: config/tc-or32.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-or32.o -MD -MP -MF $(DEPDIR)/tc-or32.Tpo -c -o tc-or32.o `test -f 'config/tc-or32.c' || echo '$(srcdir)/'`config/tc-or32.c --@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-or32.Tpo $(DEPDIR)/tc-or32.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-or32.c' object='tc-or32.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-or32.o `test -f 'config/tc-or32.c' || echo '$(srcdir)/'`config/tc-or32.c -- --tc-or32.obj: config/tc-or32.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-or32.obj -MD -MP -MF $(DEPDIR)/tc-or32.Tpo -c -o tc-or32.obj `if test -f 'config/tc-or32.c'; then $(CYGPATH_W) 'config/tc-or32.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-or32.c'; fi` --@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-or32.Tpo $(DEPDIR)/tc-or32.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-or32.c' object='tc-or32.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-or32.obj `if test -f 'config/tc-or32.c'; then $(CYGPATH_W) 'config/tc-or32.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-or32.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-or1k.obj `if test -f 'config/tc-or1k.c'; then $(CYGPATH_W) 'config/tc-or1k.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-or1k.c'; fi` - - tc-pdp11.o: config/tc-pdp11.c - @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-pdp11.o -MD -MP -MF $(DEPDIR)/tc-pdp11.Tpo -c -o tc-pdp11.o `test -f 'config/tc-pdp11.c' || echo '$(srcdir)/'`config/tc-pdp11.c -@@ -1517,6 +1503,20 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-ppc.obj `if test -f 'config/tc-ppc.c'; then $(CYGPATH_W) 'config/tc-ppc.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-ppc.c'; fi` - -+tc-riscv.o: config/tc-riscv.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-riscv.o -MD -MP -MF $(DEPDIR)/tc-riscv.Tpo -c -o tc-riscv.o `test -f 'config/tc-riscv.c' || echo '$(srcdir)/'`config/tc-riscv.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-riscv.Tpo $(DEPDIR)/tc-riscv.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-riscv.c' object='tc-riscv.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-riscv.o `test -f 'config/tc-riscv.c' || echo '$(srcdir)/'`config/tc-riscv.c -+ -+tc-riscv.obj: config/tc-riscv.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-riscv.obj -MD -MP -MF $(DEPDIR)/tc-riscv.Tpo -c -o tc-riscv.obj `if test -f 'config/tc-riscv.c'; then $(CYGPATH_W) 'config/tc-riscv.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-riscv.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-riscv.Tpo $(DEPDIR)/tc-riscv.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config/tc-riscv.c' object='tc-riscv.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tc-riscv.obj `if test -f 'config/tc-riscv.c'; then $(CYGPATH_W) 'config/tc-riscv.c'; else $(CYGPATH_W) '$(srcdir)/config/tc-riscv.c'; fi` -+ - tc-rl78.o: config/tc-rl78.c - @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tc-rl78.o -MD -MP -MF $(DEPDIR)/tc-rl78.Tpo -c -o tc-rl78.o `test -f 'config/tc-rl78.c' || echo '$(srcdir)/'`config/tc-rl78.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tc-rl78.Tpo $(DEPDIR)/tc-rl78.Po -diff -rNU3 dist.orig/gas/atof-generic.c dist/gas/atof-generic.c ---- dist.orig/gas/atof-generic.c 2009-09-02 09:24:19.000000000 +0200 -+++ dist/gas/atof-generic.c 2015-10-18 13:11:13.000000000 +0200 -@@ -121,6 +121,32 @@ - - switch (first_digit[0]) - { -+ case 's': -+ case 'S': -+ if (!strncasecmp ("snan", first_digit, 4)) -+ { -+ address_of_generic_floating_point_number->sign = 0; -+ address_of_generic_floating_point_number->exponent = 0; -+ address_of_generic_floating_point_number->leader = -+ address_of_generic_floating_point_number->low; -+ *address_of_string_pointer = first_digit + 4; -+ return 0; -+ } -+ break; -+ -+ case 'q': -+ case 'Q': -+ if (!strncasecmp ("qnan", first_digit, 4)) -+ { -+ address_of_generic_floating_point_number->sign = 0; -+ address_of_generic_floating_point_number->exponent = 0; -+ address_of_generic_floating_point_number->leader = -+ address_of_generic_floating_point_number->low; -+ *address_of_string_pointer = first_digit + 4; -+ return 0; -+ } -+ break; -+ - case 'n': - case 'N': - if (!strncasecmp ("nan", first_digit, 3)) -diff -rNU3 dist.orig/gas/config/atof-vax.c dist/gas/config/atof-vax.c ---- dist.orig/gas/config/atof-vax.c 2007-10-17 18:45:54.000000000 +0200 -+++ dist/gas/config/atof-vax.c 2015-10-18 13:11:13.000000000 +0200 -@@ -268,10 +268,27 @@ - int exponent_skippage; - LITTLENUM_TYPE word1; - -- /* JF: Deal with new Nan, +Inf and -Inf codes. */ - if (f->sign != '-' && f->sign != '+') - { -- make_invalid_floating_point_number (words); -+ if (f->sign == 0) -+ { -+ /* All NaNs are 0. */ -+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); -+ } -+ else if (f->sign == 'P') -+ { -+ /* Positive Infinity. */ -+ memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision); -+ words[0] &= 0x7fff; -+ } -+ else if (f->sign == 'N') -+ { -+ /* Negative Infinity. */ -+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); -+ words[0] = 0x0080; -+ } -+ else -+ make_invalid_floating_point_number (words); - return return_value; - } - -diff -rNU3 dist.orig/gas/config/obj-elf.c dist/gas/config/obj-elf.c ---- dist.orig/gas/config/obj-elf.c 2012-06-30 08:32:29.000000000 +0200 -+++ dist/gas/config/obj-elf.c 2015-10-18 13:11:13.000000000 +0200 -@@ -1705,12 +1705,14 @@ - const struct elf_backend_data *bed; - - bed = get_elf_backend_data (stdoutput); -+#if 0 - if (!(bed->elf_osabi == ELFOSABI_GNU - || bed->elf_osabi == ELFOSABI_FREEBSD - /* GNU is still using the default value 0. */ - || bed->elf_osabi == ELFOSABI_NONE)) - as_bad (_("symbol type \"%s\" is supported only by GNU and FreeBSD targets"), - type_name); -+#endif - type = BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION; - } - else if (strcmp (type_name, "gnu_unique_object") == 0) -diff -rNU3 dist.orig/gas/config/tc-arm.c dist/gas/config/tc-arm.c ---- dist.orig/gas/config/tc-arm.c 2013-03-25 09:06:21.000000000 +0100 -+++ dist/gas/config/tc-arm.c 2015-10-18 13:11:13.000000000 +0200 -@@ -6936,7 +6936,7 @@ - - /* Functions for operand encoding. ARM, then Thumb. */ - --#define rotate_left(v, n) (v << n | v >> (32 - n)) -+#define rotate_left(v, n) (v << (n & 31) | v >> ((32 - n) & 31)) - - /* If VAL can be encoded in the immediate field of an ARM instruction, - return the encoded form. Otherwise, return FAIL. */ -@@ -17290,12 +17290,16 @@ - asection *sect; - - for (sect = stdoutput->sections; sect != NULL; sect = sect->next) -- if (seg_info (sect)->tc_segment_info_data.current_it.state -- == MANUAL_IT_BLOCK) -- { -- as_warn (_("section '%s' finished with an open IT block."), -- sect->name); -- } -+ { -+ segment_info_type *seginfo = seg_info (sect); -+ -+ if (seginfo && seginfo->tc_segment_info_data.current_it.state -+ == MANUAL_IT_BLOCK) -+ { -+ as_warn (_("section '%s' finished with an open IT block."), -+ sect->name); -+ } -+ } - #else - if (now_it.state == MANUAL_IT_BLOCK) - as_warn (_("file finished with an open IT block.")); -diff -rNU3 dist.orig/gas/config/tc-m68k.c dist/gas/config/tc-m68k.c ---- dist.orig/gas/config/tc-m68k.c 2012-05-16 12:26:47.000000000 +0200 -+++ dist/gas/config/tc-m68k.c 2015-10-18 13:11:13.000000000 +0200 -@@ -7426,12 +7426,12 @@ - } - } - -- /* Remove 'm' or 'mc' prefix from 68k variants. */ -+ /* Remove 'm' or 'mc' prefix from 68k or coldfire variants. */ - if (allow_m) - { - if (arg[0] == 'm') - { -- if (arg[1] == '6') -+ if (arg[1] == '6' || arg[1] == '5') - arg += 1; - else if (arg[1] == 'c' && arg[2] == '6') - arg += 2; -diff -rNU3 dist.orig/gas/config/tc-mips.c dist/gas/config/tc-mips.c ---- dist.orig/gas/config/tc-mips.c 2012-09-04 16:21:03.000000000 +0200 -+++ dist/gas/config/tc-mips.c 2015-10-18 13:11:13.000000000 +0200 -@@ -909,6 +909,9 @@ - NUM_FIX_VR4120_CLASSES - }; - -+/* ...likewise -mtrap-zero-jump. */ -+static bfd_boolean mips_trap_zero_jump; -+ - /* ...likewise -mfix-loongson2f-jump. */ - static bfd_boolean mips_fix_loongson2f_jump; - -@@ -941,6 +944,8 @@ - efficient expansion. */ - - static int mips_relax_branch; -+ -+static int mips_fix_loongson2f_btb; - - /* The expansion of many macros depends on the type of symbol that - they refer to. For example, when generating position-dependent code, -@@ -1316,6 +1321,7 @@ - static void mips16_macro_build - (expressionS *, const char *, const char *, va_list *); - static void load_register (int, expressionS *, int); -+static void macro_build (expressionS *, const char *, const char *, ...); - static void macro_start (void); - static void macro_end (void); - static void macro (struct mips_cl_insn * ip); -@@ -3626,6 +3632,35 @@ - return nops; - } - -+static void -+trap_zero_jump (struct mips_cl_insn * ip) -+{ -+ if (strcmp (ip->insn_mo->name, "j") == 0 -+ || strcmp (ip->insn_mo->name, "jr") == 0 -+ || strcmp (ip->insn_mo->name, "jalr") == 0) -+ { -+ int sreg; -+ -+ if (mips_opts.warn_about_macros) -+ return; -+ -+ sreg = EXTRACT_OPERAND (0, RS, *ip); -+ if (mips_opts.isa == ISA_MIPS32 -+ || mips_opts.isa == ISA_MIPS32R2 -+ || mips_opts.isa == ISA_MIPS64 -+ || mips_opts.isa == ISA_MIPS64R2) -+ { -+ expressionS ep; -+ ep.X_op = O_constant; -+ ep.X_add_number = 4096; -+ macro_build (&ep, "tltiu", "s,j", sreg, BFD_RELOC_LO16); -+ } -+ else if (mips_opts.isa != ISA_UNKNOWN -+ && mips_opts.isa != ISA_MIPS1) -+ macro_build (NULL, "teq", "s,t", sreg, 0); -+ } -+} -+ - /* Fix NOP issue: Replace nops by "or at,at,zero". */ - - static void -@@ -3663,6 +3698,16 @@ - ep.X_add_number = 0xffff; - macro_build (&ep, "ori", "t,r,i", ATREG, ATREG, BFD_RELOC_LO16); - macro_build (NULL, "and", "d,v,t", sreg, sreg, ATREG); -+ /* Hide these three instructions to avoid getting a ``macro expanded into -+ multiple instructions'' warning. */ -+ if (mips_relax.sequence != 2) { -+ mips_macro_warning.sizes[0] -= 3 * 4; -+ mips_macro_warning.insns[0] -= 3; -+ } -+ if (mips_relax.sequence != 1) { -+ mips_macro_warning.sizes[1] -= 3 * 4; -+ mips_macro_warning.insns[1] -= 3; -+ } - } - } - -@@ -3718,6 +3763,11 @@ - if (mips_opts.mips16 && history[0].fixp[0]) - return FALSE; - -+ if (mips_fix_loongson2f) -+ fix_loongson2f (ip); -+ if (mips_trap_zero_jump) -+ trap_zero_jump (ip); -+ - /* If the branch is itself the target of a branch, we can not swap. - We cheat on this; all we check for is whether there is a label on - this instruction. If there are any branches to anything other than -@@ -4764,6 +4814,45 @@ - r[i] = (bfd_reloc_code_real_type) va_arg (*args, int); - } - -+/* Fix jump through register issue on loongson2f processor for kernel code: -+ force a BTB clear before the jump to prevent it from being incorrectly -+ prefetched by the branch prediction engine. */ -+ -+static void -+macro_build_jrpatch (expressionS *ep, unsigned int sreg) -+{ -+ if (!mips_fix_loongson2f_btb) -+ return; -+ -+ if (sreg == ZERO || sreg == KT0 || sreg == KT1 || sreg == AT) -+ return; -+ -+ if (!mips_opts.at) -+ { -+ as_warn (_("unable to apply loongson2f BTB workaround when .set noat")); -+ return; -+ } -+ -+ /* li $at, COP_0_BTB_CLEAR | COP_0_RAS_DISABLE */ -+ ep->X_op = O_constant; -+ ep->X_add_number = 3; -+ macro_build (ep, "ori", "t,r,i", AT, ZERO, BFD_RELOC_LO16); -+ -+ /* dmtc0 $at, COP_0_DIAG */ -+ macro_build (NULL, "dmtc0", "t,G", AT, 22); -+ -+ /* Hide these two instructions to avoid getting a ``macro expanded into -+ multiple instructions'' warning. */ -+ if (mips_relax.sequence != 2) { -+ mips_macro_warning.sizes[0] -= 2 * 4; -+ mips_macro_warning.insns[0] -= 2; -+ } -+ if (mips_relax.sequence != 1) { -+ mips_macro_warning.sizes[1] -= 2 * 4; -+ mips_macro_warning.insns[1] -= 2; -+ } -+} -+ - /* Build an instruction created by a macro expansion. This is passed - a pointer to the count of instructions created so far, an - expression, the name of the instruction to build, an operand format -@@ -7637,6 +7726,26 @@ - macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", treg, tempreg, breg); - break; - -+ case M_JR_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jr", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_J_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "j", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_JALR_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jalr", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_JALR_DS: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jalr", "d,s", dreg, sreg); -+ return; /* didn't modify $at */ -+ - case M_MSGSND: - gas_assert (!mips_opts.micromips); - { -@@ -9126,18 +9235,28 @@ - - - case M_SAA_AB: -- ab = 1; -+ ab = (offset_expr.X_op != O_constant || offset_expr.X_add_number != 0); - case M_SAA_OB: - s = "saa"; - off0 = 1; - fmt = "t,(b)"; -+ if (!ab) -+ { -+ tempreg = AT; -+ goto ld_noat; -+ } - goto ld_st; - case M_SAAD_AB: -- ab = 1; -+ ab = (offset_expr.X_op != O_constant || offset_expr.X_add_number != 0); - case M_SAAD_OB: - s = "saad"; - off0 = 1; - fmt = "t,(b)"; -+ if (!ab) -+ { -+ tempreg = AT; -+ goto ld_noat; -+ } - goto ld_st; - - /* New code added to support COPZ instructions. -@@ -14350,6 +14469,8 @@ - OPTION_SINGLE_FLOAT, - OPTION_DOUBLE_FLOAT, - OPTION_32, -+ OPTION_TRAP_ZERO_JUMP, -+ OPTION_NO_TRAP_ZERO_JUMP, - #ifdef OBJ_ELF - OPTION_CALL_SHARED, - OPTION_CALL_NONPIC, -@@ -14364,6 +14485,8 @@ - OPTION_NO_PDR, - OPTION_MVXWORKS_PIC, - #endif /* OBJ_ELF */ -+ OPTION_FIX_LOONGSON2F_BTB, -+ OPTION_NO_FIX_LOONGSON2F_BTB, - OPTION_END_OF_ENUM - }; - -@@ -14421,6 +14544,8 @@ - {"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP}, - {"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP}, - {"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP}, -+ {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB}, -+ {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB}, - {"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120}, - {"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120}, - {"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130}, -@@ -14459,6 +14584,9 @@ - make testing easier. */ - {"32", no_argument, NULL, OPTION_32}, - -+ {"mtrap-zero-jump", no_argument, NULL, OPTION_TRAP_ZERO_JUMP}, -+ {"mno-trap-zero-jump", no_argument, NULL, OPTION_NO_TRAP_ZERO_JUMP}, -+ - /* ELF-specific options. */ - #ifdef OBJ_ELF - {"KPIC", no_argument, NULL, OPTION_CALL_SHARED}, -@@ -14750,6 +14878,14 @@ - mips_fix_vr4130 = 0; - break; - -+ case OPTION_FIX_LOONGSON2F_BTB: -+ mips_fix_loongson2f_btb = 1; -+ break; -+ -+ case OPTION_NO_FIX_LOONGSON2F_BTB: -+ mips_fix_loongson2f_btb = 0; -+ break; -+ - case OPTION_FIX_CN63XXP1: - mips_fix_cn63xxp1 = TRUE; - break; -@@ -14782,6 +14918,14 @@ - mips_opts.sym32 = FALSE; - break; - -+ case OPTION_TRAP_ZERO_JUMP: -+ mips_trap_zero_jump = TRUE; -+ break; -+ -+ case OPTION_NO_TRAP_ZERO_JUMP: -+ mips_trap_zero_jump = FALSE; -+ break; -+ - #ifdef OBJ_ELF - /* When generating ELF code, we permit -KPIC and -call_shared to - select SVR4_PIC, and -non_shared to select no PIC. This is -@@ -19411,6 +19555,7 @@ - fprintf (stream, _("\ - -mfix-loongson2f-jump work around Loongson2F JUMP instructions\n\ - -mfix-loongson2f-nop work around Loongson2F NOP errata\n\ -+-mfix-loongson2f-btb work around Loongson2F BTB errata\n\ - -mfix-vr4120 work around certain VR4120 errata\n\ - -mfix-vr4130 work around VR4130 mflo/mfhi errata\n\ - -mfix-24k insert a nop after ERET and DERET instructions\n\ -diff -rNU3 dist.orig/gas/config/tc-openrisc.c dist/gas/config/tc-openrisc.c ---- dist.orig/gas/config/tc-openrisc.c 2009-07-24 13:45:00.000000000 +0200 -+++ dist/gas/config/tc-openrisc.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,363 +0,0 @@ --/* tc-openrisc.c -- Assembler for the OpenRISC family. -- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 -- Free Software Foundation. -- Contributed by Johan Rydberg, jrydberg@opencores.org -- -- This file is part of GAS, the GNU Assembler. -- -- GAS 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, or (at your option) -- any later version. -- -- GAS 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 GAS; see the file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street - Fifth Floor, -- Boston, MA 02110-1301, USA. */ -- --#include "as.h" --#include "subsegs.h" --#include "symcat.h" --#include "opcodes/openrisc-desc.h" --#include "opcodes/openrisc-opc.h" --#include "cgen.h" -- --/* Structure to hold all of the different components describing -- an individual instruction. */ --typedef struct openrisc_insn openrisc_insn; -- --struct openrisc_insn --{ -- const CGEN_INSN * insn; -- const CGEN_INSN * orig_insn; -- CGEN_FIELDS fields; --#if CGEN_INT_INSN_P -- CGEN_INSN_INT buffer [1]; --#define INSN_VALUE(buf) (*(buf)) --#else -- unsigned char buffer [CGEN_MAX_INSN_SIZE]; --#define INSN_VALUE(buf) (buf) --#endif -- char * addr; -- fragS * frag; -- int num_fixups; -- fixS * fixups [GAS_CGEN_MAX_FIXUPS]; -- int indices [MAX_OPERAND_INSTANCES]; --}; -- -- --const char comment_chars[] = "#"; --const char line_comment_chars[] = "#"; --const char line_separator_chars[] = ";"; --const char EXP_CHARS[] = "eE"; --const char FLT_CHARS[] = "dD"; -- -- --#define OPENRISC_SHORTOPTS "m:" --const char * md_shortopts = OPENRISC_SHORTOPTS; -- --struct option md_longopts[] = --{ -- {NULL, no_argument, NULL, 0} --}; --size_t md_longopts_size = sizeof (md_longopts); -- --unsigned long openrisc_machine = 0; /* default */ -- --int --md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED) --{ -- return 0; --} -- --void --md_show_usage (FILE * stream ATTRIBUTE_UNUSED) --{ --} -- --static void --ignore_pseudo (int val ATTRIBUTE_UNUSED) --{ -- discard_rest_of_line (); --} -- --const char openrisc_comment_chars [] = ";#"; -- --/* The target specific pseudo-ops which we support. */ --const pseudo_typeS md_pseudo_table[] = --{ -- { "word", cons, 4 }, -- { "proc", ignore_pseudo, 0 }, -- { "endproc", ignore_pseudo, 0 }, -- { NULL, NULL, 0 } --}; -- -- -- --void --md_begin (void) --{ -- /* Initialize the `cgen' interface. */ -- -- /* Set the machine number and endian. */ -- gas_cgen_cpu_desc = openrisc_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, -- CGEN_CPU_OPEN_ENDIAN, -- CGEN_ENDIAN_BIG, -- CGEN_CPU_OPEN_END); -- openrisc_cgen_init_asm (gas_cgen_cpu_desc); -- -- /* This is a callback from cgen to gas to parse operands. */ -- cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand); --} -- --void --md_assemble (char * str) --{ -- static int last_insn_had_delay_slot = 0; -- openrisc_insn insn; -- char * errmsg; -- -- /* Initialize GAS's cgen interface for a new instruction. */ -- gas_cgen_init_parse (); -- -- insn.insn = openrisc_cgen_assemble_insn -- (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg); -- -- if (!insn.insn) -- { -- as_bad ("%s", errmsg); -- return; -- } -- -- /* Doesn't really matter what we pass for RELAX_P here. */ -- gas_cgen_finish_insn (insn.insn, insn.buffer, -- CGEN_FIELDS_BITSIZE (& insn.fields), 1, NULL); -- -- last_insn_had_delay_slot -- = CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_DELAY_SLOT); --} -- -- --/* The syntax in the manual says constants begin with '#'. -- We just ignore it. */ -- --void --md_operand (expressionS * expressionP) --{ -- if (* input_line_pointer == '#') -- { -- input_line_pointer ++; -- expression (expressionP); -- } --} -- --valueT --md_section_align (segT segment, valueT size) --{ -- int align = bfd_get_section_alignment (stdoutput, segment); -- return ((size + (1 << align) - 1) & (-1 << align)); --} -- --symbolS * --md_undefined_symbol (char * name ATTRIBUTE_UNUSED) --{ -- return 0; --} -- -- --/* Interface to relax_segment. */ -- --/* FIXME: Look through this. */ -- --const relax_typeS md_relax_table[] = --{ --/* The fields are: -- 1) most positive reach of this state, -- 2) most negative reach of this state, -- 3) how many bytes this mode will add to the size of the current frag -- 4) which index into the table to try if we can't fit into this one. */ -- -- /* The first entry must be unused because an `rlx_more' value of zero ends -- each list. */ -- {1, 1, 0, 0}, -- -- /* The displacement used by GAS is from the end of the 2 byte insn, -- so we subtract 2 from the following. */ -- /* 16 bit insn, 8 bit disp -> 10 bit range. -- This doesn't handle a branch in the right slot at the border: -- the "& -4" isn't taken into account. It's not important enough to -- complicate things over it, so we subtract an extra 2 (or + 2 in -ve -- case). */ -- {511 - 2 - 2, -512 - 2 + 2, 0, 2 }, -- /* 32 bit insn, 24 bit disp -> 26 bit range. */ -- {0x2000000 - 1 - 2, -0x2000000 - 2, 2, 0 }, -- /* Same thing, but with leading nop for alignment. */ -- {0x2000000 - 1 - 2, -0x2000000 - 2, 4, 0 } --}; -- --/* Return an initial guess of the length by which a fragment must grow to -- hold a branch to reach its destination. -- Also updates fr_type/fr_subtype as necessary. -- -- Called just before doing relaxation. -- Any symbol that is now undefined will not become defined. -- The guess for fr_var is ACTUALLY the growth beyond fr_fix. -- Whatever we do to grow fr_fix or fr_var contributes to our returned value. -- Although it may not be explicit in the frag, pretend fr_var starts with a -- 0 value. */ -- --int --md_estimate_size_before_relax (fragS * fragP, segT segment) --{ -- /* The only thing we have to handle here are symbols outside of the -- current segment. They may be undefined or in a different segment in -- which case linker scripts may place them anywhere. -- However, we can't finish the fragment here and emit the reloc as insn -- alignment requirements may move the insn about. */ -- -- if (S_GET_SEGMENT (fragP->fr_symbol) != segment) -- { -- /* The symbol is undefined in this segment. -- Change the relaxation subtype to the max allowable and leave -- all further handling to md_convert_frag. */ -- fragP->fr_subtype = 2; -- -- { -- const CGEN_INSN * insn; -- int i; -- -- /* Update the recorded insn. -- Fortunately we don't have to look very far. -- FIXME: Change this to record in the instruction the next higher -- relaxable insn to use. */ -- for (i = 0, insn = fragP->fr_cgen.insn; i < 4; i++, insn++) -- { -- if ((strcmp (CGEN_INSN_MNEMONIC (insn), -- CGEN_INSN_MNEMONIC (fragP->fr_cgen.insn)) -- == 0) -- && CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED)) -- break; -- } -- if (i == 4) -- abort (); -- -- fragP->fr_cgen.insn = insn; -- return 2; -- } -- } -- -- return md_relax_table[fragP->fr_subtype].rlx_length; --} -- --/* *fragP has been relaxed to its final size, and now needs to have -- the bytes inside it modified to conform to the new size. -- -- Called after relaxation is finished. -- fragP->fr_type == rs_machine_dependent. -- fragP->fr_subtype is the subtype of what the address relaxed to. */ -- --void --md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, -- segT sec ATTRIBUTE_UNUSED, -- fragS * fragP ATTRIBUTE_UNUSED) --{ -- /* FIXME */ --} -- -- --/* Functions concerning relocs. */ -- --/* The location from which a PC relative jump should be calculated, -- given a PC relative reloc. */ -- --long --md_pcrel_from_section (fixS * fixP, segT sec) --{ -- if (fixP->fx_addsy != (symbolS *) NULL -- && (! S_IS_DEFINED (fixP->fx_addsy) -- || S_GET_SEGMENT (fixP->fx_addsy) != sec)) -- /* The symbol is undefined (or is defined but not in this section). -- Let the linker figure it out. */ -- return 0; -- -- return (fixP->fx_frag->fr_address + fixP->fx_where) & ~1; --} -- -- --/* Return the bfd reloc type for OPERAND of INSN at fixup FIXP. -- Returns BFD_RELOC_NONE if no reloc type can be found. -- *FIXP may be modified if desired. */ -- --bfd_reloc_code_real_type --md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED, -- const CGEN_OPERAND * operand, -- fixS * fixP) --{ -- bfd_reloc_code_real_type type; -- -- switch (operand->type) -- { -- case OPENRISC_OPERAND_ABS_26: -- fixP->fx_pcrel = 0; -- type = BFD_RELOC_OPENRISC_ABS_26; -- goto emit; -- case OPENRISC_OPERAND_DISP_26: -- fixP->fx_pcrel = 1; -- type = BFD_RELOC_OPENRISC_REL_26; -- goto emit; -- -- case OPENRISC_OPERAND_HI16: -- type = BFD_RELOC_HI16; -- goto emit; -- -- case OPENRISC_OPERAND_LO16: -- type = BFD_RELOC_LO16; -- goto emit; -- -- emit: -- return type; -- -- default : /* avoid -Wall warning */ -- break; -- } -- -- return BFD_RELOC_NONE; --} -- --/* Write a value out to the object file, using the appropriate endianness. */ -- --void --md_number_to_chars (char * buf, valueT val, int n) --{ -- number_to_chars_bigendian (buf, val, n); --} -- --/* Turn a string in input_line_pointer into a floating point constant of type -- type, and store the appropriate bytes in *litP. The number of LITTLENUMS -- emitted is stored in *sizeP . An error message is returned, or NULL on OK. --*/ -- --/* Equal to MAX_PRECISION in atof-ieee.c */ --#define MAX_LITTLENUMS 6 -- --char * --md_atof (int type, char * litP, int * sizeP) --{ -- return ieee_md_atof (type, litP, sizeP, TRUE); --} -- --bfd_boolean --openrisc_fix_adjustable (fixS * fixP) --{ -- /* We need the symbol name for the VTABLE entries. */ -- if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT -- || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) -- return 0; -- -- return 1; --} -diff -rNU3 dist.orig/gas/config/tc-openrisc.h dist/gas/config/tc-openrisc.h ---- dist.orig/gas/config/tc-openrisc.h 2007-07-03 13:01:04.000000000 +0200 -+++ dist/gas/config/tc-openrisc.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,61 +0,0 @@ --/* tc-openrisc.h -- Header file for tc-openrisc.c. -- Copyright 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. -- -- This file is part of GAS, the GNU Assembler. -- -- GAS 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, or (at your option) -- any later version. -- -- GAS 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 GAS; see the file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street - Fifth Floor, -- Boston, MA 02110-1301, USA. */ -- --#define TC_OPENRISC -- --#define LISTING_HEADER "OpenRISC GAS " -- --/* The target BFD architecture. */ --#define TARGET_ARCH bfd_arch_openrisc -- --extern unsigned long openrisc_machine; --#define TARGET_MACH (openrisc_machine) -- --#define TARGET_FORMAT "elf32-openrisc" --#define TARGET_BYTES_BIG_ENDIAN 1 -- --extern const char openrisc_comment_chars []; --#define tc_comment_chars openrisc_comment_chars -- --/* Permit temporary numeric labels. */ --#define LOCAL_LABELS_FB 1 -- --#define DIFF_EXPR_OK 1 /* .-foo gets turned into PC relative relocs */ -- --/* We don't need to handle .word strangely. */ --#define WORKING_DOT_WORD -- --/* Values passed to md_apply_fix don't include the symbol value. */ --#define MD_APPLY_SYM_VALUE(FIX) 0 -- --#define md_apply_fix gas_cgen_md_apply_fix -- --extern bfd_boolean openrisc_fix_adjustable (struct fix *); --#define tc_fix_adjustable(FIX) openrisc_fix_adjustable (FIX) -- --#define tc_gen_reloc gas_cgen_tc_gen_reloc -- --/* Call md_pcrel_from_section(), not md_pcrel_from(). */ --extern long md_pcrel_from_section (struct fix *, segT); --#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC) -- --/* For 8 vs 16 vs 32 bit branch selection. */ --extern const struct relax_type md_relax_table[]; --#define TC_GENERIC_RELAX_TABLE md_relax_table -diff -rNU3 dist.orig/gas/config/tc-or1k.c dist/gas/config/tc-or1k.c ---- dist.orig/gas/config/tc-or1k.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/tc-or1k.c 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,362 @@ -+/* tc-or1k.c -- Assembler for the OpenRISC family. -+ Copyright 2001-2014 Free Software Foundation. -+ Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, or (at your option) -+ any later version. -+ -+ GAS 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, see */ -+#include "as.h" -+#include "safe-ctype.h" -+#include "subsegs.h" -+#include "symcat.h" -+#include "opcodes/or1k-desc.h" -+#include "opcodes/or1k-opc.h" -+#include "cgen.h" -+#include "elf/or1k.h" -+#include "dw2gencfi.h" -+ -+/* Structure to hold all of the different components describing -+ an individual instruction. */ -+ -+typedef struct -+{ -+ const CGEN_INSN * insn; -+ const CGEN_INSN * orig_insn; -+ CGEN_FIELDS fields; -+#if CGEN_INT_INSN_P -+ CGEN_INSN_INT buffer [1]; -+#define INSN_VALUE(buf) (*(buf)) -+#else -+ unsigned char buffer [CGEN_MAX_INSN_SIZE]; -+#define INSN_VALUE(buf) (buf) -+#endif -+ char * addr; -+ fragS * frag; -+ int num_fixups; -+ fixS * fixups [GAS_CGEN_MAX_FIXUPS]; -+ int indices [MAX_OPERAND_INSTANCES]; -+} -+or1k_insn; -+ -+const char comment_chars[] = "#"; -+const char line_comment_chars[] = "#"; -+const char line_separator_chars[] = ";"; -+const char EXP_CHARS[] = "eE"; -+const char FLT_CHARS[] = "dD"; -+ -+#define OR1K_SHORTOPTS "m:" -+const char * md_shortopts = OR1K_SHORTOPTS; -+ -+struct option md_longopts[] = -+{ -+ {NULL, no_argument, NULL, 0} -+}; -+size_t md_longopts_size = sizeof (md_longopts); -+ -+unsigned long or1k_machine = 0; /* default */ -+ -+int -+md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED) -+{ -+ return 0; -+} -+ -+void -+md_show_usage (FILE * stream ATTRIBUTE_UNUSED) -+{ -+} -+ -+static void -+ignore_pseudo (int val ATTRIBUTE_UNUSED) -+{ -+ discard_rest_of_line (); -+} -+ -+static bfd_boolean nodelay = FALSE; -+static void -+s_nodelay (int val ATTRIBUTE_UNUSED) -+{ -+ nodelay = TRUE; -+} -+ -+const char or1k_comment_chars [] = ";#"; -+ -+/* The target specific pseudo-ops which we support. */ -+const pseudo_typeS md_pseudo_table[] = -+{ -+ { "align", s_align_bytes, 0 }, -+ { "word", cons, 4 }, -+ { "proc", ignore_pseudo, 0 }, -+ { "endproc", ignore_pseudo, 0 }, -+ { "nodelay", s_nodelay, 0 }, -+ { NULL, NULL, 0 } -+}; -+ -+ -+void -+md_begin (void) -+{ -+ /* Initialize the `cgen' interface. */ -+ -+ /* Set the machine number and endian. */ -+ gas_cgen_cpu_desc = or1k_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, -+ CGEN_CPU_OPEN_ENDIAN, -+ CGEN_ENDIAN_BIG, -+ CGEN_CPU_OPEN_END); -+ or1k_cgen_init_asm (gas_cgen_cpu_desc); -+ -+ /* This is a callback from cgen to gas to parse operands. */ -+ cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand); -+} -+ -+void -+md_assemble (char * str) -+{ -+ static int last_insn_had_delay_slot = 0; -+ or1k_insn insn; -+ char * errmsg; -+ -+ /* Initialize GAS's cgen interface for a new instruction. */ -+ gas_cgen_init_parse (); -+ -+ insn.insn = or1k_cgen_assemble_insn -+ (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg); -+ -+ if (!insn.insn) -+ { -+ as_bad ("%s", errmsg); -+ return; -+ } -+ -+ /* Doesn't really matter what we pass for RELAX_P here. */ -+ gas_cgen_finish_insn (insn.insn, insn.buffer, -+ CGEN_FIELDS_BITSIZE (& insn.fields), 1, NULL); -+ -+ last_insn_had_delay_slot -+ = CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_DELAY_SLOT); -+ (void) last_insn_had_delay_slot; -+} -+ -+ -+/* The syntax in the manual says constants begin with '#'. -+ We just ignore it. */ -+ -+void -+md_operand (expressionS * expressionP) -+{ -+ if (* input_line_pointer == '#') -+ { -+ input_line_pointer ++; -+ expression (expressionP); -+ } -+} -+ -+valueT -+md_section_align (segT segment, valueT size) -+{ -+ int align = bfd_get_section_alignment (stdoutput, segment); -+ return ((size + (1 << align) - 1) & (-1 << align)); -+} -+ -+symbolS * -+md_undefined_symbol (char * name ATTRIBUTE_UNUSED) -+{ -+ return 0; -+} -+ -+ -+/* Interface to relax_segment. */ -+ -+const relax_typeS md_relax_table[] = -+{ -+/* The fields are: -+ 1) most positive reach of this state, -+ 2) most negative reach of this state, -+ 3) how many bytes this mode will add to the size of the current frag -+ 4) which index into the table to try if we can't fit into this one. */ -+ -+ /* The first entry must be unused because an `rlx_more' value of zero ends -+ each list. */ -+ {1, 1, 0, 0}, -+ -+ /* The displacement used by GAS is from the end of the 4 byte insn, -+ so we subtract 4 from the following. */ -+ {(((1 << 25) - 1) << 2) - 4, -(1 << 25) - 4, 0, 0}, -+}; -+ -+int -+md_estimate_size_before_relax (fragS * fragP, segT segment ATTRIBUTE_UNUSED) -+{ -+ return md_relax_table[fragP->fr_subtype].rlx_length; -+} -+ -+/* *fragP has been relaxed to its final size, and now needs to have -+ the bytes inside it modified to conform to the new size. -+ -+ Called after relaxation is finished. -+ fragP->fr_type == rs_machine_dependent. -+ fragP->fr_subtype is the subtype of what the address relaxed to. */ -+ -+void -+md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, -+ segT sec ATTRIBUTE_UNUSED, -+ fragS * fragP ATTRIBUTE_UNUSED) -+{ -+ /* FIXME */ -+} -+ -+ -+/* Functions concerning relocs. */ -+ -+/* The location from which a PC relative jump should be calculated, -+ given a PC relative reloc. */ -+ -+long -+md_pcrel_from_section (fixS * fixP, segT sec) -+{ -+ if (fixP->fx_addsy != (symbolS *) NULL -+ && (! S_IS_DEFINED (fixP->fx_addsy) -+ || (S_GET_SEGMENT (fixP->fx_addsy) != sec) -+ || S_IS_EXTERNAL (fixP->fx_addsy) -+ || S_IS_WEAK (fixP->fx_addsy))) -+ { -+ /* The symbol is undefined (or is defined but not in this section). -+ Let the linker figure it out. */ -+ return 0; -+ } -+ -+ return fixP->fx_frag->fr_address + fixP->fx_where; -+} -+ -+ -+/* Return the bfd reloc type for OPERAND of INSN at fixup FIXP. -+ Returns BFD_RELOC_NONE if no reloc type can be found. -+ *FIXP may be modified if desired. */ -+ -+bfd_reloc_code_real_type -+md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED, -+ const CGEN_OPERAND * operand, -+ fixS * fixP) -+{ -+ if (fixP->fx_cgen.opinfo) -+ return fixP->fx_cgen.opinfo; -+ -+ switch (operand->type) -+ { -+ case OR1K_OPERAND_DISP26: -+ fixP->fx_pcrel = 1; -+ return BFD_RELOC_OR1K_REL_26; -+ -+ default: /* avoid -Wall warning */ -+ return BFD_RELOC_NONE; -+ } -+} -+ -+/* Write a value out to the object file, using the appropriate endianness. */ -+ -+void -+md_number_to_chars (char * buf, valueT val, int n) -+{ -+ number_to_chars_bigendian (buf, val, n); -+} -+ -+/* Turn a string in input_line_pointer into a floating point constant of type -+ type, and store the appropriate bytes in *litP. The number of LITTLENUMS -+ emitted is stored in *sizeP . An error message is returned, or NULL on OK. */ -+ -+/* Equal to MAX_PRECISION in atof-ieee.c. */ -+#define MAX_LITTLENUMS 6 -+ -+char * -+md_atof (int type, char * litP, int * sizeP) -+{ -+ return ieee_md_atof (type, litP, sizeP, TRUE); -+} -+ -+bfd_boolean -+or1k_fix_adjustable (fixS * fixP) -+{ -+ /* We need the symbol name for the VTABLE entries. */ -+ if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT -+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) -+ return FALSE; -+ -+ return TRUE; -+} -+ -+#define GOT_NAME "_GLOBAL_OFFSET_TABLE_" -+ -+arelent * -+tc_gen_reloc (asection *sec, fixS *fx) -+{ -+ bfd_reloc_code_real_type code = fx->fx_r_type; -+ -+ if (fx->fx_addsy != NULL -+ && strcmp (S_GET_NAME (fx->fx_addsy), GOT_NAME) == 0 -+ && (code == BFD_RELOC_OR1K_GOTPC_HI16 -+ || code == BFD_RELOC_OR1K_GOTPC_LO16)) -+ { -+ arelent * reloc; -+ -+ reloc = xmalloc (sizeof (* reloc)); -+ reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); -+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fx->fx_addsy); -+ reloc->address = fx->fx_frag->fr_address + fx->fx_where; -+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fx->fx_r_type); -+ reloc->addend = fx->fx_offset; -+ return reloc; -+ } -+ -+ return gas_cgen_tc_gen_reloc (sec, fx); -+} -+ -+void -+or1k_apply_fix (struct fix *f, valueT *t, segT s) -+{ -+ gas_cgen_md_apply_fix (f, t, s); -+ -+ switch (f->fx_r_type) -+ { -+ case BFD_RELOC_OR1K_TLS_GD_HI16: -+ case BFD_RELOC_OR1K_TLS_GD_LO16: -+ case BFD_RELOC_OR1K_TLS_LDM_HI16: -+ case BFD_RELOC_OR1K_TLS_LDM_LO16: -+ case BFD_RELOC_OR1K_TLS_LDO_HI16: -+ case BFD_RELOC_OR1K_TLS_LDO_LO16: -+ case BFD_RELOC_OR1K_TLS_IE_HI16: -+ case BFD_RELOC_OR1K_TLS_IE_LO16: -+ case BFD_RELOC_OR1K_TLS_LE_HI16: -+ case BFD_RELOC_OR1K_TLS_LE_LO16: -+ S_SET_THREAD_LOCAL (f->fx_addsy); -+ break; -+ default: -+ break; -+ } -+} -+ -+void -+or1k_elf_final_processing (void) -+{ -+ if (nodelay) -+ elf_elfheader (stdoutput)->e_flags |= EF_OR1K_NODELAY; -+} -+ -+/* Standard calling conventions leave the CFA at SP on entry. */ -+ -+void -+or1k_cfi_frame_initial_instructions (void) -+{ -+ cfi_add_CFA_def_cfa_register (1); -+} -+ -diff -rNU3 dist.orig/gas/config/tc-or1k.h dist/gas/config/tc-or1k.h ---- dist.orig/gas/config/tc-or1k.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/tc-or1k.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,79 @@ -+/* tc-or1k.h -- Header file for tc-or1k.c. -+ Copyright 2001-2014 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, or (at your option) -+ any later version. -+ -+ GAS 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, see */ -+ -+#define TC_OR1K -+ -+#define LISTING_HEADER "Or1k GAS " -+ -+/* The target BFD architecture. */ -+#define TARGET_ARCH bfd_arch_or1k -+ -+extern unsigned long or1k_machine; -+#define TARGET_MACH (or1k_machine) -+ -+#define TARGET_FORMAT "elf32-or1k" -+#define TARGET_BYTES_BIG_ENDIAN 1 -+ -+extern const char or1k_comment_chars []; -+#define tc_comment_chars or1k_comment_chars -+ -+/* Permit temporary numeric labels. */ -+#define LOCAL_LABELS_FB 1 -+ -+#define DIFF_EXPR_OK 1 /* .-foo gets turned into PC relative relocs. */ -+ -+/* We don't need to handle .word strangely. */ -+#define WORKING_DOT_WORD -+ -+/* Values passed to md_apply_fix don't include the symbol value. */ -+#define MD_APPLY_SYM_VALUE(FIX) 0 -+ -+#define md_apply_fix or1k_apply_fix -+extern void or1k_apply_fix (struct fix *, valueT *, segT); -+ -+extern bfd_boolean or1k_fix_adjustable (struct fix *); -+#define tc_fix_adjustable(FIX) or1k_fix_adjustable (FIX) -+ -+/* Call md_pcrel_from_section(), not md_pcrel_from(). */ -+extern long md_pcrel_from_section (struct fix *, segT); -+#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC) -+ -+/* For 8 vs 16 vs 32 bit branch selection. */ -+extern const struct relax_type md_relax_table[]; -+#define TC_GENERIC_RELAX_TABLE md_relax_table -+ -+#define GAS_CGEN_PCREL_R_TYPE(r_type) gas_cgen_pcrel_r_type(r_type) -+ -+#define elf_tc_final_processing or1k_elf_final_processing -+void or1k_elf_final_processing (void); -+ -+/* Enable cfi directives. */ -+#define TARGET_USE_CFIPOP 1 -+ -+/* Stack grows to lower addresses and wants 4 byte boundary. */ -+#define DWARF2_CIE_DATA_ALIGNMENT -4 -+ -+/* Define the column that represents the PC. */ -+#define DWARF2_DEFAULT_RETURN_COLUMN 9 -+ -+/* or1k instructions are 4 bytes long. */ -+#define DWARF2_LINE_MIN_INSN_LENGTH 4 -+ -+#define tc_cfi_frame_initial_instructions \ -+ or1k_cfi_frame_initial_instructions -+extern void or1k_cfi_frame_initial_instructions (void); -diff -rNU3 dist.orig/gas/config/tc-or32.c dist/gas/config/tc-or32.c ---- dist.orig/gas/config/tc-or32.c 2012-05-17 17:13:16.000000000 +0200 -+++ dist/gas/config/tc-or32.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,967 +0,0 @@ --/* Assembly backend for the OpenRISC 1000. -- Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010, 2012 -- Free Software Foundation, Inc. -- Contributed by Damjan Lampret . -- Modified bu Johan Rydberg, . -- Based upon a29k port. -- -- This file is part of GAS, the GNU Assembler. -- -- GAS 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, or (at your option) -- any later version. -- -- GAS 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 GAS; see the file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street - Fifth Floor, -- Boston, MA 02110-1301, USA. */ -- --/* tc-a29k.c used as a template. */ -- --#include "as.h" --#include "safe-ctype.h" --#include "opcode/or32.h" --#include "elf/or32.h" -- --#define DEBUG 0 -- --#ifndef REGISTER_PREFIX --#define REGISTER_PREFIX '%' --#endif -- --/* Make it easier to clone this machine desc into another one. */ --#define machine_opcode or32_opcode --#define machine_opcodes or32_opcodes --#define machine_ip or32_ip --#define machine_it or32_it -- --/* Handle of the OPCODE hash table. */ --static struct hash_control *op_hash = NULL; -- --struct machine_it --{ -- char * error; -- unsigned long opcode; -- struct nlist * nlistp; -- expressionS exp; -- int pcrel; -- int reloc_offset; /* Offset of reloc within insn. */ -- int reloc; --} --the_insn; -- --const pseudo_typeS md_pseudo_table[] = --{ -- {"align", s_align_bytes, 4 }, -- {"space", s_space, 0 }, -- {"cputype", s_ignore, 0 }, -- {"reg", s_lsym, 0 }, /* Register equate, same as equ. */ -- {"sect", s_ignore, 0 }, /* Creation of coff sections. */ -- {"proc", s_ignore, 0 }, /* Start of a function. */ -- {"endproc", s_ignore, 0 }, /* Function end. */ -- {"word", cons, 4 }, -- {NULL, 0, 0 }, --}; -- --int md_short_jump_size = 4; --int md_long_jump_size = 4; -- --/* This array holds the chars that always start a comment. -- If the pre-processor is disabled, these aren't very useful. */ --const char comment_chars[] = "#"; -- --/* This array holds the chars that only start a comment at the beginning of -- a line. If the line seems to have the form '# 123 filename' -- .line and .file directives will appear in the pre-processed output. */ --/* Note that input_file.c hand checks for '#' at the beginning of the -- first line of the input file. This is because the compiler outputs -- #NO_APP at the beginning of its output. */ --/* Also note that comments like this one will always work. */ --const char line_comment_chars[] = "#"; -- --/* We needed an unused char for line separation to work around the -- lack of macros, using sed and such. */ --const char line_separator_chars[] = ";"; -- --/* Chars that can be used to separate mant from exp in floating point nums. */ --const char EXP_CHARS[] = "eE"; -- --/* Chars that mean this number is a floating point constant. -- As in 0f12.456 -- or 0d1.2345e12. */ --const char FLT_CHARS[] = "rRsSfFdDxXpP"; -- --/* "l.jalr r9" precalculated opcode. */ --static unsigned long jalr_r9_opcode; -- --static void machine_ip (char *); -- -- --/* Set bits in machine opcode according to insn->encoding -- description and passed operand. */ -- --static void --encode (const struct machine_opcode *insn, -- unsigned long *opcode, -- signed long param_val, -- char param_ch) --{ -- int opc_pos = 0; -- int param_pos = 0; -- char *enc; -- --#if DEBUG -- printf (" encode: opcode=%.8lx param_val=%.8lx abs=%.8lx param_ch=%c\n", -- *opcode, param_val, abs (param_val), param_ch); --#endif -- for (enc = insn->encoding; *enc != '\0'; enc++) -- if (*enc == param_ch) -- { -- if (enc - 2 >= insn->encoding && (*(enc - 2) == '0') && (*(enc - 1) == 'x')) -- continue; -- else -- param_pos ++; -- } -- -- opc_pos = 32; -- -- for (enc = insn->encoding; *enc != '\0';) -- { -- if ((*enc == '0') && (*(enc + 1) == 'x')) -- { -- int tmp = strtol (enc, NULL, 16); -- -- opc_pos -= 4; -- *opcode |= tmp << opc_pos; -- enc += 3; -- } -- else if ((*enc == '0') || (*enc == '-')) -- { -- opc_pos--; -- enc++; -- } -- else if (*enc == '1') -- { -- opc_pos--; -- *opcode |= 1 << opc_pos; -- enc++; -- } -- else if (*enc == param_ch) -- { -- opc_pos--; -- param_pos--; -- *opcode |= ((param_val >> param_pos) & 0x1) << opc_pos; -- enc++; -- } -- else if (ISALPHA (*enc)) -- { -- opc_pos--; -- enc++; -- } -- else -- enc++; -- } -- --#if DEBUG -- printf (" opcode=%.8lx\n", *opcode); --#endif --} -- --/* This function is called once, at assembler startup time. It should -- set up all the tables, etc., that the MD part of the assembler will -- need. */ -- --void --md_begin (void) --{ -- const char *retval = NULL; -- int lose = 0; -- int skipnext = 0; -- unsigned int i; -- -- /* Hash up all the opcodes for fast use later. */ -- op_hash = hash_new (); -- -- for (i = 0; i < or32_num_opcodes; i++) -- { -- const char *name = machine_opcodes[i].name; -- -- if (skipnext) -- { -- skipnext = 0; -- continue; -- } -- -- retval = hash_insert (op_hash, name, (void *) &machine_opcodes[i]); -- if (retval != NULL) -- { -- fprintf (stderr, "internal error: can't hash `%s': %s\n", -- machine_opcodes[i].name, retval); -- lose = 1; -- } -- } -- -- if (lose) -- as_fatal (_("Broken assembler. No assembly attempted.")); -- -- encode (&machine_opcodes[insn_index ("l.jalr")], &jalr_r9_opcode, 9, 'B'); --} -- --/* Returns non zero if instruction is to be used. */ -- --static int --check_invalid_opcode (unsigned long opcode) --{ -- return opcode == jalr_r9_opcode; --} -- --/* Assemble a single instruction. Its label has already been handled -- by the generic front end. We just parse opcode and operands, and -- produce the bytes of data and relocation. */ -- --void --md_assemble (char *str) --{ -- char *toP; -- --#if DEBUG -- printf ("NEW INSTRUCTION\n"); --#endif -- -- know (str); -- machine_ip (str); -- toP = frag_more (4); -- -- /* Put out the opcode. */ -- md_number_to_chars (toP, the_insn.opcode, 4); -- -- /* Put out the symbol-dependent stuff. */ -- if (the_insn.reloc != BFD_RELOC_NONE) -- { -- fix_new_exp (frag_now, -- (toP - frag_now->fr_literal + the_insn.reloc_offset), -- 4, /* size */ -- &the_insn.exp, -- the_insn.pcrel, -- the_insn.reloc); -- } --} -- --/* This is true of the we have issued a "lo(" or "hi"(. */ --static int waiting_for_shift = 0; -- --static int mask_or_shift = 0; -- --static char * --parse_operand (char *s, expressionS *operandp, int opt) --{ -- char *save = input_line_pointer; -- char *new_pointer; -- --#if DEBUG -- printf (" PROCESS NEW OPERAND(%s) == %c (%d)\n", s, opt ? opt : '!', opt); --#endif -- -- input_line_pointer = s; -- -- if (strncasecmp (s, "HI(", 3) == 0) -- { -- waiting_for_shift = 1; -- mask_or_shift = BFD_RELOC_HI16; -- -- input_line_pointer += 3; -- } -- else if (strncasecmp (s, "LO(", 3) == 0) -- { -- mask_or_shift = BFD_RELOC_LO16; -- -- input_line_pointer += 3; -- } -- else -- mask_or_shift = 0; -- -- if ((*s == '(') && (*(s+1) == 'r')) -- s++; -- -- if ((*s == 'r') && ISDIGIT (*(s + 1))) -- { -- operandp->X_add_number = strtol (s + 1, NULL, 10); -- operandp->X_op = O_register; -- for (; (*s != ',') && (*s != '\0');) -- s++; -- input_line_pointer = save; -- return s; -- } -- -- expression (operandp); -- -- if (operandp->X_op == O_absent) -- { -- if (! opt) -- as_bad (_("missing operand")); -- else -- { -- operandp->X_add_number = 0; -- operandp->X_op = O_constant; -- } -- } -- -- new_pointer = input_line_pointer; -- input_line_pointer = save; -- --#if DEBUG -- printf (" %s=parse_operand(%s): operandp->X_op = %u\n", new_pointer, s, -- operandp->X_op); --#endif -- -- return new_pointer; --} -- --/* Instruction parsing. Takes a string containing the opcode. -- Operands are at input_line_pointer. Output is in the_insn. -- Warnings or errors are generated. */ -- --static void --machine_ip (char *str) --{ -- char *s; -- const char *args; -- const struct machine_opcode *insn; -- unsigned long opcode; -- expressionS the_operand; -- expressionS *operand = &the_operand; -- unsigned int regno; -- int reloc = BFD_RELOC_NONE; -- --#if DEBUG -- printf ("machine_ip(%s)\n", str); --#endif -- -- s = str; -- for (; ISALNUM (*s) || *s == '.'; ++s) -- if (ISUPPER (*s)) -- *s = TOLOWER (*s); -- -- switch (*s) -- { -- case '\0': -- break; -- -- case ' ': /* FIXME-SOMEDAY more whitespace. */ -- *s++ = '\0'; -- break; -- -- default: -- as_bad (_("unknown opcode1: `%s'"), str); -- return; -- } -- -- if ((insn = (struct machine_opcode *) hash_find (op_hash, str)) == NULL) -- { -- as_bad (_("unknown opcode2 `%s'."), str); -- return; -- } -- -- opcode = 0; -- memset (&the_insn, '\0', sizeof (the_insn)); -- the_insn.reloc = BFD_RELOC_NONE; -- -- reloc = BFD_RELOC_NONE; -- -- /* Build the opcode, checking as we go to make sure that the -- operands match. -- -- If an operand matches, we modify the_insn or opcode appropriately, -- and do a "continue". If an operand fails to match, we "break". */ -- if (insn->args[0] != '\0') -- /* Prime the pump. */ -- s = parse_operand (s, operand, insn->args[0] == 'I'); -- -- for (args = insn->args;; ++args) -- { --#if DEBUG -- printf (" args = %s\n", args); --#endif -- switch (*args) -- { -- case '\0': /* End of args. */ -- /* We have have 0 args, do the bazoooka! */ -- if (args == insn->args) -- encode (insn, &opcode, 0, 0); -- -- if (*s == '\0') -- { -- /* We are truly done. */ -- the_insn.opcode = opcode; -- if (check_invalid_opcode (opcode)) -- as_bad (_("instruction not allowed: %s"), str); -- return; -- } -- as_bad (_("too many operands: %s"), s); -- break; -- -- case ',': /* Must match a comma. */ -- if (*s++ == ',') -- { -- reloc = BFD_RELOC_NONE; -- -- /* Parse next operand. */ -- s = parse_operand (s, operand, args[1] == 'I'); --#if DEBUG -- printf (" ',' case: operand->X_add_number = %d, *args = %s, *s = %s\n", -- operand->X_add_number, args, s); --#endif -- continue; -- } -- break; -- -- case '(': /* Must match a (. */ -- s = parse_operand (s, operand, args[1] == 'I'); -- continue; -- -- case ')': /* Must match a ). */ -- continue; -- -- case 'r': /* A general register. */ -- args++; -- -- if (operand->X_op != O_register) -- break; /* Only registers. */ -- -- know (operand->X_add_symbol == 0); -- know (operand->X_op_symbol == 0); -- regno = operand->X_add_number; -- encode (insn, &opcode, regno, *args); --#if DEBUG -- printf (" r: operand->X_op = %d\n", operand->X_op); --#endif -- continue; -- -- default: -- /* if (! ISALPHA (*args)) -- break; */ /* Only immediate values. */ -- -- if (mask_or_shift) -- { --#if DEBUG -- printf ("mask_or_shift = %d\n", mask_or_shift); --#endif -- reloc = mask_or_shift; -- } -- mask_or_shift = 0; -- -- if (strncasecmp (args, "LO(", 3) == 0) -- { --#if DEBUG -- printf ("reloc_const\n"); --#endif -- reloc = BFD_RELOC_LO16; -- } -- else if (strncasecmp (args, "HI(", 3) == 0) -- { --#if DEBUG -- printf ("reloc_consth\n"); --#endif -- reloc = BFD_RELOC_HI16; -- } -- -- if (*s == '(') -- operand->X_op = O_constant; -- else if (*s == ')') -- s += 1; --#if DEBUG -- printf (" default case: operand->X_add_number = %d, *args = %s, *s = %s\n", operand->X_add_number, args, s); --#endif -- if (operand->X_op == O_constant) -- { -- if (reloc == BFD_RELOC_NONE) -- { -- bfd_vma v, mask; -- -- mask = 0x3ffffff; -- v = abs (operand->X_add_number) & ~ mask; -- if (v) -- as_bad (_("call/jmp target out of range (1)")); -- } -- -- if (reloc == BFD_RELOC_HI16) -- operand->X_add_number = ((operand->X_add_number >> 16) & 0xffff); -- -- the_insn.pcrel = 0; -- encode (insn, &opcode, operand->X_add_number, *args); -- /* the_insn.reloc = BFD_RELOC_NONE; */ -- continue; -- } -- -- if (reloc == BFD_RELOC_NONE) -- the_insn.reloc = BFD_RELOC_32_GOT_PCREL; -- else -- the_insn.reloc = reloc; -- -- /* the_insn.reloc = insn->reloc; */ --#if DEBUG -- printf (" reloc sym=%d\n", the_insn.reloc); -- printf (" BFD_RELOC_NONE=%d\n", BFD_RELOC_NONE); --#endif -- the_insn.exp = *operand; -- -- /* the_insn.reloc_offset = 1; */ -- the_insn.pcrel = 1; /* Assume PC-relative jump. */ -- -- /* FIXME-SOON, Do we figure out whether abs later, after -- know sym val? */ -- if (reloc == BFD_RELOC_LO16 || reloc == BFD_RELOC_HI16) -- the_insn.pcrel = 0; -- -- encode (insn, &opcode, operand->X_add_number, *args); -- continue; -- } -- -- /* Types or values of args don't match. */ -- as_bad (_("invalid operands")); -- return; -- } --} -- --char * --md_atof (int type, char * litP, int * sizeP) --{ -- return ieee_md_atof (type, litP, sizeP, TRUE); --} -- --/* Write out big-endian. */ -- --void --md_number_to_chars (char *buf, valueT val, int n) --{ -- number_to_chars_bigendian (buf, val, n); --} -- --void --md_apply_fix (fixS * fixP, valueT * val, segT seg ATTRIBUTE_UNUSED) --{ -- char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; -- long t_val; -- -- t_val = (long) *val; -- --#if DEBUG -- printf ("md_apply_fix val:%x\n", t_val); --#endif -- -- fixP->fx_addnumber = t_val; /* Remember value for emit_reloc. */ -- -- switch (fixP->fx_r_type) -- { -- case BFD_RELOC_32: /* XXXXXXXX pattern in a word. */ --#if DEBUG -- printf ("reloc_const: val=%x\n", t_val); --#endif -- buf[0] = t_val >> 24; -- buf[1] = t_val >> 16; -- buf[2] = t_val >> 8; -- buf[3] = t_val; -- break; -- -- case BFD_RELOC_16: /* XXXX0000 pattern in a word. */ --#if DEBUG -- printf ("reloc_const: val=%x\n", t_val); --#endif -- buf[0] = t_val >> 8; -- buf[1] = t_val; -- break; -- -- case BFD_RELOC_8: /* XX000000 pattern in a word. */ --#if DEBUG -- printf ("reloc_const: val=%x\n", t_val); --#endif -- buf[0] = t_val; -- break; -- -- case BFD_RELOC_LO16: /* 0000XXXX pattern in a word. */ --#if DEBUG -- printf ("reloc_const: val=%x\n", t_val); --#endif -- buf[2] = t_val >> 8; /* Holds bits 0000XXXX. */ -- buf[3] = t_val; -- break; -- -- case BFD_RELOC_HI16: /* 0000XXXX pattern in a word. */ --#if DEBUG -- printf ("reloc_consth: val=%x\n", t_val); --#endif -- buf[2] = t_val >> 24; /* Holds bits XXXX0000. */ -- buf[3] = t_val >> 16; -- break; -- -- case BFD_RELOC_32_GOT_PCREL: /* 0000XXXX pattern in a word. */ -- if (!fixP->fx_done) -- ; -- else if (fixP->fx_pcrel) -- { -- long v = t_val >> 28; -- -- if (v != 0 && v != -1) -- as_bad_where (fixP->fx_file, fixP->fx_line, -- _("call/jmp target out of range (2)")); -- } -- else -- /* This case was supposed to be handled in machine_ip. */ -- abort (); -- -- buf[0] |= (t_val >> 26) & 0x03; /* Holds bits 0FFFFFFC of address. */ -- buf[1] = t_val >> 18; -- buf[2] = t_val >> 10; -- buf[3] = t_val >> 2; -- break; -- -- case BFD_RELOC_VTABLE_INHERIT: -- case BFD_RELOC_VTABLE_ENTRY: -- fixP->fx_done = 0; -- break; -- -- case BFD_RELOC_NONE: -- default: -- as_bad (_("bad relocation type: 0x%02x"), fixP->fx_r_type); -- break; -- } -- -- if (fixP->fx_addsy == (symbolS *) NULL) -- fixP->fx_done = 1; --} -- --/* Should never be called for or32. */ -- --void --md_create_short_jump (char * ptr ATTRIBUTE_UNUSED, -- addressT from_addr ATTRIBUTE_UNUSED, -- addressT to_addr ATTRIBUTE_UNUSED, -- fragS * frag ATTRIBUTE_UNUSED, -- symbolS * to_symbol ATTRIBUTE_UNUSED) --{ -- as_fatal ("or32_create_short_jmp\n"); --} -- --/* Should never be called for or32. */ -- --void --md_convert_frag (bfd * headers ATTRIBUTE_UNUSED, -- segT seg ATTRIBUTE_UNUSED, -- fragS * fragP ATTRIBUTE_UNUSED) --{ -- as_fatal ("or32_convert_frag\n"); --} -- --/* Should never be called for or32. */ -- --void --md_create_long_jump (char * ptr ATTRIBUTE_UNUSED, -- addressT from_addr ATTRIBUTE_UNUSED, -- addressT to_addr ATTRIBUTE_UNUSED, -- fragS * frag ATTRIBUTE_UNUSED, -- symbolS * to_symbol ATTRIBUTE_UNUSED) --{ -- as_fatal ("or32_create_long_jump\n"); --} -- --/* Should never be called for or32. */ -- --int --md_estimate_size_before_relax (fragS * fragP ATTRIBUTE_UNUSED, -- segT segtype ATTRIBUTE_UNUSED) --{ -- as_fatal ("or32_estimate_size_before_relax\n"); -- return 0; --} -- --/* Translate internal representation of relocation info to target format. -- -- On sparc/29k: first 4 bytes are normal unsigned long address, next three -- bytes are index, most sig. byte first. Byte 7 is broken up with -- bit 7 as external, bits 6 & 5 unused, and the lower -- five bits as relocation type. Next 4 bytes are long addend. */ --/* Thanx and a tip of the hat to Michael Bloom, mb@ttidca.tti.com. */ -- --#ifdef OBJ_AOUT --void --tc_aout_fix_to_chars (char *where, -- fixS *fixP, -- relax_addressT segment_address_in_file) --{ -- long r_symbolnum; -- --#if DEBUG -- printf ("tc_aout_fix_to_chars\n"); --#endif -- -- know (fixP->fx_r_type < BFD_RELOC_NONE); -- know (fixP->fx_addsy != NULL); -- -- md_number_to_chars -- (where, -- fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file, -- 4); -- -- r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy) -- ? S_GET_TYPE (fixP->fx_addsy) -- : fixP->fx_addsy->sy_number); -- -- where[4] = (r_symbolnum >> 16) & 0x0ff; -- where[5] = (r_symbolnum >> 8) & 0x0ff; -- where[6] = r_symbolnum & 0x0ff; -- where[7] = (((!S_IS_DEFINED (fixP->fx_addsy)) << 7) & 0x80) | (0 & 0x60) | (fixP->fx_r_type & 0x1F); -- -- /* Also easy. */ -- md_number_to_chars (&where[8], fixP->fx_addnumber, 4); --} -- --#endif /* OBJ_AOUT */ -- --const char *md_shortopts = ""; -- --struct option md_longopts[] = --{ -- { NULL, no_argument, NULL, 0 } --}; --size_t md_longopts_size = sizeof (md_longopts); -- --int --md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED) --{ -- return 0; --} -- --void --md_show_usage (FILE * stream ATTRIBUTE_UNUSED) --{ --} -- --/* This is called when a line is unrecognized. This is used to handle -- definitions of or32 style local labels. */ -- --int --or32_unrecognized_line (int c) --{ -- int lab; -- char *s; -- -- if (c != '$' -- || ! ISDIGIT ((unsigned char) input_line_pointer[0])) -- return 0; -- -- s = input_line_pointer; -- -- lab = 0; -- while (ISDIGIT ((unsigned char) *s)) -- { -- lab = lab * 10 + *s - '0'; -- ++s; -- } -- -- if (*s != ':') -- /* Not a label definition. */ -- return 0; -- -- if (dollar_label_defined (lab)) -- { -- as_bad (_("label \"$%d\" redefined"), lab); -- return 0; -- } -- -- define_dollar_label (lab); -- colon (dollar_label_name (lab, 0)); -- input_line_pointer = s + 1; -- -- return 1; --} -- --/* Default the values of symbols known that should be "predefined". We -- don't bother to predefine them unless you actually use one, since there -- are a lot of them. */ -- --symbolS * --md_undefined_symbol (char *name ATTRIBUTE_UNUSED) --{ -- return NULL; --} -- --/* Parse an operand that is machine-specific. */ -- --void --md_operand (expressionS *expressionP) --{ --#if DEBUG -- printf (" md_operand(input_line_pointer = %s)\n", input_line_pointer); --#endif -- -- if (input_line_pointer[0] == REGISTER_PREFIX && input_line_pointer[1] == 'r') -- { -- /* We have a numeric register expression. No biggy. */ -- input_line_pointer += 2; /* Skip %r */ -- (void) expression (expressionP); -- -- if (expressionP->X_op != O_constant -- || expressionP->X_add_number > 255) -- as_bad (_("Invalid expression after %%%%\n")); -- expressionP->X_op = O_register; -- } -- else if (input_line_pointer[0] == '&') -- { -- /* We are taking the 'address' of a register...this one is not -- in the manual, but it *is* in traps/fpsymbol.h! What they -- seem to want is the register number, as an absolute number. */ -- input_line_pointer++; /* Skip & */ -- (void) expression (expressionP); -- -- if (expressionP->X_op != O_register) -- as_bad (_("invalid register in & expression")); -- else -- expressionP->X_op = O_constant; -- } -- else if (input_line_pointer[0] == '$' -- && ISDIGIT ((unsigned char) input_line_pointer[1])) -- { -- long lab; -- char *name; -- symbolS *sym; -- -- /* This is a local label. */ -- ++input_line_pointer; -- lab = (long) get_absolute_expression (); -- -- if (dollar_label_defined (lab)) -- { -- name = dollar_label_name (lab, 0); -- sym = symbol_find (name); -- } -- else -- { -- name = dollar_label_name (lab, 1); -- sym = symbol_find_or_make (name); -- } -- -- expressionP->X_op = O_symbol; -- expressionP->X_add_symbol = sym; -- expressionP->X_add_number = 0; -- } -- else if (input_line_pointer[0] == '$') -- { -- char *s; -- char type; -- int fieldnum, fieldlimit; -- LITTLENUM_TYPE floatbuf[8]; -- -- /* $float(), $doubleN(), or $extendN() convert floating values -- to integers. */ -- s = input_line_pointer; -- -- ++s; -- -- fieldnum = 0; -- if (strncmp (s, "double", sizeof "double" - 1) == 0) -- { -- s += sizeof "double" - 1; -- type = 'd'; -- fieldlimit = 2; -- } -- else if (strncmp (s, "float", sizeof "float" - 1) == 0) -- { -- s += sizeof "float" - 1; -- type = 'f'; -- fieldlimit = 1; -- } -- else if (strncmp (s, "extend", sizeof "extend" - 1) == 0) -- { -- s += sizeof "extend" - 1; -- type = 'x'; -- fieldlimit = 4; -- } -- else -- return; -- -- if (ISDIGIT (*s)) -- { -- fieldnum = *s - '0'; -- ++s; -- } -- if (fieldnum >= fieldlimit) -- return; -- -- SKIP_WHITESPACE (); -- if (*s != '(') -- return; -- ++s; -- SKIP_WHITESPACE (); -- -- s = atof_ieee (s, type, floatbuf); -- if (s == NULL) -- return; -- s = s; -- -- SKIP_WHITESPACE (); -- if (*s != ')') -- return; -- ++s; -- SKIP_WHITESPACE (); -- -- input_line_pointer = s; -- expressionP->X_op = O_constant; -- expressionP->X_unsigned = 1; -- expressionP->X_add_number = ((floatbuf[fieldnum * 2] -- << LITTLENUM_NUMBER_OF_BITS) -- + floatbuf[fieldnum * 2 + 1]); -- } --} -- --/* Round up a section size to the appropriate boundary. */ -- --valueT --md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size ATTRIBUTE_UNUSED) --{ -- return size; /* Byte alignment is fine. */ --} -- --/* Exactly what point is a PC-relative offset relative TO? -- On the 29000, they're relative to the address of the instruction, -- which we have set up as the address of the fixup too. */ -- --long --md_pcrel_from (fixS *fixP) --{ -- return fixP->fx_where + fixP->fx_frag->fr_address; --} -- --/* Generate a reloc for a fixup. */ -- --arelent * --tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp) --{ -- arelent *reloc; -- -- reloc = xmalloc (sizeof (arelent)); -- reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); -- *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); -- reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; -- /* reloc->address = fixp->fx_frag->fr_address + fixp->fx_where + fixp->fx_addnumber;*/ -- reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); -- -- if (reloc->howto == (reloc_howto_type *) NULL) -- { -- as_bad_where (fixp->fx_file, fixp->fx_line, -- _("reloc %d not supported by object file format"), -- (int) fixp->fx_r_type); -- return NULL; -- } -- -- if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) -- reloc->address = fixp->fx_offset; -- -- reloc->addend = fixp->fx_addnumber; -- return reloc; --} -diff -rNU3 dist.orig/gas/config/tc-or32.h dist/gas/config/tc-or32.h ---- dist.orig/gas/config/tc-or32.h 2007-07-03 13:01:04.000000000 +0200 -+++ dist/gas/config/tc-or32.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,56 +0,0 @@ --/* tc-or32.h -- Assemble for the OpenRISC 1000. -- Copyright (C) 2002, 2003. 2005, 2007 Free Software Foundation, Inc. -- Contributed by Damjan Lampret . -- Based upon a29k port. -- -- This file is part of GAS, the GNU Assembler. -- -- GAS 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, or (at your option) -- any later version. -- -- GAS 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 GAS; see the file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street - Fifth Floor, -- Boston, MA 02110-1301, USA. */ -- --#define TC_OR32 -- --#define TARGET_BYTES_BIG_ENDIAN 1 -- --#define LEX_DOLLAR 1 -- --#ifdef OBJ_ELF --#define TARGET_FORMAT "elf32-or32" --#define TARGET_ARCH bfd_arch_or32 --#endif -- --#ifdef OBJ_COFF --#define TARGET_FORMAT "coff-or32-big" --#define reloc_type int --#endif -- --#define tc_unrecognized_line(c) or32_unrecognized_line (c) -- --extern int or32_unrecognized_line (int); -- --#define tc_coff_symbol_emit_hook(a) ; /* Not used. */ -- --#define COFF_MAGIC SIPFBOMAGIC -- --/* No shared lib support, so we don't need to ensure externally -- visible symbols can be overridden. */ --#define EXTERN_FORCE_RELOC 0 -- --#ifdef OBJ_ELF --/* Values passed to md_apply_fix don't include the symbol value. */ --#define MD_APPLY_SYM_VALUE(FIX) 0 --#endif -- --#define ZERO_BASED_SEGMENTS -diff -rNU3 dist.orig/gas/config/tc-riscv.c dist/gas/config/tc-riscv.c ---- dist.orig/gas/config/tc-riscv.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/tc-riscv.c 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,2225 @@ -+/* tc-riscv.c -- RISC-V assembler -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ This file is part of GAS. -+ -+ GAS 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, or (at your option) -+ any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#include "as.h" -+#include "config.h" -+#include "subsegs.h" -+#include "safe-ctype.h" -+ -+#include "itbl-ops.h" -+#include "dwarf2dbg.h" -+#include "dw2gencfi.h" -+ -+#include "elf/riscv.h" -+#include "opcode/riscv.h" -+ -+#include -+#include -+ -+/* Information about an instruction, including its format, operands -+ and fixups. */ -+struct riscv_cl_insn -+{ -+ /* The opcode's entry in riscv_opcodes. */ -+ const struct riscv_opcode *insn_mo; -+ -+ /* The encoded instruction bits. */ -+ insn_t insn_opcode; -+ -+ /* The frag that contains the instruction. */ -+ struct frag *frag; -+ -+ /* The offset into FRAG of the first instruction byte. */ -+ long where; -+ -+ /* The relocs associated with the instruction, if any. */ -+ fixS *fixp; -+}; -+ -+bfd_boolean rv64 = TRUE; /* RV64 (true) or RV32 (false) */ -+#define LOAD_ADDRESS_INSN (rv64 ? "ld" : "lw") -+#define ADD32_INSN (rv64 ? "addiw" : "addi") -+ -+struct riscv_subset -+{ -+ const char* name; -+ int version_major; -+ int version_minor; -+ -+ struct riscv_subset* next; -+}; -+ -+static struct riscv_subset* riscv_subsets; -+ -+static int -+riscv_subset_supports(const char* feature) -+{ -+ struct riscv_subset* s; -+ bfd_boolean rv64_insn; -+ -+ if ((rv64_insn = !strncmp(feature, "64", 2)) || !strncmp(feature, "32", 2)) -+ { -+ if (rv64 != rv64_insn) -+ return 0; -+ feature += 2; -+ } -+ -+ for (s = riscv_subsets; s != NULL; s = s->next) -+ if (strcmp(s->name, feature) == 0) -+ /* FIXME: once we support version numbers: -+ return major == s->version_major && minor <= s->version_minor; */ -+ return 1; -+ -+ return 0; -+} -+ -+static void -+riscv_add_subset(const char* subset) -+{ -+ struct riscv_subset* s = xmalloc(sizeof(struct riscv_subset)); -+ s->name = xstrdup(subset); -+ s->version_major = 1; -+ s->version_minor = 0; -+ s->next = riscv_subsets; -+ riscv_subsets = s; -+} -+ -+static void -+riscv_set_arch(const char* arg) -+{ -+ /* Formally, ISA subset names begin with RV, RV32, or RV64, but we allow the -+ prefix to be omitted. We also allow all-lowercase names if version -+ numbers and eXtensions are omitted (i.e. only some combination of imafd -+ is supported in this case). -+ -+ FIXME: Version numbers are not supported yet. */ -+ const char* subsets = "IMAFD"; -+ const char* p; -+ -+ for (p = arg; *p; p++) -+ if (!ISLOWER(*p) || strchr(subsets, TOUPPER(*p)) == NULL) -+ break; -+ -+ if (!*p) -+ { -+ /* Legal all-lowercase name. */ -+ for (p = arg; *p; p++) -+ { -+ char subset[2] = {TOUPPER(*p), 0}; -+ riscv_add_subset(subset); -+ } -+ return; -+ } -+ -+ if (strncmp(arg, "RV32", 4) == 0) -+ { -+ rv64 = FALSE; -+ arg += 4; -+ } -+ else if (strncmp(arg, "RV64", 4) == 0) -+ { -+ rv64 = TRUE; -+ arg += 4; -+ } -+ else if (strncmp(arg, "RV", 2) == 0) -+ arg += 2; -+ -+ if (*arg && *arg != 'I') -+ as_fatal("`I' must be the first ISA subset name specified (got %c)", *arg); -+ -+ for (p = arg; *p; p++) -+ { -+ if (*p == 'X') -+ { -+ const char* q = p+1; -+ while (ISLOWER(*q)) -+ q++; -+ -+ char subset[q-p+1]; -+ memcpy(subset, p, q-p); -+ subset[q-p] = 0; -+ -+ riscv_add_subset(subset); -+ p = q-1; -+ } -+ else if (strchr(subsets, *p) != NULL) -+ { -+ char subset[2] = {*p, 0}; -+ riscv_add_subset(subset); -+ } -+ else -+ as_fatal("unsupported ISA subset %c", *p); -+ } -+} -+ -+/* This is the set of options which may be modified by the .set -+ pseudo-op. We use a struct so that .set push and .set pop are more -+ reliable. */ -+ -+struct riscv_set_options -+{ -+ /* Generate position-independent code. */ -+ int pic; -+ /* Generate RVC code. */ -+ int rvc; -+}; -+ -+static struct riscv_set_options riscv_opts = -+{ -+ 0, /* pic */ -+ 0, /* rvc */ -+}; -+ -+/* handle of the OPCODE hash table */ -+static struct hash_control *op_hash = NULL; -+ -+/* This array holds the chars that always start a comment. If the -+ pre-processor is disabled, these aren't very useful */ -+const char comment_chars[] = "#"; -+ -+/* This array holds the chars that only start a comment at the beginning of -+ a line. If the line seems to have the form '# 123 filename' -+ .line and .file directives will appear in the pre-processed output */ -+/* Note that input_file.c hand checks for '#' at the beginning of the -+ first line of the input file. This is because the compiler outputs -+ #NO_APP at the beginning of its output. */ -+/* Also note that C style comments are always supported. */ -+const char line_comment_chars[] = "#"; -+ -+/* This array holds machine specific line separator characters. */ -+const char line_separator_chars[] = ";"; -+ -+/* Chars that can be used to separate mant from exp in floating point nums */ -+const char EXP_CHARS[] = "eE"; -+ -+/* Chars that mean this number is a floating point constant */ -+/* As in 0f12.456 */ -+/* or 0d1.2345e12 */ -+const char FLT_CHARS[] = "rRsSfFdDxXpP"; -+ -+/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be -+ changed in read.c . Ideally it shouldn't have to know about it at all, -+ but nothing is ideal around here. -+ */ -+ -+static char *insn_error; -+ -+#define RELAX_BRANCH_ENCODE(uncond, toofar) \ -+ ((relax_substateT) \ -+ (0xc0000000 \ -+ | ((toofar) ? 1 : 0) \ -+ | ((uncond) ? 2 : 0))) -+#define RELAX_BRANCH_P(i) (((i) & 0xf0000000) == 0xc0000000) -+#define RELAX_BRANCH_TOOFAR(i) (((i) & 1) != 0) -+#define RELAX_BRANCH_UNCOND(i) (((i) & 2) != 0) -+ -+/* Is the given value a sign-extended 32-bit value? */ -+#define IS_SEXT_32BIT_NUM(x) \ -+ (((x) &~ (offsetT) 0x7fffffff) == 0 \ -+ || (((x) &~ (offsetT) 0x7fffffff) == ~ (offsetT) 0x7fffffff)) -+ -+#define IS_SEXT_NBIT_NUM(x,n) \ -+ ({ int64_t __tmp = (x); \ -+ __tmp = (__tmp << (64-(n))) >> (64-(n)); \ -+ __tmp == (x); }) -+ -+/* Is the given value a zero-extended 32-bit value? Or a negated one? */ -+#define IS_ZEXT_32BIT_NUM(x) \ -+ (((x) &~ (offsetT) 0xffffffff) == 0 \ -+ || (((x) &~ (offsetT) 0xffffffff) == ~ (offsetT) 0xffffffff)) -+ -+/* Replace bits MASK << SHIFT of STRUCT with the equivalent bits in -+ VALUE << SHIFT. VALUE is evaluated exactly once. */ -+#define INSERT_BITS(STRUCT, VALUE, MASK, SHIFT) \ -+ (STRUCT) = (((STRUCT) & ~((insn_t)(MASK) << (SHIFT))) \ -+ | ((insn_t)((VALUE) & (MASK)) << (SHIFT))) -+ -+/* Extract bits MASK << SHIFT from STRUCT and shift them right -+ SHIFT places. */ -+#define EXTRACT_BITS(STRUCT, MASK, SHIFT) \ -+ (((STRUCT) >> (SHIFT)) & (MASK)) -+ -+/* Change INSN's opcode so that the operand given by FIELD has value VALUE. -+ INSN is a riscv_cl_insn structure and VALUE is evaluated exactly once. */ -+#define INSERT_OPERAND(FIELD, INSN, VALUE) \ -+ INSERT_BITS ((INSN).insn_opcode, VALUE, OP_MASK_##FIELD, OP_SH_##FIELD) -+ -+/* Extract the operand given by FIELD from riscv_cl_insn INSN. */ -+#define EXTRACT_OPERAND(FIELD, INSN) \ -+ EXTRACT_BITS ((INSN).insn_opcode, OP_MASK_##FIELD, OP_SH_##FIELD) -+ -+/* Determine if an instruction matches an opcode. */ -+#define OPCODE_MATCHES(OPCODE, OP) \ -+ (((OPCODE) & MASK_##OP) == MATCH_##OP) -+ -+#define INSN_MATCHES(INSN, OP) \ -+ (((INSN).insn_opcode & MASK_##OP) == MATCH_##OP) -+ -+/* Prototypes for static functions. */ -+ -+#define internalError() \ -+ as_fatal (_("internal Error, line %d, %s"), __LINE__, __FILE__) -+ -+static char *expr_end; -+ -+/* Expressions which appear in instructions. These are set by -+ riscv_ip. */ -+ -+static expressionS imm_expr; -+static expressionS offset_expr; -+ -+/* Relocs associated with imm_expr and offset_expr. */ -+ -+static bfd_reloc_code_real_type imm_reloc = BFD_RELOC_UNUSED; -+static bfd_reloc_code_real_type offset_reloc = BFD_RELOC_UNUSED; -+ -+/* The default target format to use. */ -+ -+const char * -+riscv_target_format (void) -+{ -+ return rv64 ? "elf64-littleriscv" : "elf32-littleriscv"; -+} -+ -+/* Return the length of instruction INSN. */ -+ -+static inline unsigned int -+insn_length (const struct riscv_cl_insn *insn) -+{ -+ return riscv_insn_length (insn->insn_opcode); -+} -+ -+/* Initialise INSN from opcode entry MO. Leave its position unspecified. */ -+ -+static void -+create_insn (struct riscv_cl_insn *insn, const struct riscv_opcode *mo) -+{ -+ insn->insn_mo = mo; -+ insn->insn_opcode = mo->match; -+ insn->frag = NULL; -+ insn->where = 0; -+ insn->fixp = NULL; -+} -+ -+/* Install INSN at the location specified by its "frag" and "where" fields. */ -+ -+static void -+install_insn (const struct riscv_cl_insn *insn) -+{ -+ char *f = insn->frag->fr_literal + insn->where; -+ md_number_to_chars (f, insn->insn_opcode, insn_length(insn)); -+} -+ -+/* Move INSN to offset WHERE in FRAG. Adjust the fixups accordingly -+ and install the opcode in the new location. */ -+ -+static void -+move_insn (struct riscv_cl_insn *insn, fragS *frag, long where) -+{ -+ insn->frag = frag; -+ insn->where = where; -+ if (insn->fixp != NULL) -+ { -+ insn->fixp->fx_frag = frag; -+ insn->fixp->fx_where = where; -+ } -+ install_insn (insn); -+} -+ -+/* Add INSN to the end of the output. */ -+ -+static void -+add_fixed_insn (struct riscv_cl_insn *insn) -+{ -+ char *f = frag_more (insn_length (insn)); -+ move_insn (insn, frag_now, f - frag_now->fr_literal); -+} -+ -+static void -+add_relaxed_insn (struct riscv_cl_insn *insn, int max_chars, int var, -+ relax_substateT subtype, symbolS *symbol, offsetT offset) -+{ -+ frag_grow (max_chars); -+ move_insn (insn, frag_now, frag_more (0) - frag_now->fr_literal); -+ frag_var (rs_machine_dependent, max_chars, var, -+ subtype, symbol, offset, NULL); -+} -+ -+/* Compute the length of a branch sequence, and adjust the -+ RELAX_BRANCH_TOOFAR bit accordingly. If FRAGP is NULL, the -+ worst-case length is computed. */ -+static int -+relaxed_branch_length (fragS *fragp, asection *sec, int update) -+{ -+ bfd_boolean toofar = TRUE; -+ -+ if (fragp) -+ { -+ bfd_boolean uncond = RELAX_BRANCH_UNCOND (fragp->fr_subtype); -+ -+ if (S_IS_DEFINED (fragp->fr_symbol) -+ && sec == S_GET_SEGMENT (fragp->fr_symbol)) -+ { -+ offsetT val = S_GET_VALUE (fragp->fr_symbol) + fragp->fr_offset; -+ bfd_vma range; -+ val -= fragp->fr_address + fragp->fr_fix; -+ -+ if (uncond) -+ range = RISCV_JUMP_REACH; -+ else -+ range = RISCV_BRANCH_REACH; -+ toofar = (bfd_vma)(val + range/2) >= range; -+ } -+ -+ if (update && toofar != RELAX_BRANCH_TOOFAR (fragp->fr_subtype)) -+ fragp->fr_subtype = RELAX_BRANCH_ENCODE (uncond, toofar); -+ } -+ -+ return toofar ? 8 : 4; -+} -+ -+struct regname { -+ const char *name; -+ unsigned int num; -+}; -+ -+enum reg_class { -+ RCLASS_GPR, -+ RCLASS_FPR, -+ RCLASS_CSR, -+ RCLASS_VEC_GPR, -+ RCLASS_VEC_FPR, -+ RCLASS_MAX -+}; -+ -+static struct hash_control *reg_names_hash = NULL; -+ -+#define ENCODE_REG_HASH(cls, n) (void*)(uintptr_t)((n)*RCLASS_MAX + (cls) + 1) -+#define DECODE_REG_CLASS(hash) (((uintptr_t)(hash) - 1) % RCLASS_MAX) -+#define DECODE_REG_NUM(hash) (((uintptr_t)(hash) - 1) / RCLASS_MAX) -+ -+static void -+hash_reg_name (enum reg_class class, const char *name, unsigned n) -+{ -+ void *hash = ENCODE_REG_HASH (class, n); -+ const char *retval = hash_insert (reg_names_hash, name, hash); -+ if (retval != NULL) -+ as_fatal (_("internal error: can't hash `%s': %s"), name, retval); -+} -+ -+static void -+hash_reg_names (enum reg_class class, const char * const names[], unsigned n) -+{ -+ unsigned i; -+ for (i = 0; i < n; i++) -+ hash_reg_name (class, names[i], i); -+} -+ -+static unsigned int -+reg_lookup_internal (const char *s, enum reg_class class) -+{ -+ struct regname *r = (struct regname *) hash_find (reg_names_hash, s); -+ if (r == NULL || DECODE_REG_CLASS (r) != class) -+ return -1; -+ return DECODE_REG_NUM (r); -+} -+ -+static int -+reg_lookup (char **s, enum reg_class class, unsigned int *regnop) -+{ -+ char *e; -+ char save_c; -+ int reg = -1; -+ -+ /* Find end of name. */ -+ e = *s; -+ if (is_name_beginner (*e)) -+ ++e; -+ while (is_part_of_name (*e)) -+ ++e; -+ -+ /* Terminate name. */ -+ save_c = *e; -+ *e = '\0'; -+ -+ /* Look for the register. Advance to next token if one was recognized. */ -+ if ((reg = reg_lookup_internal (*s, class)) >= 0) -+ *s = e; -+ -+ *e = save_c; -+ if (regnop) -+ *regnop = reg; -+ return reg >= 0; -+} -+ -+static int -+arg_lookup(char **s, const char* const* array, size_t size, unsigned *regnop) -+{ -+ const char *p = strchr(*s, ','); -+ size_t i, len = p ? (size_t)(p - *s) : strlen(*s); -+ -+ for (i = 0; i < size; i++) -+ if (array[i] != NULL && strncmp(array[i], *s, len) == 0) -+ { -+ *regnop = i; -+ *s += len; -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* For consistency checking, verify that all bits are specified either -+ by the match/mask part of the instruction definition, or by the -+ operand list. */ -+static int -+validate_riscv_insn (const struct riscv_opcode *opc) -+{ -+ const char *p = opc->args; -+ char c; -+ insn_t required_bits, used_bits = opc->mask; -+ -+ if ((used_bits & opc->match) != opc->match) -+ { -+ as_bad (_("internal: bad RISC-V opcode (mask error): %s %s"), -+ opc->name, opc->args); -+ return 0; -+ } -+ required_bits = ((insn_t)1 << (8 * riscv_insn_length (opc->match))) - 1; -+ /* Work around for undefined behavior of uint64_t << 64 */ -+ if(riscv_insn_length (opc->match) == 8) -+ required_bits = 0xffffffffffffffff; -+ -+#define USE_BITS(mask,shift) (used_bits |= ((insn_t)(mask) << (shift))) -+ while (*p) -+ switch (c = *p++) -+ { -+ /* Xcustom */ -+ case '^': -+ switch (c = *p++) -+ { -+ case 'd': USE_BITS (OP_MASK_RD, OP_SH_RD); break; -+ case 's': USE_BITS (OP_MASK_RS1, OP_SH_RS1); break; -+ case 't': USE_BITS (OP_MASK_RS2, OP_SH_RS2); break; -+ case 'j': USE_BITS (OP_MASK_CUSTOM_IMM, OP_SH_CUSTOM_IMM); break; -+ } -+ break; -+ /* Xhwacha */ -+ case '#': -+ switch (c = *p++) -+ { -+ case 'g': USE_BITS (OP_MASK_IMMNGPR, OP_SH_IMMNGPR); break; -+ case 'f': USE_BITS (OP_MASK_IMMNFPR, OP_SH_IMMNFPR); break; -+ case 'n': USE_BITS (OP_MASK_IMMSEGNELM, OP_SH_IMMSEGNELM); break; -+ case 'd': USE_BITS (OP_MASK_VRD, OP_SH_VRD); break; -+ case 's': USE_BITS (OP_MASK_VRS, OP_SH_VRS); break; -+ case 't': USE_BITS (OP_MASK_VRT, OP_SH_VRT); break; -+ case 'r': USE_BITS (OP_MASK_VRR, OP_SH_VRR); break; -+ case 'D': USE_BITS (OP_MASK_VFD, OP_SH_VFD); break; -+ case 'S': USE_BITS (OP_MASK_VFS, OP_SH_VFS); break; -+ case 'T': USE_BITS (OP_MASK_VFT, OP_SH_VFT); break; -+ case 'R': USE_BITS (OP_MASK_VFR, OP_SH_VFR); break; -+ -+ default: -+ as_bad (_("internal: bad RISC-V opcode (unknown extension operand type `#%c'): %s %s"), -+ c, opc->name, opc->args); -+ return 0; -+ } -+ break; -+ case ',': break; -+ case '(': break; -+ case ')': break; -+ case '<': USE_BITS (OP_MASK_SHAMTW, OP_SH_SHAMTW); break; -+ case '>': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break; -+ case 'A': break; -+ case 'D': USE_BITS (OP_MASK_RD, OP_SH_RD); break; -+ case 'Z': USE_BITS (OP_MASK_RS1, OP_SH_RS1); break; -+ case 'E': USE_BITS (OP_MASK_CSR, OP_SH_CSR); break; -+ case 'I': break; -+ case 'R': USE_BITS (OP_MASK_RS3, OP_SH_RS3); break; -+ case 'S': USE_BITS (OP_MASK_RS1, OP_SH_RS1); break; -+ case 'U': USE_BITS (OP_MASK_RS1, OP_SH_RS1); /* fallthru */ -+ case 'T': USE_BITS (OP_MASK_RS2, OP_SH_RS2); break; -+ case 'd': USE_BITS (OP_MASK_RD, OP_SH_RD); break; -+ case 'm': USE_BITS (OP_MASK_RM, OP_SH_RM); break; -+ case 's': USE_BITS (OP_MASK_RS1, OP_SH_RS1); break; -+ case 't': USE_BITS (OP_MASK_RS2, OP_SH_RS2); break; -+ case 'P': USE_BITS (OP_MASK_PRED, OP_SH_PRED); break; -+ case 'Q': USE_BITS (OP_MASK_SUCC, OP_SH_SUCC); break; -+ case 'o': -+ case 'j': used_bits |= ENCODE_ITYPE_IMM(-1U); break; -+ case 'a': used_bits |= ENCODE_UJTYPE_IMM(-1U); break; -+ case 'p': used_bits |= ENCODE_SBTYPE_IMM(-1U); break; -+ case 'q': used_bits |= ENCODE_STYPE_IMM(-1U); break; -+ case 'u': used_bits |= ENCODE_UTYPE_IMM(-1U); break; -+ case '[': break; -+ case ']': break; -+ case '0': break; -+ default: -+ as_bad (_("internal: bad RISC-V opcode (unknown operand type `%c'): %s %s"), -+ c, opc->name, opc->args); -+ return 0; -+ } -+#undef USE_BITS -+ if (used_bits != required_bits) -+ { -+ as_bad (_("internal: bad RISC-V opcode (bits 0x%lx undefined): %s %s"), -+ ~(long)(used_bits & required_bits), opc->name, opc->args); -+ return 0; -+ } -+ return 1; -+} -+ -+struct percent_op_match -+{ -+ const char *str; -+ bfd_reloc_code_real_type reloc; -+}; -+ -+/* This function is called once, at assembler startup time. It should set up -+ all the tables, etc. that the MD part of the assembler will need. */ -+ -+void -+md_begin (void) -+{ -+ const char *retval = NULL; -+ int i = 0; -+ -+ if (! bfd_set_arch_mach (stdoutput, bfd_arch_riscv, 0)) -+ as_warn (_("Could not set architecture and machine")); -+ -+ op_hash = hash_new (); -+ -+ for (i = 0; i < NUMOPCODES;) -+ { -+ const char *name = riscv_opcodes[i].name; -+ -+ if (riscv_subset_supports(riscv_opcodes[i].subset)) -+ retval = hash_insert (op_hash, name, (void *) &riscv_opcodes[i]); -+ -+ if (retval != NULL) -+ { -+ fprintf (stderr, _("internal error: can't hash `%s': %s\n"), -+ riscv_opcodes[i].name, retval); -+ /* Probably a memory allocation problem? Give up now. */ -+ as_fatal (_("Broken assembler. No assembly attempted.")); -+ } -+ do -+ { -+ if (riscv_opcodes[i].pinfo != INSN_MACRO) -+ { -+ if (!validate_riscv_insn (&riscv_opcodes[i])) -+ as_fatal (_("Broken assembler. No assembly attempted.")); -+ } -+ ++i; -+ } -+ while ((i < NUMOPCODES) && !strcmp (riscv_opcodes[i].name, name)); -+ } -+ -+ reg_names_hash = hash_new (); -+ hash_reg_names (RCLASS_GPR, riscv_gpr_names_numeric, NGPR); -+ hash_reg_names (RCLASS_GPR, riscv_gpr_names_abi, NGPR); -+ hash_reg_names (RCLASS_FPR, riscv_fpr_names_numeric, NFPR); -+ hash_reg_names (RCLASS_FPR, riscv_fpr_names_abi, NFPR); -+ hash_reg_names (RCLASS_VEC_GPR, riscv_vec_gpr_names, NVGPR); -+ hash_reg_names (RCLASS_VEC_FPR, riscv_vec_fpr_names, NVFPR); -+ -+#define DECLARE_CSR(name, num) hash_reg_name (RCLASS_CSR, #name, num); -+#include "opcode/riscv-opc.h" -+#undef DECLARE_CSR -+ -+ /* set the default alignment for the text section (2**2) */ -+ record_alignment (text_section, 2); -+} -+ -+/* Output an instruction. IP is the instruction information. -+ ADDRESS_EXPR is an operand of the instruction to be used with -+ RELOC_TYPE. */ -+ -+static void -+append_insn (struct riscv_cl_insn *ip, expressionS *address_expr, -+ bfd_reloc_code_real_type reloc_type) -+{ -+#ifdef OBJ_ELF -+ dwarf2_emit_insn (0); -+#endif -+ -+ gas_assert(reloc_type <= BFD_RELOC_UNUSED); -+ -+ if (address_expr != NULL) -+ { -+ if (address_expr->X_op == O_constant) -+ { -+ switch (reloc_type) -+ { -+ case BFD_RELOC_32: -+ ip->insn_opcode |= address_expr->X_add_number; -+ break; -+ -+ case BFD_RELOC_RISCV_HI20: -+ ip->insn_opcode |= ENCODE_UTYPE_IMM ( -+ RISCV_CONST_HIGH_PART (address_expr->X_add_number)); -+ break; -+ -+ case BFD_RELOC_RISCV_LO12_S: -+ ip->insn_opcode |= ENCODE_STYPE_IMM (address_expr->X_add_number); -+ break; -+ -+ case BFD_RELOC_UNUSED: -+ case BFD_RELOC_RISCV_LO12_I: -+ ip->insn_opcode |= ENCODE_ITYPE_IMM (address_expr->X_add_number); -+ break; -+ -+ default: -+ internalError (); -+ } -+ reloc_type = BFD_RELOC_UNUSED; -+ } -+ else if (reloc_type == BFD_RELOC_12_PCREL) -+ { -+ add_relaxed_insn (ip, relaxed_branch_length (NULL, NULL, 0), 4, -+ RELAX_BRANCH_ENCODE (0, 0), -+ address_expr->X_add_symbol, -+ address_expr->X_add_number); -+ return; -+ } -+ else if (reloc_type < BFD_RELOC_UNUSED) -+ { -+ reloc_howto_type *howto; -+ -+ howto = bfd_reloc_type_lookup (stdoutput, reloc_type); -+ if (howto == NULL) -+ as_bad (_("Unsupported RISC-V relocation number %d"), reloc_type); -+ -+ ip->fixp = fix_new_exp (ip->frag, ip->where, -+ bfd_get_reloc_size (howto), -+ address_expr, -+ reloc_type == BFD_RELOC_12_PCREL || -+ reloc_type == BFD_RELOC_RISCV_CALL || -+ reloc_type == BFD_RELOC_RISCV_JMP, -+ reloc_type); -+ -+ /* These relocations can have an addend that won't fit in -+ 4 octets for 64bit assembly. */ -+ if (rv64 -+ && ! howto->partial_inplace -+ && (reloc_type == BFD_RELOC_32 -+ || reloc_type == BFD_RELOC_64 -+ || reloc_type == BFD_RELOC_CTOR -+ || reloc_type == BFD_RELOC_RISCV_HI20 -+ || reloc_type == BFD_RELOC_RISCV_LO12_I -+ || reloc_type == BFD_RELOC_RISCV_LO12_S)) -+ ip->fixp->fx_no_overflow = 1; -+ } -+ } -+ -+ add_fixed_insn (ip); -+ -+ install_insn (ip); -+} -+ -+/* Build an instruction created by a macro expansion. This is passed -+ a pointer to the count of instructions created so far, an -+ expression, the name of the instruction to build, an operand format -+ string, and corresponding arguments. */ -+ -+static void -+macro_build (expressionS *ep, const char *name, const char *fmt, ...) -+{ -+ const struct riscv_opcode *mo; -+ struct riscv_cl_insn insn; -+ bfd_reloc_code_real_type r; -+ va_list args; -+ -+ va_start (args, fmt); -+ -+ r = BFD_RELOC_UNUSED; -+ mo = (struct riscv_opcode *) hash_find (op_hash, name); -+ gas_assert (mo); -+ gas_assert (strcmp (name, mo->name) == 0); -+ -+ create_insn (&insn, mo); -+ for (;;) -+ { -+ switch (*fmt++) -+ { -+ case 'd': -+ INSERT_OPERAND (RD, insn, va_arg (args, int)); -+ continue; -+ -+ case 's': -+ INSERT_OPERAND (RS1, insn, va_arg (args, int)); -+ continue; -+ -+ case 't': -+ INSERT_OPERAND (RS2, insn, va_arg (args, int)); -+ continue; -+ -+ case '>': -+ INSERT_OPERAND (SHAMT, insn, va_arg (args, int)); -+ continue; -+ -+ case 'j': -+ case 'u': -+ case 'q': -+ gas_assert (ep != NULL); -+ r = va_arg (args, int); -+ continue; -+ -+ case '\0': -+ break; -+ case ',': -+ continue; -+ default: -+ internalError (); -+ } -+ break; -+ } -+ va_end (args); -+ gas_assert (r == BFD_RELOC_UNUSED ? ep == NULL : ep != NULL); -+ -+ append_insn (&insn, ep, r); -+} -+ -+/* -+ * Sign-extend 32-bit mode constants that have bit 31 set and all -+ * higher bits unset. -+ */ -+static void -+normalize_constant_expr (expressionS *ex) -+{ -+ if (rv64) -+ return; -+ if ((ex->X_op == O_constant || ex->X_op == O_symbol) -+ && IS_ZEXT_32BIT_NUM (ex->X_add_number)) -+ ex->X_add_number = (((ex->X_add_number & 0xffffffff) ^ 0x80000000) -+ - 0x80000000); -+} -+ -+static symbolS * -+make_internal_label (void) -+{ -+ return (symbolS *) local_symbol_make (FAKE_LABEL_NAME, now_seg, -+ (valueT) frag_now_fix(), frag_now); -+} -+ -+/* Load an entry from the GOT. */ -+static void -+pcrel_access (int destreg, int tempreg, expressionS *ep, -+ const char* lo_insn, const char* lo_pattern, -+ bfd_reloc_code_real_type hi_reloc, -+ bfd_reloc_code_real_type lo_reloc) -+{ -+ expressionS ep2; -+ ep2.X_op = O_symbol; -+ ep2.X_add_symbol = make_internal_label (); -+ ep2.X_add_number = 0; -+ -+ macro_build (ep, "auipc", "d,u", tempreg, hi_reloc); -+ macro_build (&ep2, lo_insn, lo_pattern, destreg, tempreg, lo_reloc); -+} -+ -+static void -+pcrel_load (int destreg, int tempreg, expressionS *ep, const char* lo_insn, -+ bfd_reloc_code_real_type hi_reloc, -+ bfd_reloc_code_real_type lo_reloc) -+{ -+ pcrel_access (destreg, tempreg, ep, lo_insn, "d,s,j", hi_reloc, lo_reloc); -+} -+ -+static void -+pcrel_store (int srcreg, int tempreg, expressionS *ep, const char* lo_insn, -+ bfd_reloc_code_real_type hi_reloc, -+ bfd_reloc_code_real_type lo_reloc) -+{ -+ pcrel_access (srcreg, tempreg, ep, lo_insn, "t,s,q", hi_reloc, lo_reloc); -+} -+ -+/* PC-relative function call using AUIPC/JALR, relaxed to JAL. */ -+static void -+riscv_call (int destreg, int tempreg, expressionS *ep, -+ bfd_reloc_code_real_type reloc) -+{ -+ macro_build (ep, "auipc", "d,u", tempreg, reloc); -+ macro_build (NULL, "jalr", "d,s", destreg, tempreg); -+} -+ -+/* Warn if an expression is not a constant. */ -+ -+static void -+check_absolute_expr (struct riscv_cl_insn *ip, expressionS *ex) -+{ -+ if (ex->X_op == O_big) -+ as_bad (_("unsupported large constant")); -+ else if (ex->X_op != O_constant) -+ as_bad (_("Instruction %s requires absolute expression"), -+ ip->insn_mo->name); -+ normalize_constant_expr (ex); -+} -+ -+/* Load an integer constant into a register. */ -+ -+static void -+load_const (int reg, expressionS *ep) -+{ -+ int shift = RISCV_IMM_BITS; -+ expressionS upper = *ep, lower = *ep; -+ lower.X_add_number = (int32_t) ep->X_add_number << (32-shift) >> (32-shift); -+ upper.X_add_number -= lower.X_add_number; -+ -+ gas_assert (ep->X_op == O_constant); -+ -+ if (rv64 && !IS_SEXT_32BIT_NUM(ep->X_add_number)) -+ { -+ /* Reduce to a signed 32-bit constant using SLLI and ADDI, which -+ is not optimal but also not so bad. */ -+ while (((upper.X_add_number >> shift) & 1) == 0) -+ shift++; -+ -+ upper.X_add_number = (int64_t) upper.X_add_number >> shift; -+ load_const(reg, &upper); -+ -+ macro_build (NULL, "slli", "d,s,>", reg, reg, shift); -+ if (lower.X_add_number != 0) -+ macro_build (&lower, "addi", "d,s,j", reg, reg, BFD_RELOC_RISCV_LO12_I); -+ } -+ else -+ { -+ int hi_reg = 0; -+ -+ if (upper.X_add_number != 0) -+ { -+ macro_build (ep, "lui", "d,u", reg, BFD_RELOC_RISCV_HI20); -+ hi_reg = reg; -+ } -+ -+ if (lower.X_add_number != 0 || hi_reg == 0) -+ macro_build (ep, ADD32_INSN, "d,s,j", reg, hi_reg, -+ BFD_RELOC_RISCV_LO12_I); -+ } -+} -+ -+/* Expand RISC-V assembly macros into one or more instructions. */ -+static void -+macro (struct riscv_cl_insn *ip) -+{ -+ int rd = (ip->insn_opcode >> OP_SH_RD) & OP_MASK_RD; -+ int rs1 = (ip->insn_opcode >> OP_SH_RS1) & OP_MASK_RS1; -+ int rs2 = (ip->insn_opcode >> OP_SH_RS2) & OP_MASK_RS2; -+ int mask = ip->insn_mo->mask; -+ -+ switch (mask) -+ { -+ case M_LI: -+ load_const (rd, &imm_expr); -+ break; -+ -+ case M_LA: -+ case M_LLA: -+ /* Load the address of a symbol into a register. */ -+ if (!IS_SEXT_32BIT_NUM (offset_expr.X_add_number)) -+ as_bad(_("offset too large")); -+ -+ if (offset_expr.X_op == O_constant) -+ load_const (rd, &offset_expr); -+ else if (riscv_opts.pic && mask == M_LA) /* Global PIC symbol */ -+ pcrel_load (rd, rd, &offset_expr, LOAD_ADDRESS_INSN, -+ BFD_RELOC_RISCV_GOT_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ else /* Local PIC symbol, or any non-PIC symbol */ -+ pcrel_load (rd, rd, &offset_expr, "addi", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LA_TLS_GD: -+ pcrel_load (rd, rd, &offset_expr, "addi", -+ BFD_RELOC_RISCV_TLS_GD_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LA_TLS_IE: -+ pcrel_load (rd, rd, &offset_expr, LOAD_ADDRESS_INSN, -+ BFD_RELOC_RISCV_TLS_GOT_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LB: -+ pcrel_load (rd, rd, &offset_expr, "lb", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LBU: -+ pcrel_load (rd, rd, &offset_expr, "lbu", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LH: -+ pcrel_load (rd, rd, &offset_expr, "lh", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LHU: -+ pcrel_load (rd, rd, &offset_expr, "lhu", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LW: -+ pcrel_load (rd, rd, &offset_expr, "lw", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LWU: -+ pcrel_load (rd, rd, &offset_expr, "lwu", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_LD: -+ pcrel_load (rd, rd, &offset_expr, "ld", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_FLW: -+ pcrel_load (rd, rs1, &offset_expr, "flw", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_FLD: -+ pcrel_load (rd, rs1, &offset_expr, "fld", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_I); -+ break; -+ -+ case M_SB: -+ pcrel_store (rs2, rs1, &offset_expr, "sb", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_SH: -+ pcrel_store (rs2, rs1, &offset_expr, "sh", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_SW: -+ pcrel_store (rs2, rs1, &offset_expr, "sw", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_SD: -+ pcrel_store (rs2, rs1, &offset_expr, "sd", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_FSW: -+ pcrel_store (rs2, rs1, &offset_expr, "fsw", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_FSD: -+ pcrel_store (rs2, rs1, &offset_expr, "fsd", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_VF: -+ pcrel_access (0, rs1, &offset_expr, "vf", "s,s,q", -+ BFD_RELOC_RISCV_PCREL_HI20, BFD_RELOC_RISCV_PCREL_LO12_S); -+ break; -+ -+ case M_CALL: -+ riscv_call (rd, rs1, &offset_expr, offset_reloc); -+ break; -+ -+ default: -+ as_bad (_("Macro %s not implemented"), ip->insn_mo->name); -+ break; -+ } -+} -+ -+static const struct percent_op_match percent_op_utype[] = -+{ -+ {"%tprel_hi", BFD_RELOC_RISCV_TPREL_HI20}, -+ {"%pcrel_hi", BFD_RELOC_RISCV_PCREL_HI20}, -+ {"%tls_ie_pcrel_hi", BFD_RELOC_RISCV_TLS_GOT_HI20}, -+ {"%tls_gd_pcrel_hi", BFD_RELOC_RISCV_TLS_GD_HI20}, -+ {"%hi", BFD_RELOC_RISCV_HI20}, -+ {0, 0} -+}; -+ -+static const struct percent_op_match percent_op_itype[] = -+{ -+ {"%lo", BFD_RELOC_RISCV_LO12_I}, -+ {"%tprel_lo", BFD_RELOC_RISCV_TPREL_LO12_I}, -+ {"%pcrel_lo", BFD_RELOC_RISCV_PCREL_LO12_I}, -+ {0, 0} -+}; -+ -+static const struct percent_op_match percent_op_stype[] = -+{ -+ {"%lo", BFD_RELOC_RISCV_LO12_S}, -+ {"%tprel_lo", BFD_RELOC_RISCV_TPREL_LO12_S}, -+ {"%pcrel_lo", BFD_RELOC_RISCV_PCREL_LO12_S}, -+ {0, 0} -+}; -+ -+static const struct percent_op_match percent_op_rtype[] = -+{ -+ {"%tprel_add", BFD_RELOC_RISCV_TPREL_ADD}, -+ {0, 0} -+}; -+ -+/* Return true if *STR points to a relocation operator. When returning true, -+ move *STR over the operator and store its relocation code in *RELOC. -+ Leave both *STR and *RELOC alone when returning false. */ -+ -+static bfd_boolean -+parse_relocation (char **str, bfd_reloc_code_real_type *reloc, -+ const struct percent_op_match *percent_op) -+{ -+ for ( ; percent_op->str; percent_op++) -+ if (strncasecmp (*str, percent_op->str, strlen (percent_op->str)) == 0) -+ { -+ int len = strlen (percent_op->str); -+ -+ if (!ISSPACE ((*str)[len]) && (*str)[len] != '(') -+ continue; -+ -+ *str += strlen (percent_op->str); -+ *reloc = percent_op->reloc; -+ -+ /* Check whether the output BFD supports this relocation. -+ If not, issue an error and fall back on something safe. */ -+ if (!bfd_reloc_type_lookup (stdoutput, percent_op->reloc)) -+ { -+ as_bad ("relocation %s isn't supported by the current ABI", -+ percent_op->str); -+ *reloc = BFD_RELOC_UNUSED; -+ } -+ return TRUE; -+ } -+ return FALSE; -+} -+ -+static void -+my_getExpression (expressionS *ep, char *str) -+{ -+ char *save_in; -+ -+ save_in = input_line_pointer; -+ input_line_pointer = str; -+ expression (ep); -+ expr_end = input_line_pointer; -+ input_line_pointer = save_in; -+} -+ -+/* Parse string STR as a 16-bit relocatable operand. Store the -+ expression in *EP and the relocation, if any, in RELOC. -+ Return the number of relocation operators used (0 or 1). -+ -+ On exit, EXPR_END points to the first character after the expression. */ -+ -+static size_t -+my_getSmallExpression (expressionS *ep, bfd_reloc_code_real_type *reloc, -+ char *str, const struct percent_op_match *percent_op) -+{ -+ size_t reloc_index; -+ int crux_depth, str_depth; -+ char *crux; -+ -+ /* Search for the start of the main expression. -+ End the loop with CRUX pointing to the start -+ of the main expression and with CRUX_DEPTH containing the number -+ of open brackets at that point. */ -+ reloc_index = -1; -+ str_depth = 0; -+ do -+ { -+ reloc_index++; -+ crux = str; -+ crux_depth = str_depth; -+ -+ /* Skip over whitespace and brackets, keeping count of the number -+ of brackets. */ -+ while (*str == ' ' || *str == '\t' || *str == '(') -+ if (*str++ == '(') -+ str_depth++; -+ } -+ while (*str == '%' -+ && reloc_index < 1 -+ && parse_relocation (&str, reloc, percent_op)); -+ -+ my_getExpression (ep, crux); -+ str = expr_end; -+ -+ /* Match every open bracket. */ -+ while (crux_depth > 0 && (*str == ')' || *str == ' ' || *str == '\t')) -+ if (*str++ == ')') -+ crux_depth--; -+ -+ if (crux_depth > 0) -+ as_bad ("unclosed '('"); -+ -+ expr_end = str; -+ -+ return reloc_index; -+} -+ -+/* This routine assembles an instruction into its binary format. As a -+ side effect, it sets one of the global variables imm_reloc or -+ offset_reloc to the type of relocation to do if one of the operands -+ is an address expression. */ -+ -+static void -+riscv_ip (char *str, struct riscv_cl_insn *ip) -+{ -+ char *s; -+ const char *args; -+ char c = 0; -+ struct riscv_opcode *insn; -+ char *argsStart; -+ unsigned int regno; -+ char save_c = 0; -+ int argnum; -+ const struct percent_op_match *p; -+ -+ insn_error = NULL; -+ -+ /* If the instruction contains a '.', we first try to match an instruction -+ including the '.'. Then we try again without the '.'. */ -+ insn = NULL; -+ for (s = str; *s != '\0' && !ISSPACE (*s); ++s) -+ continue; -+ -+ /* If we stopped on whitespace, then replace the whitespace with null for -+ the call to hash_find. Save the character we replaced just in case we -+ have to re-parse the instruction. */ -+ if (ISSPACE (*s)) -+ { -+ save_c = *s; -+ *s++ = '\0'; -+ } -+ -+ insn = (struct riscv_opcode *) hash_find (op_hash, str); -+ -+ /* If we didn't find the instruction in the opcode table, try again, but -+ this time with just the instruction up to, but not including the -+ first '.'. */ -+ if (insn == NULL) -+ { -+ /* Restore the character we overwrite above (if any). */ -+ if (save_c) -+ *(--s) = save_c; -+ -+ /* Scan up to the first '.' or whitespace. */ -+ for (s = str; -+ *s != '\0' && *s != '.' && !ISSPACE (*s); -+ ++s) -+ continue; -+ -+ /* If we did not find a '.', then we can quit now. */ -+ if (*s != '.') -+ { -+ insn_error = "unrecognized opcode"; -+ return; -+ } -+ -+ /* Lookup the instruction in the hash table. */ -+ *s++ = '\0'; -+ if ((insn = (struct riscv_opcode *) hash_find (op_hash, str)) == NULL) -+ { -+ insn_error = "unrecognized opcode"; -+ return; -+ } -+ } -+ -+ argsStart = s; -+ for (;;) -+ { -+ bfd_boolean ok = TRUE; -+ gas_assert (strcmp (insn->name, str) == 0); -+ -+ create_insn (ip, insn); -+ insn_error = NULL; -+ argnum = 1; -+ for (args = insn->args;; ++args) -+ { -+ s += strspn (s, " \t"); -+ switch (*args) -+ { -+ case '\0': /* end of args */ -+ if (*s == '\0') -+ return; -+ break; -+ /* Xcustom */ -+ case '^': -+ { -+ unsigned long max = OP_MASK_RD; -+ my_getExpression (&imm_expr, s); -+ check_absolute_expr (ip, &imm_expr); -+ switch (*++args) -+ { -+ case 'j': -+ max = OP_MASK_CUSTOM_IMM; -+ INSERT_OPERAND (CUSTOM_IMM, *ip, imm_expr.X_add_number); -+ break; -+ case 'd': -+ INSERT_OPERAND (RD, *ip, imm_expr.X_add_number); -+ break; -+ case 's': -+ INSERT_OPERAND (RS1, *ip, imm_expr.X_add_number); -+ break; -+ case 't': -+ INSERT_OPERAND (RS2, *ip, imm_expr.X_add_number); -+ break; -+ } -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ if ((unsigned long) imm_expr.X_add_number > max) -+ as_warn ("Bad custom immediate (%lu), must be at most %lu", -+ (unsigned long)imm_expr.X_add_number, max); -+ continue; -+ } -+ -+ /* Xhwacha */ -+ case '#': -+ switch ( *++args ) -+ { -+ case 'g': -+ my_getExpression( &imm_expr, s ); -+ /* check_absolute_expr( ip, &imm_expr ); */ -+ if ((unsigned long) imm_expr.X_add_number > 32 ) -+ as_warn( _( "Improper ngpr amount (%lu)" ), -+ (unsigned long) imm_expr.X_add_number ); -+ INSERT_OPERAND( IMMNGPR, *ip, imm_expr.X_add_number ); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ case 'f': -+ my_getExpression( &imm_expr, s ); -+ /* check_absolute_expr( ip, &imm_expr ); */ -+ if ((unsigned long) imm_expr.X_add_number > 32 ) -+ as_warn( _( "Improper nfpr amount (%lu)" ), -+ (unsigned long) imm_expr.X_add_number ); -+ INSERT_OPERAND( IMMNFPR, *ip, imm_expr.X_add_number ); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ case 'n': -+ my_getExpression( &imm_expr, s ); -+ /* check_absolute_expr( ip, &imm_expr ); */ -+ if ((unsigned long) imm_expr.X_add_number > 8 ) -+ as_warn( _( "Improper nelm amount (%lu)" ), -+ (unsigned long) imm_expr.X_add_number ); -+ INSERT_OPERAND( IMMSEGNELM, *ip, imm_expr.X_add_number - 1 ); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ case 'd': -+ ok = reg_lookup( &s, RCLASS_VEC_GPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VRD, *ip, regno ); -+ continue; -+ case 's': -+ ok = reg_lookup( &s, RCLASS_VEC_GPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VRS, *ip, regno ); -+ continue; -+ case 't': -+ ok = reg_lookup( &s, RCLASS_VEC_GPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VRT, *ip, regno ); -+ continue; -+ case 'r': -+ ok = reg_lookup( &s, RCLASS_VEC_GPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VRR, *ip, regno ); -+ continue; -+ case 'D': -+ ok = reg_lookup( &s, RCLASS_VEC_FPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VFD, *ip, regno ); -+ continue; -+ case 'S': -+ ok = reg_lookup( &s, RCLASS_VEC_FPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VFS, *ip, regno ); -+ continue; -+ case 'T': -+ ok = reg_lookup( &s, RCLASS_VEC_FPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VFT, *ip, regno ); -+ continue; -+ case 'R': -+ ok = reg_lookup( &s, RCLASS_VEC_FPR, ®no ); -+ if ( !ok ) -+ as_bad( _( "Invalid vector register" ) ); -+ INSERT_OPERAND( VFR, *ip, regno ); -+ continue; -+ } -+ break; -+ -+ case ',': -+ ++argnum; -+ if (*s++ == *args) -+ continue; -+ s--; -+ break; -+ -+ case '(': -+ case ')': -+ case '[': -+ case ']': -+ if (*s++ == *args) -+ continue; -+ break; -+ -+ case '<': /* shift amount, 0 - 31 */ -+ my_getExpression (&imm_expr, s); -+ check_absolute_expr (ip, &imm_expr); -+ if ((unsigned long) imm_expr.X_add_number > 31) -+ as_warn (_("Improper shift amount (%lu)"), -+ (unsigned long) imm_expr.X_add_number); -+ INSERT_OPERAND (SHAMTW, *ip, imm_expr.X_add_number); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ -+ case '>': /* shift amount, 0 - (XLEN-1) */ -+ my_getExpression (&imm_expr, s); -+ check_absolute_expr (ip, &imm_expr); -+ if ((unsigned long) imm_expr.X_add_number > (rv64 ? 63 : 31)) -+ as_warn (_("Improper shift amount (%lu)"), -+ (unsigned long) imm_expr.X_add_number); -+ INSERT_OPERAND (SHAMT, *ip, imm_expr.X_add_number); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ -+ case 'Z': /* CSRRxI immediate */ -+ my_getExpression (&imm_expr, s); -+ check_absolute_expr (ip, &imm_expr); -+ if ((unsigned long) imm_expr.X_add_number > 31) -+ as_warn (_("Improper CSRxI immediate (%lu)"), -+ (unsigned long) imm_expr.X_add_number); -+ INSERT_OPERAND (RS1, *ip, imm_expr.X_add_number); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ continue; -+ -+ case 'E': /* Control register. */ -+ ok = reg_lookup (&s, RCLASS_CSR, ®no); -+ if (ok) -+ INSERT_OPERAND (CSR, *ip, regno); -+ else -+ { -+ my_getExpression (&imm_expr, s); -+ check_absolute_expr (ip, &imm_expr); -+ if ((unsigned long) imm_expr.X_add_number > 0xfff) -+ as_warn(_("Improper CSR address (%lu)"), -+ (unsigned long) imm_expr.X_add_number); -+ INSERT_OPERAND (CSR, *ip, imm_expr.X_add_number); -+ imm_expr.X_op = O_absent; -+ s = expr_end; -+ } -+ continue; -+ -+ case 'm': /* rounding mode */ -+ if (arg_lookup (&s, riscv_rm, ARRAY_SIZE(riscv_rm), ®no)) -+ { -+ INSERT_OPERAND (RM, *ip, regno); -+ continue; -+ } -+ break; -+ -+ case 'P': -+ case 'Q': /* fence predecessor/successor */ -+ if (arg_lookup (&s, riscv_pred_succ, ARRAY_SIZE(riscv_pred_succ), ®no)) -+ { -+ if (*args == 'P') -+ INSERT_OPERAND(PRED, *ip, regno); -+ else -+ INSERT_OPERAND(SUCC, *ip, regno); -+ continue; -+ } -+ break; -+ -+ case 'd': /* destination register */ -+ case 's': /* source register */ -+ case 't': /* target register */ -+ ok = reg_lookup (&s, RCLASS_GPR, ®no); -+ if (ok) -+ { -+ c = *args; -+ if (*s == ' ') -+ ++s; -+ -+ /* Now that we have assembled one operand, we use the args string -+ * to figure out where it goes in the instruction. */ -+ switch (c) -+ { -+ case 's': -+ INSERT_OPERAND (RS1, *ip, regno); -+ break; -+ case 'd': -+ INSERT_OPERAND (RD, *ip, regno); -+ break; -+ case 't': -+ INSERT_OPERAND (RS2, *ip, regno); -+ break; -+ } -+ continue; -+ } -+ break; -+ -+ case 'D': /* floating point rd */ -+ case 'S': /* floating point rs1 */ -+ case 'T': /* floating point rs2 */ -+ case 'U': /* floating point rs1 and rs2 */ -+ case 'R': /* floating point rs3 */ -+ if (reg_lookup (&s, RCLASS_FPR, ®no)) -+ { -+ c = *args; -+ if (*s == ' ') -+ ++s; -+ switch (c) -+ { -+ case 'D': -+ INSERT_OPERAND (RD, *ip, regno); -+ break; -+ case 'S': -+ INSERT_OPERAND (RS1, *ip, regno); -+ break; -+ case 'U': -+ INSERT_OPERAND (RS1, *ip, regno); -+ /* fallthru */ -+ case 'T': -+ INSERT_OPERAND (RS2, *ip, regno); -+ break; -+ case 'R': -+ INSERT_OPERAND (RS3, *ip, regno); -+ break; -+ } -+ continue; -+ } -+ -+ break; -+ -+ case 'I': -+ my_getExpression (&imm_expr, s); -+ if (imm_expr.X_op != O_big -+ && imm_expr.X_op != O_constant) -+ insn_error = _("absolute expression required"); -+ normalize_constant_expr (&imm_expr); -+ s = expr_end; -+ continue; -+ -+ case 'A': -+ my_getExpression (&offset_expr, s); -+ normalize_constant_expr (&offset_expr); -+ imm_reloc = BFD_RELOC_32; -+ s = expr_end; -+ continue; -+ -+ case 'j': /* sign-extended immediate */ -+ imm_reloc = BFD_RELOC_RISCV_LO12_I; -+ p = percent_op_itype; -+ goto alu_op; -+ case 'q': /* store displacement */ -+ p = percent_op_stype; -+ offset_reloc = BFD_RELOC_RISCV_LO12_S; -+ goto load_store; -+ case 'o': /* load displacement */ -+ p = percent_op_itype; -+ offset_reloc = BFD_RELOC_RISCV_LO12_I; -+ goto load_store; -+ case '0': /* AMO "displacement," which must be zero */ -+ p = percent_op_rtype; -+ offset_reloc = BFD_RELOC_UNUSED; -+load_store: -+ /* Check whether there is only a single bracketed expression -+ left. If so, it must be the base register and the -+ constant must be zero. */ -+ offset_expr.X_op = O_constant; -+ offset_expr.X_add_number = 0; -+ if (*s == '(' && strchr (s + 1, '(') == 0) -+ continue; -+alu_op: -+ /* If this value won't fit into a 16 bit offset, then go -+ find a macro that will generate the 32 bit offset -+ code pattern. */ -+ if (!my_getSmallExpression (&offset_expr, &offset_reloc, s, p)) -+ { -+ normalize_constant_expr (&offset_expr); -+ if (offset_expr.X_op != O_constant -+ || (*args == '0' && offset_expr.X_add_number != 0) -+ || offset_expr.X_add_number >= (signed)RISCV_IMM_REACH/2 -+ || offset_expr.X_add_number < -(signed)RISCV_IMM_REACH/2) -+ break; -+ } -+ -+ s = expr_end; -+ continue; -+ -+ case 'p': /* pc relative offset */ -+ offset_reloc = BFD_RELOC_12_PCREL; -+ my_getExpression (&offset_expr, s); -+ s = expr_end; -+ continue; -+ -+ case 'u': /* upper 20 bits */ -+ p = percent_op_utype; -+ if (!my_getSmallExpression (&imm_expr, &imm_reloc, s, p) -+ && imm_expr.X_op == O_constant) -+ { -+ if (imm_expr.X_add_number < 0 -+ || imm_expr.X_add_number >= (signed)RISCV_BIGIMM_REACH) -+ as_bad (_("lui expression not in range 0..1048575")); -+ -+ imm_reloc = BFD_RELOC_RISCV_HI20; -+ imm_expr.X_add_number <<= RISCV_IMM_BITS; -+ } -+ s = expr_end; -+ continue; -+ -+ case 'a': /* 26 bit address */ -+ my_getExpression (&offset_expr, s); -+ s = expr_end; -+ offset_reloc = BFD_RELOC_RISCV_JMP; -+ continue; -+ -+ case 'c': -+ my_getExpression (&offset_expr, s); -+ s = expr_end; -+ offset_reloc = BFD_RELOC_RISCV_CALL; -+ if (*s == '@') -+ offset_reloc = BFD_RELOC_RISCV_CALL_PLT, s++; -+ continue; -+ -+ default: -+ as_bad (_("bad char = '%c'\n"), *args); -+ internalError (); -+ } -+ break; -+ } -+ /* Args don't match. */ -+ if (insn + 1 < &riscv_opcodes[NUMOPCODES] && -+ !strcmp (insn->name, insn[1].name)) -+ { -+ ++insn; -+ s = argsStart; -+ insn_error = _("illegal operands"); -+ continue; -+ } -+ if (save_c) -+ *(--argsStart) = save_c; -+ insn_error = _("illegal operands"); -+ return; -+ } -+} -+ -+void -+md_assemble (char *str) -+{ -+ struct riscv_cl_insn insn; -+ -+ imm_expr.X_op = O_absent; -+ offset_expr.X_op = O_absent; -+ imm_reloc = BFD_RELOC_UNUSED; -+ offset_reloc = BFD_RELOC_UNUSED; -+ -+ riscv_ip (str, &insn); -+ -+ if (insn_error) -+ { -+ as_bad ("%s `%s'", insn_error, str); -+ return; -+ } -+ -+ if (insn.insn_mo->pinfo == INSN_MACRO) -+ macro (&insn); -+ else -+ { -+ if (imm_expr.X_op != O_absent) -+ append_insn (&insn, &imm_expr, imm_reloc); -+ else if (offset_expr.X_op != O_absent) -+ append_insn (&insn, &offset_expr, offset_reloc); -+ else -+ append_insn (&insn, NULL, BFD_RELOC_UNUSED); -+ } -+} -+ -+char * -+md_atof (int type, char *litP, int *sizeP) -+{ -+ return ieee_md_atof (type, litP, sizeP, TARGET_BYTES_BIG_ENDIAN); -+} -+ -+void -+md_number_to_chars (char *buf, valueT val, int n) -+{ -+ number_to_chars_littleendian (buf, val, n); -+} -+ -+const char *md_shortopts = "O::g::G:"; -+ -+enum options -+ { -+ OPTION_M32 = OPTION_MD_BASE, -+ OPTION_M64, -+ OPTION_MARCH, -+ OPTION_PIC, -+ OPTION_NO_PIC, -+ OPTION_MRVC, -+ OPTION_MNO_RVC, -+ OPTION_END_OF_ENUM -+ }; -+ -+struct option md_longopts[] = -+{ -+ {"m32", no_argument, NULL, OPTION_M32}, -+ {"m64", no_argument, NULL, OPTION_M64}, -+ {"march", required_argument, NULL, OPTION_MARCH}, -+ {"fPIC", no_argument, NULL, OPTION_PIC}, -+ {"fpic", no_argument, NULL, OPTION_PIC}, -+ {"fno-pic", no_argument, NULL, OPTION_NO_PIC}, -+ {"mrvc", no_argument, NULL, OPTION_MRVC}, -+ {"mno-rvc", no_argument, NULL, OPTION_MNO_RVC}, -+ -+ {NULL, no_argument, NULL, 0} -+}; -+size_t md_longopts_size = sizeof (md_longopts); -+ -+int -+md_parse_option (int c, char *arg) -+{ -+ switch (c) -+ { -+ case OPTION_MRVC: -+ riscv_opts.rvc = 1; -+ break; -+ -+ case OPTION_MNO_RVC: -+ riscv_opts.rvc = 0; -+ break; -+ -+ case OPTION_M32: -+ rv64 = FALSE; -+ break; -+ -+ case OPTION_M64: -+ rv64 = TRUE; -+ break; -+ -+ case OPTION_MARCH: -+ riscv_set_arch(arg); -+ -+ case OPTION_NO_PIC: -+ riscv_opts.pic = FALSE; -+ break; -+ -+ case OPTION_PIC: -+ riscv_opts.pic = TRUE; -+ break; -+ -+ default: -+ return 0; -+ } -+ -+ return 1; -+} -+ -+void -+riscv_after_parse_args (void) -+{ -+ if (riscv_subsets == NULL) -+ riscv_set_arch("RVIMAFDXcustom"); -+} -+ -+void -+riscv_init_after_args (void) -+{ -+ /* initialize opcodes */ -+ bfd_riscv_num_opcodes = bfd_riscv_num_builtin_opcodes; -+ riscv_opcodes = (struct riscv_opcode *) riscv_builtin_opcodes; -+} -+ -+long -+md_pcrel_from (fixS *fixP) -+{ -+ return fixP->fx_where + fixP->fx_frag->fr_address; -+} -+ -+/* Apply a fixup to the object file. */ -+ -+void -+md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) -+{ -+ bfd_byte *buf = (bfd_byte *) (fixP->fx_frag->fr_literal + fixP->fx_where); -+ -+ /* Remember value for tc_gen_reloc. */ -+ fixP->fx_addnumber = *valP; -+ -+ switch (fixP->fx_r_type) -+ { -+ case BFD_RELOC_RISCV_TLS_GOT_HI20: -+ case BFD_RELOC_RISCV_TLS_GD_HI20: -+ case BFD_RELOC_RISCV_TLS_DTPREL32: -+ case BFD_RELOC_RISCV_TLS_DTPREL64: -+ case BFD_RELOC_RISCV_TPREL_HI20: -+ case BFD_RELOC_RISCV_TPREL_LO12_I: -+ case BFD_RELOC_RISCV_TPREL_LO12_S: -+ case BFD_RELOC_RISCV_TPREL_ADD: -+ S_SET_THREAD_LOCAL (fixP->fx_addsy); -+ /* fall through */ -+ -+ case BFD_RELOC_RISCV_GOT_HI20: -+ case BFD_RELOC_RISCV_PCREL_HI20: -+ case BFD_RELOC_RISCV_HI20: -+ case BFD_RELOC_RISCV_LO12_I: -+ case BFD_RELOC_RISCV_LO12_S: -+ case BFD_RELOC_RISCV_ADD8: -+ case BFD_RELOC_RISCV_ADD16: -+ case BFD_RELOC_RISCV_ADD32: -+ case BFD_RELOC_RISCV_ADD64: -+ case BFD_RELOC_RISCV_SUB8: -+ case BFD_RELOC_RISCV_SUB16: -+ case BFD_RELOC_RISCV_SUB32: -+ case BFD_RELOC_RISCV_SUB64: -+ gas_assert (fixP->fx_addsy != NULL); -+ /* Nothing needed to do. The value comes from the reloc entry. */ -+ break; -+ -+ case BFD_RELOC_64: -+ case BFD_RELOC_32: -+ case BFD_RELOC_16: -+ case BFD_RELOC_8: -+ if (fixP->fx_addsy && fixP->fx_subsy) -+ { -+ fixP->fx_next = xmemdup (fixP, sizeof (*fixP), sizeof (*fixP)); -+ fixP->fx_next->fx_addsy = fixP->fx_subsy; -+ fixP->fx_next->fx_subsy = NULL; -+ fixP->fx_next->fx_offset = 0; -+ fixP->fx_subsy = NULL; -+ -+ if (fixP->fx_r_type == BFD_RELOC_64) -+ fixP->fx_r_type = BFD_RELOC_RISCV_ADD64, -+ fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB64; -+ else if (fixP->fx_r_type == BFD_RELOC_32) -+ fixP->fx_r_type = BFD_RELOC_RISCV_ADD32, -+ fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB32; -+ else if (fixP->fx_r_type == BFD_RELOC_16) -+ fixP->fx_r_type = BFD_RELOC_RISCV_ADD16, -+ fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB16; -+ else -+ fixP->fx_r_type = BFD_RELOC_RISCV_ADD8, -+ fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB8; -+ } -+ /* fall through */ -+ -+ case BFD_RELOC_RVA: -+ /* If we are deleting this reloc entry, we must fill in the -+ value now. This can happen if we have a .word which is not -+ resolved when it appears but is later defined. */ -+ if (fixP->fx_addsy == NULL) -+ { -+ gas_assert (fixP->fx_size <= sizeof (valueT)); -+ md_number_to_chars ((char *) buf, *valP, fixP->fx_size); -+ fixP->fx_done = 1; -+ } -+ break; -+ -+ case BFD_RELOC_RISCV_JMP: -+ if (fixP->fx_addsy) -+ { -+ /* Fill in a tentative value to improve objdump readability. */ -+ bfd_vma delta = ENCODE_UJTYPE_IMM (S_GET_VALUE (fixP->fx_addsy) + *valP); -+ bfd_putl32 (bfd_getl32 (buf) | delta, buf); -+ } -+ break; -+ -+ case BFD_RELOC_12_PCREL: -+ if (fixP->fx_addsy) -+ { -+ /* Fill in a tentative value to improve objdump readability. */ -+ bfd_vma delta = ENCODE_SBTYPE_IMM (S_GET_VALUE (fixP->fx_addsy) + *valP); -+ bfd_putl32 (bfd_getl32 (buf) | delta, buf); -+ } -+ break; -+ -+ case BFD_RELOC_RISCV_PCREL_LO12_S: -+ case BFD_RELOC_RISCV_PCREL_LO12_I: -+ case BFD_RELOC_RISCV_CALL: -+ case BFD_RELOC_RISCV_CALL_PLT: -+ case BFD_RELOC_RISCV_ALIGN: -+ break; -+ -+ default: -+ /* We ignore generic BFD relocations we don't know about. */ -+ if (bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type) != NULL) -+ internalError (); -+ } -+} -+ -+/* This structure is used to hold a stack of .set values. */ -+ -+struct riscv_option_stack -+{ -+ struct riscv_option_stack *next; -+ struct riscv_set_options options; -+}; -+ -+static struct riscv_option_stack *riscv_opts_stack; -+ -+/* Handle the .set pseudo-op. */ -+ -+static void -+s_riscv_option (int x ATTRIBUTE_UNUSED) -+{ -+ char *name = input_line_pointer, ch; -+ -+ while (!is_end_of_line[(unsigned char) *input_line_pointer]) -+ ++input_line_pointer; -+ ch = *input_line_pointer; -+ *input_line_pointer = '\0'; -+ -+ if (strcmp (name, "rvc") == 0) -+ riscv_opts.rvc = 1; -+ else if (strcmp (name, "norvc") == 0) -+ riscv_opts.rvc = 0; -+ else if (strcmp (name, "push") == 0) -+ { -+ struct riscv_option_stack *s; -+ -+ s = (struct riscv_option_stack *) xmalloc (sizeof *s); -+ s->next = riscv_opts_stack; -+ s->options = riscv_opts; -+ riscv_opts_stack = s; -+ } -+ else if (strcmp (name, "pop") == 0) -+ { -+ struct riscv_option_stack *s; -+ -+ s = riscv_opts_stack; -+ if (s == NULL) -+ as_bad (_(".option pop with no .option push")); -+ else -+ { -+ riscv_opts = s->options; -+ riscv_opts_stack = s->next; -+ free (s); -+ } -+ } -+ else -+ { -+ as_warn (_("Unrecognized .option directive: %s\n"), name); -+ } -+ *input_line_pointer = ch; -+ demand_empty_rest_of_line (); -+} -+ -+/* Handle the .dtprelword and .dtpreldword pseudo-ops. They generate -+ a 32-bit or 64-bit DTP-relative relocation (BYTES says which) for -+ use in DWARF debug information. */ -+ -+static void -+s_dtprel (int bytes) -+{ -+ expressionS ex; -+ char *p; -+ -+ expression (&ex); -+ -+ if (ex.X_op != O_symbol) -+ { -+ as_bad (_("Unsupported use of %s"), (bytes == 8 -+ ? ".dtpreldword" -+ : ".dtprelword")); -+ ignore_rest_of_line (); -+ } -+ -+ p = frag_more (bytes); -+ md_number_to_chars (p, 0, bytes); -+ fix_new_exp (frag_now, p - frag_now->fr_literal, bytes, &ex, FALSE, -+ (bytes == 8 -+ ? BFD_RELOC_RISCV_TLS_DTPREL64 -+ : BFD_RELOC_RISCV_TLS_DTPREL32)); -+ -+ demand_empty_rest_of_line (); -+} -+ -+/* Handle the .bss pseudo-op. */ -+ -+static void -+s_bss (int ignore ATTRIBUTE_UNUSED) -+{ -+ subseg_set (bss_section, 0); -+ demand_empty_rest_of_line (); -+} -+ -+/* Align to a given power of two. */ -+ -+static void -+s_align (int x ATTRIBUTE_UNUSED) -+{ -+ int alignment, fill_value = 0, fill_value_specified = 0; -+ -+ alignment = get_absolute_expression (); -+ if (alignment < 0 || alignment > 31) -+ as_bad (_("unsatisfiable alignment: %d"), alignment); -+ -+ if (*input_line_pointer == ',') -+ { -+ ++input_line_pointer; -+ fill_value = get_absolute_expression (); -+ fill_value_specified = 1; -+ } -+ -+ if (!fill_value_specified && subseg_text_p (now_seg) && alignment > 2) -+ { -+ /* Emit the worst-case NOP string. The linker will delete any -+ unnecessary NOPs. This allows us to support code alignment -+ in spite of linker relaxations. */ -+ bfd_vma i, worst_case_nop_bytes = (1L << alignment) - 4; -+ char *nops = frag_more (worst_case_nop_bytes); -+ for (i = 0; i < worst_case_nop_bytes; i += 4) -+ md_number_to_chars (nops + i, RISCV_NOP, 4); -+ -+ expressionS ex; -+ ex.X_op = O_constant; -+ ex.X_add_number = worst_case_nop_bytes; -+ -+ fix_new_exp (frag_now, nops - frag_now->fr_literal, 0, -+ &ex, TRUE, BFD_RELOC_RISCV_ALIGN); -+ } -+ else if (alignment) -+ frag_align (alignment, fill_value, 0); -+ -+ record_alignment (now_seg, alignment); -+ -+ demand_empty_rest_of_line (); -+} -+ -+int -+md_estimate_size_before_relax (fragS *fragp, asection *segtype) -+{ -+ return (fragp->fr_var = relaxed_branch_length (fragp, segtype, FALSE)); -+} -+ -+/* Translate internal representation of relocation info to BFD target -+ format. */ -+ -+arelent * -+tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) -+{ -+ arelent *reloc = (arelent *) xmalloc (sizeof (arelent)); -+ -+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); -+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); -+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; -+ -+ if (fixp->fx_pcrel) -+ /* At this point, fx_addnumber is "symbol offset - pcrel address". -+ Relocations want only the symbol offset. */ -+ reloc->addend = fixp->fx_addnumber + reloc->address; -+ else -+ reloc->addend = fixp->fx_addnumber; -+ -+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); -+ if (reloc->howto == NULL) -+ { -+ if ((fixp->fx_r_type == BFD_RELOC_16 || fixp->fx_r_type == BFD_RELOC_8) -+ && fixp->fx_addsy != NULL && fixp->fx_subsy != NULL) -+ { -+ /* We don't have R_RISCV_8/16, but for this special case, -+ we can use R_RISCV_ADD8/16 with R_RISCV_SUB8/16. */ -+ return reloc; -+ } -+ -+ as_bad_where (fixp->fx_file, fixp->fx_line, -+ _("cannot represent %s relocation in object file"), -+ bfd_get_reloc_code_name (fixp->fx_r_type)); -+ return NULL; -+ } -+ -+ return reloc; -+} -+ -+int -+riscv_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED) -+{ -+ if (RELAX_BRANCH_P (fragp->fr_subtype)) -+ { -+ offsetT old_var = fragp->fr_var; -+ fragp->fr_var = relaxed_branch_length (fragp, sec, TRUE); -+ return fragp->fr_var - old_var; -+ } -+ -+ return 0; -+} -+ -+/* Convert a machine dependent frag. */ -+ -+static void -+md_convert_frag_branch (fragS *fragp) -+{ -+ bfd_byte *buf; -+ insn_t insn; -+ expressionS exp; -+ fixS *fixp; -+ -+ buf = (bfd_byte *)fragp->fr_literal + fragp->fr_fix; -+ -+ exp.X_op = O_symbol; -+ exp.X_add_symbol = fragp->fr_symbol; -+ exp.X_add_number = fragp->fr_offset; -+ -+ if (RELAX_BRANCH_TOOFAR (fragp->fr_subtype)) -+ { -+ gas_assert (fragp->fr_var == 8); -+ /* We could relax JAL to AUIPC/JALR, but we don't do this yet. */ -+ gas_assert (!RELAX_BRANCH_UNCOND (fragp->fr_subtype)); -+ -+ /* Invert the branch condition. Branch over the jump. */ -+ insn = bfd_getl32 (buf); -+ insn ^= MATCH_BEQ ^ MATCH_BNE; -+ insn |= ENCODE_SBTYPE_IMM (8); -+ md_number_to_chars ((char *) buf, insn, 4); -+ buf += 4; -+ -+ /* Jump to the target. */ -+ fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal, -+ 4, &exp, FALSE, BFD_RELOC_RISCV_JMP); -+ md_number_to_chars ((char *) buf, MATCH_JAL, 4); -+ buf += 4; -+ } -+ else -+ { -+ fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal, -+ 4, &exp, FALSE, BFD_RELOC_12_PCREL); -+ buf += 4; -+ } -+ -+ fixp->fx_file = fragp->fr_file; -+ fixp->fx_line = fragp->fr_line; -+ fixp->fx_pcrel = 1; -+ -+ gas_assert (buf == (bfd_byte *)fragp->fr_literal -+ + fragp->fr_fix + fragp->fr_var); -+ -+ fragp->fr_fix += fragp->fr_var; -+} -+ -+/* Relax a machine dependent frag. This returns the amount by which -+ the current size of the frag should change. */ -+ -+void -+md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec ATTRIBUTE_UNUSED, -+ fragS *fragp) -+{ -+ gas_assert (RELAX_BRANCH_P (fragp->fr_subtype)); -+ md_convert_frag_branch (fragp); -+} -+ -+void -+md_show_usage (FILE *stream) -+{ -+ fprintf (stream, _("\ -+RISC-V options:\n\ -+ -m32 assemble RV32 code\n\ -+ -m64 assemble RV64 code (default)\n\ -+ -fpic generate position-independent code\n\ -+ -fno-pic don't generate position-independent code (default)\n\ -+")); -+} -+ -+/* Standard calling conventions leave the CFA at SP on entry. */ -+void -+riscv_cfi_frame_initial_instructions (void) -+{ -+ cfi_add_CFA_def_cfa_register (X_SP); -+} -+ -+int -+tc_riscv_regname_to_dw2regnum (char *regname) -+{ -+ int reg; -+ -+ if ((reg = reg_lookup_internal (regname, RCLASS_GPR)) >= 0) -+ return reg; -+ -+ if ((reg = reg_lookup_internal (regname, RCLASS_FPR)) >= 0) -+ return reg + 32; -+ -+ as_bad (_("unknown register `%s'"), regname); -+ return -1; -+} -+ -+void -+riscv_elf_final_processing (void) -+{ -+ struct riscv_subset* s; -+ -+ unsigned int Xlen = 0; -+ for (s = riscv_subsets; s != NULL; s = s->next) -+ if (s->name[0] == 'X') -+ Xlen += strlen(s->name); -+ -+ char extension[Xlen]; -+ extension[0] = 0; -+ for (s = riscv_subsets; s != NULL; s = s->next) -+ if (s->name[0] == 'X') -+ strcat(extension, s->name); -+ -+ EF_SET_RISCV_EXT(elf_elfheader (stdoutput)->e_flags, -+ riscv_elf_name_to_flag (extension)); -+} -+ -+/* Pseudo-op table. */ -+ -+static const pseudo_typeS riscv_pseudo_table[] = -+{ -+ /* RISC-V-specific pseudo-ops. */ -+ {"option", s_riscv_option, 0}, -+ {"half", cons, 2}, -+ {"word", cons, 4}, -+ {"dword", cons, 8}, -+ {"dtprelword", s_dtprel, 4}, -+ {"dtpreldword", s_dtprel, 8}, -+ {"bss", s_bss, 0}, -+ {"align", s_align, 0}, -+ -+ /* leb128 doesn't work with relaxation; disallow it */ -+ {"uleb128", s_err, 0}, -+ {"sleb128", s_err, 0}, -+ -+ { NULL, NULL, 0 }, -+}; -+ -+void -+riscv_pop_insert (void) -+{ -+ extern void pop_insert (const pseudo_typeS *); -+ -+ pop_insert (riscv_pseudo_table); -+} -diff -rNU3 dist.orig/gas/config/tc-riscv.h dist/gas/config/tc-riscv.h ---- dist.orig/gas/config/tc-riscv.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/tc-riscv.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,102 @@ -+/* tc-riscv.h -- header file for tc-riscv.c. -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ This file is part of GAS. -+ -+ GAS 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, or (at your option) -+ any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#ifndef TC_RISCV -+#define TC_RISCV -+ -+#include "opcode/riscv.h" -+ -+struct frag; -+struct expressionS; -+ -+#define TARGET_BYTES_BIG_ENDIAN 0 -+ -+#define TARGET_ARCH bfd_arch_riscv -+ -+#define WORKING_DOT_WORD 1 -+#define OLD_FLOAT_READS -+#define REPEAT_CONS_EXPRESSIONS -+#define LOCAL_LABELS_FB 1 -+#define FAKE_LABEL_NAME ".L0 " -+ -+#define md_relax_frag(segment, fragp, stretch) \ -+ riscv_relax_frag(segment, fragp, stretch) -+extern int riscv_relax_frag (asection *, struct frag *, long); -+ -+#define md_section_align(seg,size) (size) -+#define md_undefined_symbol(name) (0) -+#define md_operand(x) -+ -+#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2) -+ -+#define TC_SYMFIELD_TYPE int -+ -+/* The ISA of the target may change based on command-line arguments. */ -+#define TARGET_FORMAT riscv_target_format() -+extern const char *riscv_target_format (void); -+ -+#define md_after_parse_args() riscv_after_parse_args() -+extern void riscv_after_parse_args (void); -+ -+#define tc_init_after_args() riscv_init_after_args() -+extern void riscv_init_after_args (void); -+ -+#define md_parse_long_option(arg) riscv_parse_long_option (arg) -+extern int riscv_parse_long_option (const char *); -+ -+/* Let the linker resolve all the relocs due to relaxation. */ -+#define tc_fix_adjustable(fixp) 0 -+#define md_allow_local_subtract(l,r,s) 0 -+ -+/* Values passed to md_apply_fix don't include symbol values. */ -+#define MD_APPLY_SYM_VALUE(FIX) 0 -+ -+/* Global syms must not be resolved, to support ELF shared libraries. */ -+#define EXTERN_FORCE_RELOC \ -+ (OUTPUT_FLAVOR == bfd_target_elf_flavour) -+ -+#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) ((SEG)->flags & SEC_CODE) -+#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG) 1 -+#define TC_VALIDATE_FIX_SUB(FIX, SEG) 1 -+#define TC_FORCE_RELOCATION_LOCAL(FIX) 1 -+#define DIFF_EXPR_OK 1 -+ -+extern void riscv_pop_insert (void); -+#define md_pop_insert() riscv_pop_insert() -+ -+#define TARGET_USE_CFIPOP 1 -+ -+#define tc_cfi_frame_initial_instructions riscv_cfi_frame_initial_instructions -+extern void riscv_cfi_frame_initial_instructions (void); -+ -+#define tc_regname_to_dw2regnum tc_riscv_regname_to_dw2regnum -+extern int tc_riscv_regname_to_dw2regnum (char *regname); -+ -+extern bfd_boolean rv64; -+#define DWARF2_DEFAULT_RETURN_COLUMN X_RA -+#define DWARF2_CIE_DATA_ALIGNMENT (rv64 ? 8 : 4) -+ -+#define elf_tc_final_processing riscv_elf_final_processing -+extern void riscv_elf_final_processing (void); -+ -+#endif /* TC_RISCV */ -diff -rNU3 dist.orig/gas/config/tc-vax.c dist/gas/config/tc-vax.c ---- dist.orig/gas/config/tc-vax.c 2010-06-28 16:06:57.000000000 +0200 -+++ dist/gas/config/tc-vax.c 2015-10-18 13:11:13.000000000 +0200 -@@ -24,6 +24,7 @@ - - #include "vax-inst.h" - #include "obstack.h" /* For FRAG_APPEND_1_CHAR macro in "frags.h" */ -+#include "dw2gencfi.h" - #include "subsegs.h" - #include "safe-ctype.h" - -@@ -392,6 +393,9 @@ - && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol) - && fragP->fr_symbol != NULL - && flag_want_pic -+#ifdef OBJ_ELF -+ && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN -+#endif - && (!S_IS_DEFINED (fragP->fr_symbol) - || S_IS_WEAK (fragP->fr_symbol) - || S_IS_EXTERNAL (fragP->fr_symbol))) -@@ -1073,6 +1077,154 @@ - return retval; - } - -+#ifdef OBJ_AOUT -+#ifndef BFD_ASSEMBLER -+void -+tc_aout_fix_to_chars (where, fixP, segment_address_in_file) -+ char *where; -+ fixS *fixP; -+ relax_addressT segment_address_in_file; -+{ -+ /* -+ * In: length of relocation (or of address) in chars: 1, 2 or 4. -+ * Out: GNU LD relocation length code: 0, 1, or 2. -+ */ -+ -+ static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2}; -+ int r_symbolnum; -+ int r_flags; -+ -+ know (fixP->fx_addsy != NULL); -+ -+ md_number_to_chars (where, -+ fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file, -+ 4); -+ -+ r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy) -+ ? S_GET_TYPE (fixP->fx_addsy) -+ : fixP->fx_addsy->sy_number); -+ r_flags = (fixP->fx_pcrel ? 1 : 0) -+ | (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */ -+ | ((nbytes_r_length[fixP->fx_size] & 3) << 1); -+ -+#if 0 -+ r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy) -+ && fixP->fx_pcrel -+ && fixP->fx_addsy != GOT_symbol -+ && fixP->fx_addsy != PLT_symbol -+ && flags_want_pic) ? 0x10 : 0); -+#endif -+ -+ switch (fixP->fx_r_type) { -+ case NO_RELOC: -+ break; -+ case NO_RELOC2: -+ if (r_flags & 8) -+ r_flags |= 0x80; /* setting the copy bit */ -+ /* says we can convert */ -+ /* to gotslot if needed */ -+ break; -+ case RELOC_32: -+ if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) { -+ r_symbolnum = fixP->fx_addsy->sy_number; -+ r_flags |= 8; /* set extern bit */ -+ } -+ break; -+ case RELOC_JMP_SLOT: -+ if (flag_want_pic) { -+ r_flags |= 0x20; /* set jmptable */ -+ r_flags &= ~0x08; /* clear extern bit */ -+ } -+ break; -+ case RELOC_JMP_TBL: -+ if (flag_want_pic) { -+ r_flags |= 0x20; /* set jmptable */ -+ r_flags |= 0x08; /* set extern bit */ -+ } -+ break; -+ case RELOC_GLOB_DAT: -+ if (flag_want_pic) { -+ r_flags |= 0x10; /* set baserel bit */ -+ r_symbolnum = fixP->fx_addsy->sy_number; -+ if (S_IS_EXTERNAL(fixP->fx_addsy)) -+ r_flags |= 8; /* set extern bit */ -+ } -+ break; -+ } -+ -+ where[4] = (r_symbolnum >> 0) & 0xff; -+ where[5] = (r_symbolnum >> 8) & 0xff; -+ where[6] = (r_symbolnum >> 16) & 0xff; -+ where[7] = r_flags; -+} -+#endif /* !BFD_ASSEMBLER */ -+#endif /* OBJ_AOUT */ -+ -+/* -+ * BUGS, GRIPES, APOLOGIA, etc. -+ * -+ * The opcode table 'votstrs' needs to be sorted on opcode frequency. -+ * That is, AFTER we hash it with hash_...(), we want most-used opcodes -+ * to come out of the hash table faster. -+ * -+ * I am sorry to inflict yet another VAX assembler on the world, but -+ * RMS says we must do everything from scratch, to prevent pin-heads -+ * restricting this software. -+ */ -+ -+/* -+ * This is a vaguely modular set of routines in C to parse VAX -+ * assembly code using DEC mnemonics. It is NOT un*x specific. -+ * -+ * The idea here is that the assembler has taken care of all: -+ * labels -+ * macros -+ * listing -+ * pseudo-ops -+ * line continuation -+ * comments -+ * condensing any whitespace down to exactly one space -+ * and all we have to do is parse 1 line into a vax instruction -+ * partially formed. We will accept a line, and deliver: -+ * an error message (hopefully empty) -+ * a skeleton VAX instruction (tree structure) -+ * textual pointers to all the operand expressions -+ * a warning message that notes a silly operand (hopefully empty) -+ */ -+ -+/* -+ * E D I T H I S T O R Y -+ * -+ * 17may86 Dean Elsner. Bug if line ends immediately after opcode. -+ * 30apr86 Dean Elsner. New vip_op() uses arg block so change call. -+ * 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults(). -+ * 2jan86 Dean Elsner. Invent synthetic opcodes. -+ * Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC, -+ * which means this is not a real opcode, it is like a macro; it will -+ * be relax()ed into 1 or more instructions. -+ * Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised -+ * like a regular branch instruction. Option added to vip_begin(): -+ * exclude synthetic opcodes. Invent synthetic_votstrs[]. -+ * 31dec85 Dean Elsner. Invent vit_opcode_nbytes. -+ * Also make vit_opcode into a char[]. We now have n-byte vax opcodes, -+ * so caller's don't have to know the difference between a 1-byte & a -+ * 2-byte op-code. Still need vax_opcodeT concept, so we know how -+ * big an object must be to hold an op.code. -+ * 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h" -+ * because vax opcodes may be 16 bits. Our crufty C compiler was -+ * happily initialising 8-bit vot_codes with 16-bit numbers! -+ * (Wouldn't the 'phone company like to compress data so easily!) -+ * 29dec85 Dean Elsner. New static table vax_operand_width_size[]. -+ * Invented so we know hw many bytes a "I^#42" needs in its immediate -+ * operand. Revised struct vop in "vax-inst.h": explicitly include -+ * byte length of each operand, and it's letter-code datum type. -+ * 17nov85 Dean Elsner. Name Change. -+ * Due to ar(1) truncating names, we learned the hard way that -+ * "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off -+ * the archived object name. SO... we shortened the name of this -+ * source file, and changed the makefile. -+ */ -+ - /* Parse a vax operand in DEC assembler notation. - For speed, expect a string of whitespace to be reduced to a single ' '. - This is the case for GNU AS, and is easy for other DEC-compatible -@@ -3150,7 +3302,7 @@ - if (flag_want_pic && operandP->vop_mode == 8 - && this_add_symbol != NULL) - { -- as_warn (_("Symbol %s used as immediate operand in PIC mode."), -+ as_warn (_("Symbol '%s' used as immediate operand in PIC mode."), - S_GET_NAME (this_add_symbol)); - } - #endif -@@ -3226,7 +3378,15 @@ - length = 4; - } - } -+#ifdef OBJ_ELF -+ if (flag_want_pic && this_add_symbol != NULL) -+ { -+ as_warn (_("Symbol '%s' used as displacement in PIC mode."), -+ S_GET_NAME (this_add_symbol)); -+ } -+#endif - p = frag_more (1 + length); -+ know (operandP->vop_reg != 0xf); - know (operandP->vop_reg >= 0); - p[0] = operandP->vop_reg - | ((at | "?\12\14?\16"[length]) << 4); -@@ -3411,3 +3571,38 @@ - { - return vax_md_atof (type, litP, sizeP); - } -+ -+void -+vax_cfi_frame_initial_instructions (void) -+{ -+ cfi_add_CFA_def_cfa (14, 0); -+} -+ -+int -+tc_vax_regname_to_dw2regnum (char *regname) -+{ -+ unsigned int i; -+ static const struct { char *name; int dw2regnum; } regnames[] = -+ { -+ { "r0", 0 }, { "r1", 1 }, { "r2", 2 }, { "r3", 3 }, -+ { "r4", 4 }, { "r5", 5 }, { "r6", 6 }, { "r7", 7 }, -+ { "r8", 8 }, { "r9", 9 }, { "r10", 10 }, { "r11", 11 }, -+ { "ap", 12 }, { "fp", 13 }, { "sp", 14 }, { "pc", 15 }, -+ { "psw", 16 }, -+ }; -+ -+ for (i = 0; i < ARRAY_SIZE (regnames); ++i) -+ if (strcmp (regnames[i].name, regname) == 0) -+ return regnames[i].dw2regnum; -+ -+ return -1; -+} -+ -+void -+vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes) -+{ -+ vax_cons_special_reloc = "pcrel"; -+ expP->X_add_number += nbytes; -+ emit_expr (expP, nbytes); -+ vax_cons_special_reloc = NULL; -+} -diff -rNU3 dist.orig/gas/config/tc-vax.h dist/gas/config/tc-vax.h ---- dist.orig/gas/config/tc-vax.h 2007-07-03 13:01:05.000000000 +0200 -+++ dist/gas/config/tc-vax.h 2015-10-18 13:11:13.000000000 +0200 -@@ -71,9 +71,17 @@ - == S_GET_SEGMENT ((FIX)->fx_addsy))) \ - || S_IS_LOCAL ((FIX)->fx_addsy))) - --/* -- * Local Variables: -- * comment-column: 0 -- * fill-column: 131 -- * End: -- */ -+#define TARGET_USE_CFIPOP 1 -+ -+#define tc_cfi_frame_initial_instructions vax_cfi_frame_initial_instructions -+extern void vax_cfi_frame_initial_instructions (void); -+ -+#define tc_regname_to_dw2regnum tc_vax_regname_to_dw2regnum -+extern int tc_vax_regname_to_dw2regnum (char *); -+ -+#define tc_cfi_emit_pcrel_expr vax_cfi_emit_pcrel_expr -+extern void vax_cfi_emit_pcrel_expr (expressionS *, unsigned int); -+ -+#define DWARF2_LINE_MIN_INSN_LENGTH 1 -+#define DWARF2_DEFAULT_RETURN_COLUMN 15 -+#define DWARF2_CIE_DATA_ALIGNMENT -4 -diff -rNU3 dist.orig/gas/config/te-armnbsd.h dist/gas/config/te-armnbsd.h ---- dist.orig/gas/config/te-armnbsd.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/te-armnbsd.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,22 @@ -+/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#include "te-nbsd.h" -+ -+#define CPU_DEFAULT ARM_ARCH_V4 -diff -rNU3 dist.orig/gas/config/te-armnbsdeabi.h dist/gas/config/te-armnbsdeabi.h ---- dist.orig/gas/config/te-armnbsdeabi.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/te-armnbsdeabi.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#include "te-nbsd.h" -+ -+/* The EABI requires the use of VFP. */ -+#define CPU_DEFAULT ARM_ARCH_V5TEJ -+#define FPU_DEFAULT FPU_ARCH_VFP -+#define EABI_DEFAULT EF_ARM_EABI_VER5 -diff -rNU3 dist.orig/gas/config/te-armnbsdeabihf.h dist/gas/config/te-armnbsdeabihf.h ---- dist.orig/gas/config/te-armnbsdeabihf.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/te-armnbsdeabihf.h 2015-10-18 13:11:13.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -+ -+ This file is part of GAS, the GNU Assembler. -+ -+ GAS 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, -+ or (at your option) any later version. -+ -+ GAS 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 GAS; see the file COPYING. If not, write to the Free -+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA -+ 02110-1301, USA. */ -+ -+#include "te-nbsd.h" -+ -+/* The EABI requires the use of VFP. */ -+#define CPU_DEFAULT ARM_ARCH_V5TEJ -+#define FPU_DEFAULT FPU_ARCH_VFP_V2 -+#define EABI_DEFAULT EF_ARM_EABI_VER5 -diff -rNU3 dist.orig/gas/config/vax-inst.h dist/gas/config/vax-inst.h ---- dist.orig/gas/config/vax-inst.h 2009-09-02 09:24:21.000000000 +0200 -+++ dist/gas/config/vax-inst.h 2015-10-18 13:11:13.000000000 +0200 -@@ -66,6 +66,8 @@ - #define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */ - #define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/ - /* Needs VAX_PC_RELATIVE_MODE byte after it*/ -+#define VAX_CALLS (0xFB) /* Call with arg list on stack */ -+#define VAX_CALLG (0xFA) /* Call with arg list in memory */ - - struct vit /* vax instruction tree */ - { -diff -rNU3 dist.orig/gas/configure dist/gas/configure ---- dist.orig/gas/configure 2012-06-18 06:43:06.000000000 +0200 -+++ dist/gas/configure 2015-10-18 13:11:13.000000000 +0200 -@@ -12146,7 +12146,7 @@ - fi - ;; - -- epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | openrisc) -+ epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | or1k | or1knd) - using_cgen=yes - ;; - -@@ -12340,6 +12340,8 @@ - cgen_cpu_prefix="" - if test $using_cgen = yes ; then - case ${target_cpu} in -+ or1knd) -+ cgen_cpu_prefix=or1k ;; - *) cgen_cpu_prefix=${target_cpu} ;; - esac - -diff -rNU3 dist.orig/gas/configure.in dist/gas/configure.in ---- dist.orig/gas/configure.in 2012-11-05 17:27:44.000000000 +0100 -+++ dist/gas/configure.in 2015-10-18 13:11:13.000000000 +0200 -@@ -314,7 +314,7 @@ - fi - ;; - -- epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | openrisc) -+ epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | or1k | or1knd) - using_cgen=yes - ;; - -@@ -504,6 +504,8 @@ - cgen_cpu_prefix="" - if test $using_cgen = yes ; then - case ${target_cpu} in -+ or1knd) -+ cgen_cpu_prefix=or1k ;; - *) cgen_cpu_prefix=${target_cpu} ;; - esac - AC_SUBST(cgen_cpu_prefix) -diff -rNU3 dist.orig/gas/configure.tgt dist/gas/configure.tgt ---- dist.orig/gas/configure.tgt 2012-09-04 14:53:45.000000000 +0200 -+++ dist/gas/configure.tgt 2015-10-18 13:11:13.000000000 +0200 -@@ -51,7 +51,7 @@ - m32c) cpu_type=m32c endian=little ;; - m32r) cpu_type=m32r endian=big ;; - m32rle) cpu_type=m32r endian=little ;; -- m5200) cpu_type=m68k ;; -+ m5200|m5407) cpu_type=m68k ;; - m68008) cpu_type=m68k ;; - m680[012346]0) cpu_type=m68k ;; - m6811|m6812|m68hc12) cpu_type=m68hc11 ;; -@@ -61,11 +61,13 @@ - mips*el) cpu_type=mips endian=little ;; - mips*) cpu_type=mips endian=big ;; - mt) cpu_type=mt endian=big ;; -- or32*) cpu_type=or32 endian=big ;; -+ or1k*) cpu_type=or1k endian=big ;; - pjl*) cpu_type=pj endian=little ;; - pj*) cpu_type=pj endian=big ;; - powerpc*le*) cpu_type=ppc endian=little ;; - powerpc*) cpu_type=ppc endian=big ;; -+ riscv*eb) cpu_type=riscv endian=big ;; -+ riscv*) cpu_type=riscv endian=little ;; - rs6000*) cpu_type=ppc ;; - rl78*) cpu_type=rl78 ;; - rx) cpu_type=rx ;; -@@ -100,6 +102,7 @@ - case ${generic_target} in - aarch64*-*-elf) fmt=elf;; - aarch64*-*-linux*) fmt=elf em=linux ;; -+ aarch64*-*-netbsd*) fmt=elf em=nbsd ;; - - alpha-*-*vms*) fmt=evax ;; - alpha-*-osf*) fmt=ecoff ;; -@@ -111,9 +114,11 @@ - arc-*-elf*) fmt=elf ;; - - arm-*-aout) fmt=aout ;; -- arm-*-coff) fmt=coff ;; -- arm-*-rtems*) fmt=elf ;; -- arm-*-elf) fmt=elf ;; -+ arm-*-coff | thumb-*-coff) fmt=coff ;; -+ arm-*-rtems* | thumb-*-rtems*) fmt=elf ;; -+ arm-*-elf | thumb-*-elf) fmt=elf ;; -+ arm-*-netbsdelf*-*eabihf*) fmt=elf em=armnbsdeabihf ;; -+ arm-*-netbsdelf*-*eabi*) fmt=elf em=armnbsdeabi ;; - arm-*-eabi*) fmt=elf em=armeabi ;; - arm-*-symbianelf*) fmt=elf em=symbian ;; - arm-*-kaos*) fmt=elf ;; -@@ -124,8 +129,8 @@ - arm-*-uclinux*eabi*) fmt=elf em=armlinuxeabi ;; - arm-*-uclinux*) fmt=elf em=linux ;; - arm-*-nacl*) fmt=elf em=nacl ;; -- arm-*-netbsdelf*) fmt=elf em=nbsd ;; -- arm-*-*n*bsd*) fmt=aout em=nbsd ;; -+ arm-*-netbsdelf*) fmt=elf em=armnbsd ;; -+ arm-*-*n*bsd*) fmt=aout em=armnbsd ;; - arm-*-nto*) fmt=elf ;; - arm-epoc-pe) fmt=coff em=epoc-pe ;; - arm-wince-pe | arm-*-wince | arm*-*-mingw32ce* | arm*-*-cegcc*) -@@ -334,10 +339,9 @@ - ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; - ns32k-*-*n*bsd*) fmt=aout em=nbsd532 ;; - -- openrisc-*-*) fmt=elf ;; -- -- or32-*-rtems*) fmt=elf ;; -- or32-*-elf) fmt=elf ;; -+ or1k-*-elf) fmt=elf ;; -+ or1k-*-linux*) fmt=elf em=linux ;; -+ or1k-*-netbsd*) fmt=elf em=nbsd ;; - - pj*) fmt=elf ;; - -@@ -357,6 +361,11 @@ - ppc-*-kaos*) fmt=elf ;; - ppc-*-lynxos*) fmt=elf em=lynx ;; - -+ riscv*eb-*-linux*) fmt=elf endian=big em=linux ;; -+ riscv*eb-*-netbsd*) fmt=elf endian=big em=nbsd ;; -+ riscv*-*-linux*) fmt=elf endian=little em=linux ;; -+ riscv*-*-netbsd*) fmt=elf endian=little em=nbsd ;; -+ - s390-*-linux-*) fmt=elf em=linux ;; - s390-*-tpf*) fmt=elf ;; - -@@ -451,7 +460,7 @@ - esac - - case ${cpu_type} in -- aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) -+ aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k) - bfd_gas=yes - ;; - esac -diff -rNU3 dist.orig/gas/doc/Makefile.am dist/gas/doc/Makefile.am ---- dist.orig/gas/doc/Makefile.am 2012-09-04 14:53:45.000000000 +0200 -+++ dist/gas/doc/Makefile.am 2015-10-18 13:11:13.000000000 +0200 -@@ -24,6 +24,8 @@ - -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc - - asconfig.texi: $(CONFIG).texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_asconfig.text: - rm -f asconfig.texi - cp $(srcdir)/$(CONFIG).texi ./asconfig.texi - chmod u+w ./asconfig.texi -@@ -103,6 +105,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod - -($(POD2MAN) as.pod | \ -diff -rNU3 dist.orig/gas/doc/Makefile.in dist/gas/doc/Makefile.in ---- dist.orig/gas/doc/Makefile.in 2012-09-04 14:53:45.000000000 +0200 -+++ dist/gas/doc/Makefile.in 2015-10-18 13:11:13.000000000 +0200 -@@ -374,6 +374,8 @@ - -rm -rf .libs _libs - - as.info: as.texinfo $(as_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.info: as.texinfo $(as_TEXINFOS) - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -756,6 +758,8 @@ - - - asconfig.texi: $(CONFIG).texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_asconfig.texi: - rm -f asconfig.texi - cp $(srcdir)/$(CONFIG).texi ./asconfig.texi - chmod u+w ./asconfig.texi -@@ -773,6 +777,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod - -($(POD2MAN) as.pod | \ -diff -rNU3 dist.orig/gas/doc/as.info dist/gas/doc/as.info ---- dist.orig/gas/doc/as.info 2013-03-25 10:10:23.000000000 +0100 -+++ dist/gas/doc/as.info 2015-10-18 13:11:13.000000000 +0200 -@@ -22275,8 +22275,8 @@ - * -g command line option, Alpha: Alpha Options. (line 47) - * -G command line option, Alpha: Alpha Options. (line 53) - * -G option (MIPS): MIPS Opts. (line 8) --* -H option, VAX/VMS: VAX-Opts. (line 81) - * -h option, VAX/VMS: VAX-Opts. (line 45) -+* -H option, VAX/VMS: VAX-Opts. (line 81) - * -I PATH: I. (line 6) - * -ignore-parallel-conflicts option, M32RX: M32R-Opts. (line 87) - * -Ip option, M32RX: M32R-Opts. (line 97) -@@ -22876,8 +22876,8 @@ - * BSD syntax: PDP-11-Syntax. (line 6) - * bss directive, i960: Directives-i960. (line 6) - * bss directive, TIC54X: TIC54X-Directives. (line 29) --* bss section <1>: bss. (line 6) --* bss section: Ld Sections. (line 20) -+* bss section <1>: Ld Sections. (line 20) -+* bss section: bss. (line 6) - * bug criteria: Bug Criteria. (line 6) - * bug reports: Bug Reporting. (line 6) - * bugs in assembler: Reporting Bugs. (line 6) -diff -rNU3 dist.orig/gas/doc/c-mips.texi dist/gas/doc/c-mips.texi ---- dist.orig/gas/doc/c-mips.texi 2012-09-04 16:16:07.000000000 +0200 -+++ dist/gas/doc/c-mips.texi 2015-10-18 13:11:13.000000000 +0200 -@@ -210,6 +210,14 @@ - @itemx -mno-fix-vr4130 - Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata. - -+@item -mfix-loongson2f-btb -+@itemx -mno-fix-loongson2f-btb -+Clear the Branch Target Buffer before any jump through a register. This -+option is intended to be used on kernel code for the Loongson 2F processor -+only; userland code compiled with this option will fault, and kernel code -+compiled with this option run on another processor than Loongson 2F will -+yield unpredictable results. -+ - @item -mfix-24k - @itemx -mno-fix-24k - Insert nops to work around the 24K @samp{eret}/@samp{deret} errata. -diff -rNU3 dist.orig/gas/remap.c dist/gas/remap.c ---- dist.orig/gas/remap.c 2011-03-11 15:18:24.000000000 +0100 -+++ dist/gas/remap.c 2015-10-18 13:11:13.000000000 +0200 -@@ -84,8 +84,8 @@ - return xstrdup (filename); - name = filename + map->old_len; - name_len = strlen (name) + 1; -- s = (char *) alloca (name_len + map->new_len); -+ s = (char *) xmalloc (name_len + map->new_len); - memcpy (s, map->new_prefix, map->new_len); - memcpy (s + map->new_len, name, name_len); -- return xstrdup (s); -+ return s; - } -diff -rNU3 dist.orig/gprof/corefile.c dist/gprof/corefile.c ---- dist.orig/gprof/corefile.c 2012-03-06 14:54:59.000000000 +0100 -+++ dist/gprof/corefile.c 2015-10-18 13:11:17.000000000 +0200 -@@ -30,6 +30,8 @@ - #include "corefile.h" - #include "safe-ctype.h" - -+#include -+ - bfd *core_bfd; - static int core_num_syms; - static asymbol **core_syms; -diff -rNU3 dist.orig/gprof/gprof.c dist/gprof/gprof.c ---- dist.orig/gprof/gprof.c 2009-06-12 17:33:30.000000000 +0200 -+++ dist/gprof/gprof.c 2015-10-18 13:11:17.000000000 +0200 -@@ -47,6 +47,8 @@ - - static void usage (FILE *, int) ATTRIBUTE_NORETURN; - -+#include -+ - const char * whoami; - const char * function_mapping_file; - static const char * external_symbol_table; -diff -rNU3 dist.orig/gprof/gprof.info dist/gprof/gprof.info ---- dist.orig/gprof/gprof.info 2012-11-13 15:19:35.000000000 +0100 -+++ dist/gprof/gprof.info 2015-10-18 13:11:17.000000000 +0200 -@@ -2441,34 +2441,34 @@ -  - Tag Table: - Node: Top777 --Node: Introduction2102 --Node: Compiling4594 --Node: Executing8650 --Node: Invoking11438 --Node: Output Options12853 --Node: Analysis Options19942 --Node: Miscellaneous Options23640 --Node: Deprecated Options24895 --Node: Symspecs26964 --Node: Output28790 --Node: Flat Profile29830 --Node: Call Graph34783 --Node: Primary38015 --Node: Callers40603 --Node: Subroutines42720 --Node: Cycles44561 --Node: Line-by-line51338 --Node: Annotated Source55411 --Node: Inaccuracy58410 --Node: Sampling Error58668 --Node: Assumptions61572 --Node: How do I?63042 --Node: Incompatibilities64596 --Node: Details66090 --Node: Implementation66483 --Node: File Format72380 --Node: Internals76670 --Node: Debugging85165 --Node: GNU Free Documentation License86766 -+Node: Introduction2103 -+Node: Compiling4595 -+Node: Executing8651 -+Node: Invoking11439 -+Node: Output Options12854 -+Node: Analysis Options19943 -+Node: Miscellaneous Options23641 -+Node: Deprecated Options24896 -+Node: Symspecs26965 -+Node: Output28791 -+Node: Flat Profile29831 -+Node: Call Graph34784 -+Node: Primary38016 -+Node: Callers40604 -+Node: Subroutines42721 -+Node: Cycles44562 -+Node: Line-by-line51339 -+Node: Annotated Source55412 -+Node: Inaccuracy58411 -+Node: Sampling Error58669 -+Node: Assumptions61573 -+Node: How do I?63043 -+Node: Incompatibilities64597 -+Node: Details66091 -+Node: Implementation66484 -+Node: File Format72381 -+Node: Internals76671 -+Node: Debugging85166 -+Node: GNU Free Documentation License86767 -  - End Tag Table -diff -rNU3 dist.orig/include/bfdlink.h dist/include/bfdlink.h ---- dist.orig/include/bfdlink.h 2012-04-09 18:27:18.000000000 +0200 -+++ dist/include/bfdlink.h 2015-10-18 13:11:17.000000000 +0200 -@@ -435,6 +435,10 @@ - option). If this is NULL, no symbols are being wrapped. */ - struct bfd_hash_table *wrap_hash; - -+ /* Hash table of symbols which may be left unresolved during -+ a link. If this is NULL, no symbols can be left unresolved. */ -+ struct bfd_hash_table *ignore_hash; -+ - /* The output BFD. */ - bfd *output_bfd; - -diff -rNU3 dist.orig/include/dis-asm.h dist/include/dis-asm.h ---- dist.orig/include/dis-asm.h 2012-09-04 14:53:46.000000000 +0200 -+++ dist/include/dis-asm.h 2015-10-18 13:11:17.000000000 +0200 -@@ -226,7 +226,6 @@ - extern int print_insn_bfin (bfd_vma, disassemble_info *); - extern int print_insn_big_arm (bfd_vma, disassemble_info *); - extern int print_insn_big_mips (bfd_vma, disassemble_info *); --extern int print_insn_big_or32 (bfd_vma, disassemble_info *); - extern int print_insn_big_powerpc (bfd_vma, disassemble_info *); - extern int print_insn_big_score (bfd_vma, disassemble_info *); - extern int print_insn_cr16 (bfd_vma, disassemble_info *); -@@ -253,7 +252,6 @@ - extern int print_insn_iq2000 (bfd_vma, disassemble_info *); - extern int print_insn_little_arm (bfd_vma, disassemble_info *); - extern int print_insn_little_mips (bfd_vma, disassemble_info *); --extern int print_insn_little_or32 (bfd_vma, disassemble_info *); - extern int print_insn_little_powerpc (bfd_vma, disassemble_info *); - extern int print_insn_little_score (bfd_vma, disassemble_info *); - extern int print_insn_lm32 (bfd_vma, disassemble_info *); -@@ -275,9 +273,10 @@ - extern int print_insn_msp430 (bfd_vma, disassemble_info *); - extern int print_insn_mt (bfd_vma, disassemble_info *); - extern int print_insn_ns32k (bfd_vma, disassemble_info *); --extern int print_insn_openrisc (bfd_vma, disassemble_info *); -+extern int print_insn_or1k (bfd_vma, disassemble_info *); - extern int print_insn_pdp11 (bfd_vma, disassemble_info *); - extern int print_insn_pj (bfd_vma, disassemble_info *); -+extern int print_insn_riscv (bfd_vma, disassemble_info *); - extern int print_insn_rs6000 (bfd_vma, disassemble_info *); - extern int print_insn_s390 (bfd_vma, disassemble_info *); - extern int print_insn_sh (bfd_vma, disassemble_info *); -diff -rNU3 dist.orig/include/elf/common.h dist/include/elf/common.h ---- dist.orig/include/elf/common.h 2012-09-04 14:53:47.000000000 +0200 -+++ dist/include/elf/common.h 2015-10-18 13:11:17.000000000 +0200 -@@ -194,7 +194,7 @@ - #define EM_MN10300 89 /* Matsushita MN10300 */ - #define EM_MN10200 90 /* Matsushita MN10200 */ - #define EM_PJ 91 /* picoJava */ --#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ -+#define EM_OR1K 92 /* OpenRISC 1000 32-bit embedded processor */ - #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ - #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ - #define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ -@@ -298,6 +298,7 @@ - #define EM_TILEGX 191 /* Tilera TILE-Gx multicore architecture family */ - #define EM_RL78 197 /* Renesas RL78 family. */ - #define EM_78K0R 199 /* Renesas 78K0R. */ -+#define EM_RISCV 243 /* RISC-V */ - - /* If it is necessary to assign new unofficial EM_* values, please pick large - random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision -@@ -357,9 +358,6 @@ - /* Ubicom IP2xxx; Written in the absense of an ABI. */ - #define EM_IP2K_OLD 0x8217 - --/* (Deprecated) Temporary number for the OpenRISC processor. */ --#define EM_OR32 0x8472 -- - /* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */ - #define EM_CYGNUS_POWERPC 0x9025 - -@@ -607,6 +605,16 @@ - /* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */ - - #define NT_NETBSD_IDENT 1 -+#define NT_NETBSD_MARCH 5 -+ -+/* Values for NetBSD .note.netbsd.ident notes. Note name is "PaX". */ -+#define NT_NETBSD_PAX 3 -+#define NT_NETBSD_PAX_MPROTECT 0x01 /* Force enable Mprotect */ -+#define NT_NETBSD_PAX_NOMPROTECT 0x02 /* Force disable Mprotect */ -+#define NT_NETBSD_PAX_GUARD 0x04 /* Force enable Segvguard */ -+#define NT_NETBSD_PAX_NOGUARD 0x08 /* Force disable Servguard */ -+#define NT_NETBSD_PAX_ASLR 0x10 /* Force enable ASLR */ -+#define NT_NETBSD_PAX_NOASLR 0x20 /* Force disable ASLR */ - - /* Values for OpenBSD .note.openbsd.ident notes. Note name is "OpenBSD". */ - -diff -rNU3 dist.orig/include/elf/openrisc.h dist/include/elf/openrisc.h ---- dist.orig/include/elf/openrisc.h 2010-04-15 12:26:08.000000000 +0200 -+++ dist/include/elf/openrisc.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,39 +0,0 @@ --/* OpenRISC ELF support for BFD. -- Copyright 2001, 2010 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. */ -- --#ifndef _ELF_OPENRISC_H --#define _ELF_OPENRISC_H -- --#include "elf/reloc-macros.h" -- --/* Relocations. */ --START_RELOC_NUMBERS (elf_openrisc_reloc_type) -- RELOC_NUMBER (R_OPENRISC_NONE, 0) -- RELOC_NUMBER (R_OPENRISC_INSN_REL_26, 1) -- RELOC_NUMBER (R_OPENRISC_INSN_ABS_26, 2) -- RELOC_NUMBER (R_OPENRISC_LO_16_IN_INSN, 3) -- RELOC_NUMBER (R_OPENRISC_HI_16_IN_INSN, 4) -- RELOC_NUMBER (R_OPENRISC_8, 5) -- RELOC_NUMBER (R_OPENRISC_16, 6) -- RELOC_NUMBER (R_OPENRISC_32, 7) -- RELOC_NUMBER (R_OPENRISC_GNU_VTINHERIT, 8) -- RELOC_NUMBER (R_OPENRISC_GNU_VTENTRY, 9) --END_RELOC_NUMBERS (R_OPENRISC_max) -- --#endif /* _ELF_OPENRISC_H */ -diff -rNU3 dist.orig/include/elf/or1k.h dist/include/elf/or1k.h ---- dist.orig/include/elf/or1k.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/include/elf/or1k.h 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,65 @@ -+/* Or1k ELF support for BFD. -+ Copyright 2001-2014 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, see */ -+ -+#ifndef _ELF_OR1K_H -+#define _ELF_OR1K_H -+ -+#include "elf/reloc-macros.h" -+ -+/* Relocations. */ -+START_RELOC_NUMBERS (elf_or1k_reloc_type) -+ RELOC_NUMBER (R_OR1K_NONE, 0) -+ RELOC_NUMBER (R_OR1K_32, 1) -+ RELOC_NUMBER (R_OR1K_16, 2) -+ RELOC_NUMBER (R_OR1K_8, 3) -+ RELOC_NUMBER (R_OR1K_LO_16_IN_INSN, 4) -+ RELOC_NUMBER (R_OR1K_HI_16_IN_INSN, 5) -+ RELOC_NUMBER (R_OR1K_INSN_REL_26, 6) -+ RELOC_NUMBER (R_OR1K_GNU_VTENTRY, 7) -+ RELOC_NUMBER (R_OR1K_GNU_VTINHERIT, 8) -+ RELOC_NUMBER (R_OR1K_32_PCREL, 9) -+ RELOC_NUMBER (R_OR1K_16_PCREL, 10) -+ RELOC_NUMBER (R_OR1K_8_PCREL, 11) -+ RELOC_NUMBER (R_OR1K_GOTPC_HI16, 12) -+ RELOC_NUMBER (R_OR1K_GOTPC_LO16, 13) -+ RELOC_NUMBER (R_OR1K_GOT16, 14) -+ RELOC_NUMBER (R_OR1K_PLT26, 15) -+ RELOC_NUMBER (R_OR1K_GOTOFF_HI16, 16) -+ RELOC_NUMBER (R_OR1K_GOTOFF_LO16, 17) -+ RELOC_NUMBER (R_OR1K_COPY, 18) -+ RELOC_NUMBER (R_OR1K_GLOB_DAT, 19) -+ RELOC_NUMBER (R_OR1K_JMP_SLOT, 20) -+ RELOC_NUMBER (R_OR1K_RELATIVE, 21) -+ RELOC_NUMBER (R_OR1K_TLS_GD_HI16, 22) -+ RELOC_NUMBER (R_OR1K_TLS_GD_LO16, 23) -+ RELOC_NUMBER (R_OR1K_TLS_LDM_HI16, 24) -+ RELOC_NUMBER (R_OR1K_TLS_LDM_LO16, 25) -+ RELOC_NUMBER (R_OR1K_TLS_LDO_HI16, 26) -+ RELOC_NUMBER (R_OR1K_TLS_LDO_LO16, 27) -+ RELOC_NUMBER (R_OR1K_TLS_IE_HI16, 28) -+ RELOC_NUMBER (R_OR1K_TLS_IE_LO16, 29) -+ RELOC_NUMBER (R_OR1K_TLS_LE_HI16, 30) -+ RELOC_NUMBER (R_OR1K_TLS_LE_LO16, 31) -+ RELOC_NUMBER (R_OR1K_TLS_TPOFF, 32) -+ RELOC_NUMBER (R_OR1K_TLS_DTPOFF, 33) -+ RELOC_NUMBER (R_OR1K_TLS_DTPMOD, 34) -+END_RELOC_NUMBERS (R_OR1K_max) -+ -+#define EF_OR1K_NODELAY (1UL << 0) -+ -+#endif /* _ELF_OR1K_H */ -diff -rNU3 dist.orig/include/elf/or32.h dist/include/elf/or32.h ---- dist.orig/include/elf/or32.h 2010-05-18 05:31:06.000000000 +0200 -+++ dist/include/elf/or32.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,56 +0,0 @@ --/* OR1K ELF support for BFD. Derived from ppc.h. -- Copyright (C) 2002, 2010 Free Software Foundation, Inc. -- Contributed by Ivan Guzvinec -- -- 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. */ -- --#ifndef _ELF_OR1K_H --#define _ELF_OR1K_H -- --#include "elf/reloc-macros.h" -- --/* Relocations. */ --START_RELOC_NUMBERS (elf_or32_reloc_type) -- RELOC_NUMBER (R_OR32_NONE, 0) -- RELOC_NUMBER (R_OR32_32, 1) -- RELOC_NUMBER (R_OR32_16, 2) -- RELOC_NUMBER (R_OR32_8, 3) -- RELOC_NUMBER (R_OR32_CONST, 4) -- RELOC_NUMBER (R_OR32_CONSTH, 5) -- RELOC_NUMBER (R_OR32_JUMPTARG, 6) -- RELOC_NUMBER (R_OR32_GNU_VTENTRY, 7) -- RELOC_NUMBER (R_OR32_GNU_VTINHERIT, 8) --END_RELOC_NUMBERS (R_OR32_max) -- --/* Four bit OR32 machine type field. */ --#define EF_OR32_MACH 0x0000000f -- --/* Various CPU types. */ --#define E_OR32_MACH_BASE 0x00000000 --#define E_OR32_MACH_UNUSED1 0x00000001 --#define E_OR32_MACH_UNUSED2 0x00000002 --#define E_OR32_MACH_UNUSED4 0x00000003 -- --/* Processor specific section headers, sh_type field */ --#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ -- entries in this section \ -- based on the address \ -- specified in the associated \ -- symbol table entry. */ -- --#endif /* _ELF_OR1K_H */ -diff -rNU3 dist.orig/include/elf/riscv.h dist/include/elf/riscv.h ---- dist.orig/include/elf/riscv.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/include/elf/riscv.h 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,138 @@ -+/* RISC-V ELF support for BFD. -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrw Waterman at UC Berkeley. -+ Based on MIPS ELF support for BFD, 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. */ -+ -+/* This file holds definitions specific to the RISCV ELF ABI. Note -+ that most of this is not actually implemented by BFD. */ -+ -+#ifndef _ELF_RISCV_H -+#define _ELF_RISCV_H -+ -+#include "elf/reloc-macros.h" -+ -+/* Relocation types. */ -+START_RELOC_NUMBERS (elf_riscv_reloc_type) -+ /* Relocation types used by the dynamic linker. */ -+ RELOC_NUMBER (R_RISCV_NONE, 0) -+ RELOC_NUMBER (R_RISCV_32, 1) -+ RELOC_NUMBER (R_RISCV_64, 2) -+ RELOC_NUMBER (R_RISCV_RELATIVE, 3) -+ RELOC_NUMBER (R_RISCV_COPY, 4) -+ RELOC_NUMBER (R_RISCV_JUMP_SLOT, 5) -+ RELOC_NUMBER (R_RISCV_TLS_DTPMOD32, 6) -+ RELOC_NUMBER (R_RISCV_TLS_DTPMOD64, 7) -+ RELOC_NUMBER (R_RISCV_TLS_DTPREL32, 8) -+ RELOC_NUMBER (R_RISCV_TLS_DTPREL64, 9) -+ RELOC_NUMBER (R_RISCV_TLS_TPREL32, 10) -+ RELOC_NUMBER (R_RISCV_TLS_TPREL64, 11) -+ -+ /* Relocation types not used by the dynamic linker. */ -+ RELOC_NUMBER (R_RISCV_BRANCH, 16) -+ RELOC_NUMBER (R_RISCV_JAL, 17) -+ RELOC_NUMBER (R_RISCV_CALL, 18) -+ RELOC_NUMBER (R_RISCV_CALL_PLT, 19) -+ RELOC_NUMBER (R_RISCV_GOT_HI20, 20) -+ RELOC_NUMBER (R_RISCV_TLS_GOT_HI20, 21) -+ RELOC_NUMBER (R_RISCV_TLS_GD_HI20, 22) -+ RELOC_NUMBER (R_RISCV_PCREL_HI20, 23) -+ RELOC_NUMBER (R_RISCV_PCREL_LO12_I, 24) -+ RELOC_NUMBER (R_RISCV_PCREL_LO12_S, 25) -+ RELOC_NUMBER (R_RISCV_HI20, 26) -+ RELOC_NUMBER (R_RISCV_LO12_I, 27) -+ RELOC_NUMBER (R_RISCV_LO12_S, 28) -+ RELOC_NUMBER (R_RISCV_TPREL_HI20, 29) -+ RELOC_NUMBER (R_RISCV_TPREL_LO12_I, 30) -+ RELOC_NUMBER (R_RISCV_TPREL_LO12_S, 31) -+ RELOC_NUMBER (R_RISCV_TPREL_ADD, 32) -+ RELOC_NUMBER (R_RISCV_ADD8, 33) -+ RELOC_NUMBER (R_RISCV_ADD16, 34) -+ RELOC_NUMBER (R_RISCV_ADD32, 35) -+ RELOC_NUMBER (R_RISCV_ADD64, 36) -+ RELOC_NUMBER (R_RISCV_SUB8, 37) -+ RELOC_NUMBER (R_RISCV_SUB16, 38) -+ RELOC_NUMBER (R_RISCV_SUB32, 39) -+ RELOC_NUMBER (R_RISCV_SUB64, 40) -+ RELOC_NUMBER (R_RISCV_GNU_VTINHERIT, 41) -+ RELOC_NUMBER (R_RISCV_GNU_VTENTRY, 42) -+ RELOC_NUMBER (R_RISCV_ALIGN, 43) -+END_RELOC_NUMBERS (R_RISCV_max) -+ -+/* Processor specific flags for the ELF header e_flags field. */ -+ -+/* Custom flag definitions. */ -+ -+#define EF_RISCV_EXT_MASK 0xffff -+#define EF_RISCV_EXT_SH 16 -+#define E_RISCV_EXT_Xcustom 0x0000 -+#define E_RISCV_EXT_Xhwacha 0x0001 -+#define E_RISCV_EXT_RESERVED 0xffff -+ -+#define EF_GET_RISCV_EXT(x) \ -+ ((x >> EF_RISCV_EXT_SH) & EF_RISCV_EXT_MASK) -+ -+#define EF_SET_RISCV_EXT(x, ext) \ -+ do { x |= ((ext & EF_RISCV_EXT_MASK) << EF_RISCV_EXT_SH); } while (0) -+ -+#define EF_IS_RISCV_EXT_Xcustom(x) \ -+ (EF_GET_RISCV_EXT(x) == E_RISCV_EXT_Xcustom) -+ -+/* A mapping from extension names to elf flags */ -+ -+struct riscv_extension_entry -+{ -+ const char* name; -+ unsigned int flag; -+}; -+ -+static const struct riscv_extension_entry riscv_extension_map[] = -+{ -+ {"Xcustom", E_RISCV_EXT_Xcustom}, -+ {"Xhwacha", E_RISCV_EXT_Xhwacha}, -+}; -+ -+/* Given an extension name, return an elf flag. */ -+ -+static inline const char* riscv_elf_flag_to_name(unsigned int flag) -+{ -+ unsigned int i; -+ -+ for (i=0; icurrent_space \ -+ (__len != 0 && __len <= __o->current_space \ - ? (__o->current_ptr += __len, \ - __o->current_space -= __len, \ - (void *) (__o->current_ptr - __len)) \ -diff -rNU3 dist.orig/include/opcode/mips.h dist/include/opcode/mips.h ---- dist.orig/include/opcode/mips.h 2012-09-04 16:21:05.000000000 +0200 -+++ dist/include/opcode/mips.h 2015-10-18 13:11:17.000000000 +0200 -@@ -1035,7 +1035,11 @@ - M_DSUB_I, - M_DSUBU_I, - M_DSUBU_I_2, -+ M_JR_S, -+ M_J_S, - M_J_A, -+ M_JALR_S, -+ M_JALR_DS, - M_JAL_1, - M_JAL_2, - M_JAL_A, -diff -rNU3 dist.orig/include/opcode/riscv-opc.h dist/include/opcode/riscv-opc.h ---- dist.orig/include/opcode/riscv-opc.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/include/opcode/riscv-opc.h 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,1234 @@ -+/* Automatically generated by parse-opcodes */ -+#ifndef RISCV_ENCODING_H -+#define RISCV_ENCODING_H -+#define MATCH_CUSTOM3_RD_RS1_RS2 0x707b -+#define MASK_CUSTOM3_RD_RS1_RS2 0x707f -+#define MATCH_VLSEGSTWU 0xc00305b -+#define MASK_VLSEGSTWU 0x1e00707f -+#define MATCH_C_LW0 0x12 -+#define MASK_C_LW0 0x801f -+#define MATCH_FMV_D_X 0xf2000053 -+#define MASK_FMV_D_X 0xfff0707f -+#define MATCH_VLH 0x200205b -+#define MASK_VLH 0xfff0707f -+#define MATCH_C_LI 0x0 -+#define MASK_C_LI 0x1f -+#define MATCH_FADD_D 0x2000053 -+#define MASK_FADD_D 0xfe00007f -+#define MATCH_C_LD 0x9 -+#define MASK_C_LD 0x1f -+#define MATCH_VLD 0x600205b -+#define MASK_VLD 0xfff0707f -+#define MATCH_FADD_S 0x53 -+#define MASK_FADD_S 0xfe00007f -+#define MATCH_C_LW 0xa -+#define MASK_C_LW 0x1f -+#define MATCH_VLW 0x400205b -+#define MASK_VLW 0xfff0707f -+#define MATCH_VSSEGSTW 0x400307b -+#define MASK_VSSEGSTW 0x1e00707f -+#define MATCH_UTIDX 0x6077 -+#define MASK_UTIDX 0xfffff07f -+#define MATCH_C_FLW 0x14 -+#define MASK_C_FLW 0x1f -+#define MATCH_FSUB_D 0xa000053 -+#define MASK_FSUB_D 0xfe00007f -+#define MATCH_VSSEGSTD 0x600307b -+#define MASK_VSSEGSTD 0x1e00707f -+#define MATCH_VSSEGSTB 0x307b -+#define MASK_VSSEGSTB 0x1e00707f -+#define MATCH_DIV 0x2004033 -+#define MASK_DIV 0xfe00707f -+#define MATCH_FMV_H_X 0xf4000053 -+#define MASK_FMV_H_X 0xfff0707f -+#define MATCH_C_FLD 0x15 -+#define MASK_C_FLD 0x1f -+#define MATCH_FRRM 0x202073 -+#define MASK_FRRM 0xfffff07f -+#define MATCH_VFMSV_S 0x1000202b -+#define MASK_VFMSV_S 0xfff0707f -+#define MATCH_C_LWSP 0x5 -+#define MASK_C_LWSP 0x1f -+#define MATCH_FENCE 0xf -+#define MASK_FENCE 0x707f -+#define MATCH_FNMSUB_S 0x4b -+#define MASK_FNMSUB_S 0x600007f -+#define MATCH_FLE_S 0xa0000053 -+#define MASK_FLE_S 0xfe00707f -+#define MATCH_FNMSUB_H 0x400004b -+#define MASK_FNMSUB_H 0x600007f -+#define MATCH_FLE_H 0xbc000053 -+#define MASK_FLE_H 0xfe00707f -+#define MATCH_FLW 0x2007 -+#define MASK_FLW 0x707f -+#define MATCH_VSETVL 0x600b -+#define MASK_VSETVL 0xfff0707f -+#define MATCH_VFMSV_D 0x1200202b -+#define MASK_VFMSV_D 0xfff0707f -+#define MATCH_FLE_D 0xa2000053 -+#define MASK_FLE_D 0xfe00707f -+#define MATCH_FENCE_I 0x100f -+#define MASK_FENCE_I 0x707f -+#define MATCH_FNMSUB_D 0x200004b -+#define MASK_FNMSUB_D 0x600007f -+#define MATCH_ADDW 0x3b -+#define MASK_ADDW 0xfe00707f -+#define MATCH_XOR 0x4033 -+#define MASK_XOR 0xfe00707f -+#define MATCH_SUB 0x40000033 -+#define MASK_SUB 0xfe00707f -+#define MATCH_VSSTW 0x400307b -+#define MASK_VSSTW 0xfe00707f -+#define MATCH_VSSTH 0x200307b -+#define MASK_VSSTH 0xfe00707f -+#define MATCH_SC_W 0x1800202f -+#define MASK_SC_W 0xf800707f -+#define MATCH_VSSTB 0x307b -+#define MASK_VSSTB 0xfe00707f -+#define MATCH_VSSTD 0x600307b -+#define MASK_VSSTD 0xfe00707f -+#define MATCH_ADDI 0x13 -+#define MASK_ADDI 0x707f -+#define MATCH_RDTIMEH 0xc8102073 -+#define MASK_RDTIMEH 0xfffff07f -+#define MATCH_MULH 0x2001033 -+#define MASK_MULH 0xfe00707f -+#define MATCH_CSRRSI 0x6073 -+#define MASK_CSRRSI 0x707f -+#define MATCH_FCVT_D_WU 0xd2100053 -+#define MASK_FCVT_D_WU 0xfff0007f -+#define MATCH_MULW 0x200003b -+#define MASK_MULW 0xfe00707f -+#define MATCH_CUSTOM1_RD_RS1_RS2 0x702b -+#define MASK_CUSTOM1_RD_RS1_RS2 0x707f -+#define MATCH_VENQIMM1 0xc00302b -+#define MASK_VENQIMM1 0xfe007fff -+#define MATCH_VENQIMM2 0xe00302b -+#define MASK_VENQIMM2 0xfe007fff -+#define MATCH_RDINSTRET 0xc0202073 -+#define MASK_RDINSTRET 0xfffff07f -+#define MATCH_C_SWSP 0x8 -+#define MASK_C_SWSP 0x1f -+#define MATCH_VLSTW 0x400305b -+#define MASK_VLSTW 0xfe00707f -+#define MATCH_VLSTH 0x200305b -+#define MASK_VLSTH 0xfe00707f -+#define MATCH_VLSTB 0x305b -+#define MASK_VLSTB 0xfe00707f -+#define MATCH_VLSTD 0x600305b -+#define MASK_VLSTD 0xfe00707f -+#define MATCH_ANDI 0x7013 -+#define MASK_ANDI 0x707f -+#define MATCH_FMV_X_S 0xe0000053 -+#define MASK_FMV_X_S 0xfff0707f -+#define MATCH_CUSTOM0_RD_RS1_RS2 0x700b -+#define MASK_CUSTOM0_RD_RS1_RS2 0x707f -+#define MATCH_FNMADD_S 0x4f -+#define MASK_FNMADD_S 0x600007f -+#define MATCH_LWU 0x6003 -+#define MASK_LWU 0x707f -+#define MATCH_CUSTOM0_RS1 0x200b -+#define MASK_CUSTOM0_RS1 0x707f -+#define MATCH_VLSEGSTBU 0x800305b -+#define MASK_VLSEGSTBU 0x1e00707f -+#define MATCH_FNMADD_D 0x200004f -+#define MASK_FNMADD_D 0x600007f -+#define MATCH_FCVT_W_S 0xc0000053 -+#define MASK_FCVT_W_S 0xfff0007f -+#define MATCH_C_SRAI 0x1019 -+#define MASK_C_SRAI 0x1c1f -+#define MATCH_MULHSU 0x2002033 -+#define MASK_MULHSU 0xfe00707f -+#define MATCH_FCVT_D_LU 0xd2300053 -+#define MASK_FCVT_D_LU 0xfff0007f -+#define MATCH_FCVT_W_D 0xc2000053 -+#define MASK_FCVT_W_D 0xfff0007f -+#define MATCH_FSUB_H 0xc000053 -+#define MASK_FSUB_H 0xfe00007f -+#define MATCH_DIVUW 0x200503b -+#define MASK_DIVUW 0xfe00707f -+#define MATCH_SLTI 0x2013 -+#define MASK_SLTI 0x707f -+#define MATCH_VLSTBU 0x800305b -+#define MASK_VLSTBU 0xfe00707f -+#define MATCH_SLTU 0x3033 -+#define MASK_SLTU 0xfe00707f -+#define MATCH_FLH 0x1007 -+#define MASK_FLH 0x707f -+#define MATCH_CUSTOM2_RD_RS1_RS2 0x705b -+#define MASK_CUSTOM2_RD_RS1_RS2 0x707f -+#define MATCH_FLD 0x3007 -+#define MASK_FLD 0x707f -+#define MATCH_FSUB_S 0x8000053 -+#define MASK_FSUB_S 0xfe00007f -+#define MATCH_FCVT_H_LU 0x6c000053 -+#define MASK_FCVT_H_LU 0xfff0007f -+#define MATCH_CUSTOM0 0xb -+#define MASK_CUSTOM0 0x707f -+#define MATCH_CUSTOM1 0x2b -+#define MASK_CUSTOM1 0x707f -+#define MATCH_CUSTOM2 0x5b -+#define MASK_CUSTOM2 0x707f -+#define MATCH_CUSTOM3 0x7b -+#define MASK_CUSTOM3 0x707f -+#define MATCH_VXCPTSAVE 0x302b -+#define MASK_VXCPTSAVE 0xfff07fff -+#define MATCH_VMSV 0x200202b -+#define MASK_VMSV 0xfff0707f -+#define MATCH_FCVT_LU_S 0xc0300053 -+#define MASK_FCVT_LU_S 0xfff0007f -+#define MATCH_AUIPC 0x17 -+#define MASK_AUIPC 0x7f -+#define MATCH_FRFLAGS 0x102073 -+#define MASK_FRFLAGS 0xfffff07f -+#define MATCH_FCVT_LU_D 0xc2300053 -+#define MASK_FCVT_LU_D 0xfff0007f -+#define MATCH_CSRRWI 0x5073 -+#define MASK_CSRRWI 0x707f -+#define MATCH_FADD_H 0x4000053 -+#define MASK_FADD_H 0xfe00007f -+#define MATCH_FSQRT_S 0x58000053 -+#define MASK_FSQRT_S 0xfff0007f -+#define MATCH_VXCPTKILL 0x400302b -+#define MASK_VXCPTKILL 0xffffffff -+#define MATCH_STOP 0x5077 -+#define MASK_STOP 0xffffffff -+#define MATCH_FSGNJN_S 0x20001053 -+#define MASK_FSGNJN_S 0xfe00707f -+#define MATCH_FSGNJN_H 0x34000053 -+#define MASK_FSGNJN_H 0xfe00707f -+#define MATCH_FSQRT_D 0x5a000053 -+#define MASK_FSQRT_D 0xfff0007f -+#define MATCH_XORI 0x4013 -+#define MASK_XORI 0x707f -+#define MATCH_DIVU 0x2005033 -+#define MASK_DIVU 0xfe00707f -+#define MATCH_FSGNJN_D 0x22001053 -+#define MASK_FSGNJN_D 0xfe00707f -+#define MATCH_FSQRT_H 0x24000053 -+#define MASK_FSQRT_H 0xfff0007f -+#define MATCH_VSSEGSTH 0x200307b -+#define MASK_VSSEGSTH 0x1e00707f -+#define MATCH_SW 0x2023 -+#define MASK_SW 0x707f -+#define MATCH_VLSTWU 0xc00305b -+#define MASK_VLSTWU 0xfe00707f -+#define MATCH_VFSSEGW 0x1400207b -+#define MASK_VFSSEGW 0x1ff0707f -+#define MATCH_LHU 0x5003 -+#define MASK_LHU 0x707f -+#define MATCH_SH 0x1023 -+#define MASK_SH 0x707f -+#define MATCH_FMSUB_H 0x4000047 -+#define MASK_FMSUB_H 0x600007f -+#define MATCH_VXCPTAUX 0x200402b -+#define MASK_VXCPTAUX 0xfffff07f -+#define MATCH_FMSUB_D 0x2000047 -+#define MASK_FMSUB_D 0x600007f -+#define MATCH_VFSSEGD 0x1600207b -+#define MASK_VFSSEGD 0x1ff0707f -+#define MATCH_VLSEGHU 0xa00205b -+#define MASK_VLSEGHU 0x1ff0707f -+#define MATCH_MOVN 0x2007077 -+#define MASK_MOVN 0xfe00707f -+#define MATCH_CUSTOM1_RS1 0x202b -+#define MASK_CUSTOM1_RS1 0x707f -+#define MATCH_VLSTHU 0xa00305b -+#define MASK_VLSTHU 0xfe00707f -+#define MATCH_MOVZ 0x7077 -+#define MASK_MOVZ 0xfe00707f -+#define MATCH_CSRRW 0x1073 -+#define MASK_CSRRW 0x707f -+#define MATCH_LD 0x3003 -+#define MASK_LD 0x707f -+#define MATCH_LB 0x3 -+#define MASK_LB 0x707f -+#define MATCH_VLWU 0xc00205b -+#define MASK_VLWU 0xfff0707f -+#define MATCH_LH 0x1003 -+#define MASK_LH 0x707f -+#define MATCH_LW 0x2003 -+#define MASK_LW 0x707f -+#define MATCH_CSRRC 0x3073 -+#define MASK_CSRRC 0x707f -+#define MATCH_FCVT_LU_H 0x4c000053 -+#define MASK_FCVT_LU_H 0xfff0007f -+#define MATCH_FCVT_S_D 0x40100053 -+#define MASK_FCVT_S_D 0xfff0007f -+#define MATCH_BGEU 0x7063 -+#define MASK_BGEU 0x707f -+#define MATCH_VFLSTD 0x1600305b -+#define MASK_VFLSTD 0xfe00707f -+#define MATCH_FCVT_S_L 0xd0200053 -+#define MASK_FCVT_S_L 0xfff0007f -+#define MATCH_FCVT_S_H 0x84000053 -+#define MASK_FCVT_S_H 0xfff0007f -+#define MATCH_FSCSR 0x301073 -+#define MASK_FSCSR 0xfff0707f -+#define MATCH_FCVT_S_W 0xd0000053 -+#define MASK_FCVT_S_W 0xfff0007f -+#define MATCH_VFLSTW 0x1400305b -+#define MASK_VFLSTW 0xfe00707f -+#define MATCH_VXCPTEVAC 0x600302b -+#define MASK_VXCPTEVAC 0xfff07fff -+#define MATCH_AMOMINU_D 0xc000302f -+#define MASK_AMOMINU_D 0xf800707f -+#define MATCH_FSFLAGS 0x101073 -+#define MASK_FSFLAGS 0xfff0707f -+#define MATCH_SRLI 0x5013 -+#define MASK_SRLI 0xfc00707f -+#define MATCH_C_SRLI 0x819 -+#define MASK_C_SRLI 0x1c1f -+#define MATCH_AMOMINU_W 0xc000202f -+#define MASK_AMOMINU_W 0xf800707f -+#define MATCH_SRLW 0x503b -+#define MASK_SRLW 0xfe00707f -+#define MATCH_VFLSEGW 0x1400205b -+#define MASK_VFLSEGW 0x1ff0707f -+#define MATCH_C_LD0 0x8012 -+#define MASK_C_LD0 0x801f -+#define MATCH_VLSEGBU 0x800205b -+#define MASK_VLSEGBU 0x1ff0707f -+#define MATCH_JALR 0x67 -+#define MASK_JALR 0x707f -+#define MATCH_BLT 0x4063 -+#define MASK_BLT 0x707f -+#define MATCH_CUSTOM2_RD_RS1 0x605b -+#define MASK_CUSTOM2_RD_RS1 0x707f -+#define MATCH_FCLASS_S 0xe0001053 -+#define MASK_FCLASS_S 0xfff0707f -+#define MATCH_SFENCE_VM 0x10100073 -+#define MASK_SFENCE_VM 0xfff07fff -+#define MATCH_REM 0x2006033 -+#define MASK_REM 0xfe00707f -+#define MATCH_FCLASS_D 0xe2001053 -+#define MASK_FCLASS_D 0xfff0707f -+#define MATCH_FMUL_S 0x10000053 -+#define MASK_FMUL_S 0xfe00007f -+#define MATCH_RDCYCLEH 0xc8002073 -+#define MASK_RDCYCLEH 0xfffff07f -+#define MATCH_VLSEGSTHU 0xa00305b -+#define MASK_VLSEGSTHU 0x1e00707f -+#define MATCH_FMUL_D 0x12000053 -+#define MASK_FMUL_D 0xfe00007f -+#define MATCH_ORI 0x6013 -+#define MASK_ORI 0x707f -+#define MATCH_FMUL_H 0x14000053 -+#define MASK_FMUL_H 0xfe00007f -+#define MATCH_VFLSEGD 0x1600205b -+#define MASK_VFLSEGD 0x1ff0707f -+#define MATCH_FEQ_S 0xa0002053 -+#define MASK_FEQ_S 0xfe00707f -+#define MATCH_FSGNJX_D 0x22002053 -+#define MASK_FSGNJX_D 0xfe00707f -+#define MATCH_SRAIW 0x4000501b -+#define MASK_SRAIW 0xfe00707f -+#define MATCH_FSGNJX_H 0x3c000053 -+#define MASK_FSGNJX_H 0xfe00707f -+#define MATCH_FSGNJX_S 0x20002053 -+#define MASK_FSGNJX_S 0xfe00707f -+#define MATCH_FEQ_D 0xa2002053 -+#define MASK_FEQ_D 0xfe00707f -+#define MATCH_CUSTOM1_RD_RS1 0x602b -+#define MASK_CUSTOM1_RD_RS1 0x707f -+#define MATCH_FEQ_H 0xac000053 -+#define MASK_FEQ_H 0xfe00707f -+#define MATCH_AMOMAXU_D 0xe000302f -+#define MASK_AMOMAXU_D 0xf800707f -+#define MATCH_DIVW 0x200403b -+#define MASK_DIVW 0xfe00707f -+#define MATCH_AMOMAXU_W 0xe000202f -+#define MASK_AMOMAXU_W 0xf800707f -+#define MATCH_SRAI_RV32 0x40005013 -+#define MASK_SRAI_RV32 0xfe00707f -+#define MATCH_C_SRLI32 0xc19 -+#define MASK_C_SRLI32 0x1c1f -+#define MATCH_VFSSTW 0x1400307b -+#define MASK_VFSSTW 0xfe00707f -+#define MATCH_CUSTOM0_RD 0x400b -+#define MASK_CUSTOM0_RD 0x707f -+#define MATCH_C_BEQ 0x10 -+#define MASK_C_BEQ 0x1f -+#define MATCH_VFSSTD 0x1600307b -+#define MASK_VFSSTD 0xfe00707f -+#define MATCH_CUSTOM3_RD_RS1 0x607b -+#define MASK_CUSTOM3_RD_RS1 0x707f -+#define MATCH_LR_D 0x1000302f -+#define MASK_LR_D 0xf9f0707f -+#define MATCH_LR_W 0x1000202f -+#define MASK_LR_W 0xf9f0707f -+#define MATCH_FCVT_H_WU 0x7c000053 -+#define MASK_FCVT_H_WU 0xfff0007f -+#define MATCH_VMVV 0x200002b -+#define MASK_VMVV 0xfff0707f -+#define MATCH_SLLW 0x103b -+#define MASK_SLLW 0xfe00707f -+#define MATCH_SLLI 0x1013 -+#define MASK_SLLI 0xfc00707f -+#define MATCH_BEQ 0x63 -+#define MASK_BEQ 0x707f -+#define MATCH_AND 0x7033 -+#define MASK_AND 0xfe00707f -+#define MATCH_LBU 0x4003 -+#define MASK_LBU 0x707f -+#define MATCH_FSGNJ_S 0x20000053 -+#define MASK_FSGNJ_S 0xfe00707f -+#define MATCH_FMSUB_S 0x47 -+#define MASK_FMSUB_S 0x600007f -+#define MATCH_C_SUB3 0x11c -+#define MASK_C_SUB3 0x31f -+#define MATCH_FSGNJ_H 0x2c000053 -+#define MASK_FSGNJ_H 0xfe00707f -+#define MATCH_VLB 0x205b -+#define MASK_VLB 0xfff0707f -+#define MATCH_C_ADDIW 0x1d -+#define MASK_C_ADDIW 0x1f -+#define MATCH_CUSTOM3_RS1_RS2 0x307b -+#define MASK_CUSTOM3_RS1_RS2 0x707f -+#define MATCH_FSGNJ_D 0x22000053 -+#define MASK_FSGNJ_D 0xfe00707f -+#define MATCH_VLSEGWU 0xc00205b -+#define MASK_VLSEGWU 0x1ff0707f -+#define MATCH_FCVT_S_WU 0xd0100053 -+#define MASK_FCVT_S_WU 0xfff0007f -+#define MATCH_CUSTOM3_RS1 0x207b -+#define MASK_CUSTOM3_RS1 0x707f -+#define MATCH_SC_D 0x1800302f -+#define MASK_SC_D 0xf800707f -+#define MATCH_VFSW 0x1400207b -+#define MASK_VFSW 0xfff0707f -+#define MATCH_AMOSWAP_D 0x800302f -+#define MASK_AMOSWAP_D 0xf800707f -+#define MATCH_SB 0x23 -+#define MASK_SB 0x707f -+#define MATCH_AMOSWAP_W 0x800202f -+#define MASK_AMOSWAP_W 0xf800707f -+#define MATCH_VFSD 0x1600207b -+#define MASK_VFSD 0xfff0707f -+#define MATCH_CUSTOM2_RS1 0x205b -+#define MASK_CUSTOM2_RS1 0x707f -+#define MATCH_SD 0x3023 -+#define MASK_SD 0x707f -+#define MATCH_FMV_S_X 0xf0000053 -+#define MASK_FMV_S_X 0xfff0707f -+#define MATCH_REMUW 0x200703b -+#define MASK_REMUW 0xfe00707f -+#define MATCH_JAL 0x6f -+#define MASK_JAL 0x7f -+#define MATCH_C_FSD 0x18 -+#define MASK_C_FSD 0x1f -+#define MATCH_RDCYCLE 0xc0002073 -+#define MASK_RDCYCLE 0xfffff07f -+#define MATCH_C_BNE 0x11 -+#define MASK_C_BNE 0x1f -+#define MATCH_C_ADD 0x1a -+#define MASK_C_ADD 0x801f -+#define MATCH_VXCPTCAUSE 0x402b -+#define MASK_VXCPTCAUSE 0xfffff07f -+#define MATCH_VGETCFG 0x400b -+#define MASK_VGETCFG 0xfffff07f -+#define MATCH_LUI 0x37 -+#define MASK_LUI 0x7f -+#define MATCH_VSETCFG 0x200b -+#define MASK_VSETCFG 0x7fff -+#define MATCH_C_SDSP 0x6 -+#define MASK_C_SDSP 0x1f -+#define MATCH_C_LDSP 0x4 -+#define MASK_C_LDSP 0x1f -+#define MATCH_FNMADD_H 0x400004f -+#define MASK_FNMADD_H 0x600007f -+#define MATCH_CUSTOM0_RS1_RS2 0x300b -+#define MASK_CUSTOM0_RS1_RS2 0x707f -+#define MATCH_SLLI_RV32 0x1013 -+#define MASK_SLLI_RV32 0xfe00707f -+#define MATCH_MUL 0x2000033 -+#define MASK_MUL 0xfe00707f -+#define MATCH_CSRRCI 0x7073 -+#define MASK_CSRRCI 0x707f -+#define MATCH_C_SRAI32 0x1419 -+#define MASK_C_SRAI32 0x1c1f -+#define MATCH_FLT_H 0xb4000053 -+#define MASK_FLT_H 0xfe00707f -+#define MATCH_SRAI 0x40005013 -+#define MASK_SRAI 0xfc00707f -+#define MATCH_AMOAND_D 0x6000302f -+#define MASK_AMOAND_D 0xf800707f -+#define MATCH_FLT_D 0xa2001053 -+#define MASK_FLT_D 0xfe00707f -+#define MATCH_SRAW 0x4000503b -+#define MASK_SRAW 0xfe00707f -+#define MATCH_CSRRS 0x2073 -+#define MASK_CSRRS 0x707f -+#define MATCH_FLT_S 0xa0001053 -+#define MASK_FLT_S 0xfe00707f -+#define MATCH_ADDIW 0x1b -+#define MASK_ADDIW 0x707f -+#define MATCH_AMOAND_W 0x6000202f -+#define MASK_AMOAND_W 0xf800707f -+#define MATCH_CUSTOM2_RD 0x405b -+#define MASK_CUSTOM2_RD 0x707f -+#define MATCH_MRTS 0x30500073 -+#define MASK_MRTS 0xffffffff -+#define MATCH_FCVT_WU_D 0xc2100053 -+#define MASK_FCVT_WU_D 0xfff0007f -+#define MATCH_AMOXOR_W 0x2000202f -+#define MASK_AMOXOR_W 0xf800707f -+#define MATCH_FCVT_D_L 0xd2200053 -+#define MASK_FCVT_D_L 0xfff0007f -+#define MATCH_FCVT_WU_H 0x5c000053 -+#define MASK_FCVT_WU_H 0xfff0007f -+#define MATCH_C_SLLI 0x19 -+#define MASK_C_SLLI 0x1c1f -+#define MATCH_AMOXOR_D 0x2000302f -+#define MASK_AMOXOR_D 0xf800707f -+#define MATCH_FCVT_WU_S 0xc0100053 -+#define MASK_FCVT_WU_S 0xfff0007f -+#define MATCH_CUSTOM3_RD 0x407b -+#define MASK_CUSTOM3_RD 0x707f -+#define MATCH_FMAX_H 0xcc000053 -+#define MASK_FMAX_H 0xfe00707f -+#define MATCH_VENQCNT 0x1000302b -+#define MASK_VENQCNT 0xfe007fff -+#define MATCH_VLBU 0x800205b -+#define MASK_VLBU 0xfff0707f -+#define MATCH_VLHU 0xa00205b -+#define MASK_VLHU 0xfff0707f -+#define MATCH_C_SW 0xd -+#define MASK_C_SW 0x1f -+#define MATCH_C_SD 0xc -+#define MASK_C_SD 0x1f -+#define MATCH_C_OR3 0x21c -+#define MASK_C_OR3 0x31f -+#define MATCH_C_AND3 0x31c -+#define MASK_C_AND3 0x31f -+#define MATCH_VFSSEGSTW 0x1400307b -+#define MASK_VFSSEGSTW 0x1e00707f -+#define MATCH_SLT 0x2033 -+#define MASK_SLT 0xfe00707f -+#define MATCH_AMOOR_D 0x4000302f -+#define MASK_AMOOR_D 0xf800707f -+#define MATCH_REMU 0x2007033 -+#define MASK_REMU 0xfe00707f -+#define MATCH_REMW 0x200603b -+#define MASK_REMW 0xfe00707f -+#define MATCH_SLL 0x1033 -+#define MASK_SLL 0xfe00707f -+#define MATCH_VFSSEGSTD 0x1600307b -+#define MASK_VFSSEGSTD 0x1e00707f -+#define MATCH_AMOOR_W 0x4000202f -+#define MASK_AMOOR_W 0xf800707f -+#define MATCH_CUSTOM2_RS1_RS2 0x305b -+#define MASK_CUSTOM2_RS1_RS2 0x707f -+#define MATCH_VF 0x10202b -+#define MASK_VF 0x1f0707f -+#define MATCH_VFMVV 0x1000002b -+#define MASK_VFMVV 0xfff0707f -+#define MATCH_VFLSEGSTW 0x1400305b -+#define MASK_VFLSEGSTW 0x1e00707f -+#define MATCH_VXCPTRESTORE 0x200302b -+#define MASK_VXCPTRESTORE 0xfff07fff -+#define MATCH_VXCPTHOLD 0x800302b -+#define MASK_VXCPTHOLD 0xfff07fff -+#define MATCH_SLTIU 0x3013 -+#define MASK_SLTIU 0x707f -+#define MATCH_VFLSEGSTD 0x1600305b -+#define MASK_VFLSEGSTD 0x1e00707f -+#define MATCH_VFLD 0x1600205b -+#define MASK_VFLD 0xfff0707f -+#define MATCH_FMADD_S 0x43 -+#define MASK_FMADD_S 0x600007f -+#define MATCH_VFLW 0x1400205b -+#define MASK_VFLW 0xfff0707f -+#define MATCH_FMADD_D 0x2000043 -+#define MASK_FMADD_D 0x600007f -+#define MATCH_FMADD_H 0x4000043 -+#define MASK_FMADD_H 0x600007f -+#define MATCH_SRET 0x10000073 -+#define MASK_SRET 0xffffffff -+#define MATCH_VSSEGW 0x400207b -+#define MASK_VSSEGW 0x1ff0707f -+#define MATCH_CUSTOM0_RD_RS1 0x600b -+#define MASK_CUSTOM0_RD_RS1 0x707f -+#define MATCH_VSSEGH 0x200207b -+#define MASK_VSSEGH 0x1ff0707f -+#define MATCH_FRCSR 0x302073 -+#define MASK_FRCSR 0xfffff07f -+#define MATCH_VSSEGD 0x600207b -+#define MASK_VSSEGD 0x1ff0707f -+#define MATCH_VSSEGB 0x207b -+#define MASK_VSSEGB 0x1ff0707f -+#define MATCH_FMIN_H 0xc4000053 -+#define MASK_FMIN_H 0xfe00707f -+#define MATCH_FMIN_D 0x2a000053 -+#define MASK_FMIN_D 0xfe00707f -+#define MATCH_BLTU 0x6063 -+#define MASK_BLTU 0x707f -+#define MATCH_FMIN_S 0x28000053 -+#define MASK_FMIN_S 0xfe00707f -+#define MATCH_SRLI_RV32 0x5013 -+#define MASK_SRLI_RV32 0xfe00707f -+#define MATCH_SLLIW 0x101b -+#define MASK_SLLIW 0xfe00707f -+#define MATCH_FMAX_S 0x28001053 -+#define MASK_FMAX_S 0xfe00707f -+#define MATCH_FCVT_D_H 0x8c000053 -+#define MASK_FCVT_D_H 0xfff0007f -+#define MATCH_FCVT_D_W 0xd2000053 -+#define MASK_FCVT_D_W 0xfff0007f -+#define MATCH_ADD 0x33 -+#define MASK_ADD 0xfe00707f -+#define MATCH_FCVT_D_S 0x42000053 -+#define MASK_FCVT_D_S 0xfff0007f -+#define MATCH_FMAX_D 0x2a001053 -+#define MASK_FMAX_D 0xfe00707f -+#define MATCH_BNE 0x1063 -+#define MASK_BNE 0x707f -+#define MATCH_CUSTOM1_RD 0x402b -+#define MASK_CUSTOM1_RD 0x707f -+#define MATCH_FSRM 0x201073 -+#define MASK_FSRM 0xfff0707f -+#define MATCH_FDIV_D 0x1a000053 -+#define MASK_FDIV_D 0xfe00007f -+#define MATCH_VSW 0x400207b -+#define MASK_VSW 0xfff0707f -+#define MATCH_FCVT_L_S 0xc0200053 -+#define MASK_FCVT_L_S 0xfff0007f -+#define MATCH_FDIV_H 0x1c000053 -+#define MASK_FDIV_H 0xfe00007f -+#define MATCH_VSB 0x207b -+#define MASK_VSB 0xfff0707f -+#define MATCH_FDIV_S 0x18000053 -+#define MASK_FDIV_S 0xfe00007f -+#define MATCH_FSRMI 0x205073 -+#define MASK_FSRMI 0xfff0707f -+#define MATCH_FCVT_L_H 0x44000053 -+#define MASK_FCVT_L_H 0xfff0007f -+#define MATCH_VSH 0x200207b -+#define MASK_VSH 0xfff0707f -+#define MATCH_FCVT_L_D 0xc2200053 -+#define MASK_FCVT_L_D 0xfff0007f -+#define MATCH_FCVT_H_S 0x90000053 -+#define MASK_FCVT_H_S 0xfff0007f -+#define MATCH_SCALL 0x73 -+#define MASK_SCALL 0xffffffff -+#define MATCH_FSFLAGSI 0x105073 -+#define MASK_FSFLAGSI 0xfff0707f -+#define MATCH_FCVT_H_W 0x74000053 -+#define MASK_FCVT_H_W 0xfff0007f -+#define MATCH_FCVT_H_L 0x64000053 -+#define MASK_FCVT_H_L 0xfff0007f -+#define MATCH_SRLIW 0x501b -+#define MASK_SRLIW 0xfe00707f -+#define MATCH_FCVT_S_LU 0xd0300053 -+#define MASK_FCVT_S_LU 0xfff0007f -+#define MATCH_FCVT_H_D 0x92000053 -+#define MASK_FCVT_H_D 0xfff0007f -+#define MATCH_SBREAK 0x100073 -+#define MASK_SBREAK 0xffffffff -+#define MATCH_RDINSTRETH 0xc8202073 -+#define MASK_RDINSTRETH 0xfffff07f -+#define MATCH_SRA 0x40005033 -+#define MASK_SRA 0xfe00707f -+#define MATCH_BGE 0x5063 -+#define MASK_BGE 0x707f -+#define MATCH_SRL 0x5033 -+#define MASK_SRL 0xfe00707f -+#define MATCH_VENQCMD 0xa00302b -+#define MASK_VENQCMD 0xfe007fff -+#define MATCH_OR 0x6033 -+#define MASK_OR 0xfe00707f -+#define MATCH_SUBW 0x4000003b -+#define MASK_SUBW 0xfe00707f -+#define MATCH_FMV_X_D 0xe2000053 -+#define MASK_FMV_X_D 0xfff0707f -+#define MATCH_RDTIME 0xc0102073 -+#define MASK_RDTIME 0xfffff07f -+#define MATCH_AMOADD_D 0x302f -+#define MASK_AMOADD_D 0xf800707f -+#define MATCH_AMOMAX_W 0xa000202f -+#define MASK_AMOMAX_W 0xf800707f -+#define MATCH_C_MOVE 0x2 -+#define MASK_C_MOVE 0x801f -+#define MATCH_FMOVN 0x6007077 -+#define MASK_FMOVN 0xfe00707f -+#define MATCH_C_FSW 0x16 -+#define MASK_C_FSW 0x1f -+#define MATCH_AMOADD_W 0x202f -+#define MASK_AMOADD_W 0xf800707f -+#define MATCH_AMOMAX_D 0xa000302f -+#define MASK_AMOMAX_D 0xf800707f -+#define MATCH_FMOVZ 0x4007077 -+#define MASK_FMOVZ 0xfe00707f -+#define MATCH_CUSTOM1_RS1_RS2 0x302b -+#define MASK_CUSTOM1_RS1_RS2 0x707f -+#define MATCH_FMV_X_H 0xe4000053 -+#define MASK_FMV_X_H 0xfff0707f -+#define MATCH_VSD 0x600207b -+#define MASK_VSD 0xfff0707f -+#define MATCH_VLSEGSTW 0x400305b -+#define MASK_VLSEGSTW 0x1e00707f -+#define MATCH_C_ADDI 0x1 -+#define MASK_C_ADDI 0x1f -+#define MATCH_C_SLLIW 0x1819 -+#define MASK_C_SLLIW 0x1c1f -+#define MATCH_VLSEGSTB 0x305b -+#define MASK_VLSEGSTB 0x1e00707f -+#define MATCH_VLSEGSTD 0x600305b -+#define MASK_VLSEGSTD 0x1e00707f -+#define MATCH_VLSEGSTH 0x200305b -+#define MASK_VLSEGSTH 0x1e00707f -+#define MATCH_MULHU 0x2003033 -+#define MASK_MULHU 0xfe00707f -+#define MATCH_AMOMIN_W 0x8000202f -+#define MASK_AMOMIN_W 0xf800707f -+#define MATCH_C_SLLI32 0x419 -+#define MASK_C_SLLI32 0x1c1f -+#define MATCH_C_ADD3 0x1c -+#define MASK_C_ADD3 0x31f -+#define MATCH_VGETVL 0x200400b -+#define MASK_VGETVL 0xfffff07f -+#define MATCH_AMOMIN_D 0x8000302f -+#define MASK_AMOMIN_D 0xf800707f -+#define MATCH_FCVT_W_H 0x54000053 -+#define MASK_FCVT_W_H 0xfff0007f -+#define MATCH_VLSEGB 0x205b -+#define MASK_VLSEGB 0x1ff0707f -+#define MATCH_FSD 0x3027 -+#define MASK_FSD 0x707f -+#define MATCH_VLSEGD 0x600205b -+#define MASK_VLSEGD 0x1ff0707f -+#define MATCH_FSH 0x1027 -+#define MASK_FSH 0x707f -+#define MATCH_VLSEGH 0x200205b -+#define MASK_VLSEGH 0x1ff0707f -+#define MATCH_C_SUB 0x801a -+#define MASK_C_SUB 0x801f -+#define MATCH_VLSEGW 0x400205b -+#define MASK_VLSEGW 0x1ff0707f -+#define MATCH_FSW 0x2027 -+#define MASK_FSW 0x707f -+#define MATCH_C_J 0x8002 -+#define MASK_C_J 0x801f -+#define CSR_FFLAGS 0x1 -+#define CSR_FRM 0x2 -+#define CSR_FCSR 0x3 -+#define CSR_CYCLE 0xc00 -+#define CSR_TIME 0xc01 -+#define CSR_INSTRET 0xc02 -+#define CSR_STATS 0xc0 -+#define CSR_UARCH0 0xcc0 -+#define CSR_UARCH1 0xcc1 -+#define CSR_UARCH2 0xcc2 -+#define CSR_UARCH3 0xcc3 -+#define CSR_UARCH4 0xcc4 -+#define CSR_UARCH5 0xcc5 -+#define CSR_UARCH6 0xcc6 -+#define CSR_UARCH7 0xcc7 -+#define CSR_UARCH8 0xcc8 -+#define CSR_UARCH9 0xcc9 -+#define CSR_UARCH10 0xcca -+#define CSR_UARCH11 0xccb -+#define CSR_UARCH12 0xccc -+#define CSR_UARCH13 0xccd -+#define CSR_UARCH14 0xcce -+#define CSR_UARCH15 0xccf -+#define CSR_SSTATUS 0x100 -+#define CSR_STVEC 0x101 -+#define CSR_STIMECMP 0x121 -+#define CSR_SSCRATCH 0x140 -+#define CSR_SEPC 0x141 -+#define CSR_SPTBR 0x188 -+#define CSR_SASID 0x189 -+#define CSR_SCYCLE 0x900 -+#define CSR_STIME 0x901 -+#define CSR_SINSTRET 0x902 -+#define CSR_SCAUSE 0xd40 -+#define CSR_SBADADDR 0xd41 -+#define CSR_MSTATUS 0x300 -+#define CSR_MSCRATCH 0x340 -+#define CSR_MEPC 0x341 -+#define CSR_MCAUSE 0x342 -+#define CSR_MBADADDR 0x343 -+#define CSR_RESET 0x780 -+#define CSR_TOHOST 0x781 -+#define CSR_FROMHOST 0x782 -+#define CSR_SEND_IPI 0x783 -+#define CSR_HARTID 0xfc0 -+#define CSR_CYCLEH 0xc80 -+#define CSR_TIMEH 0xc81 -+#define CSR_INSTRETH 0xc82 -+#define CSR_SCYCLEH 0x980 -+#define CSR_STIMEH 0x981 -+#define CSR_SINSTRETH 0x982 -+#define CAUSE_MISALIGNED_FETCH 0x0 -+#define CAUSE_FAULT_FETCH 0x1 -+#define CAUSE_ILLEGAL_INSTRUCTION 0x2 -+#define CAUSE_MISALIGNED_LOAD 0x4 -+#define CAUSE_FAULT_LOAD 0x5 -+#define CAUSE_MISALIGNED_STORE 0x6 -+#define CAUSE_FAULT_STORE 0x7 -+#define CAUSE_ECALL 0x8 -+#define CAUSE_BREAKPOINT 0x9 -+#endif -+#ifdef DECLARE_INSN -+DECLARE_INSN(custom3_rd_rs1_rs2, MATCH_CUSTOM3_RD_RS1_RS2, MASK_CUSTOM3_RD_RS1_RS2) -+DECLARE_INSN(vlsegstwu, MATCH_VLSEGSTWU, MASK_VLSEGSTWU) -+DECLARE_INSN(c_lw0, MATCH_C_LW0, MASK_C_LW0) -+DECLARE_INSN(fmv_d_x, MATCH_FMV_D_X, MASK_FMV_D_X) -+DECLARE_INSN(vlh, MATCH_VLH, MASK_VLH) -+DECLARE_INSN(c_li, MATCH_C_LI, MASK_C_LI) -+DECLARE_INSN(fadd_d, MATCH_FADD_D, MASK_FADD_D) -+DECLARE_INSN(c_ld, MATCH_C_LD, MASK_C_LD) -+DECLARE_INSN(vld, MATCH_VLD, MASK_VLD) -+DECLARE_INSN(fadd_s, MATCH_FADD_S, MASK_FADD_S) -+DECLARE_INSN(c_lw, MATCH_C_LW, MASK_C_LW) -+DECLARE_INSN(vlw, MATCH_VLW, MASK_VLW) -+DECLARE_INSN(vssegstw, MATCH_VSSEGSTW, MASK_VSSEGSTW) -+DECLARE_INSN(utidx, MATCH_UTIDX, MASK_UTIDX) -+DECLARE_INSN(c_flw, MATCH_C_FLW, MASK_C_FLW) -+DECLARE_INSN(fsub_d, MATCH_FSUB_D, MASK_FSUB_D) -+DECLARE_INSN(vssegstd, MATCH_VSSEGSTD, MASK_VSSEGSTD) -+DECLARE_INSN(vssegstb, MATCH_VSSEGSTB, MASK_VSSEGSTB) -+DECLARE_INSN(div, MATCH_DIV, MASK_DIV) -+DECLARE_INSN(fmv_h_x, MATCH_FMV_H_X, MASK_FMV_H_X) -+DECLARE_INSN(c_fld, MATCH_C_FLD, MASK_C_FLD) -+DECLARE_INSN(frrm, MATCH_FRRM, MASK_FRRM) -+DECLARE_INSN(vfmsv_s, MATCH_VFMSV_S, MASK_VFMSV_S) -+DECLARE_INSN(c_lwsp, MATCH_C_LWSP, MASK_C_LWSP) -+DECLARE_INSN(fence, MATCH_FENCE, MASK_FENCE) -+DECLARE_INSN(fnmsub_s, MATCH_FNMSUB_S, MASK_FNMSUB_S) -+DECLARE_INSN(fle_s, MATCH_FLE_S, MASK_FLE_S) -+DECLARE_INSN(fnmsub_h, MATCH_FNMSUB_H, MASK_FNMSUB_H) -+DECLARE_INSN(fle_h, MATCH_FLE_H, MASK_FLE_H) -+DECLARE_INSN(flw, MATCH_FLW, MASK_FLW) -+DECLARE_INSN(vsetvl, MATCH_VSETVL, MASK_VSETVL) -+DECLARE_INSN(vfmsv_d, MATCH_VFMSV_D, MASK_VFMSV_D) -+DECLARE_INSN(fle_d, MATCH_FLE_D, MASK_FLE_D) -+DECLARE_INSN(fence_i, MATCH_FENCE_I, MASK_FENCE_I) -+DECLARE_INSN(fnmsub_d, MATCH_FNMSUB_D, MASK_FNMSUB_D) -+DECLARE_INSN(addw, MATCH_ADDW, MASK_ADDW) -+DECLARE_INSN(xor, MATCH_XOR, MASK_XOR) -+DECLARE_INSN(sub, MATCH_SUB, MASK_SUB) -+DECLARE_INSN(vsstw, MATCH_VSSTW, MASK_VSSTW) -+DECLARE_INSN(vssth, MATCH_VSSTH, MASK_VSSTH) -+DECLARE_INSN(sc_w, MATCH_SC_W, MASK_SC_W) -+DECLARE_INSN(vsstb, MATCH_VSSTB, MASK_VSSTB) -+DECLARE_INSN(vsstd, MATCH_VSSTD, MASK_VSSTD) -+DECLARE_INSN(addi, MATCH_ADDI, MASK_ADDI) -+DECLARE_INSN(rdtimeh, MATCH_RDTIMEH, MASK_RDTIMEH) -+DECLARE_INSN(mulh, MATCH_MULH, MASK_MULH) -+DECLARE_INSN(csrrsi, MATCH_CSRRSI, MASK_CSRRSI) -+DECLARE_INSN(fcvt_d_wu, MATCH_FCVT_D_WU, MASK_FCVT_D_WU) -+DECLARE_INSN(mulw, MATCH_MULW, MASK_MULW) -+DECLARE_INSN(custom1_rd_rs1_rs2, MATCH_CUSTOM1_RD_RS1_RS2, MASK_CUSTOM1_RD_RS1_RS2) -+DECLARE_INSN(venqimm1, MATCH_VENQIMM1, MASK_VENQIMM1) -+DECLARE_INSN(venqimm2, MATCH_VENQIMM2, MASK_VENQIMM2) -+DECLARE_INSN(rdinstret, MATCH_RDINSTRET, MASK_RDINSTRET) -+DECLARE_INSN(c_swsp, MATCH_C_SWSP, MASK_C_SWSP) -+DECLARE_INSN(vlstw, MATCH_VLSTW, MASK_VLSTW) -+DECLARE_INSN(vlsth, MATCH_VLSTH, MASK_VLSTH) -+DECLARE_INSN(vlstb, MATCH_VLSTB, MASK_VLSTB) -+DECLARE_INSN(vlstd, MATCH_VLSTD, MASK_VLSTD) -+DECLARE_INSN(andi, MATCH_ANDI, MASK_ANDI) -+DECLARE_INSN(fmv_x_s, MATCH_FMV_X_S, MASK_FMV_X_S) -+DECLARE_INSN(custom0_rd_rs1_rs2, MATCH_CUSTOM0_RD_RS1_RS2, MASK_CUSTOM0_RD_RS1_RS2) -+DECLARE_INSN(fnmadd_s, MATCH_FNMADD_S, MASK_FNMADD_S) -+DECLARE_INSN(lwu, MATCH_LWU, MASK_LWU) -+DECLARE_INSN(custom0_rs1, MATCH_CUSTOM0_RS1, MASK_CUSTOM0_RS1) -+DECLARE_INSN(vlsegstbu, MATCH_VLSEGSTBU, MASK_VLSEGSTBU) -+DECLARE_INSN(fnmadd_d, MATCH_FNMADD_D, MASK_FNMADD_D) -+DECLARE_INSN(fcvt_w_s, MATCH_FCVT_W_S, MASK_FCVT_W_S) -+DECLARE_INSN(c_srai, MATCH_C_SRAI, MASK_C_SRAI) -+DECLARE_INSN(mulhsu, MATCH_MULHSU, MASK_MULHSU) -+DECLARE_INSN(fcvt_d_lu, MATCH_FCVT_D_LU, MASK_FCVT_D_LU) -+DECLARE_INSN(fcvt_w_d, MATCH_FCVT_W_D, MASK_FCVT_W_D) -+DECLARE_INSN(fsub_h, MATCH_FSUB_H, MASK_FSUB_H) -+DECLARE_INSN(divuw, MATCH_DIVUW, MASK_DIVUW) -+DECLARE_INSN(slti, MATCH_SLTI, MASK_SLTI) -+DECLARE_INSN(vlstbu, MATCH_VLSTBU, MASK_VLSTBU) -+DECLARE_INSN(sltu, MATCH_SLTU, MASK_SLTU) -+DECLARE_INSN(flh, MATCH_FLH, MASK_FLH) -+DECLARE_INSN(custom2_rd_rs1_rs2, MATCH_CUSTOM2_RD_RS1_RS2, MASK_CUSTOM2_RD_RS1_RS2) -+DECLARE_INSN(fld, MATCH_FLD, MASK_FLD) -+DECLARE_INSN(fsub_s, MATCH_FSUB_S, MASK_FSUB_S) -+DECLARE_INSN(fcvt_h_lu, MATCH_FCVT_H_LU, MASK_FCVT_H_LU) -+DECLARE_INSN(custom0, MATCH_CUSTOM0, MASK_CUSTOM0) -+DECLARE_INSN(custom1, MATCH_CUSTOM1, MASK_CUSTOM1) -+DECLARE_INSN(custom2, MATCH_CUSTOM2, MASK_CUSTOM2) -+DECLARE_INSN(custom3, MATCH_CUSTOM3, MASK_CUSTOM3) -+DECLARE_INSN(vxcptsave, MATCH_VXCPTSAVE, MASK_VXCPTSAVE) -+DECLARE_INSN(vmsv, MATCH_VMSV, MASK_VMSV) -+DECLARE_INSN(fcvt_lu_s, MATCH_FCVT_LU_S, MASK_FCVT_LU_S) -+DECLARE_INSN(auipc, MATCH_AUIPC, MASK_AUIPC) -+DECLARE_INSN(frflags, MATCH_FRFLAGS, MASK_FRFLAGS) -+DECLARE_INSN(fcvt_lu_d, MATCH_FCVT_LU_D, MASK_FCVT_LU_D) -+DECLARE_INSN(csrrwi, MATCH_CSRRWI, MASK_CSRRWI) -+DECLARE_INSN(fadd_h, MATCH_FADD_H, MASK_FADD_H) -+DECLARE_INSN(fsqrt_s, MATCH_FSQRT_S, MASK_FSQRT_S) -+DECLARE_INSN(vxcptkill, MATCH_VXCPTKILL, MASK_VXCPTKILL) -+DECLARE_INSN(stop, MATCH_STOP, MASK_STOP) -+DECLARE_INSN(fsgnjn_s, MATCH_FSGNJN_S, MASK_FSGNJN_S) -+DECLARE_INSN(fsgnjn_h, MATCH_FSGNJN_H, MASK_FSGNJN_H) -+DECLARE_INSN(fsqrt_d, MATCH_FSQRT_D, MASK_FSQRT_D) -+DECLARE_INSN(xori, MATCH_XORI, MASK_XORI) -+DECLARE_INSN(divu, MATCH_DIVU, MASK_DIVU) -+DECLARE_INSN(fsgnjn_d, MATCH_FSGNJN_D, MASK_FSGNJN_D) -+DECLARE_INSN(fsqrt_h, MATCH_FSQRT_H, MASK_FSQRT_H) -+DECLARE_INSN(vssegsth, MATCH_VSSEGSTH, MASK_VSSEGSTH) -+DECLARE_INSN(sw, MATCH_SW, MASK_SW) -+DECLARE_INSN(vlstwu, MATCH_VLSTWU, MASK_VLSTWU) -+DECLARE_INSN(vfssegw, MATCH_VFSSEGW, MASK_VFSSEGW) -+DECLARE_INSN(lhu, MATCH_LHU, MASK_LHU) -+DECLARE_INSN(sh, MATCH_SH, MASK_SH) -+DECLARE_INSN(fmsub_h, MATCH_FMSUB_H, MASK_FMSUB_H) -+DECLARE_INSN(vxcptaux, MATCH_VXCPTAUX, MASK_VXCPTAUX) -+DECLARE_INSN(fmsub_d, MATCH_FMSUB_D, MASK_FMSUB_D) -+DECLARE_INSN(vfssegd, MATCH_VFSSEGD, MASK_VFSSEGD) -+DECLARE_INSN(vlseghu, MATCH_VLSEGHU, MASK_VLSEGHU) -+DECLARE_INSN(movn, MATCH_MOVN, MASK_MOVN) -+DECLARE_INSN(custom1_rs1, MATCH_CUSTOM1_RS1, MASK_CUSTOM1_RS1) -+DECLARE_INSN(vlsthu, MATCH_VLSTHU, MASK_VLSTHU) -+DECLARE_INSN(movz, MATCH_MOVZ, MASK_MOVZ) -+DECLARE_INSN(csrrw, MATCH_CSRRW, MASK_CSRRW) -+DECLARE_INSN(ld, MATCH_LD, MASK_LD) -+DECLARE_INSN(lb, MATCH_LB, MASK_LB) -+DECLARE_INSN(vlwu, MATCH_VLWU, MASK_VLWU) -+DECLARE_INSN(lh, MATCH_LH, MASK_LH) -+DECLARE_INSN(lw, MATCH_LW, MASK_LW) -+DECLARE_INSN(csrrc, MATCH_CSRRC, MASK_CSRRC) -+DECLARE_INSN(fcvt_lu_h, MATCH_FCVT_LU_H, MASK_FCVT_LU_H) -+DECLARE_INSN(fcvt_s_d, MATCH_FCVT_S_D, MASK_FCVT_S_D) -+DECLARE_INSN(bgeu, MATCH_BGEU, MASK_BGEU) -+DECLARE_INSN(vflstd, MATCH_VFLSTD, MASK_VFLSTD) -+DECLARE_INSN(fcvt_s_l, MATCH_FCVT_S_L, MASK_FCVT_S_L) -+DECLARE_INSN(fcvt_s_h, MATCH_FCVT_S_H, MASK_FCVT_S_H) -+DECLARE_INSN(fscsr, MATCH_FSCSR, MASK_FSCSR) -+DECLARE_INSN(fcvt_s_w, MATCH_FCVT_S_W, MASK_FCVT_S_W) -+DECLARE_INSN(vflstw, MATCH_VFLSTW, MASK_VFLSTW) -+DECLARE_INSN(vxcptevac, MATCH_VXCPTEVAC, MASK_VXCPTEVAC) -+DECLARE_INSN(amominu_d, MATCH_AMOMINU_D, MASK_AMOMINU_D) -+DECLARE_INSN(fsflags, MATCH_FSFLAGS, MASK_FSFLAGS) -+DECLARE_INSN(srli, MATCH_SRLI, MASK_SRLI) -+DECLARE_INSN(c_srli, MATCH_C_SRLI, MASK_C_SRLI) -+DECLARE_INSN(amominu_w, MATCH_AMOMINU_W, MASK_AMOMINU_W) -+DECLARE_INSN(srlw, MATCH_SRLW, MASK_SRLW) -+DECLARE_INSN(vflsegw, MATCH_VFLSEGW, MASK_VFLSEGW) -+DECLARE_INSN(c_ld0, MATCH_C_LD0, MASK_C_LD0) -+DECLARE_INSN(vlsegbu, MATCH_VLSEGBU, MASK_VLSEGBU) -+DECLARE_INSN(jalr, MATCH_JALR, MASK_JALR) -+DECLARE_INSN(blt, MATCH_BLT, MASK_BLT) -+DECLARE_INSN(custom2_rd_rs1, MATCH_CUSTOM2_RD_RS1, MASK_CUSTOM2_RD_RS1) -+DECLARE_INSN(fclass_s, MATCH_FCLASS_S, MASK_FCLASS_S) -+DECLARE_INSN(sfence_vm, MATCH_SFENCE_VM, MASK_SFENCE_VM) -+DECLARE_INSN(rem, MATCH_REM, MASK_REM) -+DECLARE_INSN(fclass_d, MATCH_FCLASS_D, MASK_FCLASS_D) -+DECLARE_INSN(fmul_s, MATCH_FMUL_S, MASK_FMUL_S) -+DECLARE_INSN(rdcycleh, MATCH_RDCYCLEH, MASK_RDCYCLEH) -+DECLARE_INSN(vlsegsthu, MATCH_VLSEGSTHU, MASK_VLSEGSTHU) -+DECLARE_INSN(fmul_d, MATCH_FMUL_D, MASK_FMUL_D) -+DECLARE_INSN(ori, MATCH_ORI, MASK_ORI) -+DECLARE_INSN(fmul_h, MATCH_FMUL_H, MASK_FMUL_H) -+DECLARE_INSN(vflsegd, MATCH_VFLSEGD, MASK_VFLSEGD) -+DECLARE_INSN(feq_s, MATCH_FEQ_S, MASK_FEQ_S) -+DECLARE_INSN(fsgnjx_d, MATCH_FSGNJX_D, MASK_FSGNJX_D) -+DECLARE_INSN(sraiw, MATCH_SRAIW, MASK_SRAIW) -+DECLARE_INSN(fsgnjx_h, MATCH_FSGNJX_H, MASK_FSGNJX_H) -+DECLARE_INSN(fsgnjx_s, MATCH_FSGNJX_S, MASK_FSGNJX_S) -+DECLARE_INSN(feq_d, MATCH_FEQ_D, MASK_FEQ_D) -+DECLARE_INSN(custom1_rd_rs1, MATCH_CUSTOM1_RD_RS1, MASK_CUSTOM1_RD_RS1) -+DECLARE_INSN(feq_h, MATCH_FEQ_H, MASK_FEQ_H) -+DECLARE_INSN(amomaxu_d, MATCH_AMOMAXU_D, MASK_AMOMAXU_D) -+DECLARE_INSN(divw, MATCH_DIVW, MASK_DIVW) -+DECLARE_INSN(amomaxu_w, MATCH_AMOMAXU_W, MASK_AMOMAXU_W) -+DECLARE_INSN(srai_rv32, MATCH_SRAI_RV32, MASK_SRAI_RV32) -+DECLARE_INSN(c_srli32, MATCH_C_SRLI32, MASK_C_SRLI32) -+DECLARE_INSN(vfsstw, MATCH_VFSSTW, MASK_VFSSTW) -+DECLARE_INSN(custom0_rd, MATCH_CUSTOM0_RD, MASK_CUSTOM0_RD) -+DECLARE_INSN(c_beq, MATCH_C_BEQ, MASK_C_BEQ) -+DECLARE_INSN(vfsstd, MATCH_VFSSTD, MASK_VFSSTD) -+DECLARE_INSN(custom3_rd_rs1, MATCH_CUSTOM3_RD_RS1, MASK_CUSTOM3_RD_RS1) -+DECLARE_INSN(lr_d, MATCH_LR_D, MASK_LR_D) -+DECLARE_INSN(lr_w, MATCH_LR_W, MASK_LR_W) -+DECLARE_INSN(fcvt_h_wu, MATCH_FCVT_H_WU, MASK_FCVT_H_WU) -+DECLARE_INSN(vmvv, MATCH_VMVV, MASK_VMVV) -+DECLARE_INSN(sllw, MATCH_SLLW, MASK_SLLW) -+DECLARE_INSN(slli, MATCH_SLLI, MASK_SLLI) -+DECLARE_INSN(beq, MATCH_BEQ, MASK_BEQ) -+DECLARE_INSN(and, MATCH_AND, MASK_AND) -+DECLARE_INSN(lbu, MATCH_LBU, MASK_LBU) -+DECLARE_INSN(fsgnj_s, MATCH_FSGNJ_S, MASK_FSGNJ_S) -+DECLARE_INSN(fmsub_s, MATCH_FMSUB_S, MASK_FMSUB_S) -+DECLARE_INSN(c_sub3, MATCH_C_SUB3, MASK_C_SUB3) -+DECLARE_INSN(fsgnj_h, MATCH_FSGNJ_H, MASK_FSGNJ_H) -+DECLARE_INSN(vlb, MATCH_VLB, MASK_VLB) -+DECLARE_INSN(c_addiw, MATCH_C_ADDIW, MASK_C_ADDIW) -+DECLARE_INSN(custom3_rs1_rs2, MATCH_CUSTOM3_RS1_RS2, MASK_CUSTOM3_RS1_RS2) -+DECLARE_INSN(fsgnj_d, MATCH_FSGNJ_D, MASK_FSGNJ_D) -+DECLARE_INSN(vlsegwu, MATCH_VLSEGWU, MASK_VLSEGWU) -+DECLARE_INSN(fcvt_s_wu, MATCH_FCVT_S_WU, MASK_FCVT_S_WU) -+DECLARE_INSN(custom3_rs1, MATCH_CUSTOM3_RS1, MASK_CUSTOM3_RS1) -+DECLARE_INSN(sc_d, MATCH_SC_D, MASK_SC_D) -+DECLARE_INSN(vfsw, MATCH_VFSW, MASK_VFSW) -+DECLARE_INSN(amoswap_d, MATCH_AMOSWAP_D, MASK_AMOSWAP_D) -+DECLARE_INSN(sb, MATCH_SB, MASK_SB) -+DECLARE_INSN(amoswap_w, MATCH_AMOSWAP_W, MASK_AMOSWAP_W) -+DECLARE_INSN(vfsd, MATCH_VFSD, MASK_VFSD) -+DECLARE_INSN(custom2_rs1, MATCH_CUSTOM2_RS1, MASK_CUSTOM2_RS1) -+DECLARE_INSN(sd, MATCH_SD, MASK_SD) -+DECLARE_INSN(fmv_s_x, MATCH_FMV_S_X, MASK_FMV_S_X) -+DECLARE_INSN(remuw, MATCH_REMUW, MASK_REMUW) -+DECLARE_INSN(jal, MATCH_JAL, MASK_JAL) -+DECLARE_INSN(c_fsd, MATCH_C_FSD, MASK_C_FSD) -+DECLARE_INSN(rdcycle, MATCH_RDCYCLE, MASK_RDCYCLE) -+DECLARE_INSN(c_bne, MATCH_C_BNE, MASK_C_BNE) -+DECLARE_INSN(c_add, MATCH_C_ADD, MASK_C_ADD) -+DECLARE_INSN(vxcptcause, MATCH_VXCPTCAUSE, MASK_VXCPTCAUSE) -+DECLARE_INSN(vgetcfg, MATCH_VGETCFG, MASK_VGETCFG) -+DECLARE_INSN(lui, MATCH_LUI, MASK_LUI) -+DECLARE_INSN(vsetcfg, MATCH_VSETCFG, MASK_VSETCFG) -+DECLARE_INSN(c_sdsp, MATCH_C_SDSP, MASK_C_SDSP) -+DECLARE_INSN(c_ldsp, MATCH_C_LDSP, MASK_C_LDSP) -+DECLARE_INSN(fnmadd_h, MATCH_FNMADD_H, MASK_FNMADD_H) -+DECLARE_INSN(custom0_rs1_rs2, MATCH_CUSTOM0_RS1_RS2, MASK_CUSTOM0_RS1_RS2) -+DECLARE_INSN(slli_rv32, MATCH_SLLI_RV32, MASK_SLLI_RV32) -+DECLARE_INSN(mul, MATCH_MUL, MASK_MUL) -+DECLARE_INSN(csrrci, MATCH_CSRRCI, MASK_CSRRCI) -+DECLARE_INSN(c_srai32, MATCH_C_SRAI32, MASK_C_SRAI32) -+DECLARE_INSN(flt_h, MATCH_FLT_H, MASK_FLT_H) -+DECLARE_INSN(srai, MATCH_SRAI, MASK_SRAI) -+DECLARE_INSN(amoand_d, MATCH_AMOAND_D, MASK_AMOAND_D) -+DECLARE_INSN(flt_d, MATCH_FLT_D, MASK_FLT_D) -+DECLARE_INSN(sraw, MATCH_SRAW, MASK_SRAW) -+DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS) -+DECLARE_INSN(flt_s, MATCH_FLT_S, MASK_FLT_S) -+DECLARE_INSN(addiw, MATCH_ADDIW, MASK_ADDIW) -+DECLARE_INSN(amoand_w, MATCH_AMOAND_W, MASK_AMOAND_W) -+DECLARE_INSN(custom2_rd, MATCH_CUSTOM2_RD, MASK_CUSTOM2_RD) -+DECLARE_INSN(mrts, MATCH_MRTS, MASK_MRTS) -+DECLARE_INSN(fcvt_wu_d, MATCH_FCVT_WU_D, MASK_FCVT_WU_D) -+DECLARE_INSN(amoxor_w, MATCH_AMOXOR_W, MASK_AMOXOR_W) -+DECLARE_INSN(fcvt_d_l, MATCH_FCVT_D_L, MASK_FCVT_D_L) -+DECLARE_INSN(fcvt_wu_h, MATCH_FCVT_WU_H, MASK_FCVT_WU_H) -+DECLARE_INSN(c_slli, MATCH_C_SLLI, MASK_C_SLLI) -+DECLARE_INSN(amoxor_d, MATCH_AMOXOR_D, MASK_AMOXOR_D) -+DECLARE_INSN(fcvt_wu_s, MATCH_FCVT_WU_S, MASK_FCVT_WU_S) -+DECLARE_INSN(custom3_rd, MATCH_CUSTOM3_RD, MASK_CUSTOM3_RD) -+DECLARE_INSN(fmax_h, MATCH_FMAX_H, MASK_FMAX_H) -+DECLARE_INSN(venqcnt, MATCH_VENQCNT, MASK_VENQCNT) -+DECLARE_INSN(vlbu, MATCH_VLBU, MASK_VLBU) -+DECLARE_INSN(vlhu, MATCH_VLHU, MASK_VLHU) -+DECLARE_INSN(c_sw, MATCH_C_SW, MASK_C_SW) -+DECLARE_INSN(c_sd, MATCH_C_SD, MASK_C_SD) -+DECLARE_INSN(c_or3, MATCH_C_OR3, MASK_C_OR3) -+DECLARE_INSN(c_and3, MATCH_C_AND3, MASK_C_AND3) -+DECLARE_INSN(vfssegstw, MATCH_VFSSEGSTW, MASK_VFSSEGSTW) -+DECLARE_INSN(slt, MATCH_SLT, MASK_SLT) -+DECLARE_INSN(amoor_d, MATCH_AMOOR_D, MASK_AMOOR_D) -+DECLARE_INSN(remu, MATCH_REMU, MASK_REMU) -+DECLARE_INSN(remw, MATCH_REMW, MASK_REMW) -+DECLARE_INSN(sll, MATCH_SLL, MASK_SLL) -+DECLARE_INSN(vfssegstd, MATCH_VFSSEGSTD, MASK_VFSSEGSTD) -+DECLARE_INSN(amoor_w, MATCH_AMOOR_W, MASK_AMOOR_W) -+DECLARE_INSN(custom2_rs1_rs2, MATCH_CUSTOM2_RS1_RS2, MASK_CUSTOM2_RS1_RS2) -+DECLARE_INSN(vf, MATCH_VF, MASK_VF) -+DECLARE_INSN(vfmvv, MATCH_VFMVV, MASK_VFMVV) -+DECLARE_INSN(vflsegstw, MATCH_VFLSEGSTW, MASK_VFLSEGSTW) -+DECLARE_INSN(vxcptrestore, MATCH_VXCPTRESTORE, MASK_VXCPTRESTORE) -+DECLARE_INSN(vxcpthold, MATCH_VXCPTHOLD, MASK_VXCPTHOLD) -+DECLARE_INSN(sltiu, MATCH_SLTIU, MASK_SLTIU) -+DECLARE_INSN(vflsegstd, MATCH_VFLSEGSTD, MASK_VFLSEGSTD) -+DECLARE_INSN(vfld, MATCH_VFLD, MASK_VFLD) -+DECLARE_INSN(fmadd_s, MATCH_FMADD_S, MASK_FMADD_S) -+DECLARE_INSN(vflw, MATCH_VFLW, MASK_VFLW) -+DECLARE_INSN(fmadd_d, MATCH_FMADD_D, MASK_FMADD_D) -+DECLARE_INSN(fmadd_h, MATCH_FMADD_H, MASK_FMADD_H) -+DECLARE_INSN(sret, MATCH_SRET, MASK_SRET) -+DECLARE_INSN(vssegw, MATCH_VSSEGW, MASK_VSSEGW) -+DECLARE_INSN(custom0_rd_rs1, MATCH_CUSTOM0_RD_RS1, MASK_CUSTOM0_RD_RS1) -+DECLARE_INSN(vssegh, MATCH_VSSEGH, MASK_VSSEGH) -+DECLARE_INSN(frcsr, MATCH_FRCSR, MASK_FRCSR) -+DECLARE_INSN(vssegd, MATCH_VSSEGD, MASK_VSSEGD) -+DECLARE_INSN(vssegb, MATCH_VSSEGB, MASK_VSSEGB) -+DECLARE_INSN(fmin_h, MATCH_FMIN_H, MASK_FMIN_H) -+DECLARE_INSN(fmin_d, MATCH_FMIN_D, MASK_FMIN_D) -+DECLARE_INSN(bltu, MATCH_BLTU, MASK_BLTU) -+DECLARE_INSN(fmin_s, MATCH_FMIN_S, MASK_FMIN_S) -+DECLARE_INSN(srli_rv32, MATCH_SRLI_RV32, MASK_SRLI_RV32) -+DECLARE_INSN(slliw, MATCH_SLLIW, MASK_SLLIW) -+DECLARE_INSN(fmax_s, MATCH_FMAX_S, MASK_FMAX_S) -+DECLARE_INSN(fcvt_d_h, MATCH_FCVT_D_H, MASK_FCVT_D_H) -+DECLARE_INSN(fcvt_d_w, MATCH_FCVT_D_W, MASK_FCVT_D_W) -+DECLARE_INSN(add, MATCH_ADD, MASK_ADD) -+DECLARE_INSN(fcvt_d_s, MATCH_FCVT_D_S, MASK_FCVT_D_S) -+DECLARE_INSN(fmax_d, MATCH_FMAX_D, MASK_FMAX_D) -+DECLARE_INSN(bne, MATCH_BNE, MASK_BNE) -+DECLARE_INSN(custom1_rd, MATCH_CUSTOM1_RD, MASK_CUSTOM1_RD) -+DECLARE_INSN(fsrm, MATCH_FSRM, MASK_FSRM) -+DECLARE_INSN(fdiv_d, MATCH_FDIV_D, MASK_FDIV_D) -+DECLARE_INSN(vsw, MATCH_VSW, MASK_VSW) -+DECLARE_INSN(fcvt_l_s, MATCH_FCVT_L_S, MASK_FCVT_L_S) -+DECLARE_INSN(fdiv_h, MATCH_FDIV_H, MASK_FDIV_H) -+DECLARE_INSN(vsb, MATCH_VSB, MASK_VSB) -+DECLARE_INSN(fdiv_s, MATCH_FDIV_S, MASK_FDIV_S) -+DECLARE_INSN(fsrmi, MATCH_FSRMI, MASK_FSRMI) -+DECLARE_INSN(fcvt_l_h, MATCH_FCVT_L_H, MASK_FCVT_L_H) -+DECLARE_INSN(vsh, MATCH_VSH, MASK_VSH) -+DECLARE_INSN(fcvt_l_d, MATCH_FCVT_L_D, MASK_FCVT_L_D) -+DECLARE_INSN(fcvt_h_s, MATCH_FCVT_H_S, MASK_FCVT_H_S) -+DECLARE_INSN(scall, MATCH_SCALL, MASK_SCALL) -+DECLARE_INSN(fsflagsi, MATCH_FSFLAGSI, MASK_FSFLAGSI) -+DECLARE_INSN(fcvt_h_w, MATCH_FCVT_H_W, MASK_FCVT_H_W) -+DECLARE_INSN(fcvt_h_l, MATCH_FCVT_H_L, MASK_FCVT_H_L) -+DECLARE_INSN(srliw, MATCH_SRLIW, MASK_SRLIW) -+DECLARE_INSN(fcvt_s_lu, MATCH_FCVT_S_LU, MASK_FCVT_S_LU) -+DECLARE_INSN(fcvt_h_d, MATCH_FCVT_H_D, MASK_FCVT_H_D) -+DECLARE_INSN(sbreak, MATCH_SBREAK, MASK_SBREAK) -+DECLARE_INSN(rdinstreth, MATCH_RDINSTRETH, MASK_RDINSTRETH) -+DECLARE_INSN(sra, MATCH_SRA, MASK_SRA) -+DECLARE_INSN(bge, MATCH_BGE, MASK_BGE) -+DECLARE_INSN(srl, MATCH_SRL, MASK_SRL) -+DECLARE_INSN(venqcmd, MATCH_VENQCMD, MASK_VENQCMD) -+DECLARE_INSN(or, MATCH_OR, MASK_OR) -+DECLARE_INSN(subw, MATCH_SUBW, MASK_SUBW) -+DECLARE_INSN(fmv_x_d, MATCH_FMV_X_D, MASK_FMV_X_D) -+DECLARE_INSN(rdtime, MATCH_RDTIME, MASK_RDTIME) -+DECLARE_INSN(amoadd_d, MATCH_AMOADD_D, MASK_AMOADD_D) -+DECLARE_INSN(amomax_w, MATCH_AMOMAX_W, MASK_AMOMAX_W) -+DECLARE_INSN(c_move, MATCH_C_MOVE, MASK_C_MOVE) -+DECLARE_INSN(fmovn, MATCH_FMOVN, MASK_FMOVN) -+DECLARE_INSN(c_fsw, MATCH_C_FSW, MASK_C_FSW) -+DECLARE_INSN(amoadd_w, MATCH_AMOADD_W, MASK_AMOADD_W) -+DECLARE_INSN(amomax_d, MATCH_AMOMAX_D, MASK_AMOMAX_D) -+DECLARE_INSN(fmovz, MATCH_FMOVZ, MASK_FMOVZ) -+DECLARE_INSN(custom1_rs1_rs2, MATCH_CUSTOM1_RS1_RS2, MASK_CUSTOM1_RS1_RS2) -+DECLARE_INSN(fmv_x_h, MATCH_FMV_X_H, MASK_FMV_X_H) -+DECLARE_INSN(vsd, MATCH_VSD, MASK_VSD) -+DECLARE_INSN(vlsegstw, MATCH_VLSEGSTW, MASK_VLSEGSTW) -+DECLARE_INSN(c_addi, MATCH_C_ADDI, MASK_C_ADDI) -+DECLARE_INSN(c_slliw, MATCH_C_SLLIW, MASK_C_SLLIW) -+DECLARE_INSN(vlsegstb, MATCH_VLSEGSTB, MASK_VLSEGSTB) -+DECLARE_INSN(vlsegstd, MATCH_VLSEGSTD, MASK_VLSEGSTD) -+DECLARE_INSN(vlsegsth, MATCH_VLSEGSTH, MASK_VLSEGSTH) -+DECLARE_INSN(mulhu, MATCH_MULHU, MASK_MULHU) -+DECLARE_INSN(amomin_w, MATCH_AMOMIN_W, MASK_AMOMIN_W) -+DECLARE_INSN(c_slli32, MATCH_C_SLLI32, MASK_C_SLLI32) -+DECLARE_INSN(c_add3, MATCH_C_ADD3, MASK_C_ADD3) -+DECLARE_INSN(vgetvl, MATCH_VGETVL, MASK_VGETVL) -+DECLARE_INSN(amomin_d, MATCH_AMOMIN_D, MASK_AMOMIN_D) -+DECLARE_INSN(fcvt_w_h, MATCH_FCVT_W_H, MASK_FCVT_W_H) -+DECLARE_INSN(vlsegb, MATCH_VLSEGB, MASK_VLSEGB) -+DECLARE_INSN(fsd, MATCH_FSD, MASK_FSD) -+DECLARE_INSN(vlsegd, MATCH_VLSEGD, MASK_VLSEGD) -+DECLARE_INSN(fsh, MATCH_FSH, MASK_FSH) -+DECLARE_INSN(vlsegh, MATCH_VLSEGH, MASK_VLSEGH) -+DECLARE_INSN(c_sub, MATCH_C_SUB, MASK_C_SUB) -+DECLARE_INSN(vlsegw, MATCH_VLSEGW, MASK_VLSEGW) -+DECLARE_INSN(fsw, MATCH_FSW, MASK_FSW) -+DECLARE_INSN(c_j, MATCH_C_J, MASK_C_J) -+#endif -+#ifdef DECLARE_CSR -+DECLARE_CSR(fflags, CSR_FFLAGS) -+DECLARE_CSR(frm, CSR_FRM) -+DECLARE_CSR(fcsr, CSR_FCSR) -+DECLARE_CSR(cycle, CSR_CYCLE) -+DECLARE_CSR(time, CSR_TIME) -+DECLARE_CSR(instret, CSR_INSTRET) -+DECLARE_CSR(stats, CSR_STATS) -+DECLARE_CSR(uarch0, CSR_UARCH0) -+DECLARE_CSR(uarch1, CSR_UARCH1) -+DECLARE_CSR(uarch2, CSR_UARCH2) -+DECLARE_CSR(uarch3, CSR_UARCH3) -+DECLARE_CSR(uarch4, CSR_UARCH4) -+DECLARE_CSR(uarch5, CSR_UARCH5) -+DECLARE_CSR(uarch6, CSR_UARCH6) -+DECLARE_CSR(uarch7, CSR_UARCH7) -+DECLARE_CSR(uarch8, CSR_UARCH8) -+DECLARE_CSR(uarch9, CSR_UARCH9) -+DECLARE_CSR(uarch10, CSR_UARCH10) -+DECLARE_CSR(uarch11, CSR_UARCH11) -+DECLARE_CSR(uarch12, CSR_UARCH12) -+DECLARE_CSR(uarch13, CSR_UARCH13) -+DECLARE_CSR(uarch14, CSR_UARCH14) -+DECLARE_CSR(uarch15, CSR_UARCH15) -+DECLARE_CSR(sstatus, CSR_SSTATUS) -+DECLARE_CSR(stvec, CSR_STVEC) -+DECLARE_CSR(stimecmp, CSR_STIMECMP) -+DECLARE_CSR(sscratch, CSR_SSCRATCH) -+DECLARE_CSR(sepc, CSR_SEPC) -+DECLARE_CSR(sptbr, CSR_SPTBR) -+DECLARE_CSR(sasid, CSR_SASID) -+DECLARE_CSR(scycle, CSR_SCYCLE) -+DECLARE_CSR(stime, CSR_STIME) -+DECLARE_CSR(sinstret, CSR_SINSTRET) -+DECLARE_CSR(scause, CSR_SCAUSE) -+DECLARE_CSR(sbadaddr, CSR_SBADADDR) -+DECLARE_CSR(mstatus, CSR_MSTATUS) -+DECLARE_CSR(mscratch, CSR_MSCRATCH) -+DECLARE_CSR(mepc, CSR_MEPC) -+DECLARE_CSR(mcause, CSR_MCAUSE) -+DECLARE_CSR(mbadaddr, CSR_MBADADDR) -+DECLARE_CSR(reset, CSR_RESET) -+DECLARE_CSR(tohost, CSR_TOHOST) -+DECLARE_CSR(fromhost, CSR_FROMHOST) -+DECLARE_CSR(send_ipi, CSR_SEND_IPI) -+DECLARE_CSR(hartid, CSR_HARTID) -+DECLARE_CSR(cycleh, CSR_CYCLEH) -+DECLARE_CSR(timeh, CSR_TIMEH) -+DECLARE_CSR(instreth, CSR_INSTRETH) -+DECLARE_CSR(scycleh, CSR_SCYCLEH) -+DECLARE_CSR(stimeh, CSR_STIMEH) -+DECLARE_CSR(sinstreth, CSR_SINSTRETH) -+#endif -+#ifdef DECLARE_CAUSE -+DECLARE_CAUSE("fflags", CAUSE_FFLAGS) -+DECLARE_CAUSE("frm", CAUSE_FRM) -+DECLARE_CAUSE("fcsr", CAUSE_FCSR) -+DECLARE_CAUSE("cycle", CAUSE_CYCLE) -+DECLARE_CAUSE("time", CAUSE_TIME) -+DECLARE_CAUSE("instret", CAUSE_INSTRET) -+DECLARE_CAUSE("stats", CAUSE_STATS) -+DECLARE_CAUSE("uarch0", CAUSE_UARCH0) -+DECLARE_CAUSE("uarch1", CAUSE_UARCH1) -+DECLARE_CAUSE("uarch2", CAUSE_UARCH2) -+DECLARE_CAUSE("uarch3", CAUSE_UARCH3) -+DECLARE_CAUSE("uarch4", CAUSE_UARCH4) -+DECLARE_CAUSE("uarch5", CAUSE_UARCH5) -+DECLARE_CAUSE("uarch6", CAUSE_UARCH6) -+DECLARE_CAUSE("uarch7", CAUSE_UARCH7) -+DECLARE_CAUSE("uarch8", CAUSE_UARCH8) -+DECLARE_CAUSE("uarch9", CAUSE_UARCH9) -+DECLARE_CAUSE("uarch10", CAUSE_UARCH10) -+DECLARE_CAUSE("uarch11", CAUSE_UARCH11) -+DECLARE_CAUSE("uarch12", CAUSE_UARCH12) -+DECLARE_CAUSE("uarch13", CAUSE_UARCH13) -+DECLARE_CAUSE("uarch14", CAUSE_UARCH14) -+DECLARE_CAUSE("uarch15", CAUSE_UARCH15) -+DECLARE_CAUSE("sstatus", CAUSE_SSTATUS) -+DECLARE_CAUSE("stvec", CAUSE_STVEC) -+DECLARE_CAUSE("stimecmp", CAUSE_STIMECMP) -+DECLARE_CAUSE("sscratch", CAUSE_SSCRATCH) -+DECLARE_CAUSE("sepc", CAUSE_SEPC) -+DECLARE_CAUSE("sptbr", CAUSE_SPTBR) -+DECLARE_CAUSE("sasid", CAUSE_SASID) -+DECLARE_CAUSE("scycle", CAUSE_SCYCLE) -+DECLARE_CAUSE("stime", CAUSE_STIME) -+DECLARE_CAUSE("sinstret", CAUSE_SINSTRET) -+DECLARE_CAUSE("scause", CAUSE_SCAUSE) -+DECLARE_CAUSE("sbadaddr", CAUSE_SBADADDR) -+DECLARE_CAUSE("mstatus", CAUSE_MSTATUS) -+DECLARE_CAUSE("mscratch", CAUSE_MSCRATCH) -+DECLARE_CAUSE("mepc", CAUSE_MEPC) -+DECLARE_CAUSE("mcause", CAUSE_MCAUSE) -+DECLARE_CAUSE("mbadaddr", CAUSE_MBADADDR) -+DECLARE_CAUSE("reset", CAUSE_RESET) -+DECLARE_CAUSE("tohost", CAUSE_TOHOST) -+DECLARE_CAUSE("fromhost", CAUSE_FROMHOST) -+DECLARE_CAUSE("send_ipi", CAUSE_SEND_IPI) -+DECLARE_CAUSE("hartid", CAUSE_HARTID) -+DECLARE_CAUSE("cycleh", CAUSE_CYCLEH) -+DECLARE_CAUSE("timeh", CAUSE_TIMEH) -+DECLARE_CAUSE("instreth", CAUSE_INSTRETH) -+DECLARE_CAUSE("scycleh", CAUSE_SCYCLEH) -+DECLARE_CAUSE("stimeh", CAUSE_STIMEH) -+DECLARE_CAUSE("sinstreth", CAUSE_SINSTRETH) -+#endif -diff -rNU3 dist.orig/include/opcode/riscv.h dist/include/opcode/riscv.h ---- dist.orig/include/opcode/riscv.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/include/opcode/riscv.h 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,320 @@ -+/* riscv.h. RISC-V opcode list for GDB, the GNU debugger. -+ Copyright 2011 -+ Free Software Foundation, Inc. -+ Contributed by Andrew Waterman -+ -+This file is part of GDB, GAS, and the GNU binutils. -+ -+GDB, GAS, and the GNU binutils are free software; you can redistribute -+them and/or modify them under the terms of the GNU General Public -+License as published by the Free Software Foundation; either version -+1, or (at your option) any later version. -+ -+GDB, GAS, and the GNU binutils are distributed in the hope that they -+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 file; see the file COPYING. If not, write to the Free -+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+#ifndef _RISCV_H_ -+#define _RISCV_H_ -+ -+#include "riscv-opc.h" -+#include -+#include -+ -+/* RVC fields */ -+ -+#define OP_MASK_CRD 0x1f -+#define OP_SH_CRD 5 -+#define OP_MASK_CRS2 0x1f -+#define OP_SH_CRS2 5 -+#define OP_MASK_CRS1 0x1f -+#define OP_SH_CRS1 10 -+#define OP_MASK_CRDS 0x7 -+#define OP_SH_CRDS 13 -+#define OP_MASK_CRS2S 0x7 -+#define OP_SH_CRS2S 13 -+#define OP_MASK_CRS2BS 0x7 -+#define OP_SH_CRS2BS 5 -+#define OP_MASK_CRS1S 0x7 -+#define OP_SH_CRS1S 10 -+#define OP_MASK_CIMM6 0x3f -+#define OP_SH_CIMM6 10 -+#define OP_MASK_CIMM5 0x1f -+#define OP_SH_CIMM5 5 -+#define OP_MASK_CIMM10 0x3ff -+#define OP_SH_CIMM10 5 -+ -+static const char rvc_rs1_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 7 }; -+#define rvc_rd_regmap rvc_rs1_regmap -+#define rvc_rs2b_regmap rvc_rs1_regmap -+static const char rvc_rs2_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 0 }; -+ -+typedef uint64_t insn_t; -+ -+static inline unsigned int riscv_insn_length (insn_t insn) -+{ -+ if ((insn & 0x3) != 3) /* RVC */ -+ return 2; -+ if ((insn & 0x1f) != 0x1f) /* base ISA and extensions in 32-bit space */ -+ return 4; -+ if ((insn & 0x3f) == 0x1f) /* 48-bit extensions */ -+ return 6; -+ if ((insn & 0x7f) == 0x3f) /* 64-bit extensions */ -+ return 8; -+ /* longer instructions not supported at the moment */ -+ return 2; -+} -+ -+static const char * const riscv_rm[8] = { -+ "rne", "rtz", "rdn", "rup", "rmm", 0, 0, "dyn" -+}; -+static const char* const riscv_pred_succ[16] = { -+ 0, "w", "r", "rw", "o", "ow", "or", "orw", -+ "i", "iw", "ir", "irw", "io", "iow", "ior", "iorw", -+}; -+ -+#define RVC_JUMP_BITS 10 -+#define RVC_JUMP_ALIGN_BITS 1 -+#define RVC_JUMP_ALIGN (1 << RVC_JUMP_ALIGN_BITS) -+#define RVC_JUMP_REACH ((1ULL<> (s)) & ((1<<(n))-1)) -+#define RV_IMM_SIGN(x) (-(((x) >> 31) & 1)) -+ -+#define EXTRACT_ITYPE_IMM(x) \ -+ (RV_X(x, 20, 12) | (RV_IMM_SIGN(x) << 12)) -+#define EXTRACT_STYPE_IMM(x) \ -+ (RV_X(x, 7, 5) | (RV_X(x, 25, 7) << 5) | (RV_IMM_SIGN(x) << 12)) -+#define EXTRACT_SBTYPE_IMM(x) \ -+ ((RV_X(x, 8, 4) << 1) | (RV_X(x, 25, 6) << 5) | (RV_X(x, 7, 1) << 11) | (RV_IMM_SIGN(x) << 12)) -+#define EXTRACT_UTYPE_IMM(x) \ -+ ((RV_X(x, 12, 20) << 12) | (RV_IMM_SIGN(x) << 32)) -+#define EXTRACT_UJTYPE_IMM(x) \ -+ ((RV_X(x, 21, 10) << 1) | (RV_X(x, 20, 1) << 11) | (RV_X(x, 12, 8) << 12) | (RV_IMM_SIGN(x) << 20)) -+ -+#define ENCODE_ITYPE_IMM(x) \ -+ (RV_X(x, 0, 12) << 20) -+#define ENCODE_STYPE_IMM(x) \ -+ ((RV_X(x, 0, 5) << 7) | (RV_X(x, 5, 7) << 25)) -+#define ENCODE_SBTYPE_IMM(x) \ -+ ((RV_X(x, 1, 4) << 8) | (RV_X(x, 5, 6) << 25) | (RV_X(x, 11, 1) << 7) | (RV_X(x, 12, 1) << 31)) -+#define ENCODE_UTYPE_IMM(x) \ -+ (RV_X(x, 12, 20) << 12) -+#define ENCODE_UJTYPE_IMM(x) \ -+ ((RV_X(x, 1, 10) << 21) | (RV_X(x, 11, 1) << 20) | (RV_X(x, 12, 8) << 12) | (RV_X(x, 20, 1) << 31)) -+ -+#define VALID_ITYPE_IMM(x) (EXTRACT_ITYPE_IMM(ENCODE_ITYPE_IMM(x)) == (x)) -+#define VALID_STYPE_IMM(x) (EXTRACT_STYPE_IMM(ENCODE_STYPE_IMM(x)) == (x)) -+#define VALID_SBTYPE_IMM(x) (EXTRACT_SBTYPE_IMM(ENCODE_SBTYPE_IMM(x)) == (x)) -+#define VALID_UTYPE_IMM(x) (EXTRACT_UTYPE_IMM(ENCODE_UTYPE_IMM(x)) == (x)) -+#define VALID_UJTYPE_IMM(x) (EXTRACT_UJTYPE_IMM(ENCODE_UJTYPE_IMM(x)) == (x)) -+ -+#define RISCV_RTYPE(insn, rd, rs1, rs2) \ -+ ((MATCH_ ## insn) | ((rd) << OP_SH_RD) | ((rs1) << OP_SH_RS1) | ((rs2) << OP_SH_RS2)) -+#define RISCV_ITYPE(insn, rd, rs1, imm) \ -+ ((MATCH_ ## insn) | ((rd) << OP_SH_RD) | ((rs1) << OP_SH_RS1) | ENCODE_ITYPE_IMM(imm)) -+#define RISCV_STYPE(insn, rs1, rs2, imm) \ -+ ((MATCH_ ## insn) | ((rs1) << OP_SH_RS1) | ((rs2) << OP_SH_RS2) | ENCODE_STYPE_IMM(imm)) -+#define RISCV_SBTYPE(insn, rs1, rs2, target) \ -+ ((MATCH_ ## insn) | ((rs1) << OP_SH_RS1) | ((rs2) << OP_SH_RS2) | ENCODE_SBTYPE_IMM(target)) -+#define RISCV_UTYPE(insn, rd, bigimm) \ -+ ((MATCH_ ## insn) | ((rd) << OP_SH_RD) | ENCODE_UTYPE_IMM(bigimm)) -+#define RISCV_UJTYPE(insn, rd, target) \ -+ ((MATCH_ ## insn) | ((rd) << OP_SH_RD) | ENCODE_UJTYPE_IMM(target)) -+ -+#define RISCV_NOP RISCV_ITYPE(ADDI, 0, 0, 0) -+ -+#define RISCV_CONST_HIGH_PART(VALUE) \ -+ (((VALUE) + (RISCV_IMM_REACH/2)) & ~(RISCV_IMM_REACH-1)) -+#define RISCV_CONST_LOW_PART(VALUE) ((VALUE) - RISCV_CONST_HIGH_PART (VALUE)) -+#define RISCV_PCREL_HIGH_PART(VALUE, PC) RISCV_CONST_HIGH_PART((VALUE) - (PC)) -+#define RISCV_PCREL_LOW_PART(VALUE, PC) RISCV_CONST_LOW_PART((VALUE) - (PC)) -+ -+/* RV fields */ -+ -+#define OP_MASK_OP 0x7f -+#define OP_SH_OP 0 -+#define OP_MASK_RS2 0x1f -+#define OP_SH_RS2 20 -+#define OP_MASK_RS1 0x1f -+#define OP_SH_RS1 15 -+#define OP_MASK_RS3 0x1f -+#define OP_SH_RS3 27 -+#define OP_MASK_RD 0x1f -+#define OP_SH_RD 7 -+#define OP_MASK_SHAMT 0x3f -+#define OP_SH_SHAMT 20 -+#define OP_MASK_SHAMTW 0x1f -+#define OP_SH_SHAMTW 20 -+#define OP_MASK_RM 0x7 -+#define OP_SH_RM 12 -+#define OP_MASK_PRED 0xf -+#define OP_SH_PRED 24 -+#define OP_MASK_SUCC 0xf -+#define OP_SH_SUCC 20 -+#define OP_MASK_AQ 0x1 -+#define OP_SH_AQ 26 -+#define OP_MASK_RL 0x1 -+#define OP_SH_RL 25 -+ -+#define OP_MASK_VRD 0x1f -+#define OP_SH_VRD 7 -+#define OP_MASK_VRS 0x1f -+#define OP_SH_VRS 15 -+#define OP_MASK_VRT 0x1f -+#define OP_SH_VRT 20 -+#define OP_MASK_VRR 0x1f -+#define OP_SH_VRR 27 -+ -+#define OP_MASK_VFD 0x1f -+#define OP_SH_VFD 7 -+#define OP_MASK_VFS 0x1f -+#define OP_SH_VFS 15 -+#define OP_MASK_VFT 0x1f -+#define OP_SH_VFT 20 -+#define OP_MASK_VFR 0x1f -+#define OP_SH_VFR 27 -+ -+#define OP_MASK_IMMNGPR 0x3f -+#define OP_SH_IMMNGPR 20 -+#define OP_MASK_IMMNFPR 0x3f -+#define OP_SH_IMMNFPR 26 -+#define OP_MASK_IMMSEGNELM 0x7 -+#define OP_SH_IMMSEGNELM 29 -+#define OP_MASK_CUSTOM_IMM 0x7f -+#define OP_SH_CUSTOM_IMM 25 -+#define OP_MASK_CSR 0xfff -+#define OP_SH_CSR 20 -+ -+#define X_RA 1 -+#define X_SP 2 -+#define X_GP 3 -+#define X_TP 4 -+#define X_T0 5 -+#define X_T1 6 -+#define X_T2 7 -+#define X_T3 28 -+ -+#define NGPR 32 -+#define NFPR 32 -+#define NVGPR 32 -+#define NVFPR 32 -+ -+#define RISCV_JUMP_BITS RISCV_BIGIMM_BITS -+#define RISCV_JUMP_ALIGN_BITS 1 -+#define RISCV_JUMP_ALIGN (1 << RISCV_JUMP_ALIGN_BITS) -+#define RISCV_JUMP_REACH ((1ULL< ld.pod - -($(POD2MAN) ld.pod | \ -diff -rNU3 dist.orig/ld/Makefile.in dist/ld/Makefile.in ---- dist.orig/ld/Makefile.in 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/Makefile.in 2015-10-18 13:11:17.000000000 +0200 -@@ -452,12 +452,16 @@ - earmelf_linux_eabi.c \ - earmelf_nacl.c \ - earmelf_nbsd.c \ -+ earmelf_nbsd_eabi.c \ -+ earmelf_nbsd_eabihf.c \ - earmelf_vxworks.c \ - earmelfb.c \ - earmelfb_linux.c \ - earmelfb_linux_eabi.c \ - earmelfb_nacl.c \ - earmelfb_nbsd.c \ -+ earmelfb_nbsd_eabi.c \ -+ earmelfb_nbsd_eabihf.c \ - earmnbsd.c \ - earmnto.c \ - earmpe.c \ -@@ -535,6 +539,7 @@ - eelf32lppc.c \ - eelf32lppcnto.c \ - eelf32lppcsim.c \ -+ eelf32lriscv.c \ - eelf32lsmip.c \ - eelf32ltsmip.c \ - eelf32ltsmip_fbsd.c \ -@@ -548,9 +553,12 @@ - eelf32mipswindiss.c \ - eelf32moxie.c \ - eelf32mt.c \ -- eelf32openrisc.c \ -+ eelf32or1k.c \ -+ eelf32or1k_linux.c \ -+ eelf32or1k_nbsd.c \ - eelf32ppc.c \ - eelf32ppc_fbsd.c \ -+ eelf32ppc_nbsd.c \ - eelf32ppclinux.c \ - eelf32ppcnto.c \ - eelf32ppcsim.c \ -@@ -709,8 +717,6 @@ - emsp430xW427.c \ - enews.c \ - ens32knbsd.c \ -- eor32.c \ -- eor32elf.c \ - epc532macha.c \ - epdp11.c \ - epjelf.c \ -@@ -775,6 +781,8 @@ - eaarch64elfb.c \ - eaarch64linux.c \ - eaarch64linuxb.c \ -+ eaarch64nbsd.c \ -+ eaarch64nbsdb.c \ - eelf32_x86_64.c \ - eelf32_x86_64_nacl.c \ - eelf64_aix.c \ -@@ -793,6 +801,7 @@ - eelf64btsmip_fbsd.c \ - eelf64hppa.c \ - eelf64lppc.c \ -+ eelf64lriscv.c \ - eelf64ltsmip.c \ - eelf64ltsmip_fbsd.c \ - eelf64mmix.c \ -@@ -1060,6 +1069,8 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elfb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsdb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Po@am__quote@ -@@ -1078,12 +1089,16 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_eabi.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_eabihf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabi.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabihf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Po@am__quote@ -@@ -1156,6 +1171,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppc.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcnto.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcsim.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lriscv.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lsmip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ltsmip_fbsd.Po@am__quote@ -@@ -1169,9 +1185,12 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32openrisc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_nbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_fbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_nbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppclinux.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcnto.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcsim.Po@am__quote@ -@@ -1204,6 +1223,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@ -@@ -1363,8 +1383,6 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430xW427.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enews.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ens32knbsd.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eor32.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eor32elf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epc532macha.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epdp11.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epjelf.Po@am__quote@ -@@ -1490,6 +1508,8 @@ - -rm -f libtool config.lt - - ld.info: ld.texinfo $(ld_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ld.info: ld.texinfo $(ld_TEXINFOS) - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -2201,6 +2221,18 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)" -+earmelf_nbsd_eabi.c: $(srcdir)/emulparams/armelf_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf_nbsd.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelf_nbsd_eabi "$(tdir_armelf_nbsd_eabi)" -+earmelf_nbsd_eabihf.c: $(srcdir)/emulparams/armelf_nbsd_eabihf.sh \ -+ $(srcdir)/emulparams/armelf_nbsd.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelf_nbsd_eabihf "$(tdir_armelf_nbsd_eabihf)" - earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \ - $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \ - $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \ -@@ -2236,6 +2268,20 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)" -+earmelfb_nbsd_eabi.c: $(srcdir)/emulparams/armelfb_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf_nbsd.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelfb_nbsd_eabi "$(tdir_armelfb_nbsd_eabi)" -+earmelfb_nbsd_eabihf.c: $(srcdir)/emulparams/armelfb_nbsd_eabihf.sh \ -+ $(srcdir)/emulparams/armelf_nbsd_eabihf.sh \ -+ $(srcdir)/emulparams/armelf_nbsd.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelfb_nbsd_eabihf "$(tdir_armelfb_nbsd_eabihf)" - earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)" -@@ -2550,6 +2596,10 @@ - ldemul-list.h \ - $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)" -+eelf32lriscv.c: $(srcdir)/emulparams/elf32lriscv.sh \ -+ $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \ -+ $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf32lriscv "$(tdir_elf32lriscv)" - eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \ - $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \ - $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \ -@@ -2600,9 +2650,17 @@ - eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \ - $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf32mt "$(tdir_mt)" --eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \ -+eelf32or1k.c: $(srcdir)/emulparams/elf32or1k.sh \ -+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf32or1k "$(tdir_or1k)" -+eelf32or1k_linux.c: $(srcdir)/emulparams/elf32or1k_linux.sh \ -+ $(srcdir)/emulparams/elf32or1k.sh \ -+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf32or1k_linux "$(tdir_or1k_linux)" -+eelf32or1k_nbsd.c: $(srcdir)/emulparams/elf32or1k_nbsd.sh \ -+ $(srcdir)/emulparams/elf32or1k.sh \ - $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -- ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)" -+ ${GENSCRIPTS} elf32or1k_nbsd "$(tdir_or1k_nbsd)" - eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \ - $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \ - ldemul-list.h \ -@@ -2614,6 +2672,12 @@ - ldemul-list.h \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)" -+eelf32ppc_nbsd.c: $(srcdir)/emulparams/elf32ppc_nbsd.sh \ -+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ -+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \ -+ ldemul-list.h \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf32ppc_nbsd "$(tdir_elf32ppc_nbsd)" - eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ - $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ - $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \ -@@ -3211,12 +3275,14 @@ - $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} aarch64linuxb "$(tdir_aarch64linuxb)" --eor32.c: $(srcdir)/emulparams/or32.sh \ -- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS} -- ${GENSCRIPTS} or32 "$(tdir_or32)" --eor32elf.c: $(srcdir)/emulparams/or32elf.sh \ -- $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -- ${GENSCRIPTS} or32elf "$(tdir_or32elf)" -+eaarch64nbsd.c: $(srcdir)/emulparams/aarch64nbsd.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} aarch64nbsd "$(tdir_aarch64nbsd)" -+eaarch64nbsdb.c: $(srcdir)/emulparams/aarch64nbsdb.sh $(srcdir)/emulparams/aarch64nbsd.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} aarch64nbsdb "$(tdir_aarch64nbsdb)" - epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)" -@@ -3499,6 +3565,11 @@ - ldemul-list.h \ - $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)" -+eelf64lriscv.c: $(srcdir)/emulparams/elf64lriscv.sh \ -+ $(srcdir)/emulparams/elf64lriscv-defs.sh \ -+ $(srcdir)/emulparams/elf32lriscv-defs.sh $(ELF_DEPS) \ -+ $(srcdir)/emultempl/riscvelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf64lriscv "$(tdir_elf64lriscv)" - eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \ - $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \ - $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \ -@@ -3632,6 +3703,8 @@ - # because almost all configs use "gen" version of manual. - # Set DOCVER above to change. - configdoc.texi: ${DOCVER}-doc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_configdoc.texi: - cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi - chmod u+w ./configdoc.texi - -@@ -3639,6 +3712,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - ld.1: $(srcdir)/ld.texinfo configdoc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ld.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod - -($(POD2MAN) ld.pod | \ -diff -rNU3 dist.orig/ld/configdoc.texi dist/ld/configdoc.texi ---- dist.orig/ld/configdoc.texi 2012-11-13 15:19:33.000000000 +0100 -+++ dist/ld/configdoc.texi 1970-01-01 01:00:00.000000000 +0100 -@@ -1,27 +0,0 @@ --@c ------------------------------ CONFIGURATION VARS: --@c 1. Inclusiveness of this manual --@set GENERIC -- --@c 2. Specific target machines --@set ARM --@set C6X --@set H8300 --@set HPPA --@set I960 --@set M68HC11 --@set M68K --@set MMIX --@set MSP430 --@set POWERPC --@set POWERPC64 --@set Renesas --@set SPU --@set TICOFF --@set WIN32 --@set XTENSA -- --@c 3. Properties of this configuration --@clear SingleFormat --@set UsesEnvVars --@c ------------------------------ end CONFIGURATION VARS -- -diff -rNU3 dist.orig/ld/configure.tgt dist/ld/configure.tgt ---- dist.orig/ld/configure.tgt 2012-09-04 14:53:47.000000000 +0200 -+++ dist/ld/configure.tgt 2015-10-18 13:11:17.000000000 +0200 -@@ -35,6 +35,10 @@ - targ_extra_emuls="aarch64linux aarch64elfb aarch64elf armelfb_linux_eabi armelf_linux_eabi armelfb armelf" ;; - aarch64-*-linux*) targ_emul=aarch64linux - targ_extra_emuls="aarch64linuxb aarch64elf aarch64elfb armelf_linux_eabi armelfb_linux_eabi armelf armelfb" ;; -+aarch64_be-*-netbsd*) targ_emul=aarch64nbsdb -+ targ_extra_emuls="aarch64nbsd aarch64elfb aarch64elf armelfb_nbsd_eabihf armelf_nbsd_eabihf armelfb_nbsd_eabi armelf_nbsd_eabi armelfb_nbsd armelf_nbsd armelf armelfb" ;; -+aarch64-*-netbsd*) targ_emul=aarch64nbsd -+ targ_extra_emuls="aarch64nbsdb aarch64elf aarch64elfb armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armelfb" ;; - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) - targ_emul=elf64alpha_fbsd - targ_extra_emuls="elf64alpha alpha" -@@ -64,7 +68,19 @@ - arm-*-freebsd* | arm-*-kfreebsd*-gnu) - targ_emul=armelf_fbsd - targ_extra_emuls="armelf" ;; --armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; -+arm*eb-*-netbsdelf*-*eabihf*) -+ targ_emul=armelfb_nbsd_eabihf; -+ targ_extra_emuls="armelf_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armnbsd" ;; -+arm*eb-*-netbsdelf*-*eabi*) -+ targ_emul=armelfb_nbsd_eabi; -+ targ_extra_emuls="armelf_nbsd_eabi armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd armelfb_nbsd armelf armnbsd" ;; -+arm*-*-netbsdelf*-*eabihf*) -+ targ_emul=armelf_nbsd_eabihf; -+ targ_extra_emuls="armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armnbsd" ;; -+arm*-*-netbsdelf*-*eabi*) -+ targ_emul=armelf_nbsd_eabi; -+ targ_extra_emuls="armelfb_nbsd_eabi armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd armelfb_nbsd armelf armnbsd" ;; -+arm*eb-*-netbsdelf*) targ_emul=armelfb_nbsd; - targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; - arm-*-netbsdelf*) targ_emul=armelf_nbsd; - targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;; -@@ -379,7 +395,8 @@ - m68*-*-gnu*) targ_emul=m68kelf ;; - m68*-*-netbsd*4k*) targ_emul=m68k4knbsd - targ_extra_emuls="m68knbsd m68kelfnbsd" ;; --m68*-*-netbsdelf*) targ_emul=m68kelfnbsd -+m68*-*-netbsdelf* | m5407*-*-netbsdelf*) -+ targ_emul=m68kelfnbsd - targ_extra_emuls="m68knbsd m68k4knbsd" ;; - m68*-*-netbsdaout* | m68*-*-netbsd*) - targ_emul=m68knbsd -@@ -409,12 +426,18 @@ - mips*-sgi-irix*) targ_emul=mipsbig ;; - mips*el-*-ecoff*) targ_emul=mipsidtl ;; - mips*-*-ecoff*) targ_emul=mipsidt ;; -+mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32 -+ targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip" -+ ;; -+mips64*-*-netbsd*) targ_emul=elf32btsmipn32 -+ targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip" -+ ;; - mips*el-*-netbsd*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" - ;; - mips*-*-netbsd*) targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" -- ;; -+ ;; - mips*-*-bsd*) targ_emul=mipsbig ;; - mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;; - mips*vr4300-*-elf*) targ_emul=elf32b4300 ;; -@@ -481,11 +504,11 @@ - ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; - ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd - ;; --openrisc-*-*) targ_emul=elf32openrisc ;; --or32-*-coff) targ_emul=or32 ;; --or32-*-elf) targ_emul=or32elf ;; --or32-*-rtems*) targ_emul=or32elf -- ;; -+or1k-*-elf | or1knd-*-elf) targ_emul=elf32or1k ;; -+or1k-*-linux* | or1knd-*-linux*) targ_emul=elf32or1k_linux ;; -+or1k-*-netbsd* | or1knd-*-netbsd*) targ_emul=elf32or1k_nbsd ;; -+or1k-*-rtems* | or1knd-*-rtems*) targ_emul=elf32or1k ;; -+ - pdp11-*-*) targ_emul=pdp11 - ;; - pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;; -@@ -529,8 +552,18 @@ - *) targ_emul=elf32lppc - targ_extra_emuls="elf32ppcsim" ;; - esac ;; -+powerpc64*-*-netbsd*) -+ targ_emul=elf64ppc -+ targ_extra_emuls="elf32ppc elf32ppc_nbsd elf32ppcsim" -+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` -+ tdir_elf32ppc_nbsd=$tdir_elf32ppc -+ tdir_elf32ppcsim=$tdir_elf32ppc -+ ;; -+powerpc*-*-netbsd*) -+ targ_emul=elf32ppc_nbsd -+ targ_extra_emuls="elf32ppc elf32ppcsim" ;; - powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ -- | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*) -+ | powerpc-*-openbsd* | powerpc*-*-kaos*) - case "${targ}" in - *64*) targ_emul=elf64ppc - targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" -@@ -557,6 +590,12 @@ - powerpc-*-beos*) targ_emul=aixppc ;; - powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;; - powerpc-*-lynxos*) targ_emul=ppclynx ;; -+riscv32-*-*) targ_emul=elf32lriscv -+ targ_extra_emuls="elf64lriscv" -+ targ_extra_libpath=$targ_extra_emuls ;; -+riscv*-*-*) targ_emul=elf64lriscv -+ targ_extra_emuls="elf32lriscv" -+ targ_extra_libpath=$targ_extra_emuls ;; - rs6000-*-aix[5-9]*) targ_emul=aix5rs6 ;; - rs6000-*-aix*) targ_emul=aixrs6 - ;; -@@ -654,10 +693,15 @@ - tdir_sparclinux=${targ_alias}aout - tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` - tdir_sun4=sparc-sun-sunos4 ;; --sparc64-*-netbsd* | sparc64-*-openbsd*) -- targ_emul=elf64_sparc -- targ_extra_emuls="elf32_sparc" ;; --sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;; -+sparc64-*-netbsd*) targ_emul=elf64_sparc -+ targ_extra_emuls="elf32_sparc sparcnbsd" -+ ;; -+sparc64-*-openbsd*) targ_emul=elf64_sparc -+ targ_extra_emuls="elf32_sparc" -+ ;; -+sparc*-*-netbsd*elf*) targ_emul=elf32_sparc -+ targ_extra_emuls=sparcnbsd -+ ;; - sparc*-*-netbsd*) targ_emul=sparcnbsd ;; - sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) - targ_emul=elf32_sparc_sol2 -diff -rNU3 dist.orig/ld/emulparams/aarch64nbsd.sh dist/ld/emulparams/aarch64nbsd.sh ---- dist.orig/ld/emulparams/aarch64nbsd.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/aarch64nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,36 @@ -+ARCH=aarch64 -+MACHINE= -+NOP=0 -+ -+SCRIPT_NAME=elf -+OUTPUT_FORMAT="elf64-littleaarch64" -+BIG_OUTPUT_FORMAT="elf64-bigaarch64" -+LITTLE_OUTPUT_FORMAT="elf64-littleaarch64" -+NO_REL_RELOCS=yes -+ -+TEMPLATE_NAME=elf32 -+EXTRA_EM_FILE=aarch64elf -+ -+GENERATE_SHLIB_SCRIPT=yes -+GENERATE_PIE_SCRIPT=yes -+ -+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" -+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -+SEPARATE_GOTPLT=24 -+IREL_IN_PLT= -+ -+TEXT_START_ADDR=0x200100000 -+ -+DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; -+ -+# AArch64 does not support .s* sections. -+NO_SMALL_DATA=yes -+ -+OTHER_BSS_SYMBOLS='__bss_start__ = .;' -+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' -+OTHER_END_SYMBOLS='__end__ = . ;' -+ -+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }' -+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }' -+# Ensure each PLT entry is aligned to a cache line. -+PLT=".plt ${RELOCATING-0} : ALIGN(16) { *(.plt)${IREL_IN_PLT+ *(.iplt)} }" -diff -rNU3 dist.orig/ld/emulparams/aarch64nbsdb.sh dist/ld/emulparams/aarch64nbsdb.sh ---- dist.orig/ld/emulparams/aarch64nbsdb.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/aarch64nbsdb.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/aarch64nbsd.sh -+OUTPUT_FORMAT="elf64-bigaarch64" -diff -rNU3 dist.orig/ld/emulparams/armelf_nbsd.sh dist/ld/emulparams/armelf_nbsd.sh ---- dist.orig/ld/emulparams/armelf_nbsd.sh 2006-05-30 18:45:32.000000000 +0200 -+++ dist/ld/emulparams/armelf_nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -1,7 +1,14 @@ - . ${srcdir}/emulparams/armelf.sh - MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" --TEXT_START_ADDR=0x00008000 -+TEXT_START_ADDR=0x00010000 - TARGET2_TYPE=got-rel - -+unset DATA_START_SYMBOLS - unset STACK_ADDR - unset EMBEDDED -+ -+case "$target" in -+ aarch64*-*-netbsd* | arm*-*-netbsdelf*-*eabi*) -+ LIB_PATH='=/usr/lib/oabi' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/armelf_nbsd_eabi.sh dist/ld/emulparams/armelf_nbsd_eabi.sh ---- dist.orig/ld/emulparams/armelf_nbsd_eabi.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelf_nbsd_eabi.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,20 @@ -+. ${srcdir}/emulparams/armelf_nbsd.sh -+ -+# Use the ARM ABI-compliant exception-handling sections. -+OTHER_READONLY_SECTIONS=" -+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } -+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" -+ -+case "$target" in -+ arm*-*-netbsdelf*-*eabihf*) -+ LIB_PATH='=/usr/lib/eabi' -+ ;; -+ arm*-*-netbsdelf*-*eabi*) -+ LIB_PATH='=/usr/lib' -+ ;; -+ aarch64*-*-netbsd* | arm*-*-netbsdelf*) -+ LIB_PATH='=/usr/lib/eabi' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/armelf_nbsd_eabihf.sh dist/ld/emulparams/armelf_nbsd_eabihf.sh ---- dist.orig/ld/emulparams/armelf_nbsd_eabihf.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelf_nbsd_eabihf.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,17 @@ -+. ${srcdir}/emulparams/armelf_nbsd.sh -+ -+# Use the ARM ABI-compliant exception-handling sections. -+OTHER_READONLY_SECTIONS=" -+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } -+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" -+ -+case "$target" in -+ arm*-*-netbsdelf*-*eabihf*) -+ LIB_PATH='=/usr/lib' -+ ;; -+ aarch64*-*-netbsd* | arm*-*-netbsdelf*) -+ LIB_PATH='=/usr/lib/eabihf' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/armelfb_nbsd_eabi.sh dist/ld/emulparams/armelfb_nbsd_eabi.sh ---- dist.orig/ld/emulparams/armelfb_nbsd_eabi.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelfb_nbsd_eabi.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/armelf_nbsd_eabi.sh -+OUTPUT_FORMAT="elf32-bigarm" -diff -rNU3 dist.orig/ld/emulparams/armelfb_nbsd_eabihf.sh dist/ld/emulparams/armelfb_nbsd_eabihf.sh ---- dist.orig/ld/emulparams/armelfb_nbsd_eabihf.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelfb_nbsd_eabihf.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/armelf_nbsd_eabihf.sh -+OUTPUT_FORMAT="elf32-bigarm" -diff -rNU3 dist.orig/ld/emulparams/elf32_sparc.sh dist/ld/emulparams/elf32_sparc.sh ---- dist.orig/ld/emulparams/elf32_sparc.sh 2010-09-20 20:41:15.000000000 +0200 -+++ dist/ld/emulparams/elf32_sparc.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -13,6 +13,13 @@ - TEMPLATE_NAME=elf32 - DATA_PLT= - GENERATE_SHLIB_SCRIPT=yes -+#ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NOP=0x01000000 - NO_SMALL_DATA=yes -+ -+case "$target" in -+ sparc64-*-netbsd*) -+ LIB_PATH='=/usr/lib/sparc' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/elf32bmipn32-defs.sh dist/ld/emulparams/elf32bmipn32-defs.sh ---- dist.orig/ld/emulparams/elf32bmipn32-defs.sh 2012-09-04 16:14:28.000000000 +0200 -+++ dist/ld/emulparams/elf32bmipn32-defs.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -6,6 +6,7 @@ - - # Handle both big- and little-ended 32-bit MIPS objects. - ARCH=mips -+MACHINE= - OUTPUT_FORMAT="elf32-bigmips" - BIG_OUTPUT_FORMAT="elf32-bigmips" - LITTLE_OUTPUT_FORMAT="elf32-littlemips" -diff -rNU3 dist.orig/ld/emulparams/elf32lriscv-defs.sh dist/ld/emulparams/elf32lriscv-defs.sh ---- dist.orig/ld/emulparams/elf32lriscv-defs.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32lriscv-defs.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,39 @@ -+# This is an ELF platform. -+SCRIPT_NAME=elf -+ARCH=riscv -+OUTPUT_FORMAT="elf32-littleriscv" -+NO_REL_RELOCS=yes -+ -+TEMPLATE_NAME=elf32 -+EXTRA_EM_FILE=riscvelf -+ -+case "$EMULATION_NAME" in -+elf32*) ELFSIZE=32; LIBPATH_SUFFIX=32 ;; -+elf64*) ELFSIZE=64; LIBPATH_SUFFIX= ;; -+*) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;; -+esac -+ -+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then -+ case " $EMULATION_LIBPATH " in -+ *" ${EMULATION_NAME} "*) -+ NATIVE=yes -+ ;; -+ esac -+fi -+ -+GENERATE_SHLIB_SCRIPT=yes -+GENERATE_PIE_SCRIPT=yes -+ -+TEXT_START_ADDR=0x800000 -+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" -+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -+ -+INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" -+SDATA_START_SYMBOLS="_gp = . + 0x800; -+ *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*)" -+if test -n "${CREATE_SHLIB}"; then -+ INITIAL_READONLY_SECTIONS= -+ SDATA_START_SYMBOLS= -+ OTHER_READONLY_SECTIONS=".srodata ${RELOCATING-0} : { *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) }" -+ unset GOT -+fi -diff -rNU3 dist.orig/ld/emulparams/elf32lriscv.sh dist/ld/emulparams/elf32lriscv.sh ---- dist.orig/ld/emulparams/elf32lriscv.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32lriscv.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/elf32lriscv-defs.sh -+OUTPUT_FORMAT="elf32-littleriscv" -diff -rNU3 dist.orig/ld/emulparams/elf32openrisc.sh dist/ld/emulparams/elf32openrisc.sh ---- dist.orig/ld/emulparams/elf32openrisc.sh 2008-10-22 07:20:44.000000000 +0200 -+++ dist/ld/emulparams/elf32openrisc.sh 1970-01-01 01:00:00.000000000 +0100 -@@ -1,11 +0,0 @@ --MACHINE= --SCRIPT_NAME=elf --OUTPUT_FORMAT="elf32-openrisc" --NO_RELA_RELOCS=yes --TEXT_START_ADDR=0x10000 --ARCH=openrisc --MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" --ENTRY=_start --EMBEDDED=yes --NOP=0x15000000 -- -diff -rNU3 dist.orig/ld/emulparams/elf32or1k.sh dist/ld/emulparams/elf32or1k.sh ---- dist.orig/ld/emulparams/elf32or1k.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32or1k.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,14 @@ -+SCRIPT_NAME=elf -+MACHINE= -+TEMPLATE_NAME=elf32 -+OUTPUT_FORMAT="elf32-or1k" -+NOP=0x15000000 -+TEXT_START_ADDR=0x0000 -+TARGET_PAGE_SIZE=0x2000 -+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" -+EMBEDDED=yes -+ARCH=or1k -+ELFSIZE=32 -+INITIAL_READONLY_SECTIONS=".vectors ${RELOCATING-0} : { KEEP (*(.vectors)) }" -+NO_REL_RELOCS=yes -+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -diff -rNU3 dist.orig/ld/emulparams/elf32or1k_linux.sh dist/ld/emulparams/elf32or1k_linux.sh ---- dist.orig/ld/emulparams/elf32or1k_linux.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32or1k_linux.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,6 @@ -+. ${srcdir}/emulparams/elf32or1k.sh -+unset EMBEDDED -+GENERATE_SHLIB_SCRIPT=yes -+GENERATE_PIE_SCRIPT=yes -+GENERATE_COMBRELOC_SCRIPT=yes -+TEXT_START_ADDR=0x00002000 -diff -rNU3 dist.orig/ld/emulparams/elf32or1k_nbsd.sh dist/ld/emulparams/elf32or1k_nbsd.sh ---- dist.orig/ld/emulparams/elf32or1k_nbsd.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32or1k_nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,6 @@ -+. ${srcdir}/emulparams/elf32or1k.sh -+unset EMBEDDED -+GENERATE_SHLIB_SCRIPT=yes -+GENERATE_PIE_SCRIPT=yes -+GENERATE_COMBRELOC_SCRIPT=yes -+TEXT_START_ADDR=0x00002000 -diff -rNU3 dist.orig/ld/emulparams/elf32ppc_nbsd.sh dist/ld/emulparams/elf32ppc_nbsd.sh ---- dist.orig/ld/emulparams/elf32ppc_nbsd.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf32ppc_nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,7 @@ -+. ${srcdir}/emulparams/elf32ppc.sh -+ -+case "$target" in -+ powerpc64*-*-netbsd*) -+ LIB_PATH='=/usr/lib/powerpc' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/elf64alpha_nbsd.sh dist/ld/emulparams/elf64alpha_nbsd.sh ---- dist.orig/ld/emulparams/elf64alpha_nbsd.sh 2001-12-18 00:54:58.000000000 +0100 -+++ dist/ld/emulparams/elf64alpha_nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -1,2 +1,8 @@ - . ${srcdir}/emulparams/elf64alpha.sh - ENTRY=__start -+ -+NOP=0x47ff041f -+# XXX binutils 2.13 -+# Note that the number is always big-endian, thus we have to -+# reverse the digit string. -+#NOP=0x0000fe2f1f04ff47 # unop; nop -diff -rNU3 dist.orig/ld/emulparams/elf64lriscv-defs.sh dist/ld/emulparams/elf64lriscv-defs.sh ---- dist.orig/ld/emulparams/elf64lriscv-defs.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf64lriscv-defs.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1 @@ -+. ${srcdir}/emulparams/elf32lriscv-defs.sh -diff -rNU3 dist.orig/ld/emulparams/elf64lriscv.sh dist/ld/emulparams/elf64lriscv.sh ---- dist.orig/ld/emulparams/elf64lriscv.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf64lriscv.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/elf64lriscv-defs.sh -+OUTPUT_FORMAT="elf64-littleriscv" -diff -rNU3 dist.orig/ld/emulparams/elf_i386.sh dist/ld/emulparams/elf_i386.sh ---- dist.orig/ld/emulparams/elf_i386.sh 2012-06-11 15:23:50.000000000 +0200 -+++ dist/ld/emulparams/elf_i386.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -9,7 +9,14 @@ - MACHINE= - TEMPLATE_NAME=elf32 - GENERATE_SHLIB_SCRIPT=yes -+#ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NO_SMALL_DATA=yes - SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0" - IREL_IN_PLT= -+ -+case "$target" in -+ x86_64-*-netbsd*) -+ LIB_PATH='=/usr/lib/i386' -+ ;; -+esac -diff -rNU3 dist.orig/ld/emulparams/hppalinux.sh dist/ld/emulparams/hppalinux.sh ---- dist.orig/ld/emulparams/hppalinux.sh 2011-02-18 19:20:29.000000000 +0100 -+++ dist/ld/emulparams/hppalinux.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -1,5 +1,5 @@ - # If you change this file, please also look at files which source this one: --# hppanbsd.sh -+# hppanbsd.sh hppaobsd.sh - - SCRIPT_NAME=elf - ELFSIZE=32 -diff -rNU3 dist.orig/ld/emulparams/hppaobsd.sh dist/ld/emulparams/hppaobsd.sh ---- dist.orig/ld/emulparams/hppaobsd.sh 2006-05-30 18:45:32.000000000 +0200 -+++ dist/ld/emulparams/hppaobsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -1,4 +1,4 @@ --. ${srcdir}/emulparams/hppanbsd.sh -+. ${srcdir}/emulparams/hppalinux.sh - - OUTPUT_FORMAT="elf32-hppa" - TEXT_START_ADDR=0x1000 -diff -rNU3 dist.orig/ld/emulparams/m68kelf.sh dist/ld/emulparams/m68kelf.sh ---- dist.orig/ld/emulparams/m68kelf.sh 2009-09-29 18:28:52.000000000 +0200 -+++ dist/ld/emulparams/m68kelf.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -10,5 +10,6 @@ - TEMPLATE_NAME=elf32 - EXTRA_EM_FILE=m68kelf - GENERATE_SHLIB_SCRIPT=yes -+ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NO_SMALL_DATA=yes -diff -rNU3 dist.orig/ld/emulparams/m68kelfnbsd.sh dist/ld/emulparams/m68kelfnbsd.sh ---- dist.orig/ld/emulparams/m68kelfnbsd.sh 2001-12-18 14:26:26.000000000 +0100 -+++ dist/ld/emulparams/m68kelfnbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -1,4 +1,4 @@ - . ${srcdir}/emulparams/m68kelf.sh - TEXT_START_ADDR=0x2000 - TARGET_PAGE_SIZE=0x2000 --MACHINE= -+NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR} -diff -rNU3 dist.orig/ld/emulparams/or32.sh dist/ld/emulparams/or32.sh ---- dist.orig/ld/emulparams/or32.sh 2006-06-20 04:22:14.000000000 +0200 -+++ dist/ld/emulparams/or32.sh 1970-01-01 01:00:00.000000000 +0100 -@@ -1,5 +0,0 @@ --SCRIPT_NAME=or32 --OUTPUT_FORMAT="coff-or32-big" --TEXT_START_ADDR=0x1000000 --TARGET_PAGE_SIZE=0x1000000 --ARCH=or32 -diff -rNU3 dist.orig/ld/emulparams/or32elf.sh dist/ld/emulparams/or32elf.sh ---- dist.orig/ld/emulparams/or32elf.sh 2008-10-22 07:20:44.000000000 +0200 -+++ dist/ld/emulparams/or32elf.sh 1970-01-01 01:00:00.000000000 +0100 -@@ -1,9 +0,0 @@ --SCRIPT_NAME=elf --TEMPLATE_NAME=generic --EXTRA_EM_FILE=genelf --OUTPUT_FORMAT="elf32-or32" --NO_RELA_RELOCS=yes --TEXT_START_ADDR=0x1000000 --TARGET_PAGE_SIZE=0x1000000 --MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" --ARCH=or32 -diff -rNU3 dist.orig/ld/emulparams/sh.sh dist/ld/emulparams/sh.sh ---- dist.orig/ld/emulparams/sh.sh 2001-11-22 10:08:04.000000000 +0100 -+++ dist/ld/emulparams/sh.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -3,6 +3,6 @@ - - SCRIPT_NAME=sh - OUTPUT_FORMAT="coff-sh" --TEXT_START_ADDR=0x8000 --TARGET_PAGE_SIZE=128 -+TEXT_START_ADDR=0x1000 -+TARGET_PAGE_SIZE=0x1000 - ARCH=sh -diff -rNU3 dist.orig/ld/emulparams/shelf_nbsd.sh dist/ld/emulparams/shelf_nbsd.sh ---- dist.orig/ld/emulparams/shelf_nbsd.sh 2008-01-16 00:05:46.000000000 +0100 -+++ dist/ld/emulparams/shelf_nbsd.sh 2015-10-18 13:11:17.000000000 +0200 -@@ -9,7 +9,11 @@ - - DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; - --ENTRY=_start -+ENTRY=__start - - unset EMBEDDED - unset OTHER_SECTIONS -+ -+OTHER_READWRITE_SECTIONS=' -+ .note.ABI-tag : { *(.note.ABI-tag) } -+' -diff -rNU3 dist.orig/ld/emultempl/aarch64elf.em dist/ld/emultempl/aarch64elf.em ---- dist.orig/ld/emultempl/aarch64elf.em 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/emultempl/aarch64elf.em 2015-10-18 13:11:17.000000000 +0200 -@@ -38,6 +38,7 @@ - ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); - #endif /* not TARGET_ */ - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; -+ input_flags.add_DT_NEEDED_for_dynamic = TRUE; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - } -diff -rNU3 dist.orig/ld/emultempl/armelf.em dist/ld/emultempl/armelf.em ---- dist.orig/ld/emultempl/armelf.em 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/emultempl/armelf.em 2015-10-18 13:11:17.000000000 +0200 -@@ -51,6 +51,7 @@ - ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); - #endif /* not TARGET_ */ - input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; -+ input_flags.add_DT_NEEDED_for_dynamic = TRUE; - config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; - config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; - } -diff -rNU3 dist.orig/ld/emultempl/elf32.em dist/ld/emultempl/elf32.em ---- dist.orig/ld/emultempl/elf32.em 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/emultempl/elf32.em 2015-10-18 13:11:17.000000000 +0200 -@@ -72,6 +72,9 @@ - - if [ "x${USE_LIBPATH}" = xyes ] ; then - case ${target} in -+ *-*-netbsd*) -+ ;; -+ - *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*) - fragment <name; - size_t len; - struct dt_needed needed; - -- if (name[0] == '/') -+ if (name[0] == '/') { -+ if (prepend_sysroot && ld_sysroot) { -+ bfd_boolean rv; -+ needed.by = n->by; -+ char *filename= concat(ld_sysroot, n->name, (const char *)NULL); -+ needed.name = filename; -+ rv = gld${EMULATION_NAME}_try_needed (&needed, force); -+ free(filename); -+ return rv; -+ } - return gld${EMULATION_NAME}_try_needed (n, force); -+ } - - if (path == NULL || *path == '\0') - return FALSE; -@@ -501,6 +518,13 @@ - } - strcpy (sset, name); - -+ if (prepend_sysroot && filename[0] == '=') -+ abort(); -+ if (filename[0] == '/' && prepend_sysroot && ld_sysroot) { -+ char *filename2 = concat(ld_sysroot, filename, (const char *)NULL); -+ free(filename); -+ filename = filename2; -+ } - needed.name = filename; - if (gld${EMULATION_NAME}_try_needed (&needed, force)) - return TRUE; -@@ -621,6 +645,9 @@ - # FreeBSD - ;; - -+ *-*-netbsd*) -+ ;; -+ - *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*) - fragment <next) - { -- char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp->name); - found = (rp->by == l->by -- && gld${EMULATION_NAME}_search_needed (tmpname, -+ && gld${EMULATION_NAME}_search_needed (rp->name, - &n, -- force)); -- free (tmpname); -+ force, 1)); - } - if (found) - break; -@@ -1315,6 +1340,9 @@ - # FreeBSD - ;; - -+ *-*-netbsd*) -+ ;; -+ - *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*) - # Linux - fragment <ignore_hash != NULL -+ && bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL) -+ return TRUE; -+ - if (config.warn_once) - { -- static struct bfd_hash_table *hash; -- - /* Only warn once about a particular undefined symbol. */ -- if (hash == NULL) -+ if (info->ignore_hash == NULL) - { -- hash = (struct bfd_hash_table *) -- xmalloc (sizeof (struct bfd_hash_table)); -- if (!bfd_hash_table_init (hash, bfd_hash_newfunc, -+ info->ignore_hash = xmalloc (sizeof (struct bfd_hash_table)); -+ if (!bfd_hash_table_init (info->ignore_hash, bfd_hash_newfunc, - sizeof (struct bfd_hash_entry))) - einfo (_("%F%P: bfd_hash_table_init failed: %E\n")); - } - -- if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL) -+ if (bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL) - return TRUE; - -- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL) -+ if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL) - einfo (_("%F%P: bfd_hash_lookup failed: %E\n")); - } - -diff -rNU3 dist.orig/ld/ldmain.h dist/ld/ldmain.h ---- dist.orig/ld/ldmain.h 2012-07-13 15:20:26.000000000 +0200 -+++ dist/ld/ldmain.h 2015-10-18 13:11:17.000000000 +0200 -@@ -41,6 +41,7 @@ - - extern void add_ysym (const char *); - extern void add_wrap (const char *); -+extern void add_ignoresym (const char *); - extern void add_keepsyms_file (const char *); - - #endif -diff -rNU3 dist.orig/ld/lexsup.c dist/ld/lexsup.c ---- dist.orig/ld/lexsup.c 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/lexsup.c 2015-10-18 13:11:17.000000000 +0200 -@@ -398,7 +398,7 @@ - ONE_DASH }, - { {"shared", no_argument, NULL, OPTION_SHARED}, - '\0', NULL, N_("Create a shared library"), ONE_DASH }, -- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */ -+ { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */ - '\0', NULL, NULL, ONE_DASH }, - { {"pie", no_argument, NULL, OPTION_PIE}, - '\0', NULL, N_("Create a position independent executable"), ONE_DASH }, -@@ -496,8 +496,14 @@ - { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, - '\0', NULL, N_("Include all objects from following archives"), - TWO_DASHES }, -+ { {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, -+ '\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */ - { {"wrap", required_argument, NULL, OPTION_WRAP}, - '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }, -+ { {"ignore-unresolved-symbol", required_argument, NULL, -+ OPTION_IGNORE_UNRESOLVED_SYMBOL}, -+ '\0', N_("SYMBOL"), -+ N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES }, - }; - - #define OPTION_COUNT ARRAY_SIZE (ld_options) -@@ -1344,6 +1350,9 @@ - case OPTION_WRAP: - add_wrap (optarg); - break; -+ case OPTION_IGNORE_UNRESOLVED_SYMBOL: -+ add_ignoresym (optarg); -+ break; - case OPTION_DISCARD_NONE: - link_info.discard = discard_none; - break; -diff -rNU3 dist.orig/ld/scripttempl/elf.sc dist/ld/scripttempl/elf.sc ---- dist.orig/ld/scripttempl/elf.sc 2013-03-25 09:06:23.000000000 +0100 -+++ dist/ld/scripttempl/elf.sc 2015-10-18 13:11:17.000000000 +0200 -@@ -94,6 +94,8 @@ - # - # Each of these can also have corresponding .rel.* and .rela.* sections. - -+test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);" -+test -z "$ENTRY" && ENTRY=_start - if test -n "$NOP"; then - FILL="=$NOP" - else -@@ -471,11 +473,12 @@ - .text ${RELOCATING-0} : - { - ${RELOCATING+${TEXT_START_SYMBOLS}} -+ *(.text) - ${RELOCATING+*(.text.unlikely .text.*_unlikely)} - ${RELOCATING+*(.text.exit .text.exit.*)} - ${RELOCATING+*(.text.startup .text.startup.*)} - ${RELOCATING+*(.text.hot .text.hot.*)} -- *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) -+ *(.stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - ${RELOCATING+${OTHER_TEXT_SECTIONS}} -diff -rNU3 dist.orig/ld/scripttempl/sh.sc dist/ld/scripttempl/sh.sc ---- dist.orig/ld/scripttempl/sh.sc 2002-09-25 19:06:09.000000000 +0200 -+++ dist/ld/scripttempl/sh.sc 2015-10-18 13:11:17.000000000 +0200 -@@ -6,16 +6,13 @@ - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; -- } > ram" -+ }" -+ - - cat < ram} -+ } - ${CONSTRUCTING+${TORS}} -- .data : -+ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : - { - *(.data) - ${RELOCATING+*(.gcc_exc*)} -@@ -35,19 +32,19 @@ - ${RELOCATING+___EH_FRAME_END__ = . ;} - ${RELOCATING+LONG(0);} - ${RELOCATING+ _edata = . ; } -- } ${RELOCATING+ > ram} -- .bss : -+ } -+ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : - { - ${RELOCATING+ _bss_start = . ; } - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } -- } ${RELOCATING+ > ram} -- .stack ${RELOCATING+ 0x30000 } : -+ } -+ .stack : - { - ${RELOCATING+ _stack = . ; } - *(.stack) -- } ${RELOCATING+ > ram} -+ } - .stab 0 ${RELOCATING+(NOLOAD)} : - { - *(.stab) -diff -rNU3 dist.orig/libiberty/floatformat.c dist/libiberty/floatformat.c ---- dist.orig/libiberty/floatformat.c 2011-01-03 22:05:58.000000000 +0100 -+++ dist/libiberty/floatformat.c 2015-10-18 13:11:19.000000000 +0200 -@@ -489,7 +489,11 @@ - if (nan) - dto = NAN; - else -+#ifdef __vax__ -+ dto = HUGE_VAL; -+#else - dto = INFINITY; -+#endif - - if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1)) - dto = -dto; -diff -rNU3 dist.orig/libiberty/make-temp-file.c dist/libiberty/make-temp-file.c ---- dist.orig/libiberty/make-temp-file.c 2011-01-03 22:05:58.000000000 +0100 -+++ dist/libiberty/make-temp-file.c 2015-10-18 13:11:19.000000000 +0200 -@@ -130,10 +130,10 @@ - base = try_dir (P_tmpdir, base); - #endif - -- /* Try /var/tmp, /usr/tmp, then /tmp. */ -+ /* Try /tmp, /var/tmp, then /usr/tmp. */ -+ base = try_dir (tmp, base); - base = try_dir (vartmp, base); - base = try_dir (usrtmp, base); -- base = try_dir (tmp, base); - - /* If all else fails, use the current directory! */ - if (base == 0) -diff -rNU3 dist.orig/libiberty/objalloc.c dist/libiberty/objalloc.c ---- dist.orig/libiberty/objalloc.c 2005-07-22 05:26:05.000000000 +0200 -+++ dist/libiberty/objalloc.c 2015-10-18 13:11:19.000000000 +0200 -@@ -1,5 +1,5 @@ - /* objalloc.c -- routines to allocate memory for objects -- Copyright 1997 Free Software Foundation, Inc. -+ Copyright 1997-2012 Free Software Foundation, Inc. - Written by Ian Lance Taylor, Cygnus Solutions. - - This program is free software; you can redistribute it and/or modify it -@@ -112,8 +112,10 @@ - /* Allocate space from an objalloc structure. */ - - PTR --_objalloc_alloc (struct objalloc *o, unsigned long len) -+_objalloc_alloc (struct objalloc *o, unsigned long original_len) - { -+ unsigned long len = original_len; -+ - /* We avoid confusion from zero sized objects by always allocating - at least 1 byte. */ - if (len == 0) -@@ -121,6 +123,11 @@ - - len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); - -+ /* Check for overflow in the alignment operation above and the -+ malloc argument below. */ -+ if (len + CHUNK_HEADER_SIZE < original_len) -+ return NULL; -+ - if (len <= o->current_space) - { - o->current_ptr += len; -diff -rNU3 dist.orig/libiberty/strerror.c dist/libiberty/strerror.c ---- dist.orig/libiberty/strerror.c 2005-03-28 04:09:01.000000000 +0200 -+++ dist/libiberty/strerror.c 2015-10-18 13:11:19.000000000 +0200 -@@ -347,7 +347,7 @@ - ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"), - #endif - #if defined (ENOPROTOOPT) -- ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"), -+ ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"), - #endif - #if defined (EPROTONOSUPPORT) - ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"), -diff -rNU3 dist.orig/opcodes/Makefile.am dist/opcodes/Makefile.am ---- dist.orig/opcodes/Makefile.am 2012-09-04 16:21:06.000000000 +0200 -+++ dist/opcodes/Makefile.am 2015-10-18 13:11:20.000000000 +0200 -@@ -62,7 +62,7 @@ - mep-desc.h mep-opc.h \ - microblaze-opc.h \ - mt-desc.h mt-opc.h \ -- openrisc-desc.h openrisc-opc.h \ -+ or1k-desc.h or1k-opc.h \ - score-opc.h \ - sh-opc.h \ - sh64-opc.h \ -@@ -188,13 +188,11 @@ - mt-ibld.c \ - mt-opc.c \ - ns32k-dis.c \ -- openrisc-asm.c \ -- openrisc-desc.c \ -- openrisc-dis.c \ -- openrisc-ibld.c \ -- openrisc-opc.c \ -- or32-dis.c \ -- or32-opc.c \ -+ or1k-asm.c \ -+ or1k-desc.c \ -+ or1k-dis.c \ -+ or1k-ibld.c \ -+ or1k-opc.c \ - pdp11-dis.c \ - pdp11-opc.c \ - pj-dis.c \ -@@ -332,7 +330,7 @@ - CLEANFILES = \ - stamp-epiphany stamp-fr30 stamp-frv stamp-ip2k stamp-iq2000 stamp-lm32 \ - stamp-m32c stamp-m32r stamp-mep stamp-mt \ -- stamp-openrisc stamp-xc16x stamp-xstormy16 \ -+ stamp-or1k stamp-xc16x stamp-xstormy16 \ - libopcodes.a stamp-lib - - -@@ -348,7 +346,7 @@ - $(CGENDIR)/opc-opinst.scm \ - cgen-asm.in cgen-dis.in cgen-ibld.in - --CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt openrisc xc16x xstormy16 -+CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16 - - if CGEN_MAINT - EPIPHANY_DEPS = stamp-epiphany -@@ -361,7 +359,7 @@ - M32R_DEPS = stamp-m32r - MEP_DEPS = stamp-mep - MT_DEPS = stamp-mt --OPENRISC_DEPS = stamp-openrisc -+OR1K_DEPS = stamp-or1k - XC16X_DEPS = stamp-xc16x - XSTORMY16_DEPS = stamp-xstormy16 - else -@@ -375,7 +373,7 @@ - M32R_DEPS = - MEP_DEPS = - MT_DEPS = --OPENRISC_DEPS = -+OR1K_DEPS = - XC16X_DEPS = - XSTORMY16_DEPS = - endif -@@ -469,11 +467,11 @@ - archfile=$(CPUDIR)/mt.cpu \ - opcfile=$(CPUDIR)/mt.opc extrafiles= - --$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS) -+$(srcdir)/or1k-desc.h $(srcdir)/or1k-desc.c $(srcdir)/or1k-opc.h $(srcdir)/or1k-opc.c $(srcdir)/or1k-ibld.c $(srcdir)/or1k-opinst.c $(srcdir)/or1k-asm.c $(srcdir)/or1k-dis.c: $(OR1K_DEPS) - @true --stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc -- $(MAKE) run-cgen arch=openrisc prefix=openrisc options= \ -- archfile=$(CPUDIR)/openrisc.cpu opcfile=$(CPUDIR)/openrisc.opc extrafiles= -+stamp-or1k: $(CGENDEPS) $(CPUDIR)/or1k.cpu $(CPUDIR)/or1k.opc $(CPUDIR)/or1kcommon.cpu $(CPUDIR)/or1korbis.cpu $(CPUDIR)/or1korfpx.cpu -+ $(MAKE) run-cgen arch=or1k prefix=or1k options=opinst \ -+ archfile=$(CPUDIR)/or1k.cpu opcfile=$(CPUDIR)/or1k.opc extrafiles=opinst - - $(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS) - @true -diff -rNU3 dist.orig/opcodes/Makefile.in dist/opcodes/Makefile.in ---- dist.orig/opcodes/Makefile.in 2012-09-04 16:21:06.000000000 +0200 -+++ dist/opcodes/Makefile.in 2015-10-18 13:11:20.000000000 +0200 -@@ -459,13 +459,11 @@ - mt-ibld.c \ - mt-opc.c \ - ns32k-dis.c \ -- openrisc-asm.c \ -- openrisc-desc.c \ -- openrisc-dis.c \ -- openrisc-ibld.c \ -- openrisc-opc.c \ -- or32-dis.c \ -- or32-opc.c \ -+ or1k-asm.c \ -+ or1k-desc.c \ -+ or1k-dis.c \ -+ or1k-ibld.c \ -+ or1k-opc.c \ - pdp11-dis.c \ - pdp11-opc.c \ - pj-dis.c \ -@@ -572,7 +570,7 @@ - CLEANFILES = \ - stamp-epiphany stamp-fr30 stamp-frv stamp-ip2k stamp-iq2000 stamp-lm32 \ - stamp-m32c stamp-m32r stamp-mep stamp-mt \ -- stamp-openrisc stamp-xc16x stamp-xstormy16 \ -+ stamp-or1k stamp-xc16x stamp-xstormy16 \ - libopcodes.a stamp-lib - - CGENDIR = @cgendir@ -@@ -586,7 +584,7 @@ - $(CGENDIR)/opc-opinst.scm \ - cgen-asm.in cgen-dis.in cgen-ibld.in - --CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt openrisc xc16x xstormy16 -+CGEN_CPUS = epiphany fr30 frv ip2k iq2000 lm32 m32c m32r mep mt or1k xc16x xstormy16 - @CGEN_MAINT_FALSE@EPIPHANY_DEPS = - @CGEN_MAINT_TRUE@EPIPHANY_DEPS = stamp-epiphany - @CGEN_MAINT_FALSE@FR30_DEPS = -@@ -607,8 +605,8 @@ - @CGEN_MAINT_TRUE@MEP_DEPS = stamp-mep - @CGEN_MAINT_FALSE@MT_DEPS = - @CGEN_MAINT_TRUE@MT_DEPS = stamp-mt --@CGEN_MAINT_FALSE@OPENRISC_DEPS = --@CGEN_MAINT_TRUE@OPENRISC_DEPS = stamp-openrisc -+@CGEN_MAINT_FALSE@OR1K_DEPS = -+@CGEN_MAINT_TRUE@OR1K_DEPS = stamp-or1k - @CGEN_MAINT_FALSE@XC16X_DEPS = - @CGEN_MAINT_TRUE@XC16X_DEPS = stamp-xc16x - @CGEN_MAINT_FALSE@XSTORMY16_DEPS = -@@ -855,13 +853,12 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt-ibld.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt-opc.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ns32k-dis.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openrisc-asm.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openrisc-desc.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openrisc-dis.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openrisc-ibld.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openrisc-opc.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or32-dis.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or32-opc.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-asm.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-desc.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-dis.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-ibld.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-opc.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/or1k-opinst.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdp11-dis.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdp11-opc.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pj-dis.Plo@am__quote@ -@@ -1340,11 +1337,11 @@ - archfile=$(CPUDIR)/mt.cpu \ - opcfile=$(CPUDIR)/mt.opc extrafiles= - --$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS) -+$(srcdir)/or1k-desc.h $(srcdir)/or1k-desc.c $(srcdir)/or1k-opc.h $(srcdir)/or1k-opc.c $(srcdir)/or1k-ibld.c $(srcdir)/or1k-opinst.c $(srcdir)/or1k-asm.c $(srcdir)/or1k-dis.c: $(OR1K_DEPS) - @true --stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc -- $(MAKE) run-cgen arch=openrisc prefix=openrisc options= \ -- archfile=$(CPUDIR)/openrisc.cpu opcfile=$(CPUDIR)/openrisc.opc extrafiles= -+stamp-or1k: $(CGENDEPS) $(CPUDIR)/or1k.cpu $(CPUDIR)/or1k.opc $(CPUDIR)/or1kcommon.cpu $(CPUDIR)/or1korbis.cpu $(CPUDIR)/or1korfpx.cpu -+ $(MAKE) run-cgen arch=or1k prefix=or1k options=opinst \ -+ archfile=$(CPUDIR)/or1k.cpu opcfile=$(CPUDIR)/or1k.opc extrafiles=opinst - - $(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS) - @true -diff -rNU3 dist.orig/opcodes/cgen.sh dist/opcodes/cgen.sh ---- dist.orig/opcodes/cgen.sh 2009-06-14 18:36:56.000000000 +0200 -+++ dist/opcodes/cgen.sh 2015-10-18 13:11:19.000000000 +0200 -@@ -61,6 +61,7 @@ - shift ; extrafiles=$9 - - rootdir=${srcdir}/.. -+move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change" - - # $arch is $6, as passed on the command line. - # $ARCH is the same argument but in all uppercase. -diff -rNU3 dist.orig/opcodes/configure dist/opcodes/configure ---- dist.orig/opcodes/configure 2012-09-04 16:21:07.000000000 +0200 -+++ dist/opcodes/configure 2015-10-18 13:11:19.000000000 +0200 -@@ -12532,13 +12532,13 @@ - bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;; - bfd_msp430_arch) ta="$ta msp430-dis.lo" ;; - bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;; -- bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;; -- bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;; -+ bfd_or1k_arch) ta="$ta or1k-asm.lo or1k-desc.lo or1k-dis.lo or1k-ibld.lo or1k-opc.lo" using_cgen=yes ;; - bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;; - bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;; - bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_pyramid_arch) ;; -+ bfd_riscv_arch) ta="$ta riscv-dis.lo riscv-opc.lo" ;; - bfd_romp_arch) ;; - bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_rl78_arch) ta="$ta rl78-dis.lo rl78-decode.lo";; -@@ -12551,6 +12551,14 @@ - # specified, as in sh3-elf, sh3b-linux-gnu, etc. - # Include it just for ELF targets, since the SH5 bfd:s are ELF only. - for t in $target $canon_targets; do -+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64 -+ # is specified -+ case $t in -+ sh5*-* | sh64*-*) # let the case below handle it -+ ;; -+ sh*-*-netbsd* | sh*l*-*-netbsd*) -+ continue ;; -+ esac - case $t in - all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ - sh-*-linux* | shl-*-linux*) -diff -rNU3 dist.orig/opcodes/configure.in dist/opcodes/configure.in ---- dist.orig/opcodes/configure.in 2012-11-05 17:29:08.000000000 +0100 -+++ dist/opcodes/configure.in 2015-10-18 13:11:19.000000000 +0200 -@@ -277,13 +277,13 @@ - bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;; - bfd_msp430_arch) ta="$ta msp430-dis.lo" ;; - bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;; -- bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;; -- bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;; -+ bfd_or1k_arch) ta="$ta or1k-asm.lo or1k-desc.lo or1k-dis.lo or1k-ibld.lo or1k-opc.lo" using_cgen=yes ;; - bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;; - bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;; - bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_pyramid_arch) ;; -+ bfd_riscv_arch) ta="$ta riscv-dis.lo riscv-opc.lo" ;; - bfd_romp_arch) ;; - bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_rl78_arch) ta="$ta rl78-dis.lo rl78-decode.lo";; -@@ -296,6 +296,14 @@ - # specified, as in sh3-elf, sh3b-linux-gnu, etc. - # Include it just for ELF targets, since the SH5 bfd:s are ELF only. - for t in $target $canon_targets; do -+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64 -+ # is specified -+ case $t in -+ sh5*-* | sh64*-*) # let the case below handle it -+ ;; -+ sh*-*-netbsd* | sh*l*-*-netbsd*) -+ continue ;; -+ esac - case $t in - all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ - sh-*-linux* | shl-*-linux*) -diff -rNU3 dist.orig/opcodes/disassemble.c dist/opcodes/disassemble.c ---- dist.orig/opcodes/disassemble.c 2012-09-04 14:53:50.000000000 +0200 -+++ dist/opcodes/disassemble.c 2015-10-18 13:11:19.000000000 +0200 -@@ -67,11 +67,11 @@ - #define ARCH_mt - #define ARCH_msp430 - #define ARCH_ns32k --#define ARCH_openrisc --#define ARCH_or32 -+#define ARCH_or1k - #define ARCH_pdp11 - #define ARCH_pj - #define ARCH_powerpc -+#define ARCH_riscv - #define ARCH_rs6000 - #define ARCH_rl78 - #define ARCH_rx -@@ -332,17 +332,9 @@ - disassemble = print_insn_mn10300; - break; - #endif --#ifdef ARCH_openrisc -- case bfd_arch_openrisc: -- disassemble = print_insn_openrisc; -- break; --#endif --#ifdef ARCH_or32 -- case bfd_arch_or32: -- if (bfd_big_endian (abfd)) -- disassemble = print_insn_big_or32; -- else -- disassemble = print_insn_little_or32; -+#ifdef ARCH_or1k -+ case bfd_arch_or1k: -+ disassemble = print_insn_or1k; - break; - #endif - #ifdef ARCH_pdp11 -@@ -363,6 +355,11 @@ - disassemble = print_insn_little_powerpc; - break; - #endif -+#ifdef ARCH_riscv -+ case bfd_arch_riscv: -+ disassemble = print_insn_riscv; -+ break; -+#endif - #ifdef ARCH_rs6000 - case bfd_arch_rs6000: - if (bfd_get_mach (abfd) == bfd_mach_ppc_620) -diff -rNU3 dist.orig/opcodes/mips-opc.c dist/opcodes/mips-opc.c ---- dist.orig/opcodes/mips-opc.c 2012-09-04 16:21:10.000000000 +0200 -+++ dist/opcodes/mips-opc.c 2015-10-18 13:11:20.000000000 +0200 -@@ -791,10 +791,12 @@ - {"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 }, - {"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 }, - {"iret", "", 0x42000038, 0xffffffff, NODS, 0, MC }, -+{"jr", "s", 0, (int) M_JR_S, INSN_MACRO, 0, I1 }, - {"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, - /* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with - the same hazard barrier effect. */ - {"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I32 }, -+{"j", "s", 0, (int) M_J_S, INSN_MACRO, 0, I1 }, - {"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */ - /* SVR4 PIC code requires special handling for j, so it must be a - macro. */ -@@ -803,7 +805,9 @@ - assembler, but will never match user input (because the line above - will match first). */ - {"j", "a", 0x08000000, 0xfc000000, UBD, 0, I1 }, -+{"jalr", "s", 0, (int) M_JALR_S, INSN_MACRO, 0, I1 }, - {"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, 0, I1 }, -+{"jalr", "d,s", 0, (int) M_JALR_DS, INSN_MACRO, 0, I1 }, - {"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I1 }, - /* jalr.hb is officially MIPS{32,64}R2, but it works on R1 as jalr - with the same hazard barrier effect. */ -diff -rNU3 dist.orig/opcodes/openrisc-asm.c dist/opcodes/openrisc-asm.c ---- dist.orig/opcodes/openrisc-asm.c 2010-06-27 06:07:55.000000000 +0200 -+++ dist/opcodes/openrisc-asm.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,649 +0,0 @@ --/* Assembler interface for targets using CGEN. -*- C -*- -- CGEN: Cpu tools GENerator -- -- THIS FILE IS MACHINE GENERATED WITH CGEN. -- - the resultant file is machine generated, cgen-asm.in isn't -- -- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2007, 2008, 2010 -- Free Software Foundation, Inc. -- -- This file is part of libopcodes. -- -- This library 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, or (at your option) -- any later version. -- -- It 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. */ -- -- --/* ??? Eventually more and more of this stuff can go to cpu-independent files. -- Keep that in mind. */ -- --#include "sysdep.h" --#include --#include "ansidecl.h" --#include "bfd.h" --#include "symcat.h" --#include "openrisc-desc.h" --#include "openrisc-opc.h" --#include "opintl.h" --#include "xregex.h" --#include "libiberty.h" --#include "safe-ctype.h" -- --#undef min --#define min(a,b) ((a) < (b) ? (a) : (b)) --#undef max --#define max(a,b) ((a) > (b) ? (a) : (b)) -- --static const char * parse_insn_normal -- (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *); -- --/* -- assembler routines inserted here. */ -- --/* -- asm.c */ -- --static const char * MISSING_CLOSING_PARENTHESIS = N_("missing `)'"); -- --#define CGEN_VERBOSE_ASSEMBLER_ERRORS -- --long --openrisc_sign_extend_16bit (long value) --{ -- return ((value & 0xffff) ^ 0x8000) - 0x8000; --} -- --/* Handle hi(). */ -- --static const char * --parse_hi16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) --{ -- const char *errmsg; -- enum cgen_parse_operand_result result_type; -- unsigned long ret; -- -- if (**strp == '#') -- ++*strp; -- -- if (strncasecmp (*strp, "hi(", 3) == 0) -- { -- bfd_vma value; -- -- *strp += 3; -- errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16, -- & result_type, & value); -- if (**strp != ')') -- return MISSING_CLOSING_PARENTHESIS; -- -- ++*strp; -- if (errmsg == NULL -- && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -- value >>= 16; -- ret = value; -- } -- else -- { -- if (**strp == '-') -- { -- long value; -- -- errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -- ret = value; -- } -- else -- { -- unsigned long value; -- -- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value); -- ret = value; -- } -- } -- -- *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000; -- return errmsg; --} -- --/* Handle lo(). */ -- --static const char * --parse_lo16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) --{ -- const char *errmsg; -- enum cgen_parse_operand_result result_type; -- unsigned long ret; -- -- if (**strp == '#') -- ++*strp; -- -- if (strncasecmp (*strp, "lo(", 3) == 0) -- { -- bfd_vma value; -- -- *strp += 3; -- errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16, -- & result_type, & value); -- if (**strp != ')') -- return MISSING_CLOSING_PARENTHESIS; -- -- ++*strp; -- ret = value; -- } -- else -- { -- if (**strp == '-') -- { -- long value; -- -- errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -- ret = value; -- } -- else -- { -- unsigned long value; -- -- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value); -- ret = value; -- } -- } -- -- *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000; -- return errmsg; --} -- --/* -- */ -- --const char * openrisc_cgen_parse_operand -- (CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *); -- --/* Main entry point for operand parsing. -- -- This function is basically just a big switch statement. Earlier versions -- used tables to look up the function to use, but -- - if the table contains both assembler and disassembler functions then -- the disassembler contains much of the assembler and vice-versa, -- - there's a lot of inlining possibilities as things grow, -- - using a switch statement avoids the function call overhead. -- -- This function could be moved into `parse_insn_normal', but keeping it -- separate makes clear the interface between `parse_insn_normal' and each of -- the handlers. */ -- --const char * --openrisc_cgen_parse_operand (CGEN_CPU_DESC cd, -- int opindex, -- const char ** strp, -- CGEN_FIELDS * fields) --{ -- const char * errmsg = NULL; -- /* Used by scalar operands that still need to be parsed. */ -- long junk ATTRIBUTE_UNUSED; -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- { -- bfd_vma value = 0; -- errmsg = cgen_parse_address (cd, strp, OPENRISC_OPERAND_ABS_26, 0, NULL, & value); -- fields->f_abs26 = value; -- } -- break; -- case OPENRISC_OPERAND_DISP_26 : -- { -- bfd_vma value = 0; -- errmsg = cgen_parse_address (cd, strp, OPENRISC_OPERAND_DISP_26, 0, NULL, & value); -- fields->f_disp26 = value; -- } -- break; -- case OPENRISC_OPERAND_HI16 : -- errmsg = parse_hi16 (cd, strp, OPENRISC_OPERAND_HI16, (long *) (& fields->f_simm16)); -- break; -- case OPENRISC_OPERAND_LO16 : -- errmsg = parse_lo16 (cd, strp, OPENRISC_OPERAND_LO16, (long *) (& fields->f_lo16)); -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- errmsg = cgen_parse_unsigned_integer (cd, strp, OPENRISC_OPERAND_OP_F_23, (unsigned long *) (& fields->f_op4)); -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- errmsg = cgen_parse_unsigned_integer (cd, strp, OPENRISC_OPERAND_OP_F_3, (unsigned long *) (& fields->f_op5)); -- break; -- case OPENRISC_OPERAND_RA : -- errmsg = cgen_parse_keyword (cd, strp, & openrisc_cgen_opval_h_gr, & fields->f_r2); -- break; -- case OPENRISC_OPERAND_RB : -- errmsg = cgen_parse_keyword (cd, strp, & openrisc_cgen_opval_h_gr, & fields->f_r3); -- break; -- case OPENRISC_OPERAND_RD : -- errmsg = cgen_parse_keyword (cd, strp, & openrisc_cgen_opval_h_gr, & fields->f_r1); -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- errmsg = cgen_parse_signed_integer (cd, strp, OPENRISC_OPERAND_SIMM_16, (long *) (& fields->f_simm16)); -- break; -- case OPENRISC_OPERAND_UI16NC : -- errmsg = parse_lo16 (cd, strp, OPENRISC_OPERAND_UI16NC, (long *) (& fields->f_i16nc)); -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- errmsg = cgen_parse_unsigned_integer (cd, strp, OPENRISC_OPERAND_UIMM_16, (unsigned long *) (& fields->f_uimm16)); -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- errmsg = cgen_parse_unsigned_integer (cd, strp, OPENRISC_OPERAND_UIMM_5, (unsigned long *) (& fields->f_uimm5)); -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); -- abort (); -- } -- -- return errmsg; --} -- --cgen_parse_fn * const openrisc_cgen_parse_handlers[] = --{ -- parse_insn_normal, --}; -- --void --openrisc_cgen_init_asm (CGEN_CPU_DESC cd) --{ -- openrisc_cgen_init_opcode_table (cd); -- openrisc_cgen_init_ibld_table (cd); -- cd->parse_handlers = & openrisc_cgen_parse_handlers[0]; -- cd->parse_operand = openrisc_cgen_parse_operand; --#ifdef CGEN_ASM_INIT_HOOK --CGEN_ASM_INIT_HOOK --#endif --} -- -- -- --/* Regex construction routine. -- -- This translates an opcode syntax string into a regex string, -- by replacing any non-character syntax element (such as an -- opcode) with the pattern '.*' -- -- It then compiles the regex and stores it in the opcode, for -- later use by openrisc_cgen_assemble_insn -- -- Returns NULL for success, an error message for failure. */ -- --char * --openrisc_cgen_build_insn_regex (CGEN_INSN *insn) --{ -- CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn); -- const char *mnem = CGEN_INSN_MNEMONIC (insn); -- char rxbuf[CGEN_MAX_RX_ELEMENTS]; -- char *rx = rxbuf; -- const CGEN_SYNTAX_CHAR_TYPE *syn; -- int reg_err; -- -- syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc)); -- -- /* Mnemonics come first in the syntax string. */ -- if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) -- return _("missing mnemonic in syntax string"); -- ++syn; -- -- /* Generate a case sensitive regular expression that emulates case -- insensitive matching in the "C" locale. We cannot generate a case -- insensitive regular expression because in Turkish locales, 'i' and 'I' -- are not equal modulo case conversion. */ -- -- /* Copy the literal mnemonic out of the insn. */ -- for (; *mnem; mnem++) -- { -- char c = *mnem; -- -- if (ISALPHA (c)) -- { -- *rx++ = '['; -- *rx++ = TOLOWER (c); -- *rx++ = TOUPPER (c); -- *rx++ = ']'; -- } -- else -- *rx++ = c; -- } -- -- /* Copy any remaining literals from the syntax string into the rx. */ -- for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn) -- { -- if (CGEN_SYNTAX_CHAR_P (* syn)) -- { -- char c = CGEN_SYNTAX_CHAR (* syn); -- -- switch (c) -- { -- /* Escape any regex metacharacters in the syntax. */ -- case '.': case '[': case '\\': -- case '*': case '^': case '$': -- --#ifdef CGEN_ESCAPE_EXTENDED_REGEX -- case '?': case '{': case '}': -- case '(': case ')': case '*': -- case '|': case '+': case ']': --#endif -- *rx++ = '\\'; -- *rx++ = c; -- break; -- -- default: -- if (ISALPHA (c)) -- { -- *rx++ = '['; -- *rx++ = TOLOWER (c); -- *rx++ = TOUPPER (c); -- *rx++ = ']'; -- } -- else -- *rx++ = c; -- break; -- } -- } -- else -- { -- /* Replace non-syntax fields with globs. */ -- *rx++ = '.'; -- *rx++ = '*'; -- } -- } -- -- /* Trailing whitespace ok. */ -- * rx++ = '['; -- * rx++ = ' '; -- * rx++ = '\t'; -- * rx++ = ']'; -- * rx++ = '*'; -- -- /* But anchor it after that. */ -- * rx++ = '$'; -- * rx = '\0'; -- -- CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t)); -- reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB); -- -- if (reg_err == 0) -- return NULL; -- else -- { -- static char msg[80]; -- -- regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80); -- regfree ((regex_t *) CGEN_INSN_RX (insn)); -- free (CGEN_INSN_RX (insn)); -- (CGEN_INSN_RX (insn)) = NULL; -- return msg; -- } --} -- -- --/* Default insn parser. -- -- The syntax string is scanned and operands are parsed and stored in FIELDS. -- Relocs are queued as we go via other callbacks. -- -- ??? Note that this is currently an all-or-nothing parser. If we fail to -- parse the instruction, we return 0 and the caller will start over from -- the beginning. Backtracking will be necessary in parsing subexpressions, -- but that can be handled there. Not handling backtracking here may get -- expensive in the case of the m68k. Deal with later. -- -- Returns NULL for success, an error message for failure. */ -- --static const char * --parse_insn_normal (CGEN_CPU_DESC cd, -- const CGEN_INSN *insn, -- const char **strp, -- CGEN_FIELDS *fields) --{ -- /* ??? Runtime added insns not handled yet. */ -- const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -- const char *str = *strp; -- const char *errmsg; -- const char *p; -- const CGEN_SYNTAX_CHAR_TYPE * syn; --#ifdef CGEN_MNEMONIC_OPERANDS -- /* FIXME: wip */ -- int past_opcode_p; --#endif -- -- /* For now we assume the mnemonic is first (there are no leading operands). -- We can parse it without needing to set up operand parsing. -- GAS's input scrubber will ensure mnemonics are lowercase, but we may -- not be called from GAS. */ -- p = CGEN_INSN_MNEMONIC (insn); -- while (*p && TOLOWER (*p) == TOLOWER (*str)) -- ++p, ++str; -- -- if (* p) -- return _("unrecognized instruction"); -- --#ifndef CGEN_MNEMONIC_OPERANDS -- if (* str && ! ISSPACE (* str)) -- return _("unrecognized instruction"); --#endif -- -- CGEN_INIT_PARSE (cd); -- cgen_init_parse_operand (cd); --#ifdef CGEN_MNEMONIC_OPERANDS -- past_opcode_p = 0; --#endif -- -- /* We don't check for (*str != '\0') here because we want to parse -- any trailing fake arguments in the syntax string. */ -- syn = CGEN_SYNTAX_STRING (syntax); -- -- /* Mnemonics come first for now, ensure valid string. */ -- if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) -- abort (); -- -- ++syn; -- -- while (* syn != 0) -- { -- /* Non operand chars must match exactly. */ -- if (CGEN_SYNTAX_CHAR_P (* syn)) -- { -- /* FIXME: While we allow for non-GAS callers above, we assume the -- first char after the mnemonic part is a space. */ -- /* FIXME: We also take inappropriate advantage of the fact that -- GAS's input scrubber will remove extraneous blanks. */ -- if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn))) -- { --#ifdef CGEN_MNEMONIC_OPERANDS -- if (CGEN_SYNTAX_CHAR(* syn) == ' ') -- past_opcode_p = 1; --#endif -- ++ syn; -- ++ str; -- } -- else if (*str) -- { -- /* Syntax char didn't match. Can't be this insn. */ -- static char msg [80]; -- -- /* xgettext:c-format */ -- sprintf (msg, _("syntax error (expected char `%c', found `%c')"), -- CGEN_SYNTAX_CHAR(*syn), *str); -- return msg; -- } -- else -- { -- /* Ran out of input. */ -- static char msg [80]; -- -- /* xgettext:c-format */ -- sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"), -- CGEN_SYNTAX_CHAR(*syn)); -- return msg; -- } -- continue; -- } -- --#ifdef CGEN_MNEMONIC_OPERANDS -- (void) past_opcode_p; --#endif -- /* We have an operand of some sort. */ -- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields); -- if (errmsg) -- return errmsg; -- -- /* Done with this operand, continue with next one. */ -- ++ syn; -- } -- -- /* If we're at the end of the syntax string, we're done. */ -- if (* syn == 0) -- { -- /* FIXME: For the moment we assume a valid `str' can only contain -- blanks now. IE: We needn't try again with a longer version of -- the insn and it is assumed that longer versions of insns appear -- before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */ -- while (ISSPACE (* str)) -- ++ str; -- -- if (* str != '\0') -- return _("junk at end of line"); /* FIXME: would like to include `str' */ -- -- return NULL; -- } -- -- /* We couldn't parse it. */ -- return _("unrecognized instruction"); --} -- --/* Main entry point. -- This routine is called for each instruction to be assembled. -- STR points to the insn to be assembled. -- We assume all necessary tables have been initialized. -- The assembled instruction, less any fixups, is stored in BUF. -- Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value -- still needs to be converted to target byte order, otherwise BUF is an array -- of bytes in target byte order. -- The result is a pointer to the insn's entry in the opcode table, -- or NULL if an error occured (an error message will have already been -- printed). -- -- Note that when processing (non-alias) macro-insns, -- this function recurses. -- -- ??? It's possible to make this cpu-independent. -- One would have to deal with a few minor things. -- At this point in time doing so would be more of a curiosity than useful -- [for example this file isn't _that_ big], but keeping the possibility in -- mind helps keep the design clean. */ -- --const CGEN_INSN * --openrisc_cgen_assemble_insn (CGEN_CPU_DESC cd, -- const char *str, -- CGEN_FIELDS *fields, -- CGEN_INSN_BYTES_PTR buf, -- char **errmsg) --{ -- const char *start; -- CGEN_INSN_LIST *ilist; -- const char *parse_errmsg = NULL; -- const char *insert_errmsg = NULL; -- int recognized_mnemonic = 0; -- -- /* Skip leading white space. */ -- while (ISSPACE (* str)) -- ++ str; -- -- /* The instructions are stored in hashed lists. -- Get the first in the list. */ -- ilist = CGEN_ASM_LOOKUP_INSN (cd, str); -- -- /* Keep looking until we find a match. */ -- start = str; -- for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist)) -- { -- const CGEN_INSN *insn = ilist->insn; -- recognized_mnemonic = 1; -- --#ifdef CGEN_VALIDATE_INSN_SUPPORTED -- /* Not usually needed as unsupported opcodes -- shouldn't be in the hash lists. */ -- /* Is this insn supported by the selected cpu? */ -- if (! openrisc_cgen_insn_supported (cd, insn)) -- continue; --#endif -- /* If the RELAXED attribute is set, this is an insn that shouldn't be -- chosen immediately. Instead, it is used during assembler/linker -- relaxation if possible. */ -- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0) -- continue; -- -- str = start; -- -- /* Skip this insn if str doesn't look right lexically. */ -- if (CGEN_INSN_RX (insn) != NULL && -- regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH) -- continue; -- -- /* Allow parse/insert handlers to obtain length of insn. */ -- CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); -- -- parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields); -- if (parse_errmsg != NULL) -- continue; -- -- /* ??? 0 is passed for `pc'. */ -- insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, -- (bfd_vma) 0); -- if (insert_errmsg != NULL) -- continue; -- -- /* It is up to the caller to actually output the insn and any -- queued relocs. */ -- return insn; -- } -- -- { -- static char errbuf[150]; -- const char *tmp_errmsg; --#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS --#define be_verbose 1 --#else --#define be_verbose 0 --#endif -- -- if (be_verbose) -- { -- /* If requesting verbose error messages, use insert_errmsg. -- Failing that, use parse_errmsg. */ -- tmp_errmsg = (insert_errmsg ? insert_errmsg : -- parse_errmsg ? parse_errmsg : -- recognized_mnemonic ? -- _("unrecognized form of instruction") : -- _("unrecognized instruction")); -- -- if (strlen (start) > 50) -- /* xgettext:c-format */ -- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start); -- else -- /* xgettext:c-format */ -- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start); -- } -- else -- { -- if (strlen (start) > 50) -- /* xgettext:c-format */ -- sprintf (errbuf, _("bad instruction `%.50s...'"), start); -- else -- /* xgettext:c-format */ -- sprintf (errbuf, _("bad instruction `%.50s'"), start); -- } -- -- *errmsg = errbuf; -- return NULL; -- } --} -diff -rNU3 dist.orig/opcodes/openrisc-desc.c dist/opcodes/openrisc-desc.c ---- dist.orig/opcodes/openrisc-desc.c 2010-02-12 04:25:49.000000000 +0100 -+++ dist/opcodes/openrisc-desc.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1018 +0,0 @@ --/* CPU data for openrisc. -- --THIS FILE IS MACHINE GENERATED WITH CGEN. -- --Copyright 1996-2010 Free Software Foundation, Inc. -- --This file is part of the GNU Binutils and/or GDB, the GNU debugger. -- -- 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 -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -- -- It 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 --#include --#include "ansidecl.h" --#include "bfd.h" --#include "symcat.h" --#include "openrisc-desc.h" --#include "openrisc-opc.h" --#include "opintl.h" --#include "libiberty.h" --#include "xregex.h" -- --/* Attributes. */ -- --static const CGEN_ATTR_ENTRY bool_attr[] = --{ -- { "#f", 0 }, -- { "#t", 1 }, -- { 0, 0 } --}; -- --static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED = --{ -- { "base", MACH_BASE }, -- { "openrisc", MACH_OPENRISC }, -- { "or1300", MACH_OR1300 }, -- { "max", MACH_MAX }, -- { 0, 0 } --}; -- --static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED = --{ -- { "or32", ISA_OR32 }, -- { "max", ISA_MAX }, -- { 0, 0 } --}; -- --static const CGEN_ATTR_ENTRY HAS_CACHE_attr[] ATTRIBUTE_UNUSED = --{ -- { "DATA_CACHE", HAS_CACHE_DATA_CACHE }, -- { "INSN_CACHE", HAS_CACHE_INSN_CACHE }, -- { 0, 0 } --}; -- --const CGEN_ATTR_TABLE openrisc_cgen_ifield_attr_table[] = --{ -- { "MACH", & MACH_attr[0], & MACH_attr[0] }, -- { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -- { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, -- { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, -- { "RESERVED", &bool_attr[0], &bool_attr[0] }, -- { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, -- { "SIGNED", &bool_attr[0], &bool_attr[0] }, -- { 0, 0, 0 } --}; -- --const CGEN_ATTR_TABLE openrisc_cgen_hardware_attr_table[] = --{ -- { "MACH", & MACH_attr[0], & MACH_attr[0] }, -- { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -- { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] }, -- { "PC", &bool_attr[0], &bool_attr[0] }, -- { "PROFILE", &bool_attr[0], &bool_attr[0] }, -- { 0, 0, 0 } --}; -- --const CGEN_ATTR_TABLE openrisc_cgen_operand_attr_table[] = --{ -- { "MACH", & MACH_attr[0], & MACH_attr[0] }, -- { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -- { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, -- { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, -- { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, -- { "SIGNED", &bool_attr[0], &bool_attr[0] }, -- { "NEGATIVE", &bool_attr[0], &bool_attr[0] }, -- { "RELAX", &bool_attr[0], &bool_attr[0] }, -- { "SEM-ONLY", &bool_attr[0], &bool_attr[0] }, -- { 0, 0, 0 } --}; -- --const CGEN_ATTR_TABLE openrisc_cgen_insn_attr_table[] = --{ -- { "MACH", & MACH_attr[0], & MACH_attr[0] }, -- { "ALIAS", &bool_attr[0], &bool_attr[0] }, -- { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -- { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] }, -- { "COND-CTI", &bool_attr[0], &bool_attr[0] }, -- { "SKIP-CTI", &bool_attr[0], &bool_attr[0] }, -- { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, -- { "RELAXABLE", &bool_attr[0], &bool_attr[0] }, -- { "RELAXED", &bool_attr[0], &bool_attr[0] }, -- { "NO-DIS", &bool_attr[0], &bool_attr[0] }, -- { "PBB", &bool_attr[0], &bool_attr[0] }, -- { "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, -- { 0, 0, 0 } --}; -- --/* Instruction set variants. */ -- --static const CGEN_ISA openrisc_cgen_isa_table[] = { -- { "or32", 32, 32, 32, 32 }, -- { 0, 0, 0, 0, 0 } --}; -- --/* Machine variants. */ -- --static const CGEN_MACH openrisc_cgen_mach_table[] = { -- { "openrisc", "openrisc", MACH_OPENRISC, 0 }, -- { "or1300", "openrisc:1300", MACH_OR1300, 0 }, -- { 0, 0, 0, 0 } --}; -- --static CGEN_KEYWORD_ENTRY openrisc_cgen_opval_h_gr_entries[] = --{ -- { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, -- { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, -- { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, -- { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, -- { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, -- { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, -- { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, -- { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, -- { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, -- { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, -- { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, -- { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, -- { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, -- { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, -- { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, -- { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, -- { "r16", 16, {0, {{{0, 0}}}}, 0, 0 }, -- { "r17", 17, {0, {{{0, 0}}}}, 0, 0 }, -- { "r18", 18, {0, {{{0, 0}}}}, 0, 0 }, -- { "r19", 19, {0, {{{0, 0}}}}, 0, 0 }, -- { "r20", 20, {0, {{{0, 0}}}}, 0, 0 }, -- { "r21", 21, {0, {{{0, 0}}}}, 0, 0 }, -- { "r22", 22, {0, {{{0, 0}}}}, 0, 0 }, -- { "r23", 23, {0, {{{0, 0}}}}, 0, 0 }, -- { "r24", 24, {0, {{{0, 0}}}}, 0, 0 }, -- { "r25", 25, {0, {{{0, 0}}}}, 0, 0 }, -- { "r26", 26, {0, {{{0, 0}}}}, 0, 0 }, -- { "r27", 27, {0, {{{0, 0}}}}, 0, 0 }, -- { "r28", 28, {0, {{{0, 0}}}}, 0, 0 }, -- { "r29", 29, {0, {{{0, 0}}}}, 0, 0 }, -- { "r30", 30, {0, {{{0, 0}}}}, 0, 0 }, -- { "r31", 31, {0, {{{0, 0}}}}, 0, 0 }, -- { "lr", 11, {0, {{{0, 0}}}}, 0, 0 }, -- { "sp", 1, {0, {{{0, 0}}}}, 0, 0 }, -- { "fp", 2, {0, {{{0, 0}}}}, 0, 0 } --}; -- --CGEN_KEYWORD openrisc_cgen_opval_h_gr = --{ -- & openrisc_cgen_opval_h_gr_entries[0], -- 35, -- 0, 0, 0, 0, "" --}; -- -- --/* The hardware table. */ -- --#define A(a) (1 << CGEN_HW_##a) -- --const CGEN_HW_ENTRY openrisc_cgen_hw_table[] = --{ -- { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<name) -- { -- if (strcmp (name, table->bfd_name) == 0) -- return table; -- ++table; -- } -- abort (); --} -- --/* Subroutine of openrisc_cgen_cpu_open to build the hardware table. */ -- --static void --build_hw_table (CGEN_CPU_TABLE *cd) --{ -- int i; -- int machs = cd->machs; -- const CGEN_HW_ENTRY *init = & openrisc_cgen_hw_table[0]; -- /* MAX_HW is only an upper bound on the number of selected entries. -- However each entry is indexed by it's enum so there can be holes in -- the table. */ -- const CGEN_HW_ENTRY **selected = -- (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); -- -- cd->hw_table.init_entries = init; -- cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); -- memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); -- /* ??? For now we just use machs to determine which ones we want. */ -- for (i = 0; init[i].name != NULL; ++i) -- if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) -- & machs) -- selected[init[i].type] = &init[i]; -- cd->hw_table.entries = selected; -- cd->hw_table.num_entries = MAX_HW; --} -- --/* Subroutine of openrisc_cgen_cpu_open to build the hardware table. */ -- --static void --build_ifield_table (CGEN_CPU_TABLE *cd) --{ -- cd->ifld_table = & openrisc_cgen_ifld_table[0]; --} -- --/* Subroutine of openrisc_cgen_cpu_open to build the hardware table. */ -- --static void --build_operand_table (CGEN_CPU_TABLE *cd) --{ -- int i; -- int machs = cd->machs; -- const CGEN_OPERAND *init = & openrisc_cgen_operand_table[0]; -- /* MAX_OPERANDS is only an upper bound on the number of selected entries. -- However each entry is indexed by it's enum so there can be holes in -- the table. */ -- const CGEN_OPERAND **selected = xmalloc (MAX_OPERANDS * sizeof (* selected)); -- -- cd->operand_table.init_entries = init; -- cd->operand_table.entry_size = sizeof (CGEN_OPERAND); -- memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *)); -- /* ??? For now we just use mach to determine which ones we want. */ -- for (i = 0; init[i].name != NULL; ++i) -- if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH) -- & machs) -- selected[init[i].type] = &init[i]; -- cd->operand_table.entries = selected; -- cd->operand_table.num_entries = MAX_OPERANDS; --} -- --/* Subroutine of openrisc_cgen_cpu_open to build the hardware table. -- ??? This could leave out insns not supported by the specified mach/isa, -- but that would cause errors like "foo only supported by bar" to become -- "unknown insn", so for now we include all insns and require the app to -- do the checking later. -- ??? On the other hand, parsing of such insns may require their hardware or -- operand elements to be in the table [which they mightn't be]. */ -- --static void --build_insn_table (CGEN_CPU_TABLE *cd) --{ -- int i; -- const CGEN_IBASE *ib = & openrisc_cgen_insn_table[0]; -- CGEN_INSN *insns = xmalloc (MAX_INSNS * sizeof (CGEN_INSN)); -- -- memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN)); -- for (i = 0; i < MAX_INSNS; ++i) -- insns[i].base = &ib[i]; -- cd->insn_table.init_entries = insns; -- cd->insn_table.entry_size = sizeof (CGEN_IBASE); -- cd->insn_table.num_init_entries = MAX_INSNS; --} -- --/* Subroutine of openrisc_cgen_cpu_open to rebuild the tables. */ -- --static void --openrisc_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) --{ -- int i; -- CGEN_BITSET *isas = cd->isas; -- unsigned int machs = cd->machs; -- -- cd->int_insn_p = CGEN_INT_INSN_P; -- -- /* Data derived from the isa spec. */ --#define UNSET (CGEN_SIZE_UNKNOWN + 1) -- cd->default_insn_bitsize = UNSET; -- cd->base_insn_bitsize = UNSET; -- cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */ -- cd->max_insn_bitsize = 0; -- for (i = 0; i < MAX_ISAS; ++i) -- if (cgen_bitset_contains (isas, i)) -- { -- const CGEN_ISA *isa = & openrisc_cgen_isa_table[i]; -- -- /* Default insn sizes of all selected isas must be -- equal or we set the result to 0, meaning "unknown". */ -- if (cd->default_insn_bitsize == UNSET) -- cd->default_insn_bitsize = isa->default_insn_bitsize; -- else if (isa->default_insn_bitsize == cd->default_insn_bitsize) -- ; /* This is ok. */ -- else -- cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN; -- -- /* Base insn sizes of all selected isas must be equal -- or we set the result to 0, meaning "unknown". */ -- if (cd->base_insn_bitsize == UNSET) -- cd->base_insn_bitsize = isa->base_insn_bitsize; -- else if (isa->base_insn_bitsize == cd->base_insn_bitsize) -- ; /* This is ok. */ -- else -- cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN; -- -- /* Set min,max insn sizes. */ -- if (isa->min_insn_bitsize < cd->min_insn_bitsize) -- cd->min_insn_bitsize = isa->min_insn_bitsize; -- if (isa->max_insn_bitsize > cd->max_insn_bitsize) -- cd->max_insn_bitsize = isa->max_insn_bitsize; -- } -- -- /* Data derived from the mach spec. */ -- for (i = 0; i < MAX_MACHS; ++i) -- if (((1 << i) & machs) != 0) -- { -- const CGEN_MACH *mach = & openrisc_cgen_mach_table[i]; -- -- if (mach->insn_chunk_bitsize != 0) -- { -- if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) -- { -- fprintf (stderr, "openrisc_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", -- cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); -- abort (); -- } -- -- cd->insn_chunk_bitsize = mach->insn_chunk_bitsize; -- } -- } -- -- /* Determine which hw elements are used by MACH. */ -- build_hw_table (cd); -- -- /* Build the ifield table. */ -- build_ifield_table (cd); -- -- /* Determine which operands are used by MACH/ISA. */ -- build_operand_table (cd); -- -- /* Build the instruction table. */ -- build_insn_table (cd); --} -- --/* Initialize a cpu table and return a descriptor. -- It's much like opening a file, and must be the first function called. -- The arguments are a set of (type/value) pairs, terminated with -- CGEN_CPU_OPEN_END. -- -- Currently supported values: -- CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr -- CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr -- CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name -- CGEN_CPU_OPEN_ENDIAN: specify endian choice -- CGEN_CPU_OPEN_END: terminates arguments -- -- ??? Simultaneous multiple isas might not make sense, but it's not (yet) -- precluded. */ -- --CGEN_CPU_DESC --openrisc_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) --{ -- CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE)); -- static int init_p; -- CGEN_BITSET *isas = 0; /* 0 = "unspecified" */ -- unsigned int machs = 0; /* 0 = "unspecified" */ -- enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; -- va_list ap; -- -- if (! init_p) -- { -- init_tables (); -- init_p = 1; -- } -- -- memset (cd, 0, sizeof (*cd)); -- -- va_start (ap, arg_type); -- while (arg_type != CGEN_CPU_OPEN_END) -- { -- switch (arg_type) -- { -- case CGEN_CPU_OPEN_ISAS : -- isas = va_arg (ap, CGEN_BITSET *); -- break; -- case CGEN_CPU_OPEN_MACHS : -- machs = va_arg (ap, unsigned int); -- break; -- case CGEN_CPU_OPEN_BFDMACH : -- { -- const char *name = va_arg (ap, const char *); -- const CGEN_MACH *mach = -- lookup_mach_via_bfd_name (openrisc_cgen_mach_table, name); -- -- machs |= 1 << mach->num; -- break; -- } -- case CGEN_CPU_OPEN_ENDIAN : -- endian = va_arg (ap, enum cgen_endian); -- break; -- default : -- fprintf (stderr, "openrisc_cgen_cpu_open: unsupported argument `%d'\n", -- arg_type); -- abort (); /* ??? return NULL? */ -- } -- arg_type = va_arg (ap, enum cgen_cpu_open_arg); -- } -- va_end (ap); -- -- /* Mach unspecified means "all". */ -- if (machs == 0) -- machs = (1 << MAX_MACHS) - 1; -- /* Base mach is always selected. */ -- machs |= 1; -- if (endian == CGEN_ENDIAN_UNKNOWN) -- { -- /* ??? If target has only one, could have a default. */ -- fprintf (stderr, "openrisc_cgen_cpu_open: no endianness specified\n"); -- abort (); -- } -- -- cd->isas = cgen_bitset_copy (isas); -- cd->machs = machs; -- cd->endian = endian; -- /* FIXME: for the sparc case we can determine insn-endianness statically. -- The worry here is where both data and insn endian can be independently -- chosen, in which case this function will need another argument. -- Actually, will want to allow for more arguments in the future anyway. */ -- cd->insn_endian = endian; -- -- /* Table (re)builder. */ -- cd->rebuild_tables = openrisc_cgen_rebuild_tables; -- openrisc_cgen_rebuild_tables (cd); -- -- /* Default to not allowing signed overflow. */ -- cd->signed_overflow_ok_p = 0; -- -- return (CGEN_CPU_DESC) cd; --} -- --/* Cover fn to openrisc_cgen_cpu_open to handle the simple case of 1 isa, 1 mach. -- MACH_NAME is the bfd name of the mach. */ -- --CGEN_CPU_DESC --openrisc_cgen_cpu_open_1 (const char *mach_name, enum cgen_endian endian) --{ -- return openrisc_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name, -- CGEN_CPU_OPEN_ENDIAN, endian, -- CGEN_CPU_OPEN_END); --} -- --/* Close a cpu table. -- ??? This can live in a machine independent file, but there's currently -- no place to put this file (there's no libcgen). libopcodes is the wrong -- place as some simulator ports use this but they don't use libopcodes. */ -- --void --openrisc_cgen_cpu_close (CGEN_CPU_DESC cd) --{ -- unsigned int i; -- const CGEN_INSN *insns; -- -- if (cd->macro_insn_table.init_entries) -- { -- insns = cd->macro_insn_table.init_entries; -- for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns) -- if (CGEN_INSN_RX ((insns))) -- regfree (CGEN_INSN_RX (insns)); -- } -- -- if (cd->insn_table.init_entries) -- { -- insns = cd->insn_table.init_entries; -- for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns) -- if (CGEN_INSN_RX (insns)) -- regfree (CGEN_INSN_RX (insns)); -- } -- -- if (cd->macro_insn_table.init_entries) -- free ((CGEN_INSN *) cd->macro_insn_table.init_entries); -- -- if (cd->insn_table.init_entries) -- free ((CGEN_INSN *) cd->insn_table.init_entries); -- -- if (cd->hw_table.entries) -- free ((CGEN_HW_ENTRY *) cd->hw_table.entries); -- -- if (cd->operand_table.entries) -- free ((CGEN_HW_ENTRY *) cd->operand_table.entries); -- -- free (cd); --} -- -diff -rNU3 dist.orig/opcodes/openrisc-desc.h dist/opcodes/openrisc-desc.h ---- dist.orig/opcodes/openrisc-desc.h 2010-10-09 08:50:23.000000000 +0200 -+++ dist/opcodes/openrisc-desc.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,288 +0,0 @@ --/* CPU data header for openrisc. -- --THIS FILE IS MACHINE GENERATED WITH CGEN. -- --Copyright 1996-2010 Free Software Foundation, Inc. -- --This file is part of the GNU Binutils and/or GDB, the GNU debugger. -- -- 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 -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -- -- It 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. -- --*/ -- --#ifndef OPENRISC_CPU_H --#define OPENRISC_CPU_H -- --#define CGEN_ARCH openrisc -- --/* Given symbol S, return openrisc_cgen_. */ --#define CGEN_SYM(s) openrisc##_cgen_##s -- -- --/* Selected cpu families. */ --#define HAVE_CPU_OPENRISCBF -- --#define CGEN_INSN_LSB0_P 1 -- --/* Minimum size of any insn (in bytes). */ --#define CGEN_MIN_INSN_SIZE 4 -- --/* Maximum size of any insn (in bytes). */ --#define CGEN_MAX_INSN_SIZE 4 -- --#define CGEN_INT_INSN_P 1 -- --/* Maximum number of syntax elements in an instruction. */ --#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 14 -- --/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands. -- e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands -- we can't hash on everything up to the space. */ --#define CGEN_MNEMONIC_OPERANDS -- --/* Maximum number of fields in an instruction. */ --#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 9 -- --/* Enums. */ -- --/* Enum declaration for exception vectors. */ --typedef enum e_exception { -- E_RESET, E_BUSERR, E_DPF, E_IPF -- , E_EXTINT, E_ALIGN, E_ILLEGAL, E_PEINT -- , E_DTLBMISS, E_ITLBMISS, E_RRANGE, E_SYSCALL -- , E_BREAK, E_RESERVED --} E_EXCEPTION; -- --/* Enum declaration for FIXME. */ --typedef enum insn_class { -- OP1_0, OP1_1, OP1_2, OP1_3 --} INSN_CLASS; -- --/* Enum declaration for FIXME. */ --typedef enum insn_sub { -- OP2_0, OP2_1, OP2_2, OP2_3 -- , OP2_4, OP2_5, OP2_6, OP2_7 -- , OP2_8, OP2_9, OP2_10, OP2_11 -- , OP2_12, OP2_13, OP2_14, OP2_15 --} INSN_SUB; -- --/* Enum declaration for FIXME. */ --typedef enum insn_op3 { -- OP3_0, OP3_1, OP3_2, OP3_3 --} INSN_OP3; -- --/* Enum declaration for FIXME. */ --typedef enum insn_op4 { -- OP4_0, OP4_1, OP4_2, OP4_3 -- , OP4_4, OP4_5, OP4_6, OP4_7 --} INSN_OP4; -- --/* Enum declaration for FIXME. */ --typedef enum insn_op5 { -- OP5_0, OP5_1, OP5_2, OP5_3 -- , OP5_4, OP5_5, OP5_6, OP5_7 -- , OP5_8, OP5_9, OP5_10, OP5_11 -- , OP5_12, OP5_13, OP5_14, OP5_15 -- , OP5_16, OP5_17, OP5_18, OP5_19 -- , OP5_20, OP5_21, OP5_22, OP5_23 -- , OP5_24, OP5_25, OP5_26, OP5_27 -- , OP5_28, OP5_29, OP5_30, OP5_31 --} INSN_OP5; -- --/* Enum declaration for FIXME. */ --typedef enum insn_op6 { -- OP6_0, OP6_1, OP6_2, OP6_3 -- , OP6_4, OP6_5, OP6_6, OP6_7 --} INSN_OP6; -- --/* Enum declaration for FIXME. */ --typedef enum insn_op7 { -- OP7_0, OP7_1, OP7_2, OP7_3 -- , OP7_4, OP7_5, OP7_6, OP7_7 -- , OP7_8, OP7_9, OP7_10, OP7_11 -- , OP7_12, OP7_13, OP7_14, OP7_15 --} INSN_OP7; -- --/* Attributes. */ -- --/* Enum declaration for machine type selection. */ --typedef enum mach_attr { -- MACH_BASE, MACH_OPENRISC, MACH_OR1300, MACH_MAX --} MACH_ATTR; -- --/* Enum declaration for instruction set selection. */ --typedef enum isa_attr { -- ISA_OR32, ISA_MAX --} ISA_ATTR; -- --/* Enum declaration for if this model has caches. */ --typedef enum has_cache_attr { -- HAS_CACHE_DATA_CACHE, HAS_CACHE_INSN_CACHE --} HAS_CACHE_ATTR; -- --/* Number of architecture variants. */ --#define MAX_ISAS 1 --#define MAX_MACHS ((int) MACH_MAX) -- --/* Ifield support. */ -- --/* Ifield attribute indices. */ -- --/* Enum declaration for cgen_ifld attrs. */ --typedef enum cgen_ifld_attr { -- CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED -- , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31 -- , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS --} CGEN_IFLD_ATTR; -- --/* Number of non-boolean elements in cgen_ifld_attr. */ --#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1) -- --/* cgen_ifld attribute accessor macros. */ --#define CGEN_ATTR_CGEN_IFLD_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_IFLD_MACH-CGEN_IFLD_START_NBOOLS-1].nonbitset) --#define CGEN_ATTR_CGEN_IFLD_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_VIRTUAL)) != 0) --#define CGEN_ATTR_CGEN_IFLD_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_PCREL_ADDR)) != 0) --#define CGEN_ATTR_CGEN_IFLD_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_ABS_ADDR)) != 0) --#define CGEN_ATTR_CGEN_IFLD_RESERVED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_RESERVED)) != 0) --#define CGEN_ATTR_CGEN_IFLD_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGN_OPT)) != 0) --#define CGEN_ATTR_CGEN_IFLD_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGNED)) != 0) -- --/* Enum declaration for openrisc ifield types. */ --typedef enum ifield_type { -- OPENRISC_F_NIL, OPENRISC_F_ANYOF, OPENRISC_F_CLASS, OPENRISC_F_SUB -- , OPENRISC_F_R1, OPENRISC_F_R2, OPENRISC_F_R3, OPENRISC_F_SIMM16 -- , OPENRISC_F_UIMM16, OPENRISC_F_UIMM5, OPENRISC_F_HI16, OPENRISC_F_LO16 -- , OPENRISC_F_OP1, OPENRISC_F_OP2, OPENRISC_F_OP3, OPENRISC_F_OP4 -- , OPENRISC_F_OP5, OPENRISC_F_OP6, OPENRISC_F_OP7, OPENRISC_F_I16_1 -- , OPENRISC_F_I16_2, OPENRISC_F_DISP26, OPENRISC_F_ABS26, OPENRISC_F_I16NC -- , OPENRISC_F_F_15_8, OPENRISC_F_F_10_3, OPENRISC_F_F_4_1, OPENRISC_F_F_7_3 -- , OPENRISC_F_F_10_7, OPENRISC_F_F_10_11, OPENRISC_F_MAX --} IFIELD_TYPE; -- --#define MAX_IFLD ((int) OPENRISC_F_MAX) -- --/* Hardware attribute indices. */ -- --/* Enum declaration for cgen_hw attrs. */ --typedef enum cgen_hw_attr { -- CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE -- , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS --} CGEN_HW_ATTR; -- --/* Number of non-boolean elements in cgen_hw_attr. */ --#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1) -- --/* cgen_hw attribute accessor macros. */ --#define CGEN_ATTR_CGEN_HW_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_HW_MACH-CGEN_HW_START_NBOOLS-1].nonbitset) --#define CGEN_ATTR_CGEN_HW_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_VIRTUAL)) != 0) --#define CGEN_ATTR_CGEN_HW_CACHE_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_CACHE_ADDR)) != 0) --#define CGEN_ATTR_CGEN_HW_PC_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PC)) != 0) --#define CGEN_ATTR_CGEN_HW_PROFILE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PROFILE)) != 0) -- --/* Enum declaration for openrisc hardware types. */ --typedef enum cgen_hw_type { -- HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR -- , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_SR -- , HW_H_HI16, HW_H_LO16, HW_H_CBIT, HW_H_DELAY_INSN -- , HW_MAX --} CGEN_HW_TYPE; -- --#define MAX_HW ((int) HW_MAX) -- --/* Operand attribute indices. */ -- --/* Enum declaration for cgen_operand attrs. */ --typedef enum cgen_operand_attr { -- CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT -- , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY -- , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS --} CGEN_OPERAND_ATTR; -- --/* Number of non-boolean elements in cgen_operand_attr. */ --#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1) -- --/* cgen_operand attribute accessor macros. */ --#define CGEN_ATTR_CGEN_OPERAND_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_MACH-CGEN_OPERAND_START_NBOOLS-1].nonbitset) --#define CGEN_ATTR_CGEN_OPERAND_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_VIRTUAL)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_PCREL_ADDR)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_ABS_ADDR)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGN_OPT)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGNED)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_NEGATIVE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_NEGATIVE)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_RELAX_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_RELAX)) != 0) --#define CGEN_ATTR_CGEN_OPERAND_SEM_ONLY_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SEM_ONLY)) != 0) -- --/* Enum declaration for openrisc operand types. */ --typedef enum cgen_operand_type { -- OPENRISC_OPERAND_PC, OPENRISC_OPERAND_SR, OPENRISC_OPERAND_CBIT, OPENRISC_OPERAND_SIMM_16 -- , OPENRISC_OPERAND_UIMM_16, OPENRISC_OPERAND_DISP_26, OPENRISC_OPERAND_ABS_26, OPENRISC_OPERAND_UIMM_5 -- , OPENRISC_OPERAND_RD, OPENRISC_OPERAND_RA, OPENRISC_OPERAND_RB, OPENRISC_OPERAND_OP_F_23 -- , OPENRISC_OPERAND_OP_F_3, OPENRISC_OPERAND_HI16, OPENRISC_OPERAND_LO16, OPENRISC_OPERAND_UI16NC -- , OPENRISC_OPERAND_MAX --} CGEN_OPERAND_TYPE; -- --/* Number of operands types. */ --#define MAX_OPERANDS 16 -- --/* Maximum number of operands referenced by any insn. */ --#define MAX_OPERAND_INSTANCES 8 -- --/* Insn attribute indices. */ -- --/* Enum declaration for cgen_insn attrs. */ --typedef enum cgen_insn_attr { -- CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI -- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED -- , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS -- , CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS --} CGEN_INSN_ATTR; -- --/* Number of non-boolean elements in cgen_insn_attr. */ --#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1) -- --/* cgen_insn attribute accessor macros. */ --#define CGEN_ATTR_CGEN_INSN_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_MACH-CGEN_INSN_START_NBOOLS-1].nonbitset) --#define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_ALIAS)) != 0) --#define CGEN_ATTR_CGEN_INSN_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_VIRTUAL)) != 0) --#define CGEN_ATTR_CGEN_INSN_UNCOND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_UNCOND_CTI)) != 0) --#define CGEN_ATTR_CGEN_INSN_COND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_COND_CTI)) != 0) --#define CGEN_ATTR_CGEN_INSN_SKIP_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_SKIP_CTI)) != 0) --#define CGEN_ATTR_CGEN_INSN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_DELAY_SLOT)) != 0) --#define CGEN_ATTR_CGEN_INSN_RELAXABLE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXABLE)) != 0) --#define CGEN_ATTR_CGEN_INSN_RELAXED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXED)) != 0) --#define CGEN_ATTR_CGEN_INSN_NO_DIS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NO_DIS)) != 0) --#define CGEN_ATTR_CGEN_INSN_PBB_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_PBB)) != 0) --#define CGEN_ATTR_CGEN_INSN_NOT_IN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NOT_IN_DELAY_SLOT)) != 0) -- --/* cgen.h uses things we just defined. */ --#include "opcode/cgen.h" -- --extern const struct cgen_ifld openrisc_cgen_ifld_table[]; -- --/* Attributes. */ --extern const CGEN_ATTR_TABLE openrisc_cgen_hardware_attr_table[]; --extern const CGEN_ATTR_TABLE openrisc_cgen_ifield_attr_table[]; --extern const CGEN_ATTR_TABLE openrisc_cgen_operand_attr_table[]; --extern const CGEN_ATTR_TABLE openrisc_cgen_insn_attr_table[]; -- --/* Hardware decls. */ -- --extern CGEN_KEYWORD openrisc_cgen_opval_h_gr; -- --extern const CGEN_HW_ENTRY openrisc_cgen_hw_table[]; -- -- -- --#endif /* OPENRISC_CPU_H */ -diff -rNU3 dist.orig/opcodes/openrisc-dis.c dist/opcodes/openrisc-dis.c ---- dist.orig/opcodes/openrisc-dis.c 2010-02-12 05:42:28.000000000 +0100 -+++ dist/opcodes/openrisc-dis.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,556 +0,0 @@ --/* Disassembler interface for targets using CGEN. -*- C -*- -- CGEN: Cpu tools GENerator -- -- THIS FILE IS MACHINE GENERATED WITH CGEN. -- - the resultant file is machine generated, cgen-dis.in isn't -- -- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, -- 2008, 2010 Free Software Foundation, Inc. -- -- This file is part of libopcodes. -- -- This library 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, or (at your option) -- any later version. -- -- It 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. */ -- --/* ??? Eventually more and more of this stuff can go to cpu-independent files. -- Keep that in mind. */ -- --#include "sysdep.h" --#include --#include "ansidecl.h" --#include "dis-asm.h" --#include "bfd.h" --#include "symcat.h" --#include "libiberty.h" --#include "openrisc-desc.h" --#include "openrisc-opc.h" --#include "opintl.h" -- --/* Default text to print if an instruction isn't recognized. */ --#define UNKNOWN_INSN_MSG _("*unknown*") -- --static void print_normal -- (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int); --static void print_address -- (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int) ATTRIBUTE_UNUSED; --static void print_keyword -- (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int) ATTRIBUTE_UNUSED; --static void print_insn_normal -- (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int); --static int print_insn -- (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, unsigned); --static int default_print_insn -- (CGEN_CPU_DESC, bfd_vma, disassemble_info *) ATTRIBUTE_UNUSED; --static int read_insn -- (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, int, CGEN_EXTRACT_INFO *, -- unsigned long *); -- --/* -- disassembler routines inserted here. */ -- -- --void openrisc_cgen_print_operand -- (CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *, void const *, bfd_vma, int); -- --/* Main entry point for printing operands. -- XINFO is a `void *' and not a `disassemble_info *' to not put a requirement -- of dis-asm.h on cgen.h. -- -- This function is basically just a big switch statement. Earlier versions -- used tables to look up the function to use, but -- - if the table contains both assembler and disassembler functions then -- the disassembler contains much of the assembler and vice-versa, -- - there's a lot of inlining possibilities as things grow, -- - using a switch statement avoids the function call overhead. -- -- This function could be moved into `print_insn_normal', but keeping it -- separate makes clear the interface between `print_insn_normal' and each of -- the handlers. */ -- --void --openrisc_cgen_print_operand (CGEN_CPU_DESC cd, -- int opindex, -- void * xinfo, -- CGEN_FIELDS *fields, -- void const *attrs ATTRIBUTE_UNUSED, -- bfd_vma pc, -- int length) --{ -- disassemble_info *info = (disassemble_info *) xinfo; -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- print_address (cd, info, fields->f_abs26, 0|(1<f_disp26, 0|(1<f_simm16, 0|(1<f_lo16, 0|(1<f_op4, 0, pc, length); -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- print_normal (cd, info, fields->f_op5, 0, pc, length); -- break; -- case OPENRISC_OPERAND_RA : -- print_keyword (cd, info, & openrisc_cgen_opval_h_gr, fields->f_r2, 0); -- break; -- case OPENRISC_OPERAND_RB : -- print_keyword (cd, info, & openrisc_cgen_opval_h_gr, fields->f_r3, 0); -- break; -- case OPENRISC_OPERAND_RD : -- print_keyword (cd, info, & openrisc_cgen_opval_h_gr, fields->f_r1, 0); -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- print_normal (cd, info, fields->f_simm16, 0|(1<f_i16nc, 0|(1<f_uimm16, 0, pc, length); -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- print_normal (cd, info, fields->f_uimm5, 0, pc, length); -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), -- opindex); -- abort (); -- } --} -- --cgen_print_fn * const openrisc_cgen_print_handlers[] = --{ -- print_insn_normal, --}; -- -- --void --openrisc_cgen_init_dis (CGEN_CPU_DESC cd) --{ -- openrisc_cgen_init_opcode_table (cd); -- openrisc_cgen_init_ibld_table (cd); -- cd->print_handlers = & openrisc_cgen_print_handlers[0]; -- cd->print_operand = openrisc_cgen_print_operand; --} -- -- --/* Default print handler. */ -- --static void --print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- void *dis_info, -- long value, -- unsigned int attrs, -- bfd_vma pc ATTRIBUTE_UNUSED, -- int length ATTRIBUTE_UNUSED) --{ -- disassemble_info *info = (disassemble_info *) dis_info; -- -- /* Print the operand as directed by the attributes. */ -- if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) -- ; /* nothing to do */ -- else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) -- (*info->fprintf_func) (info->stream, "%ld", value); -- else -- (*info->fprintf_func) (info->stream, "0x%lx", value); --} -- --/* Default address handler. */ -- --static void --print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- void *dis_info, -- bfd_vma value, -- unsigned int attrs, -- bfd_vma pc ATTRIBUTE_UNUSED, -- int length ATTRIBUTE_UNUSED) --{ -- disassemble_info *info = (disassemble_info *) dis_info; -- -- /* Print the operand as directed by the attributes. */ -- if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) -- ; /* Nothing to do. */ -- else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR)) -- (*info->print_address_func) (value, info); -- else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR)) -- (*info->print_address_func) (value, info); -- else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) -- (*info->fprintf_func) (info->stream, "%ld", (long) value); -- else -- (*info->fprintf_func) (info->stream, "0x%lx", (long) value); --} -- --/* Keyword print handler. */ -- --static void --print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- void *dis_info, -- CGEN_KEYWORD *keyword_table, -- long value, -- unsigned int attrs ATTRIBUTE_UNUSED) --{ -- disassemble_info *info = (disassemble_info *) dis_info; -- const CGEN_KEYWORD_ENTRY *ke; -- -- ke = cgen_keyword_lookup_value (keyword_table, value); -- if (ke != NULL) -- (*info->fprintf_func) (info->stream, "%s", ke->name); -- else -- (*info->fprintf_func) (info->stream, "???"); --} -- --/* Default insn printer. -- -- DIS_INFO is defined as `void *' so the disassembler needn't know anything -- about disassemble_info. */ -- --static void --print_insn_normal (CGEN_CPU_DESC cd, -- void *dis_info, -- const CGEN_INSN *insn, -- CGEN_FIELDS *fields, -- bfd_vma pc, -- int length) --{ -- const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -- disassemble_info *info = (disassemble_info *) dis_info; -- const CGEN_SYNTAX_CHAR_TYPE *syn; -- -- CGEN_INIT_PRINT (cd); -- -- for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) -- { -- if (CGEN_SYNTAX_MNEMONIC_P (*syn)) -- { -- (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn)); -- continue; -- } -- if (CGEN_SYNTAX_CHAR_P (*syn)) -- { -- (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn)); -- continue; -- } -- -- /* We have an operand. */ -- openrisc_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info, -- fields, CGEN_INSN_ATTRS (insn), pc, length); -- } --} -- --/* Subroutine of print_insn. Reads an insn into the given buffers and updates -- the extract info. -- Returns 0 if all is well, non-zero otherwise. */ -- --static int --read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- bfd_vma pc, -- disassemble_info *info, -- bfd_byte *buf, -- int buflen, -- CGEN_EXTRACT_INFO *ex_info, -- unsigned long *insn_value) --{ -- int status = (*info->read_memory_func) (pc, buf, buflen, info); -- -- if (status != 0) -- { -- (*info->memory_error_func) (status, pc, info); -- return -1; -- } -- -- ex_info->dis_info = info; -- ex_info->valid = (1 << buflen) - 1; -- ex_info->insn_bytes = buf; -- -- *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); -- return 0; --} -- --/* Utility to print an insn. -- BUF is the base part of the insn, target byte order, BUFLEN bytes long. -- The result is the size of the insn in bytes or zero for an unknown insn -- or -1 if an error occurs fetching data (memory_error_func will have -- been called). */ -- --static int --print_insn (CGEN_CPU_DESC cd, -- bfd_vma pc, -- disassemble_info *info, -- bfd_byte *buf, -- unsigned int buflen) --{ -- CGEN_INSN_INT insn_value; -- const CGEN_INSN_LIST *insn_list; -- CGEN_EXTRACT_INFO ex_info; -- int basesize; -- -- /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */ -- basesize = cd->base_insn_bitsize < buflen * 8 ? -- cd->base_insn_bitsize : buflen * 8; -- insn_value = cgen_get_insn_value (cd, buf, basesize); -- -- -- /* Fill in ex_info fields like read_insn would. Don't actually call -- read_insn, since the incoming buffer is already read (and possibly -- modified a la m32r). */ -- ex_info.valid = (1 << buflen) - 1; -- ex_info.dis_info = info; -- ex_info.insn_bytes = buf; -- -- /* The instructions are stored in hash lists. -- Pick the first one and keep trying until we find the right one. */ -- -- insn_list = CGEN_DIS_LOOKUP_INSN (cd, (char *) buf, insn_value); -- while (insn_list != NULL) -- { -- const CGEN_INSN *insn = insn_list->insn; -- CGEN_FIELDS fields; -- int length; -- unsigned long insn_value_cropped; -- --#ifdef CGEN_VALIDATE_INSN_SUPPORTED -- /* Not needed as insn shouldn't be in hash lists if not supported. */ -- /* Supported by this cpu? */ -- if (! openrisc_cgen_insn_supported (cd, insn)) -- { -- insn_list = CGEN_DIS_NEXT_INSN (insn_list); -- continue; -- } --#endif -- -- /* Basic bit mask must be correct. */ -- /* ??? May wish to allow target to defer this check until the extract -- handler. */ -- -- /* Base size may exceed this instruction's size. Extract the -- relevant part from the buffer. */ -- if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && -- (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) -- insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn), -- info->endian == BFD_ENDIAN_BIG); -- else -- insn_value_cropped = insn_value; -- -- if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn)) -- == CGEN_INSN_BASE_VALUE (insn)) -- { -- /* Printing is handled in two passes. The first pass parses the -- machine insn and extracts the fields. The second pass prints -- them. */ -- -- /* Make sure the entire insn is loaded into insn_value, if it -- can fit. */ -- if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) && -- (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) -- { -- unsigned long full_insn_value; -- int rc = read_insn (cd, pc, info, buf, -- CGEN_INSN_BITSIZE (insn) / 8, -- & ex_info, & full_insn_value); -- if (rc != 0) -- return rc; -- length = CGEN_EXTRACT_FN (cd, insn) -- (cd, insn, &ex_info, full_insn_value, &fields, pc); -- } -- else -- length = CGEN_EXTRACT_FN (cd, insn) -- (cd, insn, &ex_info, insn_value_cropped, &fields, pc); -- -- /* Length < 0 -> error. */ -- if (length < 0) -- return length; -- if (length > 0) -- { -- CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length); -- /* Length is in bits, result is in bytes. */ -- return length / 8; -- } -- } -- -- insn_list = CGEN_DIS_NEXT_INSN (insn_list); -- } -- -- return 0; --} -- --/* Default value for CGEN_PRINT_INSN. -- The result is the size of the insn in bytes or zero for an unknown insn -- or -1 if an error occured fetching bytes. */ -- --#ifndef CGEN_PRINT_INSN --#define CGEN_PRINT_INSN default_print_insn --#endif -- --static int --default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info) --{ -- bfd_byte buf[CGEN_MAX_INSN_SIZE]; -- int buflen; -- int status; -- -- /* Attempt to read the base part of the insn. */ -- buflen = cd->base_insn_bitsize / 8; -- status = (*info->read_memory_func) (pc, buf, buflen, info); -- -- /* Try again with the minimum part, if min < base. */ -- if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize)) -- { -- buflen = cd->min_insn_bitsize / 8; -- status = (*info->read_memory_func) (pc, buf, buflen, info); -- } -- -- if (status != 0) -- { -- (*info->memory_error_func) (status, pc, info); -- return -1; -- } -- -- return print_insn (cd, pc, info, buf, buflen); --} -- --/* Main entry point. -- Print one instruction from PC on INFO->STREAM. -- Return the size of the instruction (in bytes). */ -- --typedef struct cpu_desc_list --{ -- struct cpu_desc_list *next; -- CGEN_BITSET *isa; -- int mach; -- int endian; -- CGEN_CPU_DESC cd; --} cpu_desc_list; -- --int --print_insn_openrisc (bfd_vma pc, disassemble_info *info) --{ -- static cpu_desc_list *cd_list = 0; -- cpu_desc_list *cl = 0; -- static CGEN_CPU_DESC cd = 0; -- static CGEN_BITSET *prev_isa; -- static int prev_mach; -- static int prev_endian; -- int length; -- CGEN_BITSET *isa; -- int mach; -- int endian = (info->endian == BFD_ENDIAN_BIG -- ? CGEN_ENDIAN_BIG -- : CGEN_ENDIAN_LITTLE); -- enum bfd_architecture arch; -- -- /* ??? gdb will set mach but leave the architecture as "unknown" */ --#ifndef CGEN_BFD_ARCH --#define CGEN_BFD_ARCH bfd_arch_openrisc --#endif -- arch = info->arch; -- if (arch == bfd_arch_unknown) -- arch = CGEN_BFD_ARCH; -- -- /* There's no standard way to compute the machine or isa number -- so we leave it to the target. */ --#ifdef CGEN_COMPUTE_MACH -- mach = CGEN_COMPUTE_MACH (info); --#else -- mach = info->mach; --#endif -- --#ifdef CGEN_COMPUTE_ISA -- { -- static CGEN_BITSET *permanent_isa; -- -- if (!permanent_isa) -- permanent_isa = cgen_bitset_create (MAX_ISAS); -- isa = permanent_isa; -- cgen_bitset_clear (isa); -- cgen_bitset_add (isa, CGEN_COMPUTE_ISA (info)); -- } --#else -- isa = info->insn_sets; --#endif -- -- /* If we've switched cpu's, try to find a handle we've used before */ -- if (cd -- && (cgen_bitset_compare (isa, prev_isa) != 0 -- || mach != prev_mach -- || endian != prev_endian)) -- { -- cd = 0; -- for (cl = cd_list; cl; cl = cl->next) -- { -- if (cgen_bitset_compare (cl->isa, isa) == 0 && -- cl->mach == mach && -- cl->endian == endian) -- { -- cd = cl->cd; -- prev_isa = cd->isas; -- break; -- } -- } -- } -- -- /* If we haven't initialized yet, initialize the opcode table. */ -- if (! cd) -- { -- const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach); -- const char *mach_name; -- -- if (!arch_type) -- abort (); -- mach_name = arch_type->printable_name; -- -- prev_isa = cgen_bitset_copy (isa); -- prev_mach = mach; -- prev_endian = endian; -- cd = openrisc_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa, -- CGEN_CPU_OPEN_BFDMACH, mach_name, -- CGEN_CPU_OPEN_ENDIAN, prev_endian, -- CGEN_CPU_OPEN_END); -- if (!cd) -- abort (); -- -- /* Save this away for future reference. */ -- cl = xmalloc (sizeof (struct cpu_desc_list)); -- cl->cd = cd; -- cl->isa = prev_isa; -- cl->mach = mach; -- cl->endian = endian; -- cl->next = cd_list; -- cd_list = cl; -- -- openrisc_cgen_init_dis (cd); -- } -- -- /* We try to have as much common code as possible. -- But at this point some targets need to take over. */ -- /* ??? Some targets may need a hook elsewhere. Try to avoid this, -- but if not possible try to move this hook elsewhere rather than -- have two hooks. */ -- length = CGEN_PRINT_INSN (cd, pc, info); -- if (length > 0) -- return length; -- if (length < 0) -- return -1; -- -- (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG); -- return cd->default_insn_bitsize / 8; --} -diff -rNU3 dist.orig/opcodes/openrisc-ibld.c dist/opcodes/openrisc-ibld.c ---- dist.orig/opcodes/openrisc-ibld.c 2010-01-07 19:05:45.000000000 +0100 -+++ dist/opcodes/openrisc-ibld.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1009 +0,0 @@ --/* Instruction building/extraction support for openrisc. -*- C -*- -- -- THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. -- - the resultant file is machine generated, cgen-ibld.in isn't -- -- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006, 2007, -- 2008, 2010 Free Software Foundation, Inc. -- -- This file is part of libopcodes. -- -- This library 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, or (at your option) -- any later version. -- -- It 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. */ -- --/* ??? Eventually more and more of this stuff can go to cpu-independent files. -- Keep that in mind. */ -- --#include "sysdep.h" --#include --#include "ansidecl.h" --#include "dis-asm.h" --#include "bfd.h" --#include "symcat.h" --#include "openrisc-desc.h" --#include "openrisc-opc.h" --#include "cgen/basic-modes.h" --#include "opintl.h" --#include "safe-ctype.h" -- --#undef min --#define min(a,b) ((a) < (b) ? (a) : (b)) --#undef max --#define max(a,b) ((a) > (b) ? (a) : (b)) -- --/* Used by the ifield rtx function. */ --#define FLD(f) (fields->f) -- --static const char * insert_normal -- (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int, -- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR); --static const char * insert_insn_normal -- (CGEN_CPU_DESC, const CGEN_INSN *, -- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma); --static int extract_normal -- (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, -- unsigned int, unsigned int, unsigned int, unsigned int, -- unsigned int, unsigned int, bfd_vma, long *); --static int extract_insn_normal -- (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *, -- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma); --#if CGEN_INT_INSN_P --static void put_insn_int_value -- (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT); --#endif --#if ! CGEN_INT_INSN_P --static CGEN_INLINE void insert_1 -- (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *); --static CGEN_INLINE int fill_cache -- (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma); --static CGEN_INLINE long extract_1 -- (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma); --#endif -- --/* Operand insertion. */ -- --#if ! CGEN_INT_INSN_P -- --/* Subroutine of insert_normal. */ -- --static CGEN_INLINE void --insert_1 (CGEN_CPU_DESC cd, -- unsigned long value, -- int start, -- int length, -- int word_length, -- unsigned char *bufp) --{ -- unsigned long x,mask; -- int shift; -- -- x = cgen_get_insn_value (cd, bufp, word_length); -- -- /* Written this way to avoid undefined behaviour. */ -- mask = (((1L << (length - 1)) - 1) << 1) | 1; -- if (CGEN_INSN_LSB0_P) -- shift = (start + 1) - length; -- else -- shift = (word_length - (start + length)); -- x = (x & ~(mask << shift)) | ((value & mask) << shift); -- -- cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x); --} -- --#endif /* ! CGEN_INT_INSN_P */ -- --/* Default insertion routine. -- -- ATTRS is a mask of the boolean attributes. -- WORD_OFFSET is the offset in bits from the start of the insn of the value. -- WORD_LENGTH is the length of the word in bits in which the value resides. -- START is the starting bit number in the word, architecture origin. -- LENGTH is the length of VALUE in bits. -- TOTAL_LENGTH is the total length of the insn in bits. -- -- The result is an error message or NULL if success. */ -- --/* ??? This duplicates functionality with bfd's howto table and -- bfd_install_relocation. */ --/* ??? This doesn't handle bfd_vma's. Create another function when -- necessary. */ -- --static const char * --insert_normal (CGEN_CPU_DESC cd, -- long value, -- unsigned int attrs, -- unsigned int word_offset, -- unsigned int start, -- unsigned int length, -- unsigned int word_length, -- unsigned int total_length, -- CGEN_INSN_BYTES_PTR buffer) --{ -- static char errbuf[100]; -- /* Written this way to avoid undefined behaviour. */ -- unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1; -- -- /* If LENGTH is zero, this operand doesn't contribute to the value. */ -- if (length == 0) -- return NULL; -- -- if (word_length > 8 * sizeof (CGEN_INSN_INT)) -- abort (); -- -- /* For architectures with insns smaller than the base-insn-bitsize, -- word_length may be too big. */ -- if (cd->min_insn_bitsize < cd->base_insn_bitsize) -- { -- if (word_offset == 0 -- && word_length > total_length) -- word_length = total_length; -- } -- -- /* Ensure VALUE will fit. */ -- if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT)) -- { -- long minval = - (1L << (length - 1)); -- unsigned long maxval = mask; -- -- if ((value > 0 && (unsigned long) value > maxval) -- || value < minval) -- { -- /* xgettext:c-format */ -- sprintf (errbuf, -- _("operand out of range (%ld not between %ld and %lu)"), -- value, minval, maxval); -- return errbuf; -- } -- } -- else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)) -- { -- unsigned long maxval = mask; -- unsigned long val = (unsigned long) value; -- -- /* For hosts with a word size > 32 check to see if value has been sign -- extended beyond 32 bits. If so then ignore these higher sign bits -- as the user is attempting to store a 32-bit signed value into an -- unsigned 32-bit field which is allowed. */ -- if (sizeof (unsigned long) > 4 && ((value >> 32) == -1)) -- val &= 0xFFFFFFFF; -- -- if (val > maxval) -- { -- /* xgettext:c-format */ -- sprintf (errbuf, -- _("operand out of range (0x%lx not between 0 and 0x%lx)"), -- val, maxval); -- return errbuf; -- } -- } -- else -- { -- if (! cgen_signed_overflow_ok_p (cd)) -- { -- long minval = - (1L << (length - 1)); -- long maxval = (1L << (length - 1)) - 1; -- -- if (value < minval || value > maxval) -- { -- sprintf -- /* xgettext:c-format */ -- (errbuf, _("operand out of range (%ld not between %ld and %ld)"), -- value, minval, maxval); -- return errbuf; -- } -- } -- } -- --#if CGEN_INT_INSN_P -- -- { -- int shift; -- -- if (CGEN_INSN_LSB0_P) -- shift = (word_offset + start + 1) - length; -- else -- shift = total_length - (word_offset + start + length); -- *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift); -- } -- --#else /* ! CGEN_INT_INSN_P */ -- -- { -- unsigned char *bufp = (unsigned char *) buffer + word_offset / 8; -- -- insert_1 (cd, value, start, length, word_length, bufp); -- } -- --#endif /* ! CGEN_INT_INSN_P */ -- -- return NULL; --} -- --/* Default insn builder (insert handler). -- The instruction is recorded in CGEN_INT_INSN_P byte order (meaning -- that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is -- recorded in host byte order, otherwise BUFFER is an array of bytes -- and the value is recorded in target byte order). -- The result is an error message or NULL if success. */ -- --static const char * --insert_insn_normal (CGEN_CPU_DESC cd, -- const CGEN_INSN * insn, -- CGEN_FIELDS * fields, -- CGEN_INSN_BYTES_PTR buffer, -- bfd_vma pc) --{ -- const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -- unsigned long value; -- const CGEN_SYNTAX_CHAR_TYPE * syn; -- -- CGEN_INIT_INSERT (cd); -- value = CGEN_INSN_BASE_VALUE (insn); -- -- /* If we're recording insns as numbers (rather than a string of bytes), -- target byte order handling is deferred until later. */ -- --#if CGEN_INT_INSN_P -- -- put_insn_int_value (cd, buffer, cd->base_insn_bitsize, -- CGEN_FIELDS_BITSIZE (fields), value); -- --#else -- -- cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize, -- (unsigned) CGEN_FIELDS_BITSIZE (fields)), -- value); -- --#endif /* ! CGEN_INT_INSN_P */ -- -- /* ??? It would be better to scan the format's fields. -- Still need to be able to insert a value based on the operand though; -- e.g. storing a branch displacement that got resolved later. -- Needs more thought first. */ -- -- for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn) -- { -- const char *errmsg; -- -- if (CGEN_SYNTAX_CHAR_P (* syn)) -- continue; -- -- errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn), -- fields, buffer, pc); -- if (errmsg) -- return errmsg; -- } -- -- return NULL; --} -- --#if CGEN_INT_INSN_P --/* Cover function to store an insn value into an integral insn. Must go here -- because it needs -desc.h for CGEN_INT_INSN_P. */ -- --static void --put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- CGEN_INSN_BYTES_PTR buf, -- int length, -- int insn_length, -- CGEN_INSN_INT value) --{ -- /* For architectures with insns smaller than the base-insn-bitsize, -- length may be too big. */ -- if (length > insn_length) -- *buf = value; -- else -- { -- int shift = insn_length - length; -- /* Written this way to avoid undefined behaviour. */ -- CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1; -- -- *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift); -- } --} --#endif -- --/* Operand extraction. */ -- --#if ! CGEN_INT_INSN_P -- --/* Subroutine of extract_normal. -- Ensure sufficient bytes are cached in EX_INFO. -- OFFSET is the offset in bytes from the start of the insn of the value. -- BYTES is the length of the needed value. -- Returns 1 for success, 0 for failure. */ -- --static CGEN_INLINE int --fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- CGEN_EXTRACT_INFO *ex_info, -- int offset, -- int bytes, -- bfd_vma pc) --{ -- /* It's doubtful that the middle part has already been fetched so -- we don't optimize that case. kiss. */ -- unsigned int mask; -- disassemble_info *info = (disassemble_info *) ex_info->dis_info; -- -- /* First do a quick check. */ -- mask = (1 << bytes) - 1; -- if (((ex_info->valid >> offset) & mask) == mask) -- return 1; -- -- /* Search for the first byte we need to read. */ -- for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1) -- if (! (mask & ex_info->valid)) -- break; -- -- if (bytes) -- { -- int status; -- -- pc += offset; -- status = (*info->read_memory_func) -- (pc, ex_info->insn_bytes + offset, bytes, info); -- -- if (status != 0) -- { -- (*info->memory_error_func) (status, pc, info); -- return 0; -- } -- -- ex_info->valid |= ((1 << bytes) - 1) << offset; -- } -- -- return 1; --} -- --/* Subroutine of extract_normal. */ -- --static CGEN_INLINE long --extract_1 (CGEN_CPU_DESC cd, -- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED, -- int start, -- int length, -- int word_length, -- unsigned char *bufp, -- bfd_vma pc ATTRIBUTE_UNUSED) --{ -- unsigned long x; -- int shift; -- -- x = cgen_get_insn_value (cd, bufp, word_length); -- -- if (CGEN_INSN_LSB0_P) -- shift = (start + 1) - length; -- else -- shift = (word_length - (start + length)); -- return x >> shift; --} -- --#endif /* ! CGEN_INT_INSN_P */ -- --/* Default extraction routine. -- -- INSN_VALUE is the first base_insn_bitsize bits of the insn in host order, -- or sometimes less for cases like the m32r where the base insn size is 32 -- but some insns are 16 bits. -- ATTRS is a mask of the boolean attributes. We only need `SIGNED', -- but for generality we take a bitmask of all of them. -- WORD_OFFSET is the offset in bits from the start of the insn of the value. -- WORD_LENGTH is the length of the word in bits in which the value resides. -- START is the starting bit number in the word, architecture origin. -- LENGTH is the length of VALUE in bits. -- TOTAL_LENGTH is the total length of the insn in bits. -- -- Returns 1 for success, 0 for failure. */ -- --/* ??? The return code isn't properly used. wip. */ -- --/* ??? This doesn't handle bfd_vma's. Create another function when -- necessary. */ -- --static int --extract_normal (CGEN_CPU_DESC cd, --#if ! CGEN_INT_INSN_P -- CGEN_EXTRACT_INFO *ex_info, --#else -- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED, --#endif -- CGEN_INSN_INT insn_value, -- unsigned int attrs, -- unsigned int word_offset, -- unsigned int start, -- unsigned int length, -- unsigned int word_length, -- unsigned int total_length, --#if ! CGEN_INT_INSN_P -- bfd_vma pc, --#else -- bfd_vma pc ATTRIBUTE_UNUSED, --#endif -- long *valuep) --{ -- long value, mask; -- -- /* If LENGTH is zero, this operand doesn't contribute to the value -- so give it a standard value of zero. */ -- if (length == 0) -- { -- *valuep = 0; -- return 1; -- } -- -- if (word_length > 8 * sizeof (CGEN_INSN_INT)) -- abort (); -- -- /* For architectures with insns smaller than the insn-base-bitsize, -- word_length may be too big. */ -- if (cd->min_insn_bitsize < cd->base_insn_bitsize) -- { -- if (word_offset + word_length > total_length) -- word_length = total_length - word_offset; -- } -- -- /* Does the value reside in INSN_VALUE, and at the right alignment? */ -- -- if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length)) -- { -- if (CGEN_INSN_LSB0_P) -- value = insn_value >> ((word_offset + start + 1) - length); -- else -- value = insn_value >> (total_length - ( word_offset + start + length)); -- } -- --#if ! CGEN_INT_INSN_P -- -- else -- { -- unsigned char *bufp = ex_info->insn_bytes + word_offset / 8; -- -- if (word_length > 8 * sizeof (CGEN_INSN_INT)) -- abort (); -- -- if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0) -- return 0; -- -- value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc); -- } -- --#endif /* ! CGEN_INT_INSN_P */ -- -- /* Written this way to avoid undefined behaviour. */ -- mask = (((1L << (length - 1)) - 1) << 1) | 1; -- -- value &= mask; -- /* sign extend? */ -- if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED) -- && (value & (1L << (length - 1)))) -- value |= ~mask; -- -- *valuep = value; -- -- return 1; --} -- --/* Default insn extractor. -- -- INSN_VALUE is the first base_insn_bitsize bits, translated to host order. -- The extracted fields are stored in FIELDS. -- EX_INFO is used to handle reading variable length insns. -- Return the length of the insn in bits, or 0 if no match, -- or -1 if an error occurs fetching data (memory_error_func will have -- been called). */ -- --static int --extract_insn_normal (CGEN_CPU_DESC cd, -- const CGEN_INSN *insn, -- CGEN_EXTRACT_INFO *ex_info, -- CGEN_INSN_INT insn_value, -- CGEN_FIELDS *fields, -- bfd_vma pc) --{ -- const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -- const CGEN_SYNTAX_CHAR_TYPE *syn; -- -- CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); -- -- CGEN_INIT_EXTRACT (cd); -- -- for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) -- { -- int length; -- -- if (CGEN_SYNTAX_CHAR_P (*syn)) -- continue; -- -- length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn), -- ex_info, insn_value, fields, pc); -- if (length <= 0) -- return length; -- } -- -- /* We recognized and successfully extracted this insn. */ -- return CGEN_INSN_BITSIZE (insn); --} -- --/* Machine generated code added here. */ -- --const char * openrisc_cgen_insert_operand -- (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma); -- --/* Main entry point for operand insertion. -- -- This function is basically just a big switch statement. Earlier versions -- used tables to look up the function to use, but -- - if the table contains both assembler and disassembler functions then -- the disassembler contains much of the assembler and vice-versa, -- - there's a lot of inlining possibilities as things grow, -- - using a switch statement avoids the function call overhead. -- -- This function could be moved into `parse_insn_normal', but keeping it -- separate makes clear the interface between `parse_insn_normal' and each of -- the handlers. It's also needed by GAS to insert operands that couldn't be -- resolved during parsing. */ -- --const char * --openrisc_cgen_insert_operand (CGEN_CPU_DESC cd, -- int opindex, -- CGEN_FIELDS * fields, -- CGEN_INSN_BYTES_PTR buffer, -- bfd_vma pc ATTRIBUTE_UNUSED) --{ -- const char * errmsg = NULL; -- unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- { -- long value = fields->f_abs26; -- value = ((SI) (pc) >> (2)); -- errmsg = insert_normal (cd, value, 0|(1<f_disp26; -- value = ((SI) (((value) - (pc))) >> (2)); -- errmsg = insert_normal (cd, value, 0|(1<f_simm16, 0|(1<f_lo16, 0|(1<f_op4, 0, 0, 23, 3, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- errmsg = insert_normal (cd, fields->f_op5, 0, 0, 25, 5, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_RA : -- errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_RB : -- errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_RD : -- errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- errmsg = insert_normal (cd, fields->f_simm16, 0|(1<> (11))) & (31)); -- FLD (f_i16_1) = ((FLD (f_i16nc)) & (2047)); --} -- errmsg = insert_normal (cd, fields->f_i16_1, 0, 0, 10, 11, 32, total_length, buffer); -- if (errmsg) -- break; -- errmsg = insert_normal (cd, fields->f_i16_2, 0, 0, 25, 5, 32, total_length, buffer); -- if (errmsg) -- break; -- } -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- errmsg = insert_normal (cd, fields->f_uimm16, 0, 0, 15, 16, 32, total_length, buffer); -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- errmsg = insert_normal (cd, fields->f_uimm5, 0, 0, 4, 5, 32, total_length, buffer); -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while building insn.\n"), -- opindex); -- abort (); -- } -- -- return errmsg; --} -- --int openrisc_cgen_extract_operand -- (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma); -- --/* Main entry point for operand extraction. -- The result is <= 0 for error, >0 for success. -- ??? Actual values aren't well defined right now. -- -- This function is basically just a big switch statement. Earlier versions -- used tables to look up the function to use, but -- - if the table contains both assembler and disassembler functions then -- the disassembler contains much of the assembler and vice-versa, -- - there's a lot of inlining possibilities as things grow, -- - using a switch statement avoids the function call overhead. -- -- This function could be moved into `print_insn_normal', but keeping it -- separate makes clear the interface between `print_insn_normal' and each of -- the handlers. */ -- --int --openrisc_cgen_extract_operand (CGEN_CPU_DESC cd, -- int opindex, -- CGEN_EXTRACT_INFO *ex_info, -- CGEN_INSN_INT insn_value, -- CGEN_FIELDS * fields, -- bfd_vma pc) --{ -- /* Assume success (for those operands that are nops). */ -- int length = 1; -- unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- { -- long value; -- length = extract_normal (cd, ex_info, insn_value, 0|(1<f_abs26 = value; -- } -- break; -- case OPENRISC_OPERAND_DISP_26 : -- { -- long value; -- length = extract_normal (cd, ex_info, insn_value, 0|(1<f_disp26 = value; -- } -- break; -- case OPENRISC_OPERAND_HI16 : -- length = extract_normal (cd, ex_info, insn_value, 0|(1<f_simm16); -- break; -- case OPENRISC_OPERAND_LO16 : -- length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lo16); -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 23, 3, 32, total_length, pc, & fields->f_op4); -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_op5); -- break; -- case OPENRISC_OPERAND_RA : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); -- break; -- case OPENRISC_OPERAND_RB : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); -- break; -- case OPENRISC_OPERAND_RD : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- length = extract_normal (cd, ex_info, insn_value, 0|(1<f_simm16); -- break; -- case OPENRISC_OPERAND_UI16NC : -- { -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 11, 32, total_length, pc, & fields->f_i16_1); -- if (length <= 0) break; -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_i16_2); -- if (length <= 0) break; --{ -- FLD (f_i16nc) = openrisc_sign_extend_16bit (((((FLD (f_i16_2)) << (11))) | (FLD (f_i16_1)))); --} -- } -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_uimm16); -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 5, 32, total_length, pc, & fields->f_uimm5); -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), -- opindex); -- abort (); -- } -- -- return length; --} -- --cgen_insert_fn * const openrisc_cgen_insert_handlers[] = --{ -- insert_insn_normal, --}; -- --cgen_extract_fn * const openrisc_cgen_extract_handlers[] = --{ -- extract_insn_normal, --}; -- --int openrisc_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *); --bfd_vma openrisc_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *); -- --/* Getting values from cgen_fields is handled by a collection of functions. -- They are distinguished by the type of the VALUE argument they return. -- TODO: floating point, inlining support, remove cases where result type -- not appropriate. */ -- --int --openrisc_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- int opindex, -- const CGEN_FIELDS * fields) --{ -- int value; -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- value = fields->f_abs26; -- break; -- case OPENRISC_OPERAND_DISP_26 : -- value = fields->f_disp26; -- break; -- case OPENRISC_OPERAND_HI16 : -- value = fields->f_simm16; -- break; -- case OPENRISC_OPERAND_LO16 : -- value = fields->f_lo16; -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- value = fields->f_op4; -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- value = fields->f_op5; -- break; -- case OPENRISC_OPERAND_RA : -- value = fields->f_r2; -- break; -- case OPENRISC_OPERAND_RB : -- value = fields->f_r3; -- break; -- case OPENRISC_OPERAND_RD : -- value = fields->f_r1; -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- value = fields->f_simm16; -- break; -- case OPENRISC_OPERAND_UI16NC : -- value = fields->f_i16nc; -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- value = fields->f_uimm16; -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- value = fields->f_uimm5; -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), -- opindex); -- abort (); -- } -- -- return value; --} -- --bfd_vma --openrisc_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- int opindex, -- const CGEN_FIELDS * fields) --{ -- bfd_vma value; -- -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- value = fields->f_abs26; -- break; -- case OPENRISC_OPERAND_DISP_26 : -- value = fields->f_disp26; -- break; -- case OPENRISC_OPERAND_HI16 : -- value = fields->f_simm16; -- break; -- case OPENRISC_OPERAND_LO16 : -- value = fields->f_lo16; -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- value = fields->f_op4; -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- value = fields->f_op5; -- break; -- case OPENRISC_OPERAND_RA : -- value = fields->f_r2; -- break; -- case OPENRISC_OPERAND_RB : -- value = fields->f_r3; -- break; -- case OPENRISC_OPERAND_RD : -- value = fields->f_r1; -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- value = fields->f_simm16; -- break; -- case OPENRISC_OPERAND_UI16NC : -- value = fields->f_i16nc; -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- value = fields->f_uimm16; -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- value = fields->f_uimm5; -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), -- opindex); -- abort (); -- } -- -- return value; --} -- --void openrisc_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int); --void openrisc_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma); -- --/* Stuffing values in cgen_fields is handled by a collection of functions. -- They are distinguished by the type of the VALUE argument they accept. -- TODO: floating point, inlining support, remove cases where argument type -- not appropriate. */ -- --void --openrisc_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- int opindex, -- CGEN_FIELDS * fields, -- int value) --{ -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- fields->f_abs26 = value; -- break; -- case OPENRISC_OPERAND_DISP_26 : -- fields->f_disp26 = value; -- break; -- case OPENRISC_OPERAND_HI16 : -- fields->f_simm16 = value; -- break; -- case OPENRISC_OPERAND_LO16 : -- fields->f_lo16 = value; -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- fields->f_op4 = value; -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- fields->f_op5 = value; -- break; -- case OPENRISC_OPERAND_RA : -- fields->f_r2 = value; -- break; -- case OPENRISC_OPERAND_RB : -- fields->f_r3 = value; -- break; -- case OPENRISC_OPERAND_RD : -- fields->f_r1 = value; -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- fields->f_simm16 = value; -- break; -- case OPENRISC_OPERAND_UI16NC : -- fields->f_i16nc = value; -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- fields->f_uimm16 = value; -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- fields->f_uimm5 = value; -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), -- opindex); -- abort (); -- } --} -- --void --openrisc_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -- int opindex, -- CGEN_FIELDS * fields, -- bfd_vma value) --{ -- switch (opindex) -- { -- case OPENRISC_OPERAND_ABS_26 : -- fields->f_abs26 = value; -- break; -- case OPENRISC_OPERAND_DISP_26 : -- fields->f_disp26 = value; -- break; -- case OPENRISC_OPERAND_HI16 : -- fields->f_simm16 = value; -- break; -- case OPENRISC_OPERAND_LO16 : -- fields->f_lo16 = value; -- break; -- case OPENRISC_OPERAND_OP_F_23 : -- fields->f_op4 = value; -- break; -- case OPENRISC_OPERAND_OP_F_3 : -- fields->f_op5 = value; -- break; -- case OPENRISC_OPERAND_RA : -- fields->f_r2 = value; -- break; -- case OPENRISC_OPERAND_RB : -- fields->f_r3 = value; -- break; -- case OPENRISC_OPERAND_RD : -- fields->f_r1 = value; -- break; -- case OPENRISC_OPERAND_SIMM_16 : -- fields->f_simm16 = value; -- break; -- case OPENRISC_OPERAND_UI16NC : -- fields->f_i16nc = value; -- break; -- case OPENRISC_OPERAND_UIMM_16 : -- fields->f_uimm16 = value; -- break; -- case OPENRISC_OPERAND_UIMM_5 : -- fields->f_uimm5 = value; -- break; -- -- default : -- /* xgettext:c-format */ -- fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), -- opindex); -- abort (); -- } --} -- --/* Function to call before using the instruction builder tables. */ -- --void --openrisc_cgen_init_ibld_table (CGEN_CPU_DESC cd) --{ -- cd->insert_handlers = & openrisc_cgen_insert_handlers[0]; -- cd->extract_handlers = & openrisc_cgen_extract_handlers[0]; -- -- cd->insert_operand = openrisc_cgen_insert_operand; -- cd->extract_operand = openrisc_cgen_extract_operand; -- -- cd->get_int_operand = openrisc_cgen_get_int_operand; -- cd->set_int_operand = openrisc_cgen_set_int_operand; -- cd->get_vma_operand = openrisc_cgen_get_vma_operand; -- cd->set_vma_operand = openrisc_cgen_set_vma_operand; --} -diff -rNU3 dist.orig/opcodes/openrisc-opc.c dist/opcodes/openrisc-opc.c ---- dist.orig/opcodes/openrisc-opc.c 2010-02-12 04:25:49.000000000 +0100 -+++ dist/opcodes/openrisc-opc.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,682 +0,0 @@ --/* Instruction opcode table for openrisc. -- --THIS FILE IS MACHINE GENERATED WITH CGEN. -- --Copyright 1996-2010 Free Software Foundation, Inc. -- --This file is part of the GNU Binutils and/or GDB, the GNU debugger. -- -- 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 -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -- -- It 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 "ansidecl.h" --#include "bfd.h" --#include "symcat.h" --#include "openrisc-desc.h" --#include "openrisc-opc.h" --#include "libiberty.h" -- --/* -- opc.c */ --/* -- */ --/* The hash functions are recorded here to help keep assembler code out of -- the disassembler and vice versa. */ -- --static int asm_hash_insn_p (const CGEN_INSN *); --static unsigned int asm_hash_insn (const char *); --static int dis_hash_insn_p (const CGEN_INSN *); --static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT); -- --/* Instruction formats. */ -- --#define F(f) & openrisc_cgen_ifld_table[OPENRISC_##f] --static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { -- 0, 0, 0x0, { { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_j ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_ABS26) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_jr ATTRIBUTE_UNUSED = { -- 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP3) }, { F (F_OP4) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_bal ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_DISP26) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_movhi ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_mfsr ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_mtsr ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_I16_1) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_lw ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_sw ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R3) }, { F (F_I16NC) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_sll ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_3) }, { F (F_OP6) }, { F (F_F_4_1) }, { F (F_OP7) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_slli ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc00ffe0, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_F_15_8) }, { F (F_OP6) }, { F (F_UIMM5) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_add ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_7) }, { F (F_OP7) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_addi ATTRIBUTE_UNUSED = { -- 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_LO16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_sfgts ATTRIBUTE_UNUSED = { -- 32, 32, 0xffe007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_11) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_sfgtsi ATTRIBUTE_UNUSED = { -- 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } --}; -- --static const CGEN_IFMT ifmt_l_sfgtui ATTRIBUTE_UNUSED = { -- 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } --}; -- --#undef F -- --#define A(a) (1 << CGEN_INSN_##a) --#define OPERAND(op) OPENRISC_OPERAND_##op --#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ --#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) -- --/* The instruction table. */ -- --static const CGEN_OPCODE openrisc_cgen_insn_opcode_table[MAX_INSNS] = --{ -- /* Special null first entry. -- A `num' value of zero is thus invalid. -- Also, the special `invalid' insn resides here. */ -- { { 0, 0, 0, 0 }, {{0}}, 0, {0}}, --/* l.j ${abs-26} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (ABS_26), 0 } }, -- & ifmt_l_j, { 0x0 } -- }, --/* l.jal ${abs-26} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (ABS_26), 0 } }, -- & ifmt_l_j, { 0x4000000 } -- }, --/* l.jr $rA */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), 0 } }, -- & ifmt_l_jr, { 0x14000000 } -- }, --/* l.jalr $rA */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), 0 } }, -- & ifmt_l_jr, { 0x14200000 } -- }, --/* l.bal ${disp-26} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (DISP_26), 0 } }, -- & ifmt_l_bal, { 0x8000000 } -- }, --/* l.bnf ${disp-26} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (DISP_26), 0 } }, -- & ifmt_l_bal, { 0xc000000 } -- }, --/* l.bf ${disp-26} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (DISP_26), 0 } }, -- & ifmt_l_bal, { 0x10000000 } -- }, --/* l.brk ${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (UIMM_16), 0 } }, -- & ifmt_l_jr, { 0x17000000 } -- }, --/* l.rfe $rA */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), 0 } }, -- & ifmt_l_jr, { 0x14400000 } -- }, --/* l.sys ${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (UIMM_16), 0 } }, -- & ifmt_l_jr, { 0x16000000 } -- }, --/* l.nop */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, 0 } }, -- & ifmt_l_jr, { 0x15000000 } -- }, --/* l.movhi $rD,$hi16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (HI16), 0 } }, -- & ifmt_l_movhi, { 0x18000000 } -- }, --/* l.mfsr $rD,$rA */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -- & ifmt_l_mfsr, { 0x1c000000 } -- }, --/* l.mtsr $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_mtsr, { 0x40000000 } -- }, --/* l.lw $rD,${simm-16}($rA) */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (SIMM_16), '(', OP (RA), ')', 0 } }, -- & ifmt_l_lw, { 0x80000000 } -- }, --/* l.lbz $rD,${simm-16}($rA) */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (SIMM_16), '(', OP (RA), ')', 0 } }, -- & ifmt_l_lw, { 0x84000000 } -- }, --/* l.lbs $rD,${simm-16}($rA) */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (SIMM_16), '(', OP (RA), ')', 0 } }, -- & ifmt_l_lw, { 0x88000000 } -- }, --/* l.lhz $rD,${simm-16}($rA) */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (SIMM_16), '(', OP (RA), ')', 0 } }, -- & ifmt_l_lw, { 0x8c000000 } -- }, --/* l.lhs $rD,${simm-16}($rA) */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (SIMM_16), '(', OP (RA), ')', 0 } }, -- & ifmt_l_lw, { 0x90000000 } -- }, --/* l.sw ${ui16nc}($rA),$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (UI16NC), '(', OP (RA), ')', ',', OP (RB), 0 } }, -- & ifmt_l_sw, { 0xd4000000 } -- }, --/* l.sb ${ui16nc}($rA),$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (UI16NC), '(', OP (RA), ')', ',', OP (RB), 0 } }, -- & ifmt_l_sw, { 0xd8000000 } -- }, --/* l.sh ${ui16nc}($rA),$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (UI16NC), '(', OP (RA), ')', ',', OP (RB), 0 } }, -- & ifmt_l_sw, { 0xdc000000 } -- }, --/* l.sll $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sll, { 0xe0000008 } -- }, --/* l.slli $rD,$rA,${uimm-5} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM_5), 0 } }, -- & ifmt_l_slli, { 0xb4000000 } -- }, --/* l.srl $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sll, { 0xe0000028 } -- }, --/* l.srli $rD,$rA,${uimm-5} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM_5), 0 } }, -- & ifmt_l_slli, { 0xb4000020 } -- }, --/* l.sra $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sll, { 0xe0000048 } -- }, --/* l.srai $rD,$rA,${uimm-5} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM_5), 0 } }, -- & ifmt_l_slli, { 0xb4000040 } -- }, --/* l.ror $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sll, { 0xe0000088 } -- }, --/* l.rori $rD,$rA,${uimm-5} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM_5), 0 } }, -- & ifmt_l_slli, { 0xb4000080 } -- }, --/* l.add $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000000 } -- }, --/* l.addi $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0x94000000 } -- }, --/* l.sub $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000002 } -- }, --/* l.subi $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0x9c000000 } -- }, --/* l.and $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000003 } -- }, --/* l.andi $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0xa0000000 } -- }, --/* l.or $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000004 } -- }, --/* l.ori $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0xa4000000 } -- }, --/* l.xor $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000005 } -- }, --/* l.xori $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0xa8000000 } -- }, --/* l.mul $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000006 } -- }, --/* l.muli $rD,$rA,$lo16 */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (LO16), 0 } }, -- & ifmt_l_addi, { 0xac000000 } -- }, --/* l.div $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe0000009 } -- }, --/* l.divu $rD,$rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_add, { 0xe000000a } -- }, --/* l.sfgts $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4c00000 } -- }, --/* l.sfgtu $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4400000 } -- }, --/* l.sfges $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4e00000 } -- }, --/* l.sfgeu $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4600000 } -- }, --/* l.sflts $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe5000000 } -- }, --/* l.sfltu $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4800000 } -- }, --/* l.sfles $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe5200000 } -- }, --/* l.sfleu $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4a00000 } -- }, --/* l.sfgtsi $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb8c00000 } -- }, --/* l.sfgtui $rA,${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (UIMM_16), 0 } }, -- & ifmt_l_sfgtui, { 0xb8400000 } -- }, --/* l.sfgesi $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb8e00000 } -- }, --/* l.sfgeui $rA,${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (UIMM_16), 0 } }, -- & ifmt_l_sfgtui, { 0xb8600000 } -- }, --/* l.sfltsi $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb9000000 } -- }, --/* l.sfltui $rA,${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (UIMM_16), 0 } }, -- & ifmt_l_sfgtui, { 0xb8800000 } -- }, --/* l.sflesi $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb9200000 } -- }, --/* l.sfleui $rA,${uimm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (UIMM_16), 0 } }, -- & ifmt_l_sfgtui, { 0xb8a00000 } -- }, --/* l.sfeq $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4000000 } -- }, --/* l.sfeqi $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb8000000 } -- }, --/* l.sfne $rA,$rB */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -- & ifmt_l_sfgts, { 0xe4200000 } -- }, --/* l.sfnei $rA,${simm-16} */ -- { -- { 0, 0, 0, 0 }, -- { { MNEM, ' ', OP (RA), ',', OP (SIMM_16), 0 } }, -- & ifmt_l_sfgtsi, { 0xb8200000 } -- }, --}; -- --#undef A --#undef OPERAND --#undef MNEM --#undef OP -- --/* Formats for ALIAS macro-insns. */ -- --#define F(f) & openrisc_cgen_ifld_table[OPENRISC_##f] --static const CGEN_IFMT ifmt_l_ret ATTRIBUTE_UNUSED = { -- 32, 32, 0xffffffff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP3) }, { F (F_OP4) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } --}; -- --#undef F -- --/* Each non-simple macro entry points to an array of expansion possibilities. */ -- --#define A(a) (1 << CGEN_INSN_##a) --#define OPERAND(op) OPENRISC_OPERAND_##op --#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ --#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) -- --/* The macro instruction table. */ -- --static const CGEN_IBASE openrisc_cgen_macro_insn_table[] = --{ --/* l.ret */ -- { -- -1, "l-ret", "l.ret", 32, -- { 0|A(ALIAS), { { { (1<= 1) -- memset (insns, 0, num_macros * sizeof (CGEN_INSN)); -- for (i = 0; i < num_macros; ++i) -- { -- insns[i].base = &ib[i]; -- insns[i].opcode = &oc[i]; -- openrisc_cgen_build_insn_regex (& insns[i]); -- } -- cd->macro_insn_table.init_entries = insns; -- cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE); -- cd->macro_insn_table.num_init_entries = num_macros; -- -- oc = & openrisc_cgen_insn_opcode_table[0]; -- insns = (CGEN_INSN *) cd->insn_table.init_entries; -- for (i = 0; i < MAX_INSNS; ++i) -- { -- insns[i].opcode = &oc[i]; -- openrisc_cgen_build_insn_regex (& insns[i]); -- } -- -- cd->sizeof_fields = sizeof (CGEN_FIELDS); -- cd->set_fields_bitsize = set_fields_bitsize; -- -- cd->asm_hash_p = asm_hash_insn_p; -- cd->asm_hash = asm_hash_insn; -- cd->asm_hash_size = CGEN_ASM_HASH_SIZE; -- -- cd->dis_hash_p = dis_hash_insn_p; -- cd->dis_hash = dis_hash_insn; -- cd->dis_hash_size = CGEN_DIS_HASH_SIZE; --} -diff -rNU3 dist.orig/opcodes/openrisc-opc.h dist/opcodes/openrisc-opc.h ---- dist.orig/opcodes/openrisc-opc.h 2010-01-02 19:50:59.000000000 +0100 -+++ dist/opcodes/openrisc-opc.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,113 +0,0 @@ --/* Instruction opcode header for openrisc. -- --THIS FILE IS MACHINE GENERATED WITH CGEN. -- --Copyright 1996-2010 Free Software Foundation, Inc. -- --This file is part of the GNU Binutils and/or GDB, the GNU debugger. -- -- 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 -- the Free Software Foundation; either version 3, or (at your option) -- any later version. -- -- It 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. -- --*/ -- --#ifndef OPENRISC_OPC_H --#define OPENRISC_OPC_H -- --/* -- opc.h */ --#undef CGEN_DIS_HASH_SIZE --#define CGEN_DIS_HASH_SIZE 64 --#undef CGEN_DIS_HASH --#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2) -- --extern long openrisc_sign_extend_16bit (long); --/* -- */ --/* Enum declaration for openrisc instruction types. */ --typedef enum cgen_insn_type { -- OPENRISC_INSN_INVALID, OPENRISC_INSN_L_J, OPENRISC_INSN_L_JAL, OPENRISC_INSN_L_JR -- , OPENRISC_INSN_L_JALR, OPENRISC_INSN_L_BAL, OPENRISC_INSN_L_BNF, OPENRISC_INSN_L_BF -- , OPENRISC_INSN_L_BRK, OPENRISC_INSN_L_RFE, OPENRISC_INSN_L_SYS, OPENRISC_INSN_L_NOP -- , OPENRISC_INSN_L_MOVHI, OPENRISC_INSN_L_MFSR, OPENRISC_INSN_L_MTSR, OPENRISC_INSN_L_LW -- , OPENRISC_INSN_L_LBZ, OPENRISC_INSN_L_LBS, OPENRISC_INSN_L_LHZ, OPENRISC_INSN_L_LHS -- , OPENRISC_INSN_L_SW, OPENRISC_INSN_L_SB, OPENRISC_INSN_L_SH, OPENRISC_INSN_L_SLL -- , OPENRISC_INSN_L_SLLI, OPENRISC_INSN_L_SRL, OPENRISC_INSN_L_SRLI, OPENRISC_INSN_L_SRA -- , OPENRISC_INSN_L_SRAI, OPENRISC_INSN_L_ROR, OPENRISC_INSN_L_RORI, OPENRISC_INSN_L_ADD -- , OPENRISC_INSN_L_ADDI, OPENRISC_INSN_L_SUB, OPENRISC_INSN_L_SUBI, OPENRISC_INSN_L_AND -- , OPENRISC_INSN_L_ANDI, OPENRISC_INSN_L_OR, OPENRISC_INSN_L_ORI, OPENRISC_INSN_L_XOR -- , OPENRISC_INSN_L_XORI, OPENRISC_INSN_L_MUL, OPENRISC_INSN_L_MULI, OPENRISC_INSN_L_DIV -- , OPENRISC_INSN_L_DIVU, OPENRISC_INSN_L_SFGTS, OPENRISC_INSN_L_SFGTU, OPENRISC_INSN_L_SFGES -- , OPENRISC_INSN_L_SFGEU, OPENRISC_INSN_L_SFLTS, OPENRISC_INSN_L_SFLTU, OPENRISC_INSN_L_SFLES -- , OPENRISC_INSN_L_SFLEU, OPENRISC_INSN_L_SFGTSI, OPENRISC_INSN_L_SFGTUI, OPENRISC_INSN_L_SFGESI -- , OPENRISC_INSN_L_SFGEUI, OPENRISC_INSN_L_SFLTSI, OPENRISC_INSN_L_SFLTUI, OPENRISC_INSN_L_SFLESI -- , OPENRISC_INSN_L_SFLEUI, OPENRISC_INSN_L_SFEQ, OPENRISC_INSN_L_SFEQI, OPENRISC_INSN_L_SFNE -- , OPENRISC_INSN_L_SFNEI --} CGEN_INSN_TYPE; -- --/* Index of `invalid' insn place holder. */ --#define CGEN_INSN_INVALID OPENRISC_INSN_INVALID -- --/* Total number of insns in table. */ --#define MAX_INSNS ((int) OPENRISC_INSN_L_SFNEI + 1) -- --/* This struct records data prior to insertion or after extraction. */ --struct cgen_fields --{ -- int length; -- long f_nil; -- long f_anyof; -- long f_class; -- long f_sub; -- long f_r1; -- long f_r2; -- long f_r3; -- long f_simm16; -- long f_uimm16; -- long f_uimm5; -- long f_hi16; -- long f_lo16; -- long f_op1; -- long f_op2; -- long f_op3; -- long f_op4; -- long f_op5; -- long f_op6; -- long f_op7; -- long f_i16_1; -- long f_i16_2; -- long f_disp26; -- long f_abs26; -- long f_i16nc; -- long f_f_15_8; -- long f_f_10_3; -- long f_f_4_1; -- long f_f_7_3; -- long f_f_10_7; -- long f_f_10_11; --}; -- --#define CGEN_INIT_PARSE(od) \ --{\ --} --#define CGEN_INIT_INSERT(od) \ --{\ --} --#define CGEN_INIT_EXTRACT(od) \ --{\ --} --#define CGEN_INIT_PRINT(od) \ --{\ --} -- -- --#endif /* OPENRISC_OPC_H */ -diff -rNU3 dist.orig/opcodes/or1k-asm.c dist/opcodes/or1k-asm.c ---- dist.orig/opcodes/or1k-asm.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-asm.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,910 @@ -+/* Assembler interface for targets using CGEN. -*- C -*- -+ CGEN: Cpu tools GENerator -+ -+ THIS FILE IS MACHINE GENERATED WITH CGEN. -+ - the resultant file is machine generated, cgen-asm.in isn't -+ -+ Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+ This file is part of libopcodes. -+ -+ This library 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, or (at your option) -+ any later version. -+ -+ It 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. */ -+ -+ -+/* ??? Eventually more and more of this stuff can go to cpu-independent files. -+ Keep that in mind. */ -+ -+#include "sysdep.h" -+#include -+#include "ansidecl.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+#include "opintl.h" -+#include "xregex.h" -+#include "libiberty.h" -+#include "safe-ctype.h" -+ -+#undef min -+#define min(a,b) ((a) < (b) ? (a) : (b)) -+#undef max -+#define max(a,b) ((a) > (b) ? (a) : (b)) -+ -+static const char * parse_insn_normal -+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *); -+ -+/* -- assembler routines inserted here. */ -+ -+/* -- asm.c */ -+ -+static const char * MISSING_CLOSING_PARENTHESIS = N_("missing `)'"); -+ -+#define CGEN_VERBOSE_ASSEMBLER_ERRORS -+ -+static const char * -+parse_disp26 (CGEN_CPU_DESC cd, -+ const char ** strp, -+ int opindex, -+ int opinfo, -+ enum cgen_parse_operand_result * resultp, -+ bfd_vma * valuep) -+{ -+ const char *errmsg = NULL; -+ enum cgen_parse_operand_result result_type; -+ -+ if (strncasecmp (*strp, "plt(", 4) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 4; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_OR1K_PLT26, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 2) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ return cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep); -+} -+ -+static const char * -+parse_simm16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, long * valuep) -+{ -+ const char *errmsg; -+ enum cgen_parse_operand_result result_type; -+ long ret; -+ -+ if (**strp == '#') -+ ++*strp; -+ -+ if (strncasecmp (*strp, "hi(", 3) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 3; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16, -+ & result_type, & value); -+ if (**strp != ')') -+ errmsg = MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ -+ ret = value; -+ -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ { -+ ret >>= 16; -+ ret &= 0xffff; -+ ret = (ret ^ 0x8000) - 0x8000; -+ } -+ } -+ else if (strncasecmp (*strp, "lo(", 3) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 3; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ -+ ret = value; -+ -+ if (result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ { -+ ret &= 0xffff; -+ ret = (ret ^ 0x8000) - 0x8000; -+ } -+ } -+ else if (strncasecmp (*strp, "got(", 4) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 4; -+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_OR1K_GOT16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotpchi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTPC_HI16, -+ & result_type, & value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotpclo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTPC_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotoffhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTOFF_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gotofflo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_GOTOFF_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsgdhi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_GD_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsgdlo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_GD_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsldmhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDM_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tlsldmlo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDM_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "dtpoffhi(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDO_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "dtpofflo(", 9) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 9; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LDO_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gottpoffhi(", 11) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 11; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_IE_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "gottpofflo(", 11) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 11; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_IE_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tpoffhi(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LE_HI16, -+ & result_type, & value); -+ -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value = (value >> 16) & 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else if (strncasecmp (*strp, "tpofflo(", 8) == 0) -+ { -+ bfd_vma value; -+ -+ *strp += 8; -+ errmsg = cgen_parse_address (cd, strp, opindex, -+ BFD_RELOC_OR1K_TLS_LE_LO16, -+ &result_type, &value); -+ if (**strp != ')') -+ return MISSING_CLOSING_PARENTHESIS; -+ ++*strp; -+ if (errmsg == NULL -+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER) -+ value &= 0xffff; -+ *valuep = value; -+ return errmsg; -+ } -+ else -+ { -+ long value; -+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value); -+ ret = value; -+ } -+ -+ if (errmsg == NULL) -+ *valuep = ret; -+ -+ return errmsg; -+} -+ -+static const char * -+parse_uimm16 (CGEN_CPU_DESC cd, const char ** strp, int opindex, unsigned long * valuep) -+{ -+ const char *errmsg = parse_simm16(cd, strp, opindex, (long *) valuep); -+ -+ if (errmsg == NULL) -+ *valuep &= 0xffff; -+ return errmsg; -+} -+ -+/* -- */ -+ -+const char * or1k_cgen_parse_operand -+ (CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *); -+ -+/* Main entry point for operand parsing. -+ -+ This function is basically just a big switch statement. Earlier versions -+ used tables to look up the function to use, but -+ - if the table contains both assembler and disassembler functions then -+ the disassembler contains much of the assembler and vice-versa, -+ - there's a lot of inlining possibilities as things grow, -+ - using a switch statement avoids the function call overhead. -+ -+ This function could be moved into `parse_insn_normal', but keeping it -+ separate makes clear the interface between `parse_insn_normal' and each of -+ the handlers. */ -+ -+const char * -+or1k_cgen_parse_operand (CGEN_CPU_DESC cd, -+ int opindex, -+ const char ** strp, -+ CGEN_FIELDS * fields) -+{ -+ const char * errmsg = NULL; -+ /* Used by scalar operands that still need to be parsed. */ -+ long junk ATTRIBUTE_UNUSED; -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ { -+ bfd_vma value = 0; -+ errmsg = parse_disp26 (cd, strp, OR1K_OPERAND_DISP26, 0, NULL, & value); -+ fields->f_disp26 = value; -+ } -+ break; -+ case OR1K_OPERAND_RA : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_gpr, & fields->f_r2); -+ break; -+ case OR1K_OPERAND_RADF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fdr, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RASF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fsr, & fields->f_r2); -+ break; -+ case OR1K_OPERAND_RB : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_gpr, & fields->f_r3); -+ break; -+ case OR1K_OPERAND_RBDF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fdr, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RBSF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fsr, & fields->f_r3); -+ break; -+ case OR1K_OPERAND_RD : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_gpr, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RDDF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fdr, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RDSF : -+ errmsg = cgen_parse_keyword (cd, strp, & or1k_cgen_opval_h_fsr, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ errmsg = parse_simm16 (cd, strp, OR1K_OPERAND_SIMM16, (long *) (& fields->f_simm16)); -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ errmsg = parse_simm16 (cd, strp, OR1K_OPERAND_SIMM16_SPLIT, (long *) (& fields->f_simm16_split)); -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ errmsg = parse_uimm16 (cd, strp, OR1K_OPERAND_UIMM16, (unsigned long *) (& fields->f_uimm16)); -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ errmsg = parse_uimm16 (cd, strp, OR1K_OPERAND_UIMM16_SPLIT, (unsigned long *) (& fields->f_uimm16_split)); -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ errmsg = cgen_parse_unsigned_integer (cd, strp, OR1K_OPERAND_UIMM6, (unsigned long *) (& fields->f_uimm6)); -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); -+ abort (); -+ } -+ -+ return errmsg; -+} -+ -+cgen_parse_fn * const or1k_cgen_parse_handlers[] = -+{ -+ parse_insn_normal, -+}; -+ -+void -+or1k_cgen_init_asm (CGEN_CPU_DESC cd) -+{ -+ or1k_cgen_init_opcode_table (cd); -+ or1k_cgen_init_ibld_table (cd); -+ cd->parse_handlers = & or1k_cgen_parse_handlers[0]; -+ cd->parse_operand = or1k_cgen_parse_operand; -+#ifdef CGEN_ASM_INIT_HOOK -+CGEN_ASM_INIT_HOOK -+#endif -+} -+ -+ -+ -+/* Regex construction routine. -+ -+ This translates an opcode syntax string into a regex string, -+ by replacing any non-character syntax element (such as an -+ opcode) with the pattern '.*' -+ -+ It then compiles the regex and stores it in the opcode, for -+ later use by or1k_cgen_assemble_insn -+ -+ Returns NULL for success, an error message for failure. */ -+ -+char * -+or1k_cgen_build_insn_regex (CGEN_INSN *insn) -+{ -+ CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn); -+ const char *mnem = CGEN_INSN_MNEMONIC (insn); -+ char rxbuf[CGEN_MAX_RX_ELEMENTS]; -+ char *rx = rxbuf; -+ const CGEN_SYNTAX_CHAR_TYPE *syn; -+ int reg_err; -+ -+ syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc)); -+ -+ /* Mnemonics come first in the syntax string. */ -+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) -+ return _("missing mnemonic in syntax string"); -+ ++syn; -+ -+ /* Generate a case sensitive regular expression that emulates case -+ insensitive matching in the "C" locale. We cannot generate a case -+ insensitive regular expression because in Turkish locales, 'i' and 'I' -+ are not equal modulo case conversion. */ -+ -+ /* Copy the literal mnemonic out of the insn. */ -+ for (; *mnem; mnem++) -+ { -+ char c = *mnem; -+ -+ if (ISALPHA (c)) -+ { -+ *rx++ = '['; -+ *rx++ = TOLOWER (c); -+ *rx++ = TOUPPER (c); -+ *rx++ = ']'; -+ } -+ else -+ *rx++ = c; -+ } -+ -+ /* Copy any remaining literals from the syntax string into the rx. */ -+ for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn) -+ { -+ if (CGEN_SYNTAX_CHAR_P (* syn)) -+ { -+ char c = CGEN_SYNTAX_CHAR (* syn); -+ -+ switch (c) -+ { -+ /* Escape any regex metacharacters in the syntax. */ -+ case '.': case '[': case '\\': -+ case '*': case '^': case '$': -+ -+#ifdef CGEN_ESCAPE_EXTENDED_REGEX -+ case '?': case '{': case '}': -+ case '(': case ')': case '*': -+ case '|': case '+': case ']': -+#endif -+ *rx++ = '\\'; -+ *rx++ = c; -+ break; -+ -+ default: -+ if (ISALPHA (c)) -+ { -+ *rx++ = '['; -+ *rx++ = TOLOWER (c); -+ *rx++ = TOUPPER (c); -+ *rx++ = ']'; -+ } -+ else -+ *rx++ = c; -+ break; -+ } -+ } -+ else -+ { -+ /* Replace non-syntax fields with globs. */ -+ *rx++ = '.'; -+ *rx++ = '*'; -+ } -+ } -+ -+ /* Trailing whitespace ok. */ -+ * rx++ = '['; -+ * rx++ = ' '; -+ * rx++ = '\t'; -+ * rx++ = ']'; -+ * rx++ = '*'; -+ -+ /* But anchor it after that. */ -+ * rx++ = '$'; -+ * rx = '\0'; -+ -+ CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t)); -+ reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB); -+ -+ if (reg_err == 0) -+ return NULL; -+ else -+ { -+ static char msg[80]; -+ -+ regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80); -+ regfree ((regex_t *) CGEN_INSN_RX (insn)); -+ free (CGEN_INSN_RX (insn)); -+ (CGEN_INSN_RX (insn)) = NULL; -+ return msg; -+ } -+} -+ -+ -+/* Default insn parser. -+ -+ The syntax string is scanned and operands are parsed and stored in FIELDS. -+ Relocs are queued as we go via other callbacks. -+ -+ ??? Note that this is currently an all-or-nothing parser. If we fail to -+ parse the instruction, we return 0 and the caller will start over from -+ the beginning. Backtracking will be necessary in parsing subexpressions, -+ but that can be handled there. Not handling backtracking here may get -+ expensive in the case of the m68k. Deal with later. -+ -+ Returns NULL for success, an error message for failure. */ -+ -+static const char * -+parse_insn_normal (CGEN_CPU_DESC cd, -+ const CGEN_INSN *insn, -+ const char **strp, -+ CGEN_FIELDS *fields) -+{ -+ /* ??? Runtime added insns not handled yet. */ -+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -+ const char *str = *strp; -+ const char *errmsg; -+ const char *p; -+ const CGEN_SYNTAX_CHAR_TYPE * syn; -+#ifdef CGEN_MNEMONIC_OPERANDS -+ /* FIXME: wip */ -+ int past_opcode_p; -+#endif -+ -+ /* For now we assume the mnemonic is first (there are no leading operands). -+ We can parse it without needing to set up operand parsing. -+ GAS's input scrubber will ensure mnemonics are lowercase, but we may -+ not be called from GAS. */ -+ p = CGEN_INSN_MNEMONIC (insn); -+ while (*p && TOLOWER (*p) == TOLOWER (*str)) -+ ++p, ++str; -+ -+ if (* p) -+ return _("unrecognized instruction"); -+ -+#ifndef CGEN_MNEMONIC_OPERANDS -+ if (* str && ! ISSPACE (* str)) -+ return _("unrecognized instruction"); -+#endif -+ -+ CGEN_INIT_PARSE (cd); -+ cgen_init_parse_operand (cd); -+#ifdef CGEN_MNEMONIC_OPERANDS -+ past_opcode_p = 0; -+#endif -+ -+ /* We don't check for (*str != '\0') here because we want to parse -+ any trailing fake arguments in the syntax string. */ -+ syn = CGEN_SYNTAX_STRING (syntax); -+ -+ /* Mnemonics come first for now, ensure valid string. */ -+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) -+ abort (); -+ -+ ++syn; -+ -+ while (* syn != 0) -+ { -+ /* Non operand chars must match exactly. */ -+ if (CGEN_SYNTAX_CHAR_P (* syn)) -+ { -+ /* FIXME: While we allow for non-GAS callers above, we assume the -+ first char after the mnemonic part is a space. */ -+ /* FIXME: We also take inappropriate advantage of the fact that -+ GAS's input scrubber will remove extraneous blanks. */ -+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn))) -+ { -+#ifdef CGEN_MNEMONIC_OPERANDS -+ if (CGEN_SYNTAX_CHAR(* syn) == ' ') -+ past_opcode_p = 1; -+#endif -+ ++ syn; -+ ++ str; -+ } -+ else if (*str) -+ { -+ /* Syntax char didn't match. Can't be this insn. */ -+ static char msg [80]; -+ -+ /* xgettext:c-format */ -+ sprintf (msg, _("syntax error (expected char `%c', found `%c')"), -+ CGEN_SYNTAX_CHAR(*syn), *str); -+ return msg; -+ } -+ else -+ { -+ /* Ran out of input. */ -+ static char msg [80]; -+ -+ /* xgettext:c-format */ -+ sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"), -+ CGEN_SYNTAX_CHAR(*syn)); -+ return msg; -+ } -+ continue; -+ } -+ -+#ifdef CGEN_MNEMONIC_OPERANDS -+ (void) past_opcode_p; -+#endif -+ /* We have an operand of some sort. */ -+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields); -+ if (errmsg) -+ return errmsg; -+ -+ /* Done with this operand, continue with next one. */ -+ ++ syn; -+ } -+ -+ /* If we're at the end of the syntax string, we're done. */ -+ if (* syn == 0) -+ { -+ /* FIXME: For the moment we assume a valid `str' can only contain -+ blanks now. IE: We needn't try again with a longer version of -+ the insn and it is assumed that longer versions of insns appear -+ before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */ -+ while (ISSPACE (* str)) -+ ++ str; -+ -+ if (* str != '\0') -+ return _("junk at end of line"); /* FIXME: would like to include `str' */ -+ -+ return NULL; -+ } -+ -+ /* We couldn't parse it. */ -+ return _("unrecognized instruction"); -+} -+ -+/* Main entry point. -+ This routine is called for each instruction to be assembled. -+ STR points to the insn to be assembled. -+ We assume all necessary tables have been initialized. -+ The assembled instruction, less any fixups, is stored in BUF. -+ Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value -+ still needs to be converted to target byte order, otherwise BUF is an array -+ of bytes in target byte order. -+ The result is a pointer to the insn's entry in the opcode table, -+ or NULL if an error occured (an error message will have already been -+ printed). -+ -+ Note that when processing (non-alias) macro-insns, -+ this function recurses. -+ -+ ??? It's possible to make this cpu-independent. -+ One would have to deal with a few minor things. -+ At this point in time doing so would be more of a curiosity than useful -+ [for example this file isn't _that_ big], but keeping the possibility in -+ mind helps keep the design clean. */ -+ -+const CGEN_INSN * -+or1k_cgen_assemble_insn (CGEN_CPU_DESC cd, -+ const char *str, -+ CGEN_FIELDS *fields, -+ CGEN_INSN_BYTES_PTR buf, -+ char **errmsg) -+{ -+ const char *start; -+ CGEN_INSN_LIST *ilist; -+ const char *parse_errmsg = NULL; -+ const char *insert_errmsg = NULL; -+ int recognized_mnemonic = 0; -+ -+ /* Skip leading white space. */ -+ while (ISSPACE (* str)) -+ ++ str; -+ -+ /* The instructions are stored in hashed lists. -+ Get the first in the list. */ -+ ilist = CGEN_ASM_LOOKUP_INSN (cd, str); -+ -+ /* Keep looking until we find a match. */ -+ start = str; -+ for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist)) -+ { -+ const CGEN_INSN *insn = ilist->insn; -+ recognized_mnemonic = 1; -+ -+#ifdef CGEN_VALIDATE_INSN_SUPPORTED -+ /* Not usually needed as unsupported opcodes -+ shouldn't be in the hash lists. */ -+ /* Is this insn supported by the selected cpu? */ -+ if (! or1k_cgen_insn_supported (cd, insn)) -+ continue; -+#endif -+ /* If the RELAXED attribute is set, this is an insn that shouldn't be -+ chosen immediately. Instead, it is used during assembler/linker -+ relaxation if possible. */ -+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0) -+ continue; -+ -+ str = start; -+ -+ /* Skip this insn if str doesn't look right lexically. */ -+ if (CGEN_INSN_RX (insn) != NULL && -+ regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH) -+ continue; -+ -+ /* Allow parse/insert handlers to obtain length of insn. */ -+ CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); -+ -+ parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields); -+ if (parse_errmsg != NULL) -+ continue; -+ -+ /* ??? 0 is passed for `pc'. */ -+ insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, -+ (bfd_vma) 0); -+ if (insert_errmsg != NULL) -+ continue; -+ -+ /* It is up to the caller to actually output the insn and any -+ queued relocs. */ -+ return insn; -+ } -+ -+ { -+ static char errbuf[150]; -+ const char *tmp_errmsg; -+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS -+#define be_verbose 1 -+#else -+#define be_verbose 0 -+#endif -+ -+ if (be_verbose) -+ { -+ /* If requesting verbose error messages, use insert_errmsg. -+ Failing that, use parse_errmsg. */ -+ tmp_errmsg = (insert_errmsg ? insert_errmsg : -+ parse_errmsg ? parse_errmsg : -+ recognized_mnemonic ? -+ _("unrecognized form of instruction") : -+ _("unrecognized instruction")); -+ -+ if (strlen (start) > 50) -+ /* xgettext:c-format */ -+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start); -+ else -+ /* xgettext:c-format */ -+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start); -+ } -+ else -+ { -+ if (strlen (start) > 50) -+ /* xgettext:c-format */ -+ sprintf (errbuf, _("bad instruction `%.50s...'"), start); -+ else -+ /* xgettext:c-format */ -+ sprintf (errbuf, _("bad instruction `%.50s'"), start); -+ } -+ -+ *errmsg = errbuf; -+ return NULL; -+ } -+} -diff -rNU3 dist.orig/opcodes/or1k-desc.c dist/opcodes/or1k-desc.c ---- dist.orig/opcodes/or1k-desc.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-desc.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,2110 @@ -+/* CPU data for or1k. -+ -+THIS FILE IS MACHINE GENERATED WITH CGEN. -+ -+Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+This file is part of the GNU Binutils and/or GDB, the GNU debugger. -+ -+ 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 -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ It 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 -+#include -+#include "ansidecl.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+#include "opintl.h" -+#include "libiberty.h" -+#include "xregex.h" -+ -+/* Attributes. */ -+ -+static const CGEN_ATTR_ENTRY bool_attr[] = -+{ -+ { "#f", 0 }, -+ { "#t", 1 }, -+ { 0, 0 } -+}; -+ -+static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED = -+{ -+ { "base", MACH_BASE }, -+ { "or32", MACH_OR32 }, -+ { "or32nd", MACH_OR32ND }, -+ { "or64", MACH_OR64 }, -+ { "or64nd", MACH_OR64ND }, -+ { "max", MACH_MAX }, -+ { 0, 0 } -+}; -+ -+static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED = -+{ -+ { "openrisc", ISA_OPENRISC }, -+ { "max", ISA_MAX }, -+ { 0, 0 } -+}; -+ -+const CGEN_ATTR_TABLE or1k_cgen_ifield_attr_table[] = -+{ -+ { "MACH", & MACH_attr[0], & MACH_attr[0] }, -+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, -+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, -+ { "RESERVED", &bool_attr[0], &bool_attr[0] }, -+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, -+ { "SIGNED", &bool_attr[0], &bool_attr[0] }, -+ { 0, 0, 0 } -+}; -+ -+const CGEN_ATTR_TABLE or1k_cgen_hardware_attr_table[] = -+{ -+ { "MACH", & MACH_attr[0], & MACH_attr[0] }, -+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -+ { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] }, -+ { "PC", &bool_attr[0], &bool_attr[0] }, -+ { "PROFILE", &bool_attr[0], &bool_attr[0] }, -+ { 0, 0, 0 } -+}; -+ -+const CGEN_ATTR_TABLE or1k_cgen_operand_attr_table[] = -+{ -+ { "MACH", & MACH_attr[0], & MACH_attr[0] }, -+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, -+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, -+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, -+ { "SIGNED", &bool_attr[0], &bool_attr[0] }, -+ { "NEGATIVE", &bool_attr[0], &bool_attr[0] }, -+ { "RELAX", &bool_attr[0], &bool_attr[0] }, -+ { "SEM-ONLY", &bool_attr[0], &bool_attr[0] }, -+ { 0, 0, 0 } -+}; -+ -+const CGEN_ATTR_TABLE or1k_cgen_insn_attr_table[] = -+{ -+ { "MACH", & MACH_attr[0], & MACH_attr[0] }, -+ { "ALIAS", &bool_attr[0], &bool_attr[0] }, -+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, -+ { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] }, -+ { "COND-CTI", &bool_attr[0], &bool_attr[0] }, -+ { "SKIP-CTI", &bool_attr[0], &bool_attr[0] }, -+ { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, -+ { "RELAXABLE", &bool_attr[0], &bool_attr[0] }, -+ { "RELAXED", &bool_attr[0], &bool_attr[0] }, -+ { "NO-DIS", &bool_attr[0], &bool_attr[0] }, -+ { "PBB", &bool_attr[0], &bool_attr[0] }, -+ { "DELAYED-CTI", &bool_attr[0], &bool_attr[0] }, -+ { "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, -+ { "FORCED-CTI", &bool_attr[0], &bool_attr[0] }, -+ { 0, 0, 0 } -+}; -+ -+/* Instruction set variants. */ -+ -+static const CGEN_ISA or1k_cgen_isa_table[] = { -+ { "openrisc", 32, 32, 32, 32 }, -+ { 0, 0, 0, 0, 0 } -+}; -+ -+/* Machine variants. */ -+ -+static const CGEN_MACH or1k_cgen_mach_table[] = { -+ { "or32", "or1k", MACH_OR32, 0 }, -+ { "or32nd", "or1knd", MACH_OR32ND, 0 }, -+ { "or64", "or1k64", MACH_OR64, 0 }, -+ { "or64nd", "or1k64nd", MACH_OR64ND, 0 }, -+ { 0, 0, 0, 0 } -+}; -+ -+static CGEN_KEYWORD_ENTRY or1k_cgen_opval_h_fsr_entries[] = -+{ -+ { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r16", 16, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r17", 17, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r18", 18, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r19", 19, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r20", 20, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r21", 21, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r22", 22, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r23", 23, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r24", 24, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r25", 25, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r26", 26, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r27", 27, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r28", 28, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r29", 29, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r30", 30, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r31", 31, {0, {{{0, 0}}}}, 0, 0 }, -+ { "lr", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "sp", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "fp", 2, {0, {{{0, 0}}}}, 0, 0 } -+}; -+ -+CGEN_KEYWORD or1k_cgen_opval_h_fsr = -+{ -+ & or1k_cgen_opval_h_fsr_entries[0], -+ 35, -+ 0, 0, 0, 0, "" -+}; -+ -+static CGEN_KEYWORD_ENTRY or1k_cgen_opval_h_fdr_entries[] = -+{ -+ { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r16", 16, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r17", 17, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r18", 18, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r19", 19, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r20", 20, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r21", 21, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r22", 22, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r23", 23, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r24", 24, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r25", 25, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r26", 26, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r27", 27, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r28", 28, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r29", 29, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r30", 30, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r31", 31, {0, {{{0, 0}}}}, 0, 0 }, -+ { "lr", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "sp", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "fp", 2, {0, {{{0, 0}}}}, 0, 0 } -+}; -+ -+CGEN_KEYWORD or1k_cgen_opval_h_fdr = -+{ -+ & or1k_cgen_opval_h_fdr_entries[0], -+ 35, -+ 0, 0, 0, 0, "" -+}; -+ -+static CGEN_KEYWORD_ENTRY or1k_cgen_opval_h_gpr_entries[] = -+{ -+ { "r0", 0, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r1", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r2", 2, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r3", 3, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r4", 4, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r5", 5, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r6", 6, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r7", 7, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r8", 8, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r9", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r10", 10, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r11", 11, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r12", 12, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r13", 13, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r14", 14, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r16", 16, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r17", 17, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r18", 18, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r19", 19, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r20", 20, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r21", 21, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r22", 22, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r23", 23, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r24", 24, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r25", 25, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r26", 26, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r27", 27, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r28", 28, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r29", 29, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r30", 30, {0, {{{0, 0}}}}, 0, 0 }, -+ { "r31", 31, {0, {{{0, 0}}}}, 0, 0 }, -+ { "lr", 9, {0, {{{0, 0}}}}, 0, 0 }, -+ { "sp", 1, {0, {{{0, 0}}}}, 0, 0 }, -+ { "fp", 2, {0, {{{0, 0}}}}, 0, 0 } -+}; -+ -+CGEN_KEYWORD or1k_cgen_opval_h_gpr = -+{ -+ & or1k_cgen_opval_h_gpr_entries[0], -+ 35, -+ 0, 0, 0, 0, "" -+}; -+ -+ -+/* The hardware table. */ -+ -+#define A(a) (1 << CGEN_HW_##a) -+ -+const CGEN_HW_ENTRY or1k_cgen_hw_table[] = -+{ -+ { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<name) -+ { -+ if (strcmp (name, table->bfd_name) == 0) -+ return table; -+ ++table; -+ } -+ abort (); -+} -+ -+/* Subroutine of or1k_cgen_cpu_open to build the hardware table. */ -+ -+static void -+build_hw_table (CGEN_CPU_TABLE *cd) -+{ -+ int i; -+ int machs = cd->machs; -+ const CGEN_HW_ENTRY *init = & or1k_cgen_hw_table[0]; -+ /* MAX_HW is only an upper bound on the number of selected entries. -+ However each entry is indexed by it's enum so there can be holes in -+ the table. */ -+ const CGEN_HW_ENTRY **selected = -+ (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); -+ -+ cd->hw_table.init_entries = init; -+ cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); -+ memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); -+ /* ??? For now we just use machs to determine which ones we want. */ -+ for (i = 0; init[i].name != NULL; ++i) -+ if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) -+ & machs) -+ selected[init[i].type] = &init[i]; -+ cd->hw_table.entries = selected; -+ cd->hw_table.num_entries = MAX_HW; -+} -+ -+/* Subroutine of or1k_cgen_cpu_open to build the hardware table. */ -+ -+static void -+build_ifield_table (CGEN_CPU_TABLE *cd) -+{ -+ cd->ifld_table = & or1k_cgen_ifld_table[0]; -+} -+ -+/* Subroutine of or1k_cgen_cpu_open to build the hardware table. */ -+ -+static void -+build_operand_table (CGEN_CPU_TABLE *cd) -+{ -+ int i; -+ int machs = cd->machs; -+ const CGEN_OPERAND *init = & or1k_cgen_operand_table[0]; -+ /* MAX_OPERANDS is only an upper bound on the number of selected entries. -+ However each entry is indexed by it's enum so there can be holes in -+ the table. */ -+ const CGEN_OPERAND **selected = xmalloc (MAX_OPERANDS * sizeof (* selected)); -+ -+ cd->operand_table.init_entries = init; -+ cd->operand_table.entry_size = sizeof (CGEN_OPERAND); -+ memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *)); -+ /* ??? For now we just use mach to determine which ones we want. */ -+ for (i = 0; init[i].name != NULL; ++i) -+ if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH) -+ & machs) -+ selected[init[i].type] = &init[i]; -+ cd->operand_table.entries = selected; -+ cd->operand_table.num_entries = MAX_OPERANDS; -+} -+ -+/* Subroutine of or1k_cgen_cpu_open to build the hardware table. -+ ??? This could leave out insns not supported by the specified mach/isa, -+ but that would cause errors like "foo only supported by bar" to become -+ "unknown insn", so for now we include all insns and require the app to -+ do the checking later. -+ ??? On the other hand, parsing of such insns may require their hardware or -+ operand elements to be in the table [which they mightn't be]. */ -+ -+static void -+build_insn_table (CGEN_CPU_TABLE *cd) -+{ -+ int i; -+ const CGEN_IBASE *ib = & or1k_cgen_insn_table[0]; -+ CGEN_INSN *insns = xmalloc (MAX_INSNS * sizeof (CGEN_INSN)); -+ -+ memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN)); -+ for (i = 0; i < MAX_INSNS; ++i) -+ insns[i].base = &ib[i]; -+ cd->insn_table.init_entries = insns; -+ cd->insn_table.entry_size = sizeof (CGEN_IBASE); -+ cd->insn_table.num_init_entries = MAX_INSNS; -+} -+ -+/* Subroutine of or1k_cgen_cpu_open to rebuild the tables. */ -+ -+static void -+or1k_cgen_rebuild_tables (CGEN_CPU_TABLE *cd) -+{ -+ int i; -+ CGEN_BITSET *isas = cd->isas; -+ unsigned int machs = cd->machs; -+ -+ cd->int_insn_p = CGEN_INT_INSN_P; -+ -+ /* Data derived from the isa spec. */ -+#define UNSET (CGEN_SIZE_UNKNOWN + 1) -+ cd->default_insn_bitsize = UNSET; -+ cd->base_insn_bitsize = UNSET; -+ cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */ -+ cd->max_insn_bitsize = 0; -+ for (i = 0; i < MAX_ISAS; ++i) -+ if (cgen_bitset_contains (isas, i)) -+ { -+ const CGEN_ISA *isa = & or1k_cgen_isa_table[i]; -+ -+ /* Default insn sizes of all selected isas must be -+ equal or we set the result to 0, meaning "unknown". */ -+ if (cd->default_insn_bitsize == UNSET) -+ cd->default_insn_bitsize = isa->default_insn_bitsize; -+ else if (isa->default_insn_bitsize == cd->default_insn_bitsize) -+ ; /* This is ok. */ -+ else -+ cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN; -+ -+ /* Base insn sizes of all selected isas must be equal -+ or we set the result to 0, meaning "unknown". */ -+ if (cd->base_insn_bitsize == UNSET) -+ cd->base_insn_bitsize = isa->base_insn_bitsize; -+ else if (isa->base_insn_bitsize == cd->base_insn_bitsize) -+ ; /* This is ok. */ -+ else -+ cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN; -+ -+ /* Set min,max insn sizes. */ -+ if (isa->min_insn_bitsize < cd->min_insn_bitsize) -+ cd->min_insn_bitsize = isa->min_insn_bitsize; -+ if (isa->max_insn_bitsize > cd->max_insn_bitsize) -+ cd->max_insn_bitsize = isa->max_insn_bitsize; -+ } -+ -+ /* Data derived from the mach spec. */ -+ for (i = 0; i < MAX_MACHS; ++i) -+ if (((1 << i) & machs) != 0) -+ { -+ const CGEN_MACH *mach = & or1k_cgen_mach_table[i]; -+ -+ if (mach->insn_chunk_bitsize != 0) -+ { -+ if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) -+ { -+ fprintf (stderr, "or1k_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", -+ cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); -+ abort (); -+ } -+ -+ cd->insn_chunk_bitsize = mach->insn_chunk_bitsize; -+ } -+ } -+ -+ /* Determine which hw elements are used by MACH. */ -+ build_hw_table (cd); -+ -+ /* Build the ifield table. */ -+ build_ifield_table (cd); -+ -+ /* Determine which operands are used by MACH/ISA. */ -+ build_operand_table (cd); -+ -+ /* Build the instruction table. */ -+ build_insn_table (cd); -+} -+ -+/* Initialize a cpu table and return a descriptor. -+ It's much like opening a file, and must be the first function called. -+ The arguments are a set of (type/value) pairs, terminated with -+ CGEN_CPU_OPEN_END. -+ -+ Currently supported values: -+ CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr -+ CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr -+ CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name -+ CGEN_CPU_OPEN_ENDIAN: specify endian choice -+ CGEN_CPU_OPEN_END: terminates arguments -+ -+ ??? Simultaneous multiple isas might not make sense, but it's not (yet) -+ precluded. */ -+ -+CGEN_CPU_DESC -+or1k_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) -+{ -+ CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE)); -+ static int init_p; -+ CGEN_BITSET *isas = 0; /* 0 = "unspecified" */ -+ unsigned int machs = 0; /* 0 = "unspecified" */ -+ enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; -+ va_list ap; -+ -+ if (! init_p) -+ { -+ init_tables (); -+ init_p = 1; -+ } -+ -+ memset (cd, 0, sizeof (*cd)); -+ -+ va_start (ap, arg_type); -+ while (arg_type != CGEN_CPU_OPEN_END) -+ { -+ switch (arg_type) -+ { -+ case CGEN_CPU_OPEN_ISAS : -+ isas = va_arg (ap, CGEN_BITSET *); -+ break; -+ case CGEN_CPU_OPEN_MACHS : -+ machs = va_arg (ap, unsigned int); -+ break; -+ case CGEN_CPU_OPEN_BFDMACH : -+ { -+ const char *name = va_arg (ap, const char *); -+ const CGEN_MACH *mach = -+ lookup_mach_via_bfd_name (or1k_cgen_mach_table, name); -+ -+ machs |= 1 << mach->num; -+ break; -+ } -+ case CGEN_CPU_OPEN_ENDIAN : -+ endian = va_arg (ap, enum cgen_endian); -+ break; -+ default : -+ fprintf (stderr, "or1k_cgen_cpu_open: unsupported argument `%d'\n", -+ arg_type); -+ abort (); /* ??? return NULL? */ -+ } -+ arg_type = va_arg (ap, enum cgen_cpu_open_arg); -+ } -+ va_end (ap); -+ -+ /* Mach unspecified means "all". */ -+ if (machs == 0) -+ machs = (1 << MAX_MACHS) - 1; -+ /* Base mach is always selected. */ -+ machs |= 1; -+ if (endian == CGEN_ENDIAN_UNKNOWN) -+ { -+ /* ??? If target has only one, could have a default. */ -+ fprintf (stderr, "or1k_cgen_cpu_open: no endianness specified\n"); -+ abort (); -+ } -+ -+ cd->isas = cgen_bitset_copy (isas); -+ cd->machs = machs; -+ cd->endian = endian; -+ /* FIXME: for the sparc case we can determine insn-endianness statically. -+ The worry here is where both data and insn endian can be independently -+ chosen, in which case this function will need another argument. -+ Actually, will want to allow for more arguments in the future anyway. */ -+ cd->insn_endian = endian; -+ -+ /* Table (re)builder. */ -+ cd->rebuild_tables = or1k_cgen_rebuild_tables; -+ or1k_cgen_rebuild_tables (cd); -+ -+ /* Default to not allowing signed overflow. */ -+ cd->signed_overflow_ok_p = 0; -+ -+ return (CGEN_CPU_DESC) cd; -+} -+ -+/* Cover fn to or1k_cgen_cpu_open to handle the simple case of 1 isa, 1 mach. -+ MACH_NAME is the bfd name of the mach. */ -+ -+CGEN_CPU_DESC -+or1k_cgen_cpu_open_1 (const char *mach_name, enum cgen_endian endian) -+{ -+ return or1k_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name, -+ CGEN_CPU_OPEN_ENDIAN, endian, -+ CGEN_CPU_OPEN_END); -+} -+ -+/* Close a cpu table. -+ ??? This can live in a machine independent file, but there's currently -+ no place to put this file (there's no libcgen). libopcodes is the wrong -+ place as some simulator ports use this but they don't use libopcodes. */ -+ -+void -+or1k_cgen_cpu_close (CGEN_CPU_DESC cd) -+{ -+ unsigned int i; -+ const CGEN_INSN *insns; -+ -+ if (cd->macro_insn_table.init_entries) -+ { -+ insns = cd->macro_insn_table.init_entries; -+ for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns) -+ if (CGEN_INSN_RX ((insns))) -+ regfree (CGEN_INSN_RX (insns)); -+ } -+ -+ if (cd->insn_table.init_entries) -+ { -+ insns = cd->insn_table.init_entries; -+ for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns) -+ if (CGEN_INSN_RX (insns)) -+ regfree (CGEN_INSN_RX (insns)); -+ } -+ -+ if (cd->macro_insn_table.init_entries) -+ free ((CGEN_INSN *) cd->macro_insn_table.init_entries); -+ -+ if (cd->insn_table.init_entries) -+ free ((CGEN_INSN *) cd->insn_table.init_entries); -+ -+ if (cd->hw_table.entries) -+ free ((CGEN_HW_ENTRY *) cd->hw_table.entries); -+ -+ if (cd->operand_table.entries) -+ free ((CGEN_HW_ENTRY *) cd->operand_table.entries); -+ -+ free (cd); -+} -+ -diff -rNU3 dist.orig/opcodes/or1k-desc.h dist/opcodes/or1k-desc.h ---- dist.orig/opcodes/or1k-desc.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-desc.h 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,682 @@ -+/* CPU data header for or1k. -+ -+THIS FILE IS MACHINE GENERATED WITH CGEN. -+ -+Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+This file is part of the GNU Binutils and/or GDB, the GNU debugger. -+ -+ 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 -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ It 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. -+ -+*/ -+ -+#ifndef OR1K_CPU_H -+#define OR1K_CPU_H -+ -+#define CGEN_ARCH or1k -+ -+/* Given symbol S, return or1k_cgen_. */ -+#define CGEN_SYM(s) or1k##_cgen_##s -+ -+ -+/* Selected cpu families. */ -+#define HAVE_CPU_OR1K32BF -+#define HAVE_CPU_OR1K64BF -+ -+#define CGEN_INSN_LSB0_P 1 -+ -+/* Minimum size of any insn (in bytes). */ -+#define CGEN_MIN_INSN_SIZE 4 -+ -+/* Maximum size of any insn (in bytes). */ -+#define CGEN_MAX_INSN_SIZE 4 -+ -+#define CGEN_INT_INSN_P 1 -+ -+/* Maximum number of syntax elements in an instruction. */ -+#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 17 -+ -+/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands. -+ e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands -+ we can't hash on everything up to the space. */ -+#define CGEN_MNEMONIC_OPERANDS -+ -+/* Maximum number of fields in an instruction. */ -+#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 8 -+ -+/* Enums. */ -+ -+/* Enum declaration for Exception numbers. */ -+typedef enum except_number { -+ EXCEPT_NONE, EXCEPT_RESET, EXCEPT_BUSERR, EXCEPT_DPF -+ , EXCEPT_IPF, EXCEPT_TICK, EXCEPT_ALIGN, EXCEPT_ILLEGAL -+ , EXCEPT_INT, EXCEPT_DTLBMISS, EXCEPT_ITLBMISS, EXCEPT_RANGE -+ , EXCEPT_SYSCALL, EXCEPT_FPE, EXCEPT_TRAP -+} EXCEPT_NUMBER; -+ -+/* Enum declaration for special purpose register groups. */ -+typedef enum spr_groups { -+ SPR_GROUP_SYS, SPR_GROUP_DMMU, SPR_GROUP_IMMU, SPR_GROUP_DCACHE -+ , SPR_GROUP_ICACHE, SPR_GROUP_MAC, SPR_GROUP_DEBUG, SPR_GROUP_PERF -+ , SPR_GROUP_POWER, SPR_GROUP_PIC, SPR_GROUP_TICK, SPR_GROUP_FPU -+} SPR_GROUPS; -+ -+/* Enum declaration for special purpose register indicies. */ -+typedef enum spr_reg_indices { -+ SPR_INDEX_SYS_VR = 0, SPR_INDEX_SYS_UPR = 1, SPR_INDEX_SYS_CPUCFGR = 2, SPR_INDEX_SYS_DMMUCFGR = 3 -+ , SPR_INDEX_SYS_IMMUCFGR = 4, SPR_INDEX_SYS_DCCFGR = 5, SPR_INDEX_SYS_ICCFGR = 6, SPR_INDEX_SYS_DCFGR = 7 -+ , SPR_INDEX_SYS_PCCFGR = 8, SPR_INDEX_SYS_NPC = 16, SPR_INDEX_SYS_SR = 17, SPR_INDEX_SYS_PPC = 18 -+ , SPR_INDEX_SYS_FPCSR = 20, SPR_INDEX_SYS_EPCR0 = 32, SPR_INDEX_SYS_EPCR1 = 33, SPR_INDEX_SYS_EPCR2 = 34 -+ , SPR_INDEX_SYS_EPCR3 = 35, SPR_INDEX_SYS_EPCR4 = 36, SPR_INDEX_SYS_EPCR5 = 37, SPR_INDEX_SYS_EPCR6 = 38 -+ , SPR_INDEX_SYS_EPCR7 = 39, SPR_INDEX_SYS_EPCR8 = 40, SPR_INDEX_SYS_EPCR9 = 41, SPR_INDEX_SYS_EPCR10 = 42 -+ , SPR_INDEX_SYS_EPCR11 = 43, SPR_INDEX_SYS_EPCR12 = 44, SPR_INDEX_SYS_EPCR13 = 45, SPR_INDEX_SYS_EPCR14 = 46 -+ , SPR_INDEX_SYS_EPCR15 = 47, SPR_INDEX_SYS_EEAR0 = 48, SPR_INDEX_SYS_EEAR1 = 49, SPR_INDEX_SYS_EEAR2 = 50 -+ , SPR_INDEX_SYS_EEAR3 = 51, SPR_INDEX_SYS_EEAR4 = 52, SPR_INDEX_SYS_EEAR5 = 53, SPR_INDEX_SYS_EEAR6 = 54 -+ , SPR_INDEX_SYS_EEAR7 = 55, SPR_INDEX_SYS_EEAR8 = 56, SPR_INDEX_SYS_EEAR9 = 57, SPR_INDEX_SYS_EEAR10 = 58 -+ , SPR_INDEX_SYS_EEAR11 = 59, SPR_INDEX_SYS_EEAR12 = 60, SPR_INDEX_SYS_EEAR13 = 61, SPR_INDEX_SYS_EEAR14 = 62 -+ , SPR_INDEX_SYS_EEAR15 = 63, SPR_INDEX_SYS_ESR0 = 64, SPR_INDEX_SYS_ESR1 = 65, SPR_INDEX_SYS_ESR2 = 66 -+ , SPR_INDEX_SYS_ESR3 = 67, SPR_INDEX_SYS_ESR4 = 68, SPR_INDEX_SYS_ESR5 = 69, SPR_INDEX_SYS_ESR6 = 70 -+ , SPR_INDEX_SYS_ESR7 = 71, SPR_INDEX_SYS_ESR8 = 72, SPR_INDEX_SYS_ESR9 = 73, SPR_INDEX_SYS_ESR10 = 74 -+ , SPR_INDEX_SYS_ESR11 = 75, SPR_INDEX_SYS_ESR12 = 76, SPR_INDEX_SYS_ESR13 = 77, SPR_INDEX_SYS_ESR14 = 78 -+ , SPR_INDEX_SYS_ESR15 = 79, SPR_INDEX_SYS_GPR0 = 1024, SPR_INDEX_SYS_GPR1 = 1025, SPR_INDEX_SYS_GPR2 = 1026 -+ , SPR_INDEX_SYS_GPR3 = 1027, SPR_INDEX_SYS_GPR4 = 1028, SPR_INDEX_SYS_GPR5 = 1029, SPR_INDEX_SYS_GPR6 = 1030 -+ , SPR_INDEX_SYS_GPR7 = 1031, SPR_INDEX_SYS_GPR8 = 1032, SPR_INDEX_SYS_GPR9 = 1033, SPR_INDEX_SYS_GPR10 = 1034 -+ , SPR_INDEX_SYS_GPR11 = 1035, SPR_INDEX_SYS_GPR12 = 1036, SPR_INDEX_SYS_GPR13 = 1037, SPR_INDEX_SYS_GPR14 = 1038 -+ , SPR_INDEX_SYS_GPR15 = 1039, SPR_INDEX_SYS_GPR16 = 1040, SPR_INDEX_SYS_GPR17 = 1041, SPR_INDEX_SYS_GPR18 = 1042 -+ , SPR_INDEX_SYS_GPR19 = 1043, SPR_INDEX_SYS_GPR20 = 1044, SPR_INDEX_SYS_GPR21 = 1045, SPR_INDEX_SYS_GPR22 = 1046 -+ , SPR_INDEX_SYS_GPR23 = 1047, SPR_INDEX_SYS_GPR24 = 1048, SPR_INDEX_SYS_GPR25 = 1049, SPR_INDEX_SYS_GPR26 = 1050 -+ , SPR_INDEX_SYS_GPR27 = 1051, SPR_INDEX_SYS_GPR28 = 1052, SPR_INDEX_SYS_GPR29 = 1053, SPR_INDEX_SYS_GPR30 = 1054 -+ , SPR_INDEX_SYS_GPR31 = 1055, SPR_INDEX_SYS_GPR32 = 1056, SPR_INDEX_SYS_GPR33 = 1057, SPR_INDEX_SYS_GPR34 = 1058 -+ , SPR_INDEX_SYS_GPR35 = 1059, SPR_INDEX_SYS_GPR36 = 1060, SPR_INDEX_SYS_GPR37 = 1061, SPR_INDEX_SYS_GPR38 = 1062 -+ , SPR_INDEX_SYS_GPR39 = 1063, SPR_INDEX_SYS_GPR40 = 1064, SPR_INDEX_SYS_GPR41 = 1065, SPR_INDEX_SYS_GPR42 = 1066 -+ , SPR_INDEX_SYS_GPR43 = 1067, SPR_INDEX_SYS_GPR44 = 1068, SPR_INDEX_SYS_GPR45 = 1069, SPR_INDEX_SYS_GPR46 = 1070 -+ , SPR_INDEX_SYS_GPR47 = 1071, SPR_INDEX_SYS_GPR48 = 1072, SPR_INDEX_SYS_GPR49 = 1073, SPR_INDEX_SYS_GPR50 = 1074 -+ , SPR_INDEX_SYS_GPR51 = 1075, SPR_INDEX_SYS_GPR52 = 1076, SPR_INDEX_SYS_GPR53 = 1077, SPR_INDEX_SYS_GPR54 = 1078 -+ , SPR_INDEX_SYS_GPR55 = 1079, SPR_INDEX_SYS_GPR56 = 1080, SPR_INDEX_SYS_GPR57 = 1081, SPR_INDEX_SYS_GPR58 = 1082 -+ , SPR_INDEX_SYS_GPR59 = 1083, SPR_INDEX_SYS_GPR60 = 1084, SPR_INDEX_SYS_GPR61 = 1085, SPR_INDEX_SYS_GPR62 = 1086 -+ , SPR_INDEX_SYS_GPR63 = 1087, SPR_INDEX_SYS_GPR64 = 1088, SPR_INDEX_SYS_GPR65 = 1089, SPR_INDEX_SYS_GPR66 = 1090 -+ , SPR_INDEX_SYS_GPR67 = 1091, SPR_INDEX_SYS_GPR68 = 1092, SPR_INDEX_SYS_GPR69 = 1093, SPR_INDEX_SYS_GPR70 = 1094 -+ , SPR_INDEX_SYS_GPR71 = 1095, SPR_INDEX_SYS_GPR72 = 1096, SPR_INDEX_SYS_GPR73 = 1097, SPR_INDEX_SYS_GPR74 = 1098 -+ , SPR_INDEX_SYS_GPR75 = 1099, SPR_INDEX_SYS_GPR76 = 1100, SPR_INDEX_SYS_GPR77 = 1101, SPR_INDEX_SYS_GPR78 = 1102 -+ , SPR_INDEX_SYS_GPR79 = 1103, SPR_INDEX_SYS_GPR80 = 1104, SPR_INDEX_SYS_GPR81 = 1105, SPR_INDEX_SYS_GPR82 = 1106 -+ , SPR_INDEX_SYS_GPR83 = 1107, SPR_INDEX_SYS_GPR84 = 1108, SPR_INDEX_SYS_GPR85 = 1109, SPR_INDEX_SYS_GPR86 = 1110 -+ , SPR_INDEX_SYS_GPR87 = 1111, SPR_INDEX_SYS_GPR88 = 1112, SPR_INDEX_SYS_GPR89 = 1113, SPR_INDEX_SYS_GPR90 = 1114 -+ , SPR_INDEX_SYS_GPR91 = 1115, SPR_INDEX_SYS_GPR92 = 1116, SPR_INDEX_SYS_GPR93 = 1117, SPR_INDEX_SYS_GPR94 = 1118 -+ , SPR_INDEX_SYS_GPR95 = 1119, SPR_INDEX_SYS_GPR96 = 1120, SPR_INDEX_SYS_GPR97 = 1121, SPR_INDEX_SYS_GPR98 = 1122 -+ , SPR_INDEX_SYS_GPR99 = 1123, SPR_INDEX_SYS_GPR100 = 1124, SPR_INDEX_SYS_GPR101 = 1125, SPR_INDEX_SYS_GPR102 = 1126 -+ , SPR_INDEX_SYS_GPR103 = 1127, SPR_INDEX_SYS_GPR104 = 1128, SPR_INDEX_SYS_GPR105 = 1129, SPR_INDEX_SYS_GPR106 = 1130 -+ , SPR_INDEX_SYS_GPR107 = 1131, SPR_INDEX_SYS_GPR108 = 1132, SPR_INDEX_SYS_GPR109 = 1133, SPR_INDEX_SYS_GPR110 = 1134 -+ , SPR_INDEX_SYS_GPR111 = 1135, SPR_INDEX_SYS_GPR112 = 1136, SPR_INDEX_SYS_GPR113 = 1137, SPR_INDEX_SYS_GPR114 = 1138 -+ , SPR_INDEX_SYS_GPR115 = 1139, SPR_INDEX_SYS_GPR116 = 1140, SPR_INDEX_SYS_GPR117 = 1141, SPR_INDEX_SYS_GPR118 = 1142 -+ , SPR_INDEX_SYS_GPR119 = 1143, SPR_INDEX_SYS_GPR120 = 1144, SPR_INDEX_SYS_GPR121 = 1145, SPR_INDEX_SYS_GPR122 = 1146 -+ , SPR_INDEX_SYS_GPR123 = 1147, SPR_INDEX_SYS_GPR124 = 1148, SPR_INDEX_SYS_GPR125 = 1149, SPR_INDEX_SYS_GPR126 = 1150 -+ , SPR_INDEX_SYS_GPR127 = 1151, SPR_INDEX_SYS_GPR128 = 1152, SPR_INDEX_SYS_GPR129 = 1153, SPR_INDEX_SYS_GPR130 = 1154 -+ , SPR_INDEX_SYS_GPR131 = 1155, SPR_INDEX_SYS_GPR132 = 1156, SPR_INDEX_SYS_GPR133 = 1157, SPR_INDEX_SYS_GPR134 = 1158 -+ , SPR_INDEX_SYS_GPR135 = 1159, SPR_INDEX_SYS_GPR136 = 1160, SPR_INDEX_SYS_GPR137 = 1161, SPR_INDEX_SYS_GPR138 = 1162 -+ , SPR_INDEX_SYS_GPR139 = 1163, SPR_INDEX_SYS_GPR140 = 1164, SPR_INDEX_SYS_GPR141 = 1165, SPR_INDEX_SYS_GPR142 = 1166 -+ , SPR_INDEX_SYS_GPR143 = 1167, SPR_INDEX_SYS_GPR144 = 1168, SPR_INDEX_SYS_GPR145 = 1169, SPR_INDEX_SYS_GPR146 = 1170 -+ , SPR_INDEX_SYS_GPR147 = 1171, SPR_INDEX_SYS_GPR148 = 1172, SPR_INDEX_SYS_GPR149 = 1173, SPR_INDEX_SYS_GPR150 = 1174 -+ , SPR_INDEX_SYS_GPR151 = 1175, SPR_INDEX_SYS_GPR152 = 1176, SPR_INDEX_SYS_GPR153 = 1177, SPR_INDEX_SYS_GPR154 = 1178 -+ , SPR_INDEX_SYS_GPR155 = 1179, SPR_INDEX_SYS_GPR156 = 1180, SPR_INDEX_SYS_GPR157 = 1181, SPR_INDEX_SYS_GPR158 = 1182 -+ , SPR_INDEX_SYS_GPR159 = 1183, SPR_INDEX_SYS_GPR160 = 1184, SPR_INDEX_SYS_GPR161 = 1185, SPR_INDEX_SYS_GPR162 = 1186 -+ , SPR_INDEX_SYS_GPR163 = 1187, SPR_INDEX_SYS_GPR164 = 1188, SPR_INDEX_SYS_GPR165 = 1189, SPR_INDEX_SYS_GPR166 = 1190 -+ , SPR_INDEX_SYS_GPR167 = 1191, SPR_INDEX_SYS_GPR168 = 1192, SPR_INDEX_SYS_GPR169 = 1193, SPR_INDEX_SYS_GPR170 = 1194 -+ , SPR_INDEX_SYS_GPR171 = 1195, SPR_INDEX_SYS_GPR172 = 1196, SPR_INDEX_SYS_GPR173 = 1197, SPR_INDEX_SYS_GPR174 = 1198 -+ , SPR_INDEX_SYS_GPR175 = 1199, SPR_INDEX_SYS_GPR176 = 1200, SPR_INDEX_SYS_GPR177 = 1201, SPR_INDEX_SYS_GPR178 = 1202 -+ , SPR_INDEX_SYS_GPR179 = 1203, SPR_INDEX_SYS_GPR180 = 1204, SPR_INDEX_SYS_GPR181 = 1205, SPR_INDEX_SYS_GPR182 = 1206 -+ , SPR_INDEX_SYS_GPR183 = 1207, SPR_INDEX_SYS_GPR184 = 1208, SPR_INDEX_SYS_GPR185 = 1209, SPR_INDEX_SYS_GPR186 = 1210 -+ , SPR_INDEX_SYS_GPR187 = 1211, SPR_INDEX_SYS_GPR188 = 1212, SPR_INDEX_SYS_GPR189 = 1213, SPR_INDEX_SYS_GPR190 = 1214 -+ , SPR_INDEX_SYS_GPR191 = 1215, SPR_INDEX_SYS_GPR192 = 1216, SPR_INDEX_SYS_GPR193 = 1217, SPR_INDEX_SYS_GPR194 = 1218 -+ , SPR_INDEX_SYS_GPR195 = 1219, SPR_INDEX_SYS_GPR196 = 1220, SPR_INDEX_SYS_GPR197 = 1221, SPR_INDEX_SYS_GPR198 = 1222 -+ , SPR_INDEX_SYS_GPR199 = 1223, SPR_INDEX_SYS_GPR200 = 1224, SPR_INDEX_SYS_GPR201 = 1225, SPR_INDEX_SYS_GPR202 = 1226 -+ , SPR_INDEX_SYS_GPR203 = 1227, SPR_INDEX_SYS_GPR204 = 1228, SPR_INDEX_SYS_GPR205 = 1229, SPR_INDEX_SYS_GPR206 = 1230 -+ , SPR_INDEX_SYS_GPR207 = 1231, SPR_INDEX_SYS_GPR208 = 1232, SPR_INDEX_SYS_GPR209 = 1233, SPR_INDEX_SYS_GPR210 = 1234 -+ , SPR_INDEX_SYS_GPR211 = 1235, SPR_INDEX_SYS_GPR212 = 1236, SPR_INDEX_SYS_GPR213 = 1237, SPR_INDEX_SYS_GPR214 = 1238 -+ , SPR_INDEX_SYS_GPR215 = 1239, SPR_INDEX_SYS_GPR216 = 1240, SPR_INDEX_SYS_GPR217 = 1241, SPR_INDEX_SYS_GPR218 = 1242 -+ , SPR_INDEX_SYS_GPR219 = 1243, SPR_INDEX_SYS_GPR220 = 1244, SPR_INDEX_SYS_GPR221 = 1245, SPR_INDEX_SYS_GPR222 = 1246 -+ , SPR_INDEX_SYS_GPR223 = 1247, SPR_INDEX_SYS_GPR224 = 1248, SPR_INDEX_SYS_GPR225 = 1249, SPR_INDEX_SYS_GPR226 = 1250 -+ , SPR_INDEX_SYS_GPR227 = 1251, SPR_INDEX_SYS_GPR228 = 1252, SPR_INDEX_SYS_GPR229 = 1253, SPR_INDEX_SYS_GPR230 = 1254 -+ , SPR_INDEX_SYS_GPR231 = 1255, SPR_INDEX_SYS_GPR232 = 1256, SPR_INDEX_SYS_GPR233 = 1257, SPR_INDEX_SYS_GPR234 = 1258 -+ , SPR_INDEX_SYS_GPR235 = 1259, SPR_INDEX_SYS_GPR236 = 1260, SPR_INDEX_SYS_GPR237 = 1261, SPR_INDEX_SYS_GPR238 = 1262 -+ , SPR_INDEX_SYS_GPR239 = 1263, SPR_INDEX_SYS_GPR240 = 1264, SPR_INDEX_SYS_GPR241 = 1265, SPR_INDEX_SYS_GPR242 = 1266 -+ , SPR_INDEX_SYS_GPR243 = 1267, SPR_INDEX_SYS_GPR244 = 1268, SPR_INDEX_SYS_GPR245 = 1269, SPR_INDEX_SYS_GPR246 = 1270 -+ , SPR_INDEX_SYS_GPR247 = 1271, SPR_INDEX_SYS_GPR248 = 1272, SPR_INDEX_SYS_GPR249 = 1273, SPR_INDEX_SYS_GPR250 = 1274 -+ , SPR_INDEX_SYS_GPR251 = 1275, SPR_INDEX_SYS_GPR252 = 1276, SPR_INDEX_SYS_GPR253 = 1277, SPR_INDEX_SYS_GPR254 = 1278 -+ , SPR_INDEX_SYS_GPR255 = 1279, SPR_INDEX_SYS_GPR256 = 1280, SPR_INDEX_SYS_GPR257 = 1281, SPR_INDEX_SYS_GPR258 = 1282 -+ , SPR_INDEX_SYS_GPR259 = 1283, SPR_INDEX_SYS_GPR260 = 1284, SPR_INDEX_SYS_GPR261 = 1285, SPR_INDEX_SYS_GPR262 = 1286 -+ , SPR_INDEX_SYS_GPR263 = 1287, SPR_INDEX_SYS_GPR264 = 1288, SPR_INDEX_SYS_GPR265 = 1289, SPR_INDEX_SYS_GPR266 = 1290 -+ , SPR_INDEX_SYS_GPR267 = 1291, SPR_INDEX_SYS_GPR268 = 1292, SPR_INDEX_SYS_GPR269 = 1293, SPR_INDEX_SYS_GPR270 = 1294 -+ , SPR_INDEX_SYS_GPR271 = 1295, SPR_INDEX_SYS_GPR272 = 1296, SPR_INDEX_SYS_GPR273 = 1297, SPR_INDEX_SYS_GPR274 = 1298 -+ , SPR_INDEX_SYS_GPR275 = 1299, SPR_INDEX_SYS_GPR276 = 1300, SPR_INDEX_SYS_GPR277 = 1301, SPR_INDEX_SYS_GPR278 = 1302 -+ , SPR_INDEX_SYS_GPR279 = 1303, SPR_INDEX_SYS_GPR280 = 1304, SPR_INDEX_SYS_GPR281 = 1305, SPR_INDEX_SYS_GPR282 = 1306 -+ , SPR_INDEX_SYS_GPR283 = 1307, SPR_INDEX_SYS_GPR284 = 1308, SPR_INDEX_SYS_GPR285 = 1309, SPR_INDEX_SYS_GPR286 = 1310 -+ , SPR_INDEX_SYS_GPR287 = 1311, SPR_INDEX_SYS_GPR288 = 1312, SPR_INDEX_SYS_GPR289 = 1313, SPR_INDEX_SYS_GPR290 = 1314 -+ , SPR_INDEX_SYS_GPR291 = 1315, SPR_INDEX_SYS_GPR292 = 1316, SPR_INDEX_SYS_GPR293 = 1317, SPR_INDEX_SYS_GPR294 = 1318 -+ , SPR_INDEX_SYS_GPR295 = 1319, SPR_INDEX_SYS_GPR296 = 1320, SPR_INDEX_SYS_GPR297 = 1321, SPR_INDEX_SYS_GPR298 = 1322 -+ , SPR_INDEX_SYS_GPR299 = 1323, SPR_INDEX_SYS_GPR300 = 1324, SPR_INDEX_SYS_GPR301 = 1325, SPR_INDEX_SYS_GPR302 = 1326 -+ , SPR_INDEX_SYS_GPR303 = 1327, SPR_INDEX_SYS_GPR304 = 1328, SPR_INDEX_SYS_GPR305 = 1329, SPR_INDEX_SYS_GPR306 = 1330 -+ , SPR_INDEX_SYS_GPR307 = 1331, SPR_INDEX_SYS_GPR308 = 1332, SPR_INDEX_SYS_GPR309 = 1333, SPR_INDEX_SYS_GPR310 = 1334 -+ , SPR_INDEX_SYS_GPR311 = 1335, SPR_INDEX_SYS_GPR312 = 1336, SPR_INDEX_SYS_GPR313 = 1337, SPR_INDEX_SYS_GPR314 = 1338 -+ , SPR_INDEX_SYS_GPR315 = 1339, SPR_INDEX_SYS_GPR316 = 1340, SPR_INDEX_SYS_GPR317 = 1341, SPR_INDEX_SYS_GPR318 = 1342 -+ , SPR_INDEX_SYS_GPR319 = 1343, SPR_INDEX_SYS_GPR320 = 1344, SPR_INDEX_SYS_GPR321 = 1345, SPR_INDEX_SYS_GPR322 = 1346 -+ , SPR_INDEX_SYS_GPR323 = 1347, SPR_INDEX_SYS_GPR324 = 1348, SPR_INDEX_SYS_GPR325 = 1349, SPR_INDEX_SYS_GPR326 = 1350 -+ , SPR_INDEX_SYS_GPR327 = 1351, SPR_INDEX_SYS_GPR328 = 1352, SPR_INDEX_SYS_GPR329 = 1353, SPR_INDEX_SYS_GPR330 = 1354 -+ , SPR_INDEX_SYS_GPR331 = 1355, SPR_INDEX_SYS_GPR332 = 1356, SPR_INDEX_SYS_GPR333 = 1357, SPR_INDEX_SYS_GPR334 = 1358 -+ , SPR_INDEX_SYS_GPR335 = 1359, SPR_INDEX_SYS_GPR336 = 1360, SPR_INDEX_SYS_GPR337 = 1361, SPR_INDEX_SYS_GPR338 = 1362 -+ , SPR_INDEX_SYS_GPR339 = 1363, SPR_INDEX_SYS_GPR340 = 1364, SPR_INDEX_SYS_GPR341 = 1365, SPR_INDEX_SYS_GPR342 = 1366 -+ , SPR_INDEX_SYS_GPR343 = 1367, SPR_INDEX_SYS_GPR344 = 1368, SPR_INDEX_SYS_GPR345 = 1369, SPR_INDEX_SYS_GPR346 = 1370 -+ , SPR_INDEX_SYS_GPR347 = 1371, SPR_INDEX_SYS_GPR348 = 1372, SPR_INDEX_SYS_GPR349 = 1373, SPR_INDEX_SYS_GPR350 = 1374 -+ , SPR_INDEX_SYS_GPR351 = 1375, SPR_INDEX_SYS_GPR352 = 1376, SPR_INDEX_SYS_GPR353 = 1377, SPR_INDEX_SYS_GPR354 = 1378 -+ , SPR_INDEX_SYS_GPR355 = 1379, SPR_INDEX_SYS_GPR356 = 1380, SPR_INDEX_SYS_GPR357 = 1381, SPR_INDEX_SYS_GPR358 = 1382 -+ , SPR_INDEX_SYS_GPR359 = 1383, SPR_INDEX_SYS_GPR360 = 1384, SPR_INDEX_SYS_GPR361 = 1385, SPR_INDEX_SYS_GPR362 = 1386 -+ , SPR_INDEX_SYS_GPR363 = 1387, SPR_INDEX_SYS_GPR364 = 1388, SPR_INDEX_SYS_GPR365 = 1389, SPR_INDEX_SYS_GPR366 = 1390 -+ , SPR_INDEX_SYS_GPR367 = 1391, SPR_INDEX_SYS_GPR368 = 1392, SPR_INDEX_SYS_GPR369 = 1393, SPR_INDEX_SYS_GPR370 = 1394 -+ , SPR_INDEX_SYS_GPR371 = 1395, SPR_INDEX_SYS_GPR372 = 1396, SPR_INDEX_SYS_GPR373 = 1397, SPR_INDEX_SYS_GPR374 = 1398 -+ , SPR_INDEX_SYS_GPR375 = 1399, SPR_INDEX_SYS_GPR376 = 1400, SPR_INDEX_SYS_GPR377 = 1401, SPR_INDEX_SYS_GPR378 = 1402 -+ , SPR_INDEX_SYS_GPR379 = 1403, SPR_INDEX_SYS_GPR380 = 1404, SPR_INDEX_SYS_GPR381 = 1405, SPR_INDEX_SYS_GPR382 = 1406 -+ , SPR_INDEX_SYS_GPR383 = 1407, SPR_INDEX_SYS_GPR384 = 1408, SPR_INDEX_SYS_GPR385 = 1409, SPR_INDEX_SYS_GPR386 = 1410 -+ , SPR_INDEX_SYS_GPR387 = 1411, SPR_INDEX_SYS_GPR388 = 1412, SPR_INDEX_SYS_GPR389 = 1413, SPR_INDEX_SYS_GPR390 = 1414 -+ , SPR_INDEX_SYS_GPR391 = 1415, SPR_INDEX_SYS_GPR392 = 1416, SPR_INDEX_SYS_GPR393 = 1417, SPR_INDEX_SYS_GPR394 = 1418 -+ , SPR_INDEX_SYS_GPR395 = 1419, SPR_INDEX_SYS_GPR396 = 1420, SPR_INDEX_SYS_GPR397 = 1421, SPR_INDEX_SYS_GPR398 = 1422 -+ , SPR_INDEX_SYS_GPR399 = 1423, SPR_INDEX_SYS_GPR400 = 1424, SPR_INDEX_SYS_GPR401 = 1425, SPR_INDEX_SYS_GPR402 = 1426 -+ , SPR_INDEX_SYS_GPR403 = 1427, SPR_INDEX_SYS_GPR404 = 1428, SPR_INDEX_SYS_GPR405 = 1429, SPR_INDEX_SYS_GPR406 = 1430 -+ , SPR_INDEX_SYS_GPR407 = 1431, SPR_INDEX_SYS_GPR408 = 1432, SPR_INDEX_SYS_GPR409 = 1433, SPR_INDEX_SYS_GPR410 = 1434 -+ , SPR_INDEX_SYS_GPR411 = 1435, SPR_INDEX_SYS_GPR412 = 1436, SPR_INDEX_SYS_GPR413 = 1437, SPR_INDEX_SYS_GPR414 = 1438 -+ , SPR_INDEX_SYS_GPR415 = 1439, SPR_INDEX_SYS_GPR416 = 1440, SPR_INDEX_SYS_GPR417 = 1441, SPR_INDEX_SYS_GPR418 = 1442 -+ , SPR_INDEX_SYS_GPR419 = 1443, SPR_INDEX_SYS_GPR420 = 1444, SPR_INDEX_SYS_GPR421 = 1445, SPR_INDEX_SYS_GPR422 = 1446 -+ , SPR_INDEX_SYS_GPR423 = 1447, SPR_INDEX_SYS_GPR424 = 1448, SPR_INDEX_SYS_GPR425 = 1449, SPR_INDEX_SYS_GPR426 = 1450 -+ , SPR_INDEX_SYS_GPR427 = 1451, SPR_INDEX_SYS_GPR428 = 1452, SPR_INDEX_SYS_GPR429 = 1453, SPR_INDEX_SYS_GPR430 = 1454 -+ , SPR_INDEX_SYS_GPR431 = 1455, SPR_INDEX_SYS_GPR432 = 1456, SPR_INDEX_SYS_GPR433 = 1457, SPR_INDEX_SYS_GPR434 = 1458 -+ , SPR_INDEX_SYS_GPR435 = 1459, SPR_INDEX_SYS_GPR436 = 1460, SPR_INDEX_SYS_GPR437 = 1461, SPR_INDEX_SYS_GPR438 = 1462 -+ , SPR_INDEX_SYS_GPR439 = 1463, SPR_INDEX_SYS_GPR440 = 1464, SPR_INDEX_SYS_GPR441 = 1465, SPR_INDEX_SYS_GPR442 = 1466 -+ , SPR_INDEX_SYS_GPR443 = 1467, SPR_INDEX_SYS_GPR444 = 1468, SPR_INDEX_SYS_GPR445 = 1469, SPR_INDEX_SYS_GPR446 = 1470 -+ , SPR_INDEX_SYS_GPR447 = 1471, SPR_INDEX_SYS_GPR448 = 1472, SPR_INDEX_SYS_GPR449 = 1473, SPR_INDEX_SYS_GPR450 = 1474 -+ , SPR_INDEX_SYS_GPR451 = 1475, SPR_INDEX_SYS_GPR452 = 1476, SPR_INDEX_SYS_GPR453 = 1477, SPR_INDEX_SYS_GPR454 = 1478 -+ , SPR_INDEX_SYS_GPR455 = 1479, SPR_INDEX_SYS_GPR456 = 1480, SPR_INDEX_SYS_GPR457 = 1481, SPR_INDEX_SYS_GPR458 = 1482 -+ , SPR_INDEX_SYS_GPR459 = 1483, SPR_INDEX_SYS_GPR460 = 1484, SPR_INDEX_SYS_GPR461 = 1485, SPR_INDEX_SYS_GPR462 = 1486 -+ , SPR_INDEX_SYS_GPR463 = 1487, SPR_INDEX_SYS_GPR464 = 1488, SPR_INDEX_SYS_GPR465 = 1489, SPR_INDEX_SYS_GPR466 = 1490 -+ , SPR_INDEX_SYS_GPR467 = 1491, SPR_INDEX_SYS_GPR468 = 1492, SPR_INDEX_SYS_GPR469 = 1493, SPR_INDEX_SYS_GPR470 = 1494 -+ , SPR_INDEX_SYS_GPR471 = 1495, SPR_INDEX_SYS_GPR472 = 1496, SPR_INDEX_SYS_GPR473 = 1497, SPR_INDEX_SYS_GPR474 = 1498 -+ , SPR_INDEX_SYS_GPR475 = 1499, SPR_INDEX_SYS_GPR476 = 1500, SPR_INDEX_SYS_GPR477 = 1501, SPR_INDEX_SYS_GPR478 = 1502 -+ , SPR_INDEX_SYS_GPR479 = 1503, SPR_INDEX_SYS_GPR480 = 1504, SPR_INDEX_SYS_GPR481 = 1505, SPR_INDEX_SYS_GPR482 = 1506 -+ , SPR_INDEX_SYS_GPR483 = 1507, SPR_INDEX_SYS_GPR484 = 1508, SPR_INDEX_SYS_GPR485 = 1509, SPR_INDEX_SYS_GPR486 = 1510 -+ , SPR_INDEX_SYS_GPR487 = 1511, SPR_INDEX_SYS_GPR488 = 1512, SPR_INDEX_SYS_GPR489 = 1513, SPR_INDEX_SYS_GPR490 = 1514 -+ , SPR_INDEX_SYS_GPR491 = 1515, SPR_INDEX_SYS_GPR492 = 1516, SPR_INDEX_SYS_GPR493 = 1517, SPR_INDEX_SYS_GPR494 = 1518 -+ , SPR_INDEX_SYS_GPR495 = 1519, SPR_INDEX_SYS_GPR496 = 1520, SPR_INDEX_SYS_GPR497 = 1521, SPR_INDEX_SYS_GPR498 = 1522 -+ , SPR_INDEX_SYS_GPR499 = 1523, SPR_INDEX_SYS_GPR500 = 1524, SPR_INDEX_SYS_GPR501 = 1525, SPR_INDEX_SYS_GPR502 = 1526 -+ , SPR_INDEX_SYS_GPR503 = 1527, SPR_INDEX_SYS_GPR504 = 1528, SPR_INDEX_SYS_GPR505 = 1529, SPR_INDEX_SYS_GPR506 = 1530 -+ , SPR_INDEX_SYS_GPR507 = 1531, SPR_INDEX_SYS_GPR508 = 1532, SPR_INDEX_SYS_GPR509 = 1533, SPR_INDEX_SYS_GPR510 = 1534 -+ , SPR_INDEX_SYS_GPR511 = 1535, SPR_INDEX_MAC_MACLO = 1, SPR_INDEX_MAC_MACHI = 2, SPR_INDEX_TICK_TTMR = 0 -+} SPR_REG_INDICES; -+ -+/* Enum declaration for SPR field msb positions. */ -+typedef enum spr_field_msbs { -+ SPR_FIELD_MSB_SYS_VR_REV = 5, SPR_FIELD_MSB_SYS_VR_CFG = 23, SPR_FIELD_MSB_SYS_VR_VER = 31, SPR_FIELD_MSB_SYS_UPR_UP = 0 -+ , SPR_FIELD_MSB_SYS_UPR_DCP = 1, SPR_FIELD_MSB_SYS_UPR_ICP = 2, SPR_FIELD_MSB_SYS_UPR_DMP = 3, SPR_FIELD_MSB_SYS_UPR_MP = 4 -+ , SPR_FIELD_MSB_SYS_UPR_IMP = 5, SPR_FIELD_MSB_SYS_UPR_DUP = 6, SPR_FIELD_MSB_SYS_UPR_PCUP = 7, SPR_FIELD_MSB_SYS_UPR_PICP = 8 -+ , SPR_FIELD_MSB_SYS_UPR_PMP = 9, SPR_FIELD_MSB_SYS_UPR_TTP = 10, SPR_FIELD_MSB_SYS_UPR_CUP = 31, SPR_FIELD_MSB_SYS_CPUCFGR_NSGR = 3 -+ , SPR_FIELD_MSB_SYS_CPUCFGR_CGF = 4, SPR_FIELD_MSB_SYS_CPUCFGR_OB32S = 5, SPR_FIELD_MSB_SYS_CPUCFGR_OB64S = 6, SPR_FIELD_MSB_SYS_CPUCFGR_OF32S = 7 -+ , SPR_FIELD_MSB_SYS_CPUCFGR_OF64S = 8, SPR_FIELD_MSB_SYS_CPUCFGR_OV64S = 9, SPR_FIELD_MSB_SYS_CPUCFGR_ND = 10, SPR_FIELD_MSB_SYS_SR_SM = 0 -+ , SPR_FIELD_MSB_SYS_SR_TEE = 1, SPR_FIELD_MSB_SYS_SR_IEE = 2, SPR_FIELD_MSB_SYS_SR_DCE = 3, SPR_FIELD_MSB_SYS_SR_ICE = 4 -+ , SPR_FIELD_MSB_SYS_SR_DME = 5, SPR_FIELD_MSB_SYS_SR_IME = 6, SPR_FIELD_MSB_SYS_SR_LEE = 7, SPR_FIELD_MSB_SYS_SR_CE = 8 -+ , SPR_FIELD_MSB_SYS_SR_F = 9, SPR_FIELD_MSB_SYS_SR_CY = 10, SPR_FIELD_MSB_SYS_SR_OV = 11, SPR_FIELD_MSB_SYS_SR_OVE = 12 -+ , SPR_FIELD_MSB_SYS_SR_DSX = 13, SPR_FIELD_MSB_SYS_SR_EPH = 14, SPR_FIELD_MSB_SYS_SR_FO = 15, SPR_FIELD_MSB_SYS_SR_SUMRA = 16 -+ , SPR_FIELD_MSB_SYS_SR_CID = 31, SPR_FIELD_MSB_SYS_FPCSR_FPEE = 0, SPR_FIELD_MSB_SYS_FPCSR_RM = 2, SPR_FIELD_MSB_SYS_FPCSR_OVF = 3 -+ , SPR_FIELD_MSB_SYS_FPCSR_UNF = 4, SPR_FIELD_MSB_SYS_FPCSR_SNF = 5, SPR_FIELD_MSB_SYS_FPCSR_QNF = 6, SPR_FIELD_MSB_SYS_FPCSR_ZF = 7 -+ , SPR_FIELD_MSB_SYS_FPCSR_IXF = 8, SPR_FIELD_MSB_SYS_FPCSR_IVF = 9, SPR_FIELD_MSB_SYS_FPCSR_INF = 10, SPR_FIELD_MSB_SYS_FPCSR_DZF = 11 -+} SPR_FIELD_MSBS; -+ -+/* Enum declaration for SPR field lsb positions. */ -+typedef enum spr_field_lsbs { -+ SPR_FIELD_SIZE_SYS_VR_REV = 0, SPR_FIELD_SIZE_SYS_VR_CFG = 16, SPR_FIELD_SIZE_SYS_VR_VER = 24, SPR_FIELD_SIZE_SYS_UPR_UP = 0 -+ , SPR_FIELD_SIZE_SYS_UPR_DCP = 1, SPR_FIELD_SIZE_SYS_UPR_ICP = 2, SPR_FIELD_SIZE_SYS_UPR_DMP = 3, SPR_FIELD_SIZE_SYS_UPR_MP = 4 -+ , SPR_FIELD_SIZE_SYS_UPR_IMP = 5, SPR_FIELD_SIZE_SYS_UPR_DUP = 6, SPR_FIELD_SIZE_SYS_UPR_PCUP = 7, SPR_FIELD_SIZE_SYS_UPR_PICP = 8 -+ , SPR_FIELD_SIZE_SYS_UPR_PMP = 9, SPR_FIELD_SIZE_SYS_UPR_TTP = 10, SPR_FIELD_SIZE_SYS_UPR_CUP = 24, SPR_FIELD_SIZE_SYS_CPUCFGR_NSGR = 0 -+ , SPR_FIELD_SIZE_SYS_CPUCFGR_CGF = 4, SPR_FIELD_SIZE_SYS_CPUCFGR_OB32S = 5, SPR_FIELD_SIZE_SYS_CPUCFGR_OB64S = 6, SPR_FIELD_SIZE_SYS_CPUCFGR_OF32S = 7 -+ , SPR_FIELD_SIZE_SYS_CPUCFGR_OF64S = 8, SPR_FIELD_SIZE_SYS_CPUCFGR_OV64S = 9, SPR_FIELD_SIZE_SYS_CPUCFGR_ND = 10, SPR_FIELD_SIZE_SYS_SR_SM = 0 -+ , SPR_FIELD_SIZE_SYS_SR_TEE = 1, SPR_FIELD_SIZE_SYS_SR_IEE = 2, SPR_FIELD_SIZE_SYS_SR_DCE = 3, SPR_FIELD_SIZE_SYS_SR_ICE = 4 -+ , SPR_FIELD_SIZE_SYS_SR_DME = 5, SPR_FIELD_SIZE_SYS_SR_IME = 6, SPR_FIELD_SIZE_SYS_SR_LEE = 7, SPR_FIELD_SIZE_SYS_SR_CE = 8 -+ , SPR_FIELD_SIZE_SYS_SR_F = 9, SPR_FIELD_SIZE_SYS_SR_CY = 10, SPR_FIELD_SIZE_SYS_SR_OV = 11, SPR_FIELD_SIZE_SYS_SR_OVE = 12 -+ , SPR_FIELD_SIZE_SYS_SR_DSX = 13, SPR_FIELD_SIZE_SYS_SR_EPH = 14, SPR_FIELD_SIZE_SYS_SR_FO = 15, SPR_FIELD_SIZE_SYS_SR_SUMRA = 16 -+ , SPR_FIELD_SIZE_SYS_SR_CID = 28, SPR_FIELD_SIZE_SYS_FPCSR_FPEE = 0, SPR_FIELD_SIZE_SYS_FPCSR_RM = 1, SPR_FIELD_SIZE_SYS_FPCSR_OVF = 3 -+ , SPR_FIELD_SIZE_SYS_FPCSR_UNF = 4, SPR_FIELD_SIZE_SYS_FPCSR_SNF = 5, SPR_FIELD_SIZE_SYS_FPCSR_QNF = 6, SPR_FIELD_SIZE_SYS_FPCSR_ZF = 7 -+ , SPR_FIELD_SIZE_SYS_FPCSR_IXF = 8, SPR_FIELD_SIZE_SYS_FPCSR_IVF = 9, SPR_FIELD_SIZE_SYS_FPCSR_INF = 10, SPR_FIELD_SIZE_SYS_FPCSR_DZF = 11 -+} SPR_FIELD_LSBS; -+ -+/* Enum declaration for SPR field masks. */ -+typedef enum spr_field_masks { -+ SPR_FIELD_MASK_SYS_VR_REV = 63, SPR_FIELD_MASK_SYS_VR_CFG = 16711680, SPR_FIELD_MASK_SYS_VR_VER = 4278190080u, SPR_FIELD_MASK_SYS_UPR_UP = 1 -+ , SPR_FIELD_MASK_SYS_UPR_DCP = 2, SPR_FIELD_MASK_SYS_UPR_ICP = 4, SPR_FIELD_MASK_SYS_UPR_DMP = 8, SPR_FIELD_MASK_SYS_UPR_MP = 16 -+ , SPR_FIELD_MASK_SYS_UPR_IMP = 32, SPR_FIELD_MASK_SYS_UPR_DUP = 64, SPR_FIELD_MASK_SYS_UPR_PCUP = 128, SPR_FIELD_MASK_SYS_UPR_PICP = 256 -+ , SPR_FIELD_MASK_SYS_UPR_PMP = 512, SPR_FIELD_MASK_SYS_UPR_TTP = 1024, SPR_FIELD_MASK_SYS_UPR_CUP = 4278190080u, SPR_FIELD_MASK_SYS_CPUCFGR_NSGR = 15 -+ , SPR_FIELD_MASK_SYS_CPUCFGR_CGF = 16, SPR_FIELD_MASK_SYS_CPUCFGR_OB32S = 32, SPR_FIELD_MASK_SYS_CPUCFGR_OB64S = 64, SPR_FIELD_MASK_SYS_CPUCFGR_OF32S = 128 -+ , SPR_FIELD_MASK_SYS_CPUCFGR_OF64S = 256, SPR_FIELD_MASK_SYS_CPUCFGR_OV64S = 512, SPR_FIELD_MASK_SYS_CPUCFGR_ND = 1024, SPR_FIELD_MASK_SYS_SR_SM = 1 -+ , SPR_FIELD_MASK_SYS_SR_TEE = 2, SPR_FIELD_MASK_SYS_SR_IEE = 4, SPR_FIELD_MASK_SYS_SR_DCE = 8, SPR_FIELD_MASK_SYS_SR_ICE = 16 -+ , SPR_FIELD_MASK_SYS_SR_DME = 32, SPR_FIELD_MASK_SYS_SR_IME = 64, SPR_FIELD_MASK_SYS_SR_LEE = 128, SPR_FIELD_MASK_SYS_SR_CE = 256 -+ , SPR_FIELD_MASK_SYS_SR_F = 512, SPR_FIELD_MASK_SYS_SR_CY = 1024, SPR_FIELD_MASK_SYS_SR_OV = 2048, SPR_FIELD_MASK_SYS_SR_OVE = 4096 -+ , SPR_FIELD_MASK_SYS_SR_DSX = 8192, SPR_FIELD_MASK_SYS_SR_EPH = 16384, SPR_FIELD_MASK_SYS_SR_FO = 32768, SPR_FIELD_MASK_SYS_SR_SUMRA = 65536 -+ , SPR_FIELD_MASK_SYS_SR_CID = 4026531840u, SPR_FIELD_MASK_SYS_FPCSR_FPEE = 1, SPR_FIELD_MASK_SYS_FPCSR_RM = 6, SPR_FIELD_MASK_SYS_FPCSR_OVF = 8 -+ , SPR_FIELD_MASK_SYS_FPCSR_UNF = 16, SPR_FIELD_MASK_SYS_FPCSR_SNF = 32, SPR_FIELD_MASK_SYS_FPCSR_QNF = 64, SPR_FIELD_MASK_SYS_FPCSR_ZF = 128 -+ , SPR_FIELD_MASK_SYS_FPCSR_IXF = 256, SPR_FIELD_MASK_SYS_FPCSR_IVF = 512, SPR_FIELD_MASK_SYS_FPCSR_INF = 1024, SPR_FIELD_MASK_SYS_FPCSR_DZF = 2048 -+} SPR_FIELD_MASKS; -+ -+/* Enum declaration for insn main opcode enums. */ -+typedef enum insn_opcode { -+ OPC_J = 0, OPC_JAL = 1, OPC_BNF = 3, OPC_BF = 4 -+ , OPC_NOP = 5, OPC_MOVHIMACRC = 6, OPC_SYSTRAPSYNCS = 8, OPC_RFE = 9 -+ , OPC_VECTOR = 10, OPC_JR = 17, OPC_JALR = 18, OPC_MACI = 19 -+ , OPC_LWA = 27, OPC_CUST1 = 28, OPC_CUST2 = 29, OPC_CUST3 = 30 -+ , OPC_CUST4 = 31, OPC_LD = 32, OPC_LWZ = 33, OPC_LWS = 34 -+ , OPC_LBZ = 35, OPC_LBS = 36, OPC_LHZ = 37, OPC_LHS = 38 -+ , OPC_ADDI = 39, OPC_ADDIC = 40, OPC_ANDI = 41, OPC_ORI = 42 -+ , OPC_XORI = 43, OPC_MULI = 44, OPC_MFSPR = 45, OPC_SHROTI = 46 -+ , OPC_SFI = 47, OPC_MTSPR = 48, OPC_MAC = 49, OPC_FLOAT = 50 -+ , OPC_SWA = 51, OPC_SD = 52, OPC_SW = 53, OPC_SB = 54 -+ , OPC_SH = 55, OPC_ALU = 56, OPC_SF = 57, OPC_CUST5 = 60 -+ , OPC_CUST6 = 61, OPC_CUST7 = 62, OPC_CUST8 = 63 -+} INSN_OPCODE; -+ -+/* Enum declaration for systrapsync insn opcode enums. */ -+typedef enum insn_opcode_systrapsyncs { -+ OPC_SYSTRAPSYNCS_SYSCALL = 0, OPC_SYSTRAPSYNCS_TRAP = 8, OPC_SYSTRAPSYNCS_MSYNC = 16, OPC_SYSTRAPSYNCS_PSYNC = 20 -+ , OPC_SYSTRAPSYNCS_CSYNC = 24 -+} INSN_OPCODE_SYSTRAPSYNCS; -+ -+/* Enum declaration for movhi/macrc insn opcode enums. */ -+typedef enum insn_opcode_movehimacrc { -+ OPC_MOVHIMACRC_MOVHI, OPC_MOVHIMACRC_MACRC -+} INSN_OPCODE_MOVEHIMACRC; -+ -+/* Enum declaration for multiply/accumulate insn opcode enums. */ -+typedef enum insn_opcode_mac { -+ OPC_MAC_MAC = 1, OPC_MAC_MSB = 2 -+} INSN_OPCODE_MAC; -+ -+/* Enum declaration for shift/rotate insn opcode enums. */ -+typedef enum insn_opcode_shorts { -+ OPC_SHROTS_SLL, OPC_SHROTS_SRL, OPC_SHROTS_SRA, OPC_SHROTS_ROR -+} INSN_OPCODE_SHORTS; -+ -+/* Enum declaration for extend byte/half opcode enums. */ -+typedef enum insn_opcode_extbhs { -+ OPC_EXTBHS_EXTHS, OPC_EXTBHS_EXTBS, OPC_EXTBHS_EXTHZ, OPC_EXTBHS_EXTBZ -+} INSN_OPCODE_EXTBHS; -+ -+/* Enum declaration for extend word opcode enums. */ -+typedef enum insn_opcode_extws { -+ OPC_EXTWS_EXTWS, OPC_EXTWS_EXTWZ -+} INSN_OPCODE_EXTWS; -+ -+/* Enum declaration for alu reg/reg insn opcode enums. */ -+typedef enum insn_opcode_alu_regreg { -+ OPC_ALU_REGREG_ADD = 0, OPC_ALU_REGREG_ADDC = 1, OPC_ALU_REGREG_SUB = 2, OPC_ALU_REGREG_AND = 3 -+ , OPC_ALU_REGREG_OR = 4, OPC_ALU_REGREG_XOR = 5, OPC_ALU_REGREG_MUL = 6, OPC_ALU_REGREG_SHROT = 8 -+ , OPC_ALU_REGREG_DIV = 9, OPC_ALU_REGREG_DIVU = 10, OPC_ALU_REGREG_MULU = 11, OPC_ALU_REGREG_EXTBH = 12 -+ , OPC_ALU_REGREG_EXTW = 13, OPC_ALU_REGREG_CMOV = 14, OPC_ALU_REGREG_FFL1 = 15 -+} INSN_OPCODE_ALU_REGREG; -+ -+/* Enum declaration for setflag insn opcode enums. */ -+typedef enum insn_opcode_setflag { -+ OPC_SF_EQ = 0, OPC_SF_NE = 1, OPC_SF_GTU = 2, OPC_SF_GEU = 3 -+ , OPC_SF_LTU = 4, OPC_SF_LEU = 5, OPC_SF_GTS = 10, OPC_SF_GES = 11 -+ , OPC_SF_LTS = 12, OPC_SF_LES = 13 -+} INSN_OPCODE_SETFLAG; -+ -+/* Enum declaration for floating point reg/reg insn opcode enums. */ -+typedef enum insn_opcode_float_regreg { -+ OPC_FLOAT_REGREG_ADD_S = 0, OPC_FLOAT_REGREG_SUB_S = 1, OPC_FLOAT_REGREG_MUL_S = 2, OPC_FLOAT_REGREG_DIV_S = 3 -+ , OPC_FLOAT_REGREG_ITOF_S = 4, OPC_FLOAT_REGREG_FTOI_S = 5, OPC_FLOAT_REGREG_REM_S = 6, OPC_FLOAT_REGREG_MADD_S = 7 -+ , OPC_FLOAT_REGREG_SFEQ_S = 8, OPC_FLOAT_REGREG_SFNE_S = 9, OPC_FLOAT_REGREG_SFGT_S = 10, OPC_FLOAT_REGREG_SFGE_S = 11 -+ , OPC_FLOAT_REGREG_SFLT_S = 12, OPC_FLOAT_REGREG_SFLE_S = 13, OPC_FLOAT_REGREG_ADD_D = 16, OPC_FLOAT_REGREG_SUB_D = 17 -+ , OPC_FLOAT_REGREG_MUL_D = 18, OPC_FLOAT_REGREG_DIV_D = 19, OPC_FLOAT_REGREG_ITOF_D = 20, OPC_FLOAT_REGREG_FTOI_D = 21 -+ , OPC_FLOAT_REGREG_REM_D = 22, OPC_FLOAT_REGREG_MADD_D = 23, OPC_FLOAT_REGREG_SFEQ_D = 24, OPC_FLOAT_REGREG_SFNE_D = 25 -+ , OPC_FLOAT_REGREG_SFGT_D = 26, OPC_FLOAT_REGREG_SFGE_D = 27, OPC_FLOAT_REGREG_SFLT_D = 28, OPC_FLOAT_REGREG_SFLE_D = 29 -+ , OPC_FLOAT_REGREG_CUST1_S = 208, OPC_FLOAT_REGREG_CUST1_D = 224 -+} INSN_OPCODE_FLOAT_REGREG; -+ -+/* Attributes. */ -+ -+/* Enum declaration for machine type selection. */ -+typedef enum mach_attr { -+ MACH_BASE, MACH_OR32, MACH_OR32ND, MACH_OR64 -+ , MACH_OR64ND, MACH_MAX -+} MACH_ATTR; -+ -+/* Enum declaration for instruction set selection. */ -+typedef enum isa_attr { -+ ISA_OPENRISC, ISA_MAX -+} ISA_ATTR; -+ -+/* Number of architecture variants. */ -+#define MAX_ISAS 1 -+#define MAX_MACHS ((int) MACH_MAX) -+ -+/* Ifield support. */ -+ -+/* Ifield attribute indices. */ -+ -+/* Enum declaration for cgen_ifld attrs. */ -+typedef enum cgen_ifld_attr { -+ CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED -+ , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31 -+ , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS -+} CGEN_IFLD_ATTR; -+ -+/* Number of non-boolean elements in cgen_ifld_attr. */ -+#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1) -+ -+/* cgen_ifld attribute accessor macros. */ -+#define CGEN_ATTR_CGEN_IFLD_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_IFLD_MACH-CGEN_IFLD_START_NBOOLS-1].nonbitset) -+#define CGEN_ATTR_CGEN_IFLD_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_VIRTUAL)) != 0) -+#define CGEN_ATTR_CGEN_IFLD_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_PCREL_ADDR)) != 0) -+#define CGEN_ATTR_CGEN_IFLD_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_ABS_ADDR)) != 0) -+#define CGEN_ATTR_CGEN_IFLD_RESERVED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_RESERVED)) != 0) -+#define CGEN_ATTR_CGEN_IFLD_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGN_OPT)) != 0) -+#define CGEN_ATTR_CGEN_IFLD_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_IFLD_SIGNED)) != 0) -+ -+/* Enum declaration for or1k ifield types. */ -+typedef enum ifield_type { -+ OR1K_F_NIL, OR1K_F_ANYOF, OR1K_F_OPCODE, OR1K_F_R1 -+ , OR1K_F_R2, OR1K_F_R3, OR1K_F_OP_25_2, OR1K_F_OP_25_5 -+ , OR1K_F_OP_16_1, OR1K_F_OP_7_4, OR1K_F_OP_3_4, OR1K_F_OP_9_2 -+ , OR1K_F_OP_9_4, OR1K_F_OP_7_8, OR1K_F_OP_7_2, OR1K_F_RESV_25_26 -+ , OR1K_F_RESV_25_10, OR1K_F_RESV_25_5, OR1K_F_RESV_23_8, OR1K_F_RESV_20_21 -+ , OR1K_F_RESV_20_5, OR1K_F_RESV_20_4, OR1K_F_RESV_15_8, OR1K_F_RESV_15_6 -+ , OR1K_F_RESV_10_11, OR1K_F_RESV_10_7, OR1K_F_RESV_10_3, OR1K_F_RESV_10_1 -+ , OR1K_F_RESV_7_4, OR1K_F_RESV_5_2, OR1K_F_IMM16_25_5, OR1K_F_IMM16_10_11 -+ , OR1K_F_DISP26, OR1K_F_UIMM16, OR1K_F_SIMM16, OR1K_F_UIMM6 -+ , OR1K_F_UIMM16_SPLIT, OR1K_F_SIMM16_SPLIT, OR1K_F_MAX -+} IFIELD_TYPE; -+ -+#define MAX_IFLD ((int) OR1K_F_MAX) -+ -+/* Hardware attribute indices. */ -+ -+/* Enum declaration for cgen_hw attrs. */ -+typedef enum cgen_hw_attr { -+ CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE -+ , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS -+} CGEN_HW_ATTR; -+ -+/* Number of non-boolean elements in cgen_hw_attr. */ -+#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1) -+ -+/* cgen_hw attribute accessor macros. */ -+#define CGEN_ATTR_CGEN_HW_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_HW_MACH-CGEN_HW_START_NBOOLS-1].nonbitset) -+#define CGEN_ATTR_CGEN_HW_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_VIRTUAL)) != 0) -+#define CGEN_ATTR_CGEN_HW_CACHE_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_CACHE_ADDR)) != 0) -+#define CGEN_ATTR_CGEN_HW_PC_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PC)) != 0) -+#define CGEN_ATTR_CGEN_HW_PROFILE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_HW_PROFILE)) != 0) -+ -+/* Enum declaration for or1k hardware types. */ -+typedef enum cgen_hw_type { -+ HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR -+ , HW_H_IADDR, HW_H_PC, HW_H_FSR, HW_H_FDR -+ , HW_H_SPR, HW_H_GPR, HW_H_SYS_VR, HW_H_SYS_UPR -+ , HW_H_SYS_CPUCFGR, HW_H_SYS_DMMUCFGR, HW_H_SYS_IMMUCFGR, HW_H_SYS_DCCFGR -+ , HW_H_SYS_ICCFGR, HW_H_SYS_DCFGR, HW_H_SYS_PCCFGR, HW_H_SYS_NPC -+ , HW_H_SYS_SR, HW_H_SYS_PPC, HW_H_SYS_FPCSR, HW_H_SYS_EPCR0 -+ , HW_H_SYS_EPCR1, HW_H_SYS_EPCR2, HW_H_SYS_EPCR3, HW_H_SYS_EPCR4 -+ , HW_H_SYS_EPCR5, HW_H_SYS_EPCR6, HW_H_SYS_EPCR7, HW_H_SYS_EPCR8 -+ , HW_H_SYS_EPCR9, HW_H_SYS_EPCR10, HW_H_SYS_EPCR11, HW_H_SYS_EPCR12 -+ , HW_H_SYS_EPCR13, HW_H_SYS_EPCR14, HW_H_SYS_EPCR15, HW_H_SYS_EEAR0 -+ , HW_H_SYS_EEAR1, HW_H_SYS_EEAR2, HW_H_SYS_EEAR3, HW_H_SYS_EEAR4 -+ , HW_H_SYS_EEAR5, HW_H_SYS_EEAR6, HW_H_SYS_EEAR7, HW_H_SYS_EEAR8 -+ , HW_H_SYS_EEAR9, HW_H_SYS_EEAR10, HW_H_SYS_EEAR11, HW_H_SYS_EEAR12 -+ , HW_H_SYS_EEAR13, HW_H_SYS_EEAR14, HW_H_SYS_EEAR15, HW_H_SYS_ESR0 -+ , HW_H_SYS_ESR1, HW_H_SYS_ESR2, HW_H_SYS_ESR3, HW_H_SYS_ESR4 -+ , HW_H_SYS_ESR5, HW_H_SYS_ESR6, HW_H_SYS_ESR7, HW_H_SYS_ESR8 -+ , HW_H_SYS_ESR9, HW_H_SYS_ESR10, HW_H_SYS_ESR11, HW_H_SYS_ESR12 -+ , HW_H_SYS_ESR13, HW_H_SYS_ESR14, HW_H_SYS_ESR15, HW_H_SYS_GPR0 -+ , HW_H_SYS_GPR1, HW_H_SYS_GPR2, HW_H_SYS_GPR3, HW_H_SYS_GPR4 -+ , HW_H_SYS_GPR5, HW_H_SYS_GPR6, HW_H_SYS_GPR7, HW_H_SYS_GPR8 -+ , HW_H_SYS_GPR9, HW_H_SYS_GPR10, HW_H_SYS_GPR11, HW_H_SYS_GPR12 -+ , HW_H_SYS_GPR13, HW_H_SYS_GPR14, HW_H_SYS_GPR15, HW_H_SYS_GPR16 -+ , HW_H_SYS_GPR17, HW_H_SYS_GPR18, HW_H_SYS_GPR19, HW_H_SYS_GPR20 -+ , HW_H_SYS_GPR21, HW_H_SYS_GPR22, HW_H_SYS_GPR23, HW_H_SYS_GPR24 -+ , HW_H_SYS_GPR25, HW_H_SYS_GPR26, HW_H_SYS_GPR27, HW_H_SYS_GPR28 -+ , HW_H_SYS_GPR29, HW_H_SYS_GPR30, HW_H_SYS_GPR31, HW_H_SYS_GPR32 -+ , HW_H_SYS_GPR33, HW_H_SYS_GPR34, HW_H_SYS_GPR35, HW_H_SYS_GPR36 -+ , HW_H_SYS_GPR37, HW_H_SYS_GPR38, HW_H_SYS_GPR39, HW_H_SYS_GPR40 -+ , HW_H_SYS_GPR41, HW_H_SYS_GPR42, HW_H_SYS_GPR43, HW_H_SYS_GPR44 -+ , HW_H_SYS_GPR45, HW_H_SYS_GPR46, HW_H_SYS_GPR47, HW_H_SYS_GPR48 -+ , HW_H_SYS_GPR49, HW_H_SYS_GPR50, HW_H_SYS_GPR51, HW_H_SYS_GPR52 -+ , HW_H_SYS_GPR53, HW_H_SYS_GPR54, HW_H_SYS_GPR55, HW_H_SYS_GPR56 -+ , HW_H_SYS_GPR57, HW_H_SYS_GPR58, HW_H_SYS_GPR59, HW_H_SYS_GPR60 -+ , HW_H_SYS_GPR61, HW_H_SYS_GPR62, HW_H_SYS_GPR63, HW_H_SYS_GPR64 -+ , HW_H_SYS_GPR65, HW_H_SYS_GPR66, HW_H_SYS_GPR67, HW_H_SYS_GPR68 -+ , HW_H_SYS_GPR69, HW_H_SYS_GPR70, HW_H_SYS_GPR71, HW_H_SYS_GPR72 -+ , HW_H_SYS_GPR73, HW_H_SYS_GPR74, HW_H_SYS_GPR75, HW_H_SYS_GPR76 -+ , HW_H_SYS_GPR77, HW_H_SYS_GPR78, HW_H_SYS_GPR79, HW_H_SYS_GPR80 -+ , HW_H_SYS_GPR81, HW_H_SYS_GPR82, HW_H_SYS_GPR83, HW_H_SYS_GPR84 -+ , HW_H_SYS_GPR85, HW_H_SYS_GPR86, HW_H_SYS_GPR87, HW_H_SYS_GPR88 -+ , HW_H_SYS_GPR89, HW_H_SYS_GPR90, HW_H_SYS_GPR91, HW_H_SYS_GPR92 -+ , HW_H_SYS_GPR93, HW_H_SYS_GPR94, HW_H_SYS_GPR95, HW_H_SYS_GPR96 -+ , HW_H_SYS_GPR97, HW_H_SYS_GPR98, HW_H_SYS_GPR99, HW_H_SYS_GPR100 -+ , HW_H_SYS_GPR101, HW_H_SYS_GPR102, HW_H_SYS_GPR103, HW_H_SYS_GPR104 -+ , HW_H_SYS_GPR105, HW_H_SYS_GPR106, HW_H_SYS_GPR107, HW_H_SYS_GPR108 -+ , HW_H_SYS_GPR109, HW_H_SYS_GPR110, HW_H_SYS_GPR111, HW_H_SYS_GPR112 -+ , HW_H_SYS_GPR113, HW_H_SYS_GPR114, HW_H_SYS_GPR115, HW_H_SYS_GPR116 -+ , HW_H_SYS_GPR117, HW_H_SYS_GPR118, HW_H_SYS_GPR119, HW_H_SYS_GPR120 -+ , HW_H_SYS_GPR121, HW_H_SYS_GPR122, HW_H_SYS_GPR123, HW_H_SYS_GPR124 -+ , HW_H_SYS_GPR125, HW_H_SYS_GPR126, HW_H_SYS_GPR127, HW_H_SYS_GPR128 -+ , HW_H_SYS_GPR129, HW_H_SYS_GPR130, HW_H_SYS_GPR131, HW_H_SYS_GPR132 -+ , HW_H_SYS_GPR133, HW_H_SYS_GPR134, HW_H_SYS_GPR135, HW_H_SYS_GPR136 -+ , HW_H_SYS_GPR137, HW_H_SYS_GPR138, HW_H_SYS_GPR139, HW_H_SYS_GPR140 -+ , HW_H_SYS_GPR141, HW_H_SYS_GPR142, HW_H_SYS_GPR143, HW_H_SYS_GPR144 -+ , HW_H_SYS_GPR145, HW_H_SYS_GPR146, HW_H_SYS_GPR147, HW_H_SYS_GPR148 -+ , HW_H_SYS_GPR149, HW_H_SYS_GPR150, HW_H_SYS_GPR151, HW_H_SYS_GPR152 -+ , HW_H_SYS_GPR153, HW_H_SYS_GPR154, HW_H_SYS_GPR155, HW_H_SYS_GPR156 -+ , HW_H_SYS_GPR157, HW_H_SYS_GPR158, HW_H_SYS_GPR159, HW_H_SYS_GPR160 -+ , HW_H_SYS_GPR161, HW_H_SYS_GPR162, HW_H_SYS_GPR163, HW_H_SYS_GPR164 -+ , HW_H_SYS_GPR165, HW_H_SYS_GPR166, HW_H_SYS_GPR167, HW_H_SYS_GPR168 -+ , HW_H_SYS_GPR169, HW_H_SYS_GPR170, HW_H_SYS_GPR171, HW_H_SYS_GPR172 -+ , HW_H_SYS_GPR173, HW_H_SYS_GPR174, HW_H_SYS_GPR175, HW_H_SYS_GPR176 -+ , HW_H_SYS_GPR177, HW_H_SYS_GPR178, HW_H_SYS_GPR179, HW_H_SYS_GPR180 -+ , HW_H_SYS_GPR181, HW_H_SYS_GPR182, HW_H_SYS_GPR183, HW_H_SYS_GPR184 -+ , HW_H_SYS_GPR185, HW_H_SYS_GPR186, HW_H_SYS_GPR187, HW_H_SYS_GPR188 -+ , HW_H_SYS_GPR189, HW_H_SYS_GPR190, HW_H_SYS_GPR191, HW_H_SYS_GPR192 -+ , HW_H_SYS_GPR193, HW_H_SYS_GPR194, HW_H_SYS_GPR195, HW_H_SYS_GPR196 -+ , HW_H_SYS_GPR197, HW_H_SYS_GPR198, HW_H_SYS_GPR199, HW_H_SYS_GPR200 -+ , HW_H_SYS_GPR201, HW_H_SYS_GPR202, HW_H_SYS_GPR203, HW_H_SYS_GPR204 -+ , HW_H_SYS_GPR205, HW_H_SYS_GPR206, HW_H_SYS_GPR207, HW_H_SYS_GPR208 -+ , HW_H_SYS_GPR209, HW_H_SYS_GPR210, HW_H_SYS_GPR211, HW_H_SYS_GPR212 -+ , HW_H_SYS_GPR213, HW_H_SYS_GPR214, HW_H_SYS_GPR215, HW_H_SYS_GPR216 -+ , HW_H_SYS_GPR217, HW_H_SYS_GPR218, HW_H_SYS_GPR219, HW_H_SYS_GPR220 -+ , HW_H_SYS_GPR221, HW_H_SYS_GPR222, HW_H_SYS_GPR223, HW_H_SYS_GPR224 -+ , HW_H_SYS_GPR225, HW_H_SYS_GPR226, HW_H_SYS_GPR227, HW_H_SYS_GPR228 -+ , HW_H_SYS_GPR229, HW_H_SYS_GPR230, HW_H_SYS_GPR231, HW_H_SYS_GPR232 -+ , HW_H_SYS_GPR233, HW_H_SYS_GPR234, HW_H_SYS_GPR235, HW_H_SYS_GPR236 -+ , HW_H_SYS_GPR237, HW_H_SYS_GPR238, HW_H_SYS_GPR239, HW_H_SYS_GPR240 -+ , HW_H_SYS_GPR241, HW_H_SYS_GPR242, HW_H_SYS_GPR243, HW_H_SYS_GPR244 -+ , HW_H_SYS_GPR245, HW_H_SYS_GPR246, HW_H_SYS_GPR247, HW_H_SYS_GPR248 -+ , HW_H_SYS_GPR249, HW_H_SYS_GPR250, HW_H_SYS_GPR251, HW_H_SYS_GPR252 -+ , HW_H_SYS_GPR253, HW_H_SYS_GPR254, HW_H_SYS_GPR255, HW_H_SYS_GPR256 -+ , HW_H_SYS_GPR257, HW_H_SYS_GPR258, HW_H_SYS_GPR259, HW_H_SYS_GPR260 -+ , HW_H_SYS_GPR261, HW_H_SYS_GPR262, HW_H_SYS_GPR263, HW_H_SYS_GPR264 -+ , HW_H_SYS_GPR265, HW_H_SYS_GPR266, HW_H_SYS_GPR267, HW_H_SYS_GPR268 -+ , HW_H_SYS_GPR269, HW_H_SYS_GPR270, HW_H_SYS_GPR271, HW_H_SYS_GPR272 -+ , HW_H_SYS_GPR273, HW_H_SYS_GPR274, HW_H_SYS_GPR275, HW_H_SYS_GPR276 -+ , HW_H_SYS_GPR277, HW_H_SYS_GPR278, HW_H_SYS_GPR279, HW_H_SYS_GPR280 -+ , HW_H_SYS_GPR281, HW_H_SYS_GPR282, HW_H_SYS_GPR283, HW_H_SYS_GPR284 -+ , HW_H_SYS_GPR285, HW_H_SYS_GPR286, HW_H_SYS_GPR287, HW_H_SYS_GPR288 -+ , HW_H_SYS_GPR289, HW_H_SYS_GPR290, HW_H_SYS_GPR291, HW_H_SYS_GPR292 -+ , HW_H_SYS_GPR293, HW_H_SYS_GPR294, HW_H_SYS_GPR295, HW_H_SYS_GPR296 -+ , HW_H_SYS_GPR297, HW_H_SYS_GPR298, HW_H_SYS_GPR299, HW_H_SYS_GPR300 -+ , HW_H_SYS_GPR301, HW_H_SYS_GPR302, HW_H_SYS_GPR303, HW_H_SYS_GPR304 -+ , HW_H_SYS_GPR305, HW_H_SYS_GPR306, HW_H_SYS_GPR307, HW_H_SYS_GPR308 -+ , HW_H_SYS_GPR309, HW_H_SYS_GPR310, HW_H_SYS_GPR311, HW_H_SYS_GPR312 -+ , HW_H_SYS_GPR313, HW_H_SYS_GPR314, HW_H_SYS_GPR315, HW_H_SYS_GPR316 -+ , HW_H_SYS_GPR317, HW_H_SYS_GPR318, HW_H_SYS_GPR319, HW_H_SYS_GPR320 -+ , HW_H_SYS_GPR321, HW_H_SYS_GPR322, HW_H_SYS_GPR323, HW_H_SYS_GPR324 -+ , HW_H_SYS_GPR325, HW_H_SYS_GPR326, HW_H_SYS_GPR327, HW_H_SYS_GPR328 -+ , HW_H_SYS_GPR329, HW_H_SYS_GPR330, HW_H_SYS_GPR331, HW_H_SYS_GPR332 -+ , HW_H_SYS_GPR333, HW_H_SYS_GPR334, HW_H_SYS_GPR335, HW_H_SYS_GPR336 -+ , HW_H_SYS_GPR337, HW_H_SYS_GPR338, HW_H_SYS_GPR339, HW_H_SYS_GPR340 -+ , HW_H_SYS_GPR341, HW_H_SYS_GPR342, HW_H_SYS_GPR343, HW_H_SYS_GPR344 -+ , HW_H_SYS_GPR345, HW_H_SYS_GPR346, HW_H_SYS_GPR347, HW_H_SYS_GPR348 -+ , HW_H_SYS_GPR349, HW_H_SYS_GPR350, HW_H_SYS_GPR351, HW_H_SYS_GPR352 -+ , HW_H_SYS_GPR353, HW_H_SYS_GPR354, HW_H_SYS_GPR355, HW_H_SYS_GPR356 -+ , HW_H_SYS_GPR357, HW_H_SYS_GPR358, HW_H_SYS_GPR359, HW_H_SYS_GPR360 -+ , HW_H_SYS_GPR361, HW_H_SYS_GPR362, HW_H_SYS_GPR363, HW_H_SYS_GPR364 -+ , HW_H_SYS_GPR365, HW_H_SYS_GPR366, HW_H_SYS_GPR367, HW_H_SYS_GPR368 -+ , HW_H_SYS_GPR369, HW_H_SYS_GPR370, HW_H_SYS_GPR371, HW_H_SYS_GPR372 -+ , HW_H_SYS_GPR373, HW_H_SYS_GPR374, HW_H_SYS_GPR375, HW_H_SYS_GPR376 -+ , HW_H_SYS_GPR377, HW_H_SYS_GPR378, HW_H_SYS_GPR379, HW_H_SYS_GPR380 -+ , HW_H_SYS_GPR381, HW_H_SYS_GPR382, HW_H_SYS_GPR383, HW_H_SYS_GPR384 -+ , HW_H_SYS_GPR385, HW_H_SYS_GPR386, HW_H_SYS_GPR387, HW_H_SYS_GPR388 -+ , HW_H_SYS_GPR389, HW_H_SYS_GPR390, HW_H_SYS_GPR391, HW_H_SYS_GPR392 -+ , HW_H_SYS_GPR393, HW_H_SYS_GPR394, HW_H_SYS_GPR395, HW_H_SYS_GPR396 -+ , HW_H_SYS_GPR397, HW_H_SYS_GPR398, HW_H_SYS_GPR399, HW_H_SYS_GPR400 -+ , HW_H_SYS_GPR401, HW_H_SYS_GPR402, HW_H_SYS_GPR403, HW_H_SYS_GPR404 -+ , HW_H_SYS_GPR405, HW_H_SYS_GPR406, HW_H_SYS_GPR407, HW_H_SYS_GPR408 -+ , HW_H_SYS_GPR409, HW_H_SYS_GPR410, HW_H_SYS_GPR411, HW_H_SYS_GPR412 -+ , HW_H_SYS_GPR413, HW_H_SYS_GPR414, HW_H_SYS_GPR415, HW_H_SYS_GPR416 -+ , HW_H_SYS_GPR417, HW_H_SYS_GPR418, HW_H_SYS_GPR419, HW_H_SYS_GPR420 -+ , HW_H_SYS_GPR421, HW_H_SYS_GPR422, HW_H_SYS_GPR423, HW_H_SYS_GPR424 -+ , HW_H_SYS_GPR425, HW_H_SYS_GPR426, HW_H_SYS_GPR427, HW_H_SYS_GPR428 -+ , HW_H_SYS_GPR429, HW_H_SYS_GPR430, HW_H_SYS_GPR431, HW_H_SYS_GPR432 -+ , HW_H_SYS_GPR433, HW_H_SYS_GPR434, HW_H_SYS_GPR435, HW_H_SYS_GPR436 -+ , HW_H_SYS_GPR437, HW_H_SYS_GPR438, HW_H_SYS_GPR439, HW_H_SYS_GPR440 -+ , HW_H_SYS_GPR441, HW_H_SYS_GPR442, HW_H_SYS_GPR443, HW_H_SYS_GPR444 -+ , HW_H_SYS_GPR445, HW_H_SYS_GPR446, HW_H_SYS_GPR447, HW_H_SYS_GPR448 -+ , HW_H_SYS_GPR449, HW_H_SYS_GPR450, HW_H_SYS_GPR451, HW_H_SYS_GPR452 -+ , HW_H_SYS_GPR453, HW_H_SYS_GPR454, HW_H_SYS_GPR455, HW_H_SYS_GPR456 -+ , HW_H_SYS_GPR457, HW_H_SYS_GPR458, HW_H_SYS_GPR459, HW_H_SYS_GPR460 -+ , HW_H_SYS_GPR461, HW_H_SYS_GPR462, HW_H_SYS_GPR463, HW_H_SYS_GPR464 -+ , HW_H_SYS_GPR465, HW_H_SYS_GPR466, HW_H_SYS_GPR467, HW_H_SYS_GPR468 -+ , HW_H_SYS_GPR469, HW_H_SYS_GPR470, HW_H_SYS_GPR471, HW_H_SYS_GPR472 -+ , HW_H_SYS_GPR473, HW_H_SYS_GPR474, HW_H_SYS_GPR475, HW_H_SYS_GPR476 -+ , HW_H_SYS_GPR477, HW_H_SYS_GPR478, HW_H_SYS_GPR479, HW_H_SYS_GPR480 -+ , HW_H_SYS_GPR481, HW_H_SYS_GPR482, HW_H_SYS_GPR483, HW_H_SYS_GPR484 -+ , HW_H_SYS_GPR485, HW_H_SYS_GPR486, HW_H_SYS_GPR487, HW_H_SYS_GPR488 -+ , HW_H_SYS_GPR489, HW_H_SYS_GPR490, HW_H_SYS_GPR491, HW_H_SYS_GPR492 -+ , HW_H_SYS_GPR493, HW_H_SYS_GPR494, HW_H_SYS_GPR495, HW_H_SYS_GPR496 -+ , HW_H_SYS_GPR497, HW_H_SYS_GPR498, HW_H_SYS_GPR499, HW_H_SYS_GPR500 -+ , HW_H_SYS_GPR501, HW_H_SYS_GPR502, HW_H_SYS_GPR503, HW_H_SYS_GPR504 -+ , HW_H_SYS_GPR505, HW_H_SYS_GPR506, HW_H_SYS_GPR507, HW_H_SYS_GPR508 -+ , HW_H_SYS_GPR509, HW_H_SYS_GPR510, HW_H_SYS_GPR511, HW_H_MAC_MACLO -+ , HW_H_MAC_MACHI, HW_H_TICK_TTMR, HW_H_SYS_VR_REV, HW_H_SYS_VR_CFG -+ , HW_H_SYS_VR_VER, HW_H_SYS_UPR_UP, HW_H_SYS_UPR_DCP, HW_H_SYS_UPR_ICP -+ , HW_H_SYS_UPR_DMP, HW_H_SYS_UPR_MP, HW_H_SYS_UPR_IMP, HW_H_SYS_UPR_DUP -+ , HW_H_SYS_UPR_PCUP, HW_H_SYS_UPR_PICP, HW_H_SYS_UPR_PMP, HW_H_SYS_UPR_TTP -+ , HW_H_SYS_UPR_CUP, HW_H_SYS_CPUCFGR_NSGR, HW_H_SYS_CPUCFGR_CGF, HW_H_SYS_CPUCFGR_OB32S -+ , HW_H_SYS_CPUCFGR_OB64S, HW_H_SYS_CPUCFGR_OF32S, HW_H_SYS_CPUCFGR_OF64S, HW_H_SYS_CPUCFGR_OV64S -+ , HW_H_SYS_CPUCFGR_ND, HW_H_SYS_SR_SM, HW_H_SYS_SR_TEE, HW_H_SYS_SR_IEE -+ , HW_H_SYS_SR_DCE, HW_H_SYS_SR_ICE, HW_H_SYS_SR_DME, HW_H_SYS_SR_IME -+ , HW_H_SYS_SR_LEE, HW_H_SYS_SR_CE, HW_H_SYS_SR_F, HW_H_SYS_SR_CY -+ , HW_H_SYS_SR_OV, HW_H_SYS_SR_OVE, HW_H_SYS_SR_DSX, HW_H_SYS_SR_EPH -+ , HW_H_SYS_SR_FO, HW_H_SYS_SR_SUMRA, HW_H_SYS_SR_CID, HW_H_SYS_FPCSR_FPEE -+ , HW_H_SYS_FPCSR_RM, HW_H_SYS_FPCSR_OVF, HW_H_SYS_FPCSR_UNF, HW_H_SYS_FPCSR_SNF -+ , HW_H_SYS_FPCSR_QNF, HW_H_SYS_FPCSR_ZF, HW_H_SYS_FPCSR_IXF, HW_H_SYS_FPCSR_IVF -+ , HW_H_SYS_FPCSR_INF, HW_H_SYS_FPCSR_DZF, HW_H_SIMM16, HW_H_UIMM16 -+ , HW_H_UIMM6, HW_H_ATOMIC_RESERVE, HW_H_ATOMIC_ADDRESS, HW_MAX -+} CGEN_HW_TYPE; -+ -+#define MAX_HW ((int) HW_MAX) -+ -+/* Operand attribute indices. */ -+ -+/* Enum declaration for cgen_operand attrs. */ -+typedef enum cgen_operand_attr { -+ CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT -+ , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY -+ , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS -+} CGEN_OPERAND_ATTR; -+ -+/* Number of non-boolean elements in cgen_operand_attr. */ -+#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1) -+ -+/* cgen_operand attribute accessor macros. */ -+#define CGEN_ATTR_CGEN_OPERAND_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_MACH-CGEN_OPERAND_START_NBOOLS-1].nonbitset) -+#define CGEN_ATTR_CGEN_OPERAND_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_VIRTUAL)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_PCREL_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_PCREL_ADDR)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_ABS_ADDR_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_ABS_ADDR)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_SIGN_OPT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGN_OPT)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_SIGNED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SIGNED)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_NEGATIVE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_NEGATIVE)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_RELAX_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_RELAX)) != 0) -+#define CGEN_ATTR_CGEN_OPERAND_SEM_ONLY_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_OPERAND_SEM_ONLY)) != 0) -+ -+/* Enum declaration for or1k operand types. */ -+typedef enum cgen_operand_type { -+ OR1K_OPERAND_PC, OR1K_OPERAND_SYS_SR, OR1K_OPERAND_SYS_ESR0, OR1K_OPERAND_SYS_EPCR0 -+ , OR1K_OPERAND_SYS_SR_LEE, OR1K_OPERAND_SYS_SR_F, OR1K_OPERAND_SYS_SR_CY, OR1K_OPERAND_SYS_SR_OV -+ , OR1K_OPERAND_SYS_SR_OVE, OR1K_OPERAND_SYS_CPUCFGR_OB64S, OR1K_OPERAND_SYS_CPUCFGR_ND, OR1K_OPERAND_SYS_FPCSR_RM -+ , OR1K_OPERAND_MAC_MACHI, OR1K_OPERAND_MAC_MACLO, OR1K_OPERAND_ATOMIC_RESERVE, OR1K_OPERAND_ATOMIC_ADDRESS -+ , OR1K_OPERAND_UIMM6, OR1K_OPERAND_RD, OR1K_OPERAND_RA, OR1K_OPERAND_RB -+ , OR1K_OPERAND_DISP26, OR1K_OPERAND_SIMM16, OR1K_OPERAND_UIMM16, OR1K_OPERAND_SIMM16_SPLIT -+ , OR1K_OPERAND_UIMM16_SPLIT, OR1K_OPERAND_RDSF, OR1K_OPERAND_RASF, OR1K_OPERAND_RBSF -+ , OR1K_OPERAND_RDDF, OR1K_OPERAND_RADF, OR1K_OPERAND_RBDF, OR1K_OPERAND_MAX -+} CGEN_OPERAND_TYPE; -+ -+/* Number of operands types. */ -+#define MAX_OPERANDS 31 -+ -+/* Maximum number of operands referenced by any insn. */ -+#define MAX_OPERAND_INSTANCES 9 -+ -+/* Insn attribute indices. */ -+ -+/* Enum declaration for cgen_insn attrs. */ -+typedef enum cgen_insn_attr { -+ CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI -+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED -+ , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_DELAYED_CTI, CGEN_INSN_NOT_IN_DELAY_SLOT -+ , CGEN_INSN_FORCED_CTI, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH -+ , CGEN_INSN_END_NBOOLS -+} CGEN_INSN_ATTR; -+ -+/* Number of non-boolean elements in cgen_insn_attr. */ -+#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1) -+ -+/* cgen_insn attribute accessor macros. */ -+#define CGEN_ATTR_CGEN_INSN_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_MACH-CGEN_INSN_START_NBOOLS-1].nonbitset) -+#define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_ALIAS)) != 0) -+#define CGEN_ATTR_CGEN_INSN_VIRTUAL_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_VIRTUAL)) != 0) -+#define CGEN_ATTR_CGEN_INSN_UNCOND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_UNCOND_CTI)) != 0) -+#define CGEN_ATTR_CGEN_INSN_COND_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_COND_CTI)) != 0) -+#define CGEN_ATTR_CGEN_INSN_SKIP_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_SKIP_CTI)) != 0) -+#define CGEN_ATTR_CGEN_INSN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_DELAY_SLOT)) != 0) -+#define CGEN_ATTR_CGEN_INSN_RELAXABLE_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXABLE)) != 0) -+#define CGEN_ATTR_CGEN_INSN_RELAXED_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_RELAXED)) != 0) -+#define CGEN_ATTR_CGEN_INSN_NO_DIS_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NO_DIS)) != 0) -+#define CGEN_ATTR_CGEN_INSN_PBB_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_PBB)) != 0) -+#define CGEN_ATTR_CGEN_INSN_DELAYED_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_DELAYED_CTI)) != 0) -+#define CGEN_ATTR_CGEN_INSN_NOT_IN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_NOT_IN_DELAY_SLOT)) != 0) -+#define CGEN_ATTR_CGEN_INSN_FORCED_CTI_VALUE(attrs) (((attrs)->bool_ & (1 << CGEN_INSN_FORCED_CTI)) != 0) -+ -+/* cgen.h uses things we just defined. */ -+#include "opcode/cgen.h" -+ -+extern const struct cgen_ifld or1k_cgen_ifld_table[]; -+ -+/* Attributes. */ -+extern const CGEN_ATTR_TABLE or1k_cgen_hardware_attr_table[]; -+extern const CGEN_ATTR_TABLE or1k_cgen_ifield_attr_table[]; -+extern const CGEN_ATTR_TABLE or1k_cgen_operand_attr_table[]; -+extern const CGEN_ATTR_TABLE or1k_cgen_insn_attr_table[]; -+ -+/* Hardware decls. */ -+ -+extern CGEN_KEYWORD or1k_cgen_opval_h_fsr; -+extern CGEN_KEYWORD or1k_cgen_opval_h_fdr; -+extern CGEN_KEYWORD or1k_cgen_opval_h_gpr; -+ -+extern const CGEN_HW_ENTRY or1k_cgen_hw_table[]; -+ -+ -+ -+#endif /* OR1K_CPU_H */ -diff -rNU3 dist.orig/opcodes/or1k-dis.c dist/opcodes/or1k-dis.c ---- dist.orig/opcodes/or1k-dis.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-dis.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,561 @@ -+/* Disassembler interface for targets using CGEN. -*- C -*- -+ CGEN: Cpu tools GENerator -+ -+ THIS FILE IS MACHINE GENERATED WITH CGEN. -+ - the resultant file is machine generated, cgen-dis.in isn't -+ -+ Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+ This file is part of libopcodes. -+ -+ This library 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, or (at your option) -+ any later version. -+ -+ It 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. */ -+ -+/* ??? Eventually more and more of this stuff can go to cpu-independent files. -+ Keep that in mind. */ -+ -+#include "sysdep.h" -+#include -+#include "ansidecl.h" -+#include "dis-asm.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "libiberty.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+#include "opintl.h" -+ -+/* Default text to print if an instruction isn't recognized. */ -+#define UNKNOWN_INSN_MSG _("*unknown*") -+ -+static void print_normal -+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int); -+static void print_address -+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int) ATTRIBUTE_UNUSED; -+static void print_keyword -+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int) ATTRIBUTE_UNUSED; -+static void print_insn_normal -+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int); -+static int print_insn -+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, unsigned); -+static int default_print_insn -+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *) ATTRIBUTE_UNUSED; -+static int read_insn -+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, int, CGEN_EXTRACT_INFO *, -+ unsigned long *); -+ -+/* -- disassembler routines inserted here. */ -+ -+ -+void or1k_cgen_print_operand -+ (CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *, void const *, bfd_vma, int); -+ -+/* Main entry point for printing operands. -+ XINFO is a `void *' and not a `disassemble_info *' to not put a requirement -+ of dis-asm.h on cgen.h. -+ -+ This function is basically just a big switch statement. Earlier versions -+ used tables to look up the function to use, but -+ - if the table contains both assembler and disassembler functions then -+ the disassembler contains much of the assembler and vice-versa, -+ - there's a lot of inlining possibilities as things grow, -+ - using a switch statement avoids the function call overhead. -+ -+ This function could be moved into `print_insn_normal', but keeping it -+ separate makes clear the interface between `print_insn_normal' and each of -+ the handlers. */ -+ -+void -+or1k_cgen_print_operand (CGEN_CPU_DESC cd, -+ int opindex, -+ void * xinfo, -+ CGEN_FIELDS *fields, -+ void const *attrs ATTRIBUTE_UNUSED, -+ bfd_vma pc, -+ int length) -+{ -+ disassemble_info *info = (disassemble_info *) xinfo; -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ print_address (cd, info, fields->f_disp26, 0|(1<f_r2, 0); -+ break; -+ case OR1K_OPERAND_RADF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fdr, fields->f_r1, 0); -+ break; -+ case OR1K_OPERAND_RASF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fsr, fields->f_r2, 0); -+ break; -+ case OR1K_OPERAND_RB : -+ print_keyword (cd, info, & or1k_cgen_opval_h_gpr, fields->f_r3, 0); -+ break; -+ case OR1K_OPERAND_RBDF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fdr, fields->f_r1, 0); -+ break; -+ case OR1K_OPERAND_RBSF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fsr, fields->f_r3, 0); -+ break; -+ case OR1K_OPERAND_RD : -+ print_keyword (cd, info, & or1k_cgen_opval_h_gpr, fields->f_r1, 0); -+ break; -+ case OR1K_OPERAND_RDDF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fdr, fields->f_r1, 0); -+ break; -+ case OR1K_OPERAND_RDSF : -+ print_keyword (cd, info, & or1k_cgen_opval_h_fsr, fields->f_r1, 0); -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ print_normal (cd, info, fields->f_simm16, 0|(1<f_simm16_split, 0|(1<f_uimm16, 0, pc, length); -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ print_normal (cd, info, fields->f_uimm16_split, 0|(1<f_uimm6, 0, pc, length); -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), -+ opindex); -+ abort (); -+ } -+} -+ -+cgen_print_fn * const or1k_cgen_print_handlers[] = -+{ -+ print_insn_normal, -+}; -+ -+ -+void -+or1k_cgen_init_dis (CGEN_CPU_DESC cd) -+{ -+ or1k_cgen_init_opcode_table (cd); -+ or1k_cgen_init_ibld_table (cd); -+ cd->print_handlers = & or1k_cgen_print_handlers[0]; -+ cd->print_operand = or1k_cgen_print_operand; -+} -+ -+ -+/* Default print handler. */ -+ -+static void -+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ void *dis_info, -+ long value, -+ unsigned int attrs, -+ bfd_vma pc ATTRIBUTE_UNUSED, -+ int length ATTRIBUTE_UNUSED) -+{ -+ disassemble_info *info = (disassemble_info *) dis_info; -+ -+ /* Print the operand as directed by the attributes. */ -+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) -+ ; /* nothing to do */ -+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) -+ (*info->fprintf_func) (info->stream, "%ld", value); -+ else -+ (*info->fprintf_func) (info->stream, "0x%lx", value); -+} -+ -+/* Default address handler. */ -+ -+static void -+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ void *dis_info, -+ bfd_vma value, -+ unsigned int attrs, -+ bfd_vma pc ATTRIBUTE_UNUSED, -+ int length ATTRIBUTE_UNUSED) -+{ -+ disassemble_info *info = (disassemble_info *) dis_info; -+ -+ /* Print the operand as directed by the attributes. */ -+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) -+ ; /* Nothing to do. */ -+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR)) -+ (*info->print_address_func) (value, info); -+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR)) -+ (*info->print_address_func) (value, info); -+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) -+ (*info->fprintf_func) (info->stream, "%ld", (long) value); -+ else -+ (*info->fprintf_func) (info->stream, "0x%lx", (long) value); -+} -+ -+/* Keyword print handler. */ -+ -+static void -+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ void *dis_info, -+ CGEN_KEYWORD *keyword_table, -+ long value, -+ unsigned int attrs ATTRIBUTE_UNUSED) -+{ -+ disassemble_info *info = (disassemble_info *) dis_info; -+ const CGEN_KEYWORD_ENTRY *ke; -+ -+ ke = cgen_keyword_lookup_value (keyword_table, value); -+ if (ke != NULL) -+ (*info->fprintf_func) (info->stream, "%s", ke->name); -+ else -+ (*info->fprintf_func) (info->stream, "???"); -+} -+ -+/* Default insn printer. -+ -+ DIS_INFO is defined as `void *' so the disassembler needn't know anything -+ about disassemble_info. */ -+ -+static void -+print_insn_normal (CGEN_CPU_DESC cd, -+ void *dis_info, -+ const CGEN_INSN *insn, -+ CGEN_FIELDS *fields, -+ bfd_vma pc, -+ int length) -+{ -+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -+ disassemble_info *info = (disassemble_info *) dis_info; -+ const CGEN_SYNTAX_CHAR_TYPE *syn; -+ -+ CGEN_INIT_PRINT (cd); -+ -+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) -+ { -+ if (CGEN_SYNTAX_MNEMONIC_P (*syn)) -+ { -+ (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn)); -+ continue; -+ } -+ if (CGEN_SYNTAX_CHAR_P (*syn)) -+ { -+ (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn)); -+ continue; -+ } -+ -+ /* We have an operand. */ -+ or1k_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info, -+ fields, CGEN_INSN_ATTRS (insn), pc, length); -+ } -+} -+ -+/* Subroutine of print_insn. Reads an insn into the given buffers and updates -+ the extract info. -+ Returns 0 if all is well, non-zero otherwise. */ -+ -+static int -+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ bfd_vma pc, -+ disassemble_info *info, -+ bfd_byte *buf, -+ int buflen, -+ CGEN_EXTRACT_INFO *ex_info, -+ unsigned long *insn_value) -+{ -+ int status = (*info->read_memory_func) (pc, buf, buflen, info); -+ -+ if (status != 0) -+ { -+ (*info->memory_error_func) (status, pc, info); -+ return -1; -+ } -+ -+ ex_info->dis_info = info; -+ ex_info->valid = (1 << buflen) - 1; -+ ex_info->insn_bytes = buf; -+ -+ *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); -+ return 0; -+} -+ -+/* Utility to print an insn. -+ BUF is the base part of the insn, target byte order, BUFLEN bytes long. -+ The result is the size of the insn in bytes or zero for an unknown insn -+ or -1 if an error occurs fetching data (memory_error_func will have -+ been called). */ -+ -+static int -+print_insn (CGEN_CPU_DESC cd, -+ bfd_vma pc, -+ disassemble_info *info, -+ bfd_byte *buf, -+ unsigned int buflen) -+{ -+ CGEN_INSN_INT insn_value; -+ const CGEN_INSN_LIST *insn_list; -+ CGEN_EXTRACT_INFO ex_info; -+ int basesize; -+ -+ /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */ -+ basesize = cd->base_insn_bitsize < buflen * 8 ? -+ cd->base_insn_bitsize : buflen * 8; -+ insn_value = cgen_get_insn_value (cd, buf, basesize); -+ -+ -+ /* Fill in ex_info fields like read_insn would. Don't actually call -+ read_insn, since the incoming buffer is already read (and possibly -+ modified a la m32r). */ -+ ex_info.valid = (1 << buflen) - 1; -+ ex_info.dis_info = info; -+ ex_info.insn_bytes = buf; -+ -+ /* The instructions are stored in hash lists. -+ Pick the first one and keep trying until we find the right one. */ -+ -+ insn_list = CGEN_DIS_LOOKUP_INSN (cd, (char *) buf, insn_value); -+ while (insn_list != NULL) -+ { -+ const CGEN_INSN *insn = insn_list->insn; -+ CGEN_FIELDS fields; -+ int length; -+ unsigned long insn_value_cropped; -+ -+#ifdef CGEN_VALIDATE_INSN_SUPPORTED -+ /* Not needed as insn shouldn't be in hash lists if not supported. */ -+ /* Supported by this cpu? */ -+ if (! or1k_cgen_insn_supported (cd, insn)) -+ { -+ insn_list = CGEN_DIS_NEXT_INSN (insn_list); -+ continue; -+ } -+#endif -+ -+ /* Basic bit mask must be correct. */ -+ /* ??? May wish to allow target to defer this check until the extract -+ handler. */ -+ -+ /* Base size may exceed this instruction's size. Extract the -+ relevant part from the buffer. */ -+ if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && -+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) -+ insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn), -+ info->endian == BFD_ENDIAN_BIG); -+ else -+ insn_value_cropped = insn_value; -+ -+ if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn)) -+ == CGEN_INSN_BASE_VALUE (insn)) -+ { -+ /* Printing is handled in two passes. The first pass parses the -+ machine insn and extracts the fields. The second pass prints -+ them. */ -+ -+ /* Make sure the entire insn is loaded into insn_value, if it -+ can fit. */ -+ if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) && -+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) -+ { -+ unsigned long full_insn_value; -+ int rc = read_insn (cd, pc, info, buf, -+ CGEN_INSN_BITSIZE (insn) / 8, -+ & ex_info, & full_insn_value); -+ if (rc != 0) -+ return rc; -+ length = CGEN_EXTRACT_FN (cd, insn) -+ (cd, insn, &ex_info, full_insn_value, &fields, pc); -+ } -+ else -+ length = CGEN_EXTRACT_FN (cd, insn) -+ (cd, insn, &ex_info, insn_value_cropped, &fields, pc); -+ -+ /* Length < 0 -> error. */ -+ if (length < 0) -+ return length; -+ if (length > 0) -+ { -+ CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length); -+ /* Length is in bits, result is in bytes. */ -+ return length / 8; -+ } -+ } -+ -+ insn_list = CGEN_DIS_NEXT_INSN (insn_list); -+ } -+ -+ return 0; -+} -+ -+/* Default value for CGEN_PRINT_INSN. -+ The result is the size of the insn in bytes or zero for an unknown insn -+ or -1 if an error occured fetching bytes. */ -+ -+#ifndef CGEN_PRINT_INSN -+#define CGEN_PRINT_INSN default_print_insn -+#endif -+ -+static int -+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info) -+{ -+ bfd_byte buf[CGEN_MAX_INSN_SIZE]; -+ int buflen; -+ int status; -+ -+ /* Attempt to read the base part of the insn. */ -+ buflen = cd->base_insn_bitsize / 8; -+ status = (*info->read_memory_func) (pc, buf, buflen, info); -+ -+ /* Try again with the minimum part, if min < base. */ -+ if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize)) -+ { -+ buflen = cd->min_insn_bitsize / 8; -+ status = (*info->read_memory_func) (pc, buf, buflen, info); -+ } -+ -+ if (status != 0) -+ { -+ (*info->memory_error_func) (status, pc, info); -+ return -1; -+ } -+ -+ return print_insn (cd, pc, info, buf, buflen); -+} -+ -+/* Main entry point. -+ Print one instruction from PC on INFO->STREAM. -+ Return the size of the instruction (in bytes). */ -+ -+typedef struct cpu_desc_list -+{ -+ struct cpu_desc_list *next; -+ CGEN_BITSET *isa; -+ int mach; -+ int endian; -+ CGEN_CPU_DESC cd; -+} cpu_desc_list; -+ -+int -+print_insn_or1k (bfd_vma pc, disassemble_info *info) -+{ -+ static cpu_desc_list *cd_list = 0; -+ cpu_desc_list *cl = 0; -+ static CGEN_CPU_DESC cd = 0; -+ static CGEN_BITSET *prev_isa; -+ static int prev_mach; -+ static int prev_endian; -+ int length; -+ CGEN_BITSET *isa; -+ int mach; -+ int endian = (info->endian == BFD_ENDIAN_BIG -+ ? CGEN_ENDIAN_BIG -+ : CGEN_ENDIAN_LITTLE); -+ enum bfd_architecture arch; -+ -+ /* ??? gdb will set mach but leave the architecture as "unknown" */ -+#ifndef CGEN_BFD_ARCH -+#define CGEN_BFD_ARCH bfd_arch_or1k -+#endif -+ arch = info->arch; -+ if (arch == bfd_arch_unknown) -+ arch = CGEN_BFD_ARCH; -+ -+ /* There's no standard way to compute the machine or isa number -+ so we leave it to the target. */ -+#ifdef CGEN_COMPUTE_MACH -+ mach = CGEN_COMPUTE_MACH (info); -+#else -+ mach = info->mach; -+#endif -+ -+#ifdef CGEN_COMPUTE_ISA -+ { -+ static CGEN_BITSET *permanent_isa; -+ -+ if (!permanent_isa) -+ permanent_isa = cgen_bitset_create (MAX_ISAS); -+ isa = permanent_isa; -+ cgen_bitset_clear (isa); -+ cgen_bitset_add (isa, CGEN_COMPUTE_ISA (info)); -+ } -+#else -+ isa = info->insn_sets; -+#endif -+ -+ /* If we've switched cpu's, try to find a handle we've used before */ -+ if (cd -+ && (cgen_bitset_compare (isa, prev_isa) != 0 -+ || mach != prev_mach -+ || endian != prev_endian)) -+ { -+ cd = 0; -+ for (cl = cd_list; cl; cl = cl->next) -+ { -+ if (cgen_bitset_compare (cl->isa, isa) == 0 && -+ cl->mach == mach && -+ cl->endian == endian) -+ { -+ cd = cl->cd; -+ prev_isa = cd->isas; -+ break; -+ } -+ } -+ } -+ -+ /* If we haven't initialized yet, initialize the opcode table. */ -+ if (! cd) -+ { -+ const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach); -+ const char *mach_name; -+ -+ if (!arch_type) -+ abort (); -+ mach_name = arch_type->printable_name; -+ -+ prev_isa = cgen_bitset_copy (isa); -+ prev_mach = mach; -+ prev_endian = endian; -+ cd = or1k_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa, -+ CGEN_CPU_OPEN_BFDMACH, mach_name, -+ CGEN_CPU_OPEN_ENDIAN, prev_endian, -+ CGEN_CPU_OPEN_END); -+ if (!cd) -+ abort (); -+ -+ /* Save this away for future reference. */ -+ cl = xmalloc (sizeof (struct cpu_desc_list)); -+ cl->cd = cd; -+ cl->isa = prev_isa; -+ cl->mach = mach; -+ cl->endian = endian; -+ cl->next = cd_list; -+ cd_list = cl; -+ -+ or1k_cgen_init_dis (cd); -+ } -+ -+ /* We try to have as much common code as possible. -+ But at this point some targets need to take over. */ -+ /* ??? Some targets may need a hook elsewhere. Try to avoid this, -+ but if not possible try to move this hook elsewhere rather than -+ have two hooks. */ -+ length = CGEN_PRINT_INSN (cd, pc, info); -+ if (length > 0) -+ return length; -+ if (length < 0) -+ return -1; -+ -+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG); -+ return cd->default_insn_bitsize / 8; -+} -diff -rNU3 dist.orig/opcodes/or1k-ibld.c dist/opcodes/or1k-ibld.c ---- dist.orig/opcodes/or1k-ibld.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-ibld.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,1050 @@ -+/* Instruction building/extraction support for or1k. -*- C -*- -+ -+ THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. -+ - the resultant file is machine generated, cgen-ibld.in isn't -+ -+ Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+ This file is part of libopcodes. -+ -+ This library 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, or (at your option) -+ any later version. -+ -+ It 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. */ -+ -+/* ??? Eventually more and more of this stuff can go to cpu-independent files. -+ Keep that in mind. */ -+ -+#include "sysdep.h" -+#include -+#include "ansidecl.h" -+#include "dis-asm.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+#include "cgen/basic-modes.h" -+#include "opintl.h" -+#include "safe-ctype.h" -+ -+#undef min -+#define min(a,b) ((a) < (b) ? (a) : (b)) -+#undef max -+#define max(a,b) ((a) > (b) ? (a) : (b)) -+ -+/* Used by the ifield rtx function. */ -+#define FLD(f) (fields->f) -+ -+static const char * insert_normal -+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int, -+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR); -+static const char * insert_insn_normal -+ (CGEN_CPU_DESC, const CGEN_INSN *, -+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma); -+static int extract_normal -+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, -+ unsigned int, unsigned int, unsigned int, unsigned int, -+ unsigned int, unsigned int, bfd_vma, long *); -+static int extract_insn_normal -+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *, -+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma); -+#if CGEN_INT_INSN_P -+static void put_insn_int_value -+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT); -+#endif -+#if ! CGEN_INT_INSN_P -+static CGEN_INLINE void insert_1 -+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *); -+static CGEN_INLINE int fill_cache -+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma); -+static CGEN_INLINE long extract_1 -+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma); -+#endif -+ -+/* Operand insertion. */ -+ -+#if ! CGEN_INT_INSN_P -+ -+/* Subroutine of insert_normal. */ -+ -+static CGEN_INLINE void -+insert_1 (CGEN_CPU_DESC cd, -+ unsigned long value, -+ int start, -+ int length, -+ int word_length, -+ unsigned char *bufp) -+{ -+ unsigned long x,mask; -+ int shift; -+ -+ x = cgen_get_insn_value (cd, bufp, word_length); -+ -+ /* Written this way to avoid undefined behaviour. */ -+ mask = (((1L << (length - 1)) - 1) << 1) | 1; -+ if (CGEN_INSN_LSB0_P) -+ shift = (start + 1) - length; -+ else -+ shift = (word_length - (start + length)); -+ x = (x & ~(mask << shift)) | ((value & mask) << shift); -+ -+ cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x); -+} -+ -+#endif /* ! CGEN_INT_INSN_P */ -+ -+/* Default insertion routine. -+ -+ ATTRS is a mask of the boolean attributes. -+ WORD_OFFSET is the offset in bits from the start of the insn of the value. -+ WORD_LENGTH is the length of the word in bits in which the value resides. -+ START is the starting bit number in the word, architecture origin. -+ LENGTH is the length of VALUE in bits. -+ TOTAL_LENGTH is the total length of the insn in bits. -+ -+ The result is an error message or NULL if success. */ -+ -+/* ??? This duplicates functionality with bfd's howto table and -+ bfd_install_relocation. */ -+/* ??? This doesn't handle bfd_vma's. Create another function when -+ necessary. */ -+ -+static const char * -+insert_normal (CGEN_CPU_DESC cd, -+ long value, -+ unsigned int attrs, -+ unsigned int word_offset, -+ unsigned int start, -+ unsigned int length, -+ unsigned int word_length, -+ unsigned int total_length, -+ CGEN_INSN_BYTES_PTR buffer) -+{ -+ static char errbuf[100]; -+ /* Written this way to avoid undefined behaviour. */ -+ unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1; -+ -+ /* If LENGTH is zero, this operand doesn't contribute to the value. */ -+ if (length == 0) -+ return NULL; -+ -+ if (word_length > 8 * sizeof (CGEN_INSN_INT)) -+ abort (); -+ -+ /* For architectures with insns smaller than the base-insn-bitsize, -+ word_length may be too big. */ -+ if (cd->min_insn_bitsize < cd->base_insn_bitsize) -+ { -+ if (word_offset == 0 -+ && word_length > total_length) -+ word_length = total_length; -+ } -+ -+ /* Ensure VALUE will fit. */ -+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT)) -+ { -+ long minval = - (1L << (length - 1)); -+ unsigned long maxval = mask; -+ -+ if ((value > 0 && (unsigned long) value > maxval) -+ || value < minval) -+ { -+ /* xgettext:c-format */ -+ sprintf (errbuf, -+ _("operand out of range (%ld not between %ld and %lu)"), -+ value, minval, maxval); -+ return errbuf; -+ } -+ } -+ else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)) -+ { -+ unsigned long maxval = mask; -+ unsigned long val = (unsigned long) value; -+ -+ /* For hosts with a word size > 32 check to see if value has been sign -+ extended beyond 32 bits. If so then ignore these higher sign bits -+ as the user is attempting to store a 32-bit signed value into an -+ unsigned 32-bit field which is allowed. */ -+ if (sizeof (unsigned long) > 4 && ((value >> 32) == -1)) -+ val &= 0xFFFFFFFF; -+ -+ if (val > maxval) -+ { -+ /* xgettext:c-format */ -+ sprintf (errbuf, -+ _("operand out of range (0x%lx not between 0 and 0x%lx)"), -+ val, maxval); -+ return errbuf; -+ } -+ } -+ else -+ { -+ if (! cgen_signed_overflow_ok_p (cd)) -+ { -+ long minval = - (1L << (length - 1)); -+ long maxval = (1L << (length - 1)) - 1; -+ -+ if (value < minval || value > maxval) -+ { -+ sprintf -+ /* xgettext:c-format */ -+ (errbuf, _("operand out of range (%ld not between %ld and %ld)"), -+ value, minval, maxval); -+ return errbuf; -+ } -+ } -+ } -+ -+#if CGEN_INT_INSN_P -+ -+ { -+ int shift; -+ -+ if (CGEN_INSN_LSB0_P) -+ shift = (word_offset + start + 1) - length; -+ else -+ shift = total_length - (word_offset + start + length); -+ *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift); -+ } -+ -+#else /* ! CGEN_INT_INSN_P */ -+ -+ { -+ unsigned char *bufp = (unsigned char *) buffer + word_offset / 8; -+ -+ insert_1 (cd, value, start, length, word_length, bufp); -+ } -+ -+#endif /* ! CGEN_INT_INSN_P */ -+ -+ return NULL; -+} -+ -+/* Default insn builder (insert handler). -+ The instruction is recorded in CGEN_INT_INSN_P byte order (meaning -+ that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is -+ recorded in host byte order, otherwise BUFFER is an array of bytes -+ and the value is recorded in target byte order). -+ The result is an error message or NULL if success. */ -+ -+static const char * -+insert_insn_normal (CGEN_CPU_DESC cd, -+ const CGEN_INSN * insn, -+ CGEN_FIELDS * fields, -+ CGEN_INSN_BYTES_PTR buffer, -+ bfd_vma pc) -+{ -+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -+ unsigned long value; -+ const CGEN_SYNTAX_CHAR_TYPE * syn; -+ -+ CGEN_INIT_INSERT (cd); -+ value = CGEN_INSN_BASE_VALUE (insn); -+ -+ /* If we're recording insns as numbers (rather than a string of bytes), -+ target byte order handling is deferred until later. */ -+ -+#if CGEN_INT_INSN_P -+ -+ put_insn_int_value (cd, buffer, cd->base_insn_bitsize, -+ CGEN_FIELDS_BITSIZE (fields), value); -+ -+#else -+ -+ cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize, -+ (unsigned) CGEN_FIELDS_BITSIZE (fields)), -+ value); -+ -+#endif /* ! CGEN_INT_INSN_P */ -+ -+ /* ??? It would be better to scan the format's fields. -+ Still need to be able to insert a value based on the operand though; -+ e.g. storing a branch displacement that got resolved later. -+ Needs more thought first. */ -+ -+ for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn) -+ { -+ const char *errmsg; -+ -+ if (CGEN_SYNTAX_CHAR_P (* syn)) -+ continue; -+ -+ errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn), -+ fields, buffer, pc); -+ if (errmsg) -+ return errmsg; -+ } -+ -+ return NULL; -+} -+ -+#if CGEN_INT_INSN_P -+/* Cover function to store an insn value into an integral insn. Must go here -+ because it needs -desc.h for CGEN_INT_INSN_P. */ -+ -+static void -+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ CGEN_INSN_BYTES_PTR buf, -+ int length, -+ int insn_length, -+ CGEN_INSN_INT value) -+{ -+ /* For architectures with insns smaller than the base-insn-bitsize, -+ length may be too big. */ -+ if (length > insn_length) -+ *buf = value; -+ else -+ { -+ int shift = insn_length - length; -+ /* Written this way to avoid undefined behaviour. */ -+ CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1; -+ -+ *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift); -+ } -+} -+#endif -+ -+/* Operand extraction. */ -+ -+#if ! CGEN_INT_INSN_P -+ -+/* Subroutine of extract_normal. -+ Ensure sufficient bytes are cached in EX_INFO. -+ OFFSET is the offset in bytes from the start of the insn of the value. -+ BYTES is the length of the needed value. -+ Returns 1 for success, 0 for failure. */ -+ -+static CGEN_INLINE int -+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ CGEN_EXTRACT_INFO *ex_info, -+ int offset, -+ int bytes, -+ bfd_vma pc) -+{ -+ /* It's doubtful that the middle part has already been fetched so -+ we don't optimize that case. kiss. */ -+ unsigned int mask; -+ disassemble_info *info = (disassemble_info *) ex_info->dis_info; -+ -+ /* First do a quick check. */ -+ mask = (1 << bytes) - 1; -+ if (((ex_info->valid >> offset) & mask) == mask) -+ return 1; -+ -+ /* Search for the first byte we need to read. */ -+ for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1) -+ if (! (mask & ex_info->valid)) -+ break; -+ -+ if (bytes) -+ { -+ int status; -+ -+ pc += offset; -+ status = (*info->read_memory_func) -+ (pc, ex_info->insn_bytes + offset, bytes, info); -+ -+ if (status != 0) -+ { -+ (*info->memory_error_func) (status, pc, info); -+ return 0; -+ } -+ -+ ex_info->valid |= ((1 << bytes) - 1) << offset; -+ } -+ -+ return 1; -+} -+ -+/* Subroutine of extract_normal. */ -+ -+static CGEN_INLINE long -+extract_1 (CGEN_CPU_DESC cd, -+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED, -+ int start, -+ int length, -+ int word_length, -+ unsigned char *bufp, -+ bfd_vma pc ATTRIBUTE_UNUSED) -+{ -+ unsigned long x; -+ int shift; -+ -+ x = cgen_get_insn_value (cd, bufp, word_length); -+ -+ if (CGEN_INSN_LSB0_P) -+ shift = (start + 1) - length; -+ else -+ shift = (word_length - (start + length)); -+ return x >> shift; -+} -+ -+#endif /* ! CGEN_INT_INSN_P */ -+ -+/* Default extraction routine. -+ -+ INSN_VALUE is the first base_insn_bitsize bits of the insn in host order, -+ or sometimes less for cases like the m32r where the base insn size is 32 -+ but some insns are 16 bits. -+ ATTRS is a mask of the boolean attributes. We only need `SIGNED', -+ but for generality we take a bitmask of all of them. -+ WORD_OFFSET is the offset in bits from the start of the insn of the value. -+ WORD_LENGTH is the length of the word in bits in which the value resides. -+ START is the starting bit number in the word, architecture origin. -+ LENGTH is the length of VALUE in bits. -+ TOTAL_LENGTH is the total length of the insn in bits. -+ -+ Returns 1 for success, 0 for failure. */ -+ -+/* ??? The return code isn't properly used. wip. */ -+ -+/* ??? This doesn't handle bfd_vma's. Create another function when -+ necessary. */ -+ -+static int -+extract_normal (CGEN_CPU_DESC cd, -+#if ! CGEN_INT_INSN_P -+ CGEN_EXTRACT_INFO *ex_info, -+#else -+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED, -+#endif -+ CGEN_INSN_INT insn_value, -+ unsigned int attrs, -+ unsigned int word_offset, -+ unsigned int start, -+ unsigned int length, -+ unsigned int word_length, -+ unsigned int total_length, -+#if ! CGEN_INT_INSN_P -+ bfd_vma pc, -+#else -+ bfd_vma pc ATTRIBUTE_UNUSED, -+#endif -+ long *valuep) -+{ -+ long value, mask; -+ -+ /* If LENGTH is zero, this operand doesn't contribute to the value -+ so give it a standard value of zero. */ -+ if (length == 0) -+ { -+ *valuep = 0; -+ return 1; -+ } -+ -+ if (word_length > 8 * sizeof (CGEN_INSN_INT)) -+ abort (); -+ -+ /* For architectures with insns smaller than the insn-base-bitsize, -+ word_length may be too big. */ -+ if (cd->min_insn_bitsize < cd->base_insn_bitsize) -+ { -+ if (word_offset + word_length > total_length) -+ word_length = total_length - word_offset; -+ } -+ -+ /* Does the value reside in INSN_VALUE, and at the right alignment? */ -+ -+ if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length)) -+ { -+ if (CGEN_INSN_LSB0_P) -+ value = insn_value >> ((word_offset + start + 1) - length); -+ else -+ value = insn_value >> (total_length - ( word_offset + start + length)); -+ } -+ -+#if ! CGEN_INT_INSN_P -+ -+ else -+ { -+ unsigned char *bufp = ex_info->insn_bytes + word_offset / 8; -+ -+ if (word_length > 8 * sizeof (CGEN_INSN_INT)) -+ abort (); -+ -+ if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0) -+ return 0; -+ -+ value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc); -+ } -+ -+#endif /* ! CGEN_INT_INSN_P */ -+ -+ /* Written this way to avoid undefined behaviour. */ -+ mask = (((1L << (length - 1)) - 1) << 1) | 1; -+ -+ value &= mask; -+ /* sign extend? */ -+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED) -+ && (value & (1L << (length - 1)))) -+ value |= ~mask; -+ -+ *valuep = value; -+ -+ return 1; -+} -+ -+/* Default insn extractor. -+ -+ INSN_VALUE is the first base_insn_bitsize bits, translated to host order. -+ The extracted fields are stored in FIELDS. -+ EX_INFO is used to handle reading variable length insns. -+ Return the length of the insn in bits, or 0 if no match, -+ or -1 if an error occurs fetching data (memory_error_func will have -+ been called). */ -+ -+static int -+extract_insn_normal (CGEN_CPU_DESC cd, -+ const CGEN_INSN *insn, -+ CGEN_EXTRACT_INFO *ex_info, -+ CGEN_INSN_INT insn_value, -+ CGEN_FIELDS *fields, -+ bfd_vma pc) -+{ -+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); -+ const CGEN_SYNTAX_CHAR_TYPE *syn; -+ -+ CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); -+ -+ CGEN_INIT_EXTRACT (cd); -+ -+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) -+ { -+ int length; -+ -+ if (CGEN_SYNTAX_CHAR_P (*syn)) -+ continue; -+ -+ length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn), -+ ex_info, insn_value, fields, pc); -+ if (length <= 0) -+ return length; -+ } -+ -+ /* We recognized and successfully extracted this insn. */ -+ return CGEN_INSN_BITSIZE (insn); -+} -+ -+/* Machine generated code added here. */ -+ -+const char * or1k_cgen_insert_operand -+ (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma); -+ -+/* Main entry point for operand insertion. -+ -+ This function is basically just a big switch statement. Earlier versions -+ used tables to look up the function to use, but -+ - if the table contains both assembler and disassembler functions then -+ the disassembler contains much of the assembler and vice-versa, -+ - there's a lot of inlining possibilities as things grow, -+ - using a switch statement avoids the function call overhead. -+ -+ This function could be moved into `parse_insn_normal', but keeping it -+ separate makes clear the interface between `parse_insn_normal' and each of -+ the handlers. It's also needed by GAS to insert operands that couldn't be -+ resolved during parsing. */ -+ -+const char * -+or1k_cgen_insert_operand (CGEN_CPU_DESC cd, -+ int opindex, -+ CGEN_FIELDS * fields, -+ CGEN_INSN_BYTES_PTR buffer, -+ bfd_vma pc ATTRIBUTE_UNUSED) -+{ -+ const char * errmsg = NULL; -+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ { -+ long value = fields->f_disp26; -+ value = ((SI) (((value) - (pc))) >> (2)); -+ errmsg = insert_normal (cd, value, 0|(1<f_r2, 0, 0, 20, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RADF : -+ errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RASF : -+ errmsg = insert_normal (cd, fields->f_r2, 0, 0, 20, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RB : -+ errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RBDF : -+ errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RBSF : -+ errmsg = insert_normal (cd, fields->f_r3, 0, 0, 15, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RD : -+ errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RDDF : -+ errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_RDSF : -+ errmsg = insert_normal (cd, fields->f_r1, 0, 0, 25, 5, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ errmsg = insert_normal (cd, fields->f_simm16, 0|(1<> (11))) & (31)); -+ FLD (f_imm16_10_11) = ((FLD (f_simm16_split)) & (2047)); -+} -+ errmsg = insert_normal (cd, fields->f_imm16_25_5, 0, 0, 25, 5, 32, total_length, buffer); -+ if (errmsg) -+ break; -+ errmsg = insert_normal (cd, fields->f_imm16_10_11, 0, 0, 10, 11, 32, total_length, buffer); -+ if (errmsg) -+ break; -+ } -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ errmsg = insert_normal (cd, fields->f_uimm16, 0, 0, 15, 16, 32, total_length, buffer); -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ { -+{ -+ FLD (f_imm16_25_5) = ((((UINT) (FLD (f_uimm16_split)) >> (11))) & (31)); -+ FLD (f_imm16_10_11) = ((FLD (f_uimm16_split)) & (2047)); -+} -+ errmsg = insert_normal (cd, fields->f_imm16_25_5, 0, 0, 25, 5, 32, total_length, buffer); -+ if (errmsg) -+ break; -+ errmsg = insert_normal (cd, fields->f_imm16_10_11, 0, 0, 10, 11, 32, total_length, buffer); -+ if (errmsg) -+ break; -+ } -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ errmsg = insert_normal (cd, fields->f_uimm6, 0, 0, 5, 6, 32, total_length, buffer); -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while building insn.\n"), -+ opindex); -+ abort (); -+ } -+ -+ return errmsg; -+} -+ -+int or1k_cgen_extract_operand -+ (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma); -+ -+/* Main entry point for operand extraction. -+ The result is <= 0 for error, >0 for success. -+ ??? Actual values aren't well defined right now. -+ -+ This function is basically just a big switch statement. Earlier versions -+ used tables to look up the function to use, but -+ - if the table contains both assembler and disassembler functions then -+ the disassembler contains much of the assembler and vice-versa, -+ - there's a lot of inlining possibilities as things grow, -+ - using a switch statement avoids the function call overhead. -+ -+ This function could be moved into `print_insn_normal', but keeping it -+ separate makes clear the interface between `print_insn_normal' and each of -+ the handlers. */ -+ -+int -+or1k_cgen_extract_operand (CGEN_CPU_DESC cd, -+ int opindex, -+ CGEN_EXTRACT_INFO *ex_info, -+ CGEN_INSN_INT insn_value, -+ CGEN_FIELDS * fields, -+ bfd_vma pc) -+{ -+ /* Assume success (for those operands that are nops). */ -+ int length = 1; -+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ { -+ long value; -+ length = extract_normal (cd, ex_info, insn_value, 0|(1<f_disp26 = value; -+ } -+ break; -+ case OR1K_OPERAND_RA : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); -+ break; -+ case OR1K_OPERAND_RADF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RASF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_r2); -+ break; -+ case OR1K_OPERAND_RB : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); -+ break; -+ case OR1K_OPERAND_RBDF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RBSF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_r3); -+ break; -+ case OR1K_OPERAND_RD : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RDDF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_RDSF : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_r1); -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ length = extract_normal (cd, ex_info, insn_value, 0|(1<f_simm16); -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ { -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_imm16_25_5); -+ if (length <= 0) break; -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 11, 32, total_length, pc, & fields->f_imm16_10_11); -+ if (length <= 0) break; -+ FLD (f_simm16_split) = ((HI) (UINT) (((((FLD (f_imm16_25_5)) << (11))) | (FLD (f_imm16_10_11))))); -+ } -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_uimm16); -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ { -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_imm16_25_5); -+ if (length <= 0) break; -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 11, 32, total_length, pc, & fields->f_imm16_10_11); -+ if (length <= 0) break; -+ FLD (f_uimm16_split) = ((UHI) (UINT) (((((FLD (f_imm16_25_5)) << (11))) | (FLD (f_imm16_10_11))))); -+ } -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_uimm6); -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), -+ opindex); -+ abort (); -+ } -+ -+ return length; -+} -+ -+cgen_insert_fn * const or1k_cgen_insert_handlers[] = -+{ -+ insert_insn_normal, -+}; -+ -+cgen_extract_fn * const or1k_cgen_extract_handlers[] = -+{ -+ extract_insn_normal, -+}; -+ -+int or1k_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *); -+bfd_vma or1k_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *); -+ -+/* Getting values from cgen_fields is handled by a collection of functions. -+ They are distinguished by the type of the VALUE argument they return. -+ TODO: floating point, inlining support, remove cases where result type -+ not appropriate. */ -+ -+int -+or1k_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ int opindex, -+ const CGEN_FIELDS * fields) -+{ -+ int value; -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ value = fields->f_disp26; -+ break; -+ case OR1K_OPERAND_RA : -+ value = fields->f_r2; -+ break; -+ case OR1K_OPERAND_RADF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RASF : -+ value = fields->f_r2; -+ break; -+ case OR1K_OPERAND_RB : -+ value = fields->f_r3; -+ break; -+ case OR1K_OPERAND_RBDF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RBSF : -+ value = fields->f_r3; -+ break; -+ case OR1K_OPERAND_RD : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RDDF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RDSF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ value = fields->f_simm16; -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ value = fields->f_simm16_split; -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ value = fields->f_uimm16; -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ value = fields->f_uimm16_split; -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ value = fields->f_uimm6; -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), -+ opindex); -+ abort (); -+ } -+ -+ return value; -+} -+ -+bfd_vma -+or1k_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ int opindex, -+ const CGEN_FIELDS * fields) -+{ -+ bfd_vma value; -+ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ value = fields->f_disp26; -+ break; -+ case OR1K_OPERAND_RA : -+ value = fields->f_r2; -+ break; -+ case OR1K_OPERAND_RADF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RASF : -+ value = fields->f_r2; -+ break; -+ case OR1K_OPERAND_RB : -+ value = fields->f_r3; -+ break; -+ case OR1K_OPERAND_RBDF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RBSF : -+ value = fields->f_r3; -+ break; -+ case OR1K_OPERAND_RD : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RDDF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_RDSF : -+ value = fields->f_r1; -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ value = fields->f_simm16; -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ value = fields->f_simm16_split; -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ value = fields->f_uimm16; -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ value = fields->f_uimm16_split; -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ value = fields->f_uimm6; -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), -+ opindex); -+ abort (); -+ } -+ -+ return value; -+} -+ -+void or1k_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int); -+void or1k_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma); -+ -+/* Stuffing values in cgen_fields is handled by a collection of functions. -+ They are distinguished by the type of the VALUE argument they accept. -+ TODO: floating point, inlining support, remove cases where argument type -+ not appropriate. */ -+ -+void -+or1k_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ int opindex, -+ CGEN_FIELDS * fields, -+ int value) -+{ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ fields->f_disp26 = value; -+ break; -+ case OR1K_OPERAND_RA : -+ fields->f_r2 = value; -+ break; -+ case OR1K_OPERAND_RADF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RASF : -+ fields->f_r2 = value; -+ break; -+ case OR1K_OPERAND_RB : -+ fields->f_r3 = value; -+ break; -+ case OR1K_OPERAND_RBDF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RBSF : -+ fields->f_r3 = value; -+ break; -+ case OR1K_OPERAND_RD : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RDDF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RDSF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ fields->f_simm16 = value; -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ fields->f_simm16_split = value; -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ fields->f_uimm16 = value; -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ fields->f_uimm16_split = value; -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ fields->f_uimm6 = value; -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), -+ opindex); -+ abort (); -+ } -+} -+ -+void -+or1k_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, -+ int opindex, -+ CGEN_FIELDS * fields, -+ bfd_vma value) -+{ -+ switch (opindex) -+ { -+ case OR1K_OPERAND_DISP26 : -+ fields->f_disp26 = value; -+ break; -+ case OR1K_OPERAND_RA : -+ fields->f_r2 = value; -+ break; -+ case OR1K_OPERAND_RADF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RASF : -+ fields->f_r2 = value; -+ break; -+ case OR1K_OPERAND_RB : -+ fields->f_r3 = value; -+ break; -+ case OR1K_OPERAND_RBDF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RBSF : -+ fields->f_r3 = value; -+ break; -+ case OR1K_OPERAND_RD : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RDDF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_RDSF : -+ fields->f_r1 = value; -+ break; -+ case OR1K_OPERAND_SIMM16 : -+ fields->f_simm16 = value; -+ break; -+ case OR1K_OPERAND_SIMM16_SPLIT : -+ fields->f_simm16_split = value; -+ break; -+ case OR1K_OPERAND_UIMM16 : -+ fields->f_uimm16 = value; -+ break; -+ case OR1K_OPERAND_UIMM16_SPLIT : -+ fields->f_uimm16_split = value; -+ break; -+ case OR1K_OPERAND_UIMM6 : -+ fields->f_uimm6 = value; -+ break; -+ -+ default : -+ /* xgettext:c-format */ -+ fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), -+ opindex); -+ abort (); -+ } -+} -+ -+/* Function to call before using the instruction builder tables. */ -+ -+void -+or1k_cgen_init_ibld_table (CGEN_CPU_DESC cd) -+{ -+ cd->insert_handlers = & or1k_cgen_insert_handlers[0]; -+ cd->extract_handlers = & or1k_cgen_extract_handlers[0]; -+ -+ cd->insert_operand = or1k_cgen_insert_operand; -+ cd->extract_operand = or1k_cgen_extract_operand; -+ -+ cd->get_int_operand = or1k_cgen_get_int_operand; -+ cd->set_int_operand = or1k_cgen_set_int_operand; -+ cd->get_vma_operand = or1k_cgen_get_vma_operand; -+ cd->set_vma_operand = or1k_cgen_set_vma_operand; -+} -diff -rNU3 dist.orig/opcodes/or1k-opc.c dist/opcodes/or1k-opc.c ---- dist.orig/opcodes/or1k-opc.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-opc.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,1081 @@ -+/* Instruction opcode table for or1k. -+ -+THIS FILE IS MACHINE GENERATED WITH CGEN. -+ -+Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+This file is part of the GNU Binutils and/or GDB, the GNU debugger. -+ -+ 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 -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ It 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 "ansidecl.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+#include "libiberty.h" -+ -+/* -- opc.c */ -+/* -- */ -+/* The hash functions are recorded here to help keep assembler code out of -+ the disassembler and vice versa. */ -+ -+static int asm_hash_insn_p (const CGEN_INSN *); -+static unsigned int asm_hash_insn (const char *); -+static int dis_hash_insn_p (const CGEN_INSN *); -+static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT); -+ -+/* Instruction formats. */ -+ -+#define F(f) & or1k_cgen_ifld_table[OR1K_##f] -+static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { -+ 0, 0, 0x0, { { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_j ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_DISP26) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_jr ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffff07ff, { { F (F_OPCODE) }, { F (F_RESV_25_10) }, { F (F_R3) }, { F (F_RESV_10_11) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_trap ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_RESV_20_5) }, { F (F_UIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_msync ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_RESV_20_21) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_rfe ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RESV_25_26) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_nop_imm ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_OP_25_2) }, { F (F_RESV_23_8) }, { F (F_UIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_movhi ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_RESV_20_4) }, { F (F_OP_16_1) }, { F (F_UIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_macrc ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_RESV_20_4) }, { F (F_OP_16_1) }, { F (F_UIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_mfspr ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_mtspr ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_UIMM16_SPLIT) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_lwz ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_sw ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_SIMM16_SPLIT) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_swa ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_SIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_sll ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_2) }, { F (F_RESV_5_2) }, { F (F_OP_3_4) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_slli ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc00ffc0, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_RESV_15_8) }, { F (F_OP_7_2) }, { F (F_UIMM6) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_and ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_7) }, { F (F_OP_3_4) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_exths ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_RESV_15_6) }, { F (F_OP_9_4) }, { F (F_RESV_5_2) }, { F (F_OP_3_4) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_cmov ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_1) }, { F (F_OP_9_2) }, { F (F_RESV_7_4) }, { F (F_OP_3_4) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_sfgts ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_11) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_sfgtsi ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_mac ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_7) }, { F (F_OP_3_4) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_l_maci ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_add_s ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_add_d ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R1) }, { F (F_R1) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_itof_s ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_ftoi_s ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_ftoi_d ATTRIBUTE_UNUSED = { -+ 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R1) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_eq_s ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_cust1_s ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+static const CGEN_IFMT ifmt_lf_cust1_d ATTRIBUTE_UNUSED = { -+ 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R1) }, { F (F_R1) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } -+}; -+ -+#undef F -+ -+#define A(a) (1 << CGEN_INSN_##a) -+#define OPERAND(op) OR1K_OPERAND_##op -+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ -+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) -+ -+/* The instruction table. */ -+ -+static const CGEN_OPCODE or1k_cgen_insn_opcode_table[MAX_INSNS] = -+{ -+ /* Special null first entry. -+ A `num' value of zero is thus invalid. -+ Also, the special `invalid' insn resides here. */ -+ { { 0, 0, 0, 0 }, {{0}}, 0, {0}}, -+/* l.j ${disp26} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (DISP26), 0 } }, -+ & ifmt_l_j, { 0x0 } -+ }, -+/* l.jal ${disp26} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (DISP26), 0 } }, -+ & ifmt_l_j, { 0x4000000 } -+ }, -+/* l.jr $rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RB), 0 } }, -+ & ifmt_l_jr, { 0x44000000 } -+ }, -+/* l.jalr $rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RB), 0 } }, -+ & ifmt_l_jr, { 0x48000000 } -+ }, -+/* l.bnf ${disp26} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (DISP26), 0 } }, -+ & ifmt_l_j, { 0xc000000 } -+ }, -+/* l.bf ${disp26} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (DISP26), 0 } }, -+ & ifmt_l_j, { 0x10000000 } -+ }, -+/* l.trap ${uimm16} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (UIMM16), 0 } }, -+ & ifmt_l_trap, { 0x21000000 } -+ }, -+/* l.sys ${uimm16} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (UIMM16), 0 } }, -+ & ifmt_l_trap, { 0x20000000 } -+ }, -+/* l.msync */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_msync, { 0x22000000 } -+ }, -+/* l.psync */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_msync, { 0x22800000 } -+ }, -+/* l.csync */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_msync, { 0x23000000 } -+ }, -+/* l.rfe */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0x24000000 } -+ }, -+/* l.nop ${uimm16} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (UIMM16), 0 } }, -+ & ifmt_l_nop_imm, { 0x15000000 } -+ }, -+/* l.nop */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_nop_imm, { 0x15000000 } -+ }, -+/* l.movhi $rD,$uimm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (UIMM16), 0 } }, -+ & ifmt_l_movhi, { 0x18000000 } -+ }, -+/* l.macrc $rD */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), 0 } }, -+ & ifmt_l_macrc, { 0x18010000 } -+ }, -+/* l.mfspr $rD,$rA,${uimm16} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, -+ & ifmt_l_mfspr, { 0xb4000000 } -+ }, -+/* l.mtspr $rA,$rB,${uimm16-split} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), ',', OP (UIMM16_SPLIT), 0 } }, -+ & ifmt_l_mtspr, { 0xc0000000 } -+ }, -+/* l.lwz $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x84000000 } -+ }, -+/* l.lws $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x88000000 } -+ }, -+/* l.lwa $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x6c000000 } -+ }, -+/* l.lbz $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x8c000000 } -+ }, -+/* l.lbs $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x90000000 } -+ }, -+/* l.lhz $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x94000000 } -+ }, -+/* l.lhs $rD,${simm16}($rA) */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, -+ & ifmt_l_lwz, { 0x98000000 } -+ }, -+/* l.sw ${simm16-split}($rA),$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, -+ & ifmt_l_sw, { 0xd4000000 } -+ }, -+/* l.sb ${simm16-split}($rA),$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, -+ & ifmt_l_sw, { 0xd8000000 } -+ }, -+/* l.sh ${simm16-split}($rA),$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, -+ & ifmt_l_sw, { 0xdc000000 } -+ }, -+/* l.swa ${simm16-split}($rA),$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, -+ & ifmt_l_swa, { 0xcc000000 } -+ }, -+/* l.sll $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sll, { 0xe0000008 } -+ }, -+/* l.slli $rD,$rA,${uimm6} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, -+ & ifmt_l_slli, { 0xb8000000 } -+ }, -+/* l.srl $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sll, { 0xe0000048 } -+ }, -+/* l.srli $rD,$rA,${uimm6} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, -+ & ifmt_l_slli, { 0xb8000040 } -+ }, -+/* l.sra $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sll, { 0xe0000088 } -+ }, -+/* l.srai $rD,$rA,${uimm6} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, -+ & ifmt_l_slli, { 0xb8000080 } -+ }, -+/* l.ror $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sll, { 0xe00000c8 } -+ }, -+/* l.rori $rD,$rA,${uimm6} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, -+ & ifmt_l_slli, { 0xb80000c0 } -+ }, -+/* l.and $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000003 } -+ }, -+/* l.or $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000004 } -+ }, -+/* l.xor $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000005 } -+ }, -+/* l.add $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000000 } -+ }, -+/* l.sub $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000002 } -+ }, -+/* l.addc $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000001 } -+ }, -+/* l.mul $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000306 } -+ }, -+/* l.mulu $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe000030b } -+ }, -+/* l.div $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe0000309 } -+ }, -+/* l.divu $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_and, { 0xe000030a } -+ }, -+/* l.ff1 $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_and, { 0xe000000f } -+ }, -+/* l.fl1 $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_and, { 0xe000010f } -+ }, -+/* l.andi $rD,$rA,$uimm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, -+ & ifmt_l_mfspr, { 0xa4000000 } -+ }, -+/* l.ori $rD,$rA,$uimm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, -+ & ifmt_l_mfspr, { 0xa8000000 } -+ }, -+/* l.xori $rD,$rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_lwz, { 0xac000000 } -+ }, -+/* l.addi $rD,$rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_lwz, { 0x9c000000 } -+ }, -+/* l.addic $rD,$rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_lwz, { 0xa0000000 } -+ }, -+/* l.muli $rD,$rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_lwz, { 0xb0000000 } -+ }, -+/* l.exths $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe000000c } -+ }, -+/* l.extbs $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe000004c } -+ }, -+/* l.exthz $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe000008c } -+ }, -+/* l.extbz $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe00000cc } -+ }, -+/* l.extws $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe000000d } -+ }, -+/* l.extwz $rD,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, -+ & ifmt_l_exths, { 0xe000004d } -+ }, -+/* l.cmov $rD,$rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_cmov, { 0xe000000e } -+ }, -+/* l.sfgts $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe5400000 } -+ }, -+/* l.sfgtsi $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbd400000 } -+ }, -+/* l.sfgtu $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4400000 } -+ }, -+/* l.sfgtui $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbc400000 } -+ }, -+/* l.sfges $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe5600000 } -+ }, -+/* l.sfgesi $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbd600000 } -+ }, -+/* l.sfgeu $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4600000 } -+ }, -+/* l.sfgeui $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbc600000 } -+ }, -+/* l.sflts $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe5800000 } -+ }, -+/* l.sfltsi $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbd800000 } -+ }, -+/* l.sfltu $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4800000 } -+ }, -+/* l.sfltui $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbc800000 } -+ }, -+/* l.sfles $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe5a00000 } -+ }, -+/* l.sflesi $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbda00000 } -+ }, -+/* l.sfleu $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4a00000 } -+ }, -+/* l.sfleui $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbca00000 } -+ }, -+/* l.sfeq $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4000000 } -+ }, -+/* l.sfeqi $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbc000000 } -+ }, -+/* l.sfne $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_sfgts, { 0xe4200000 } -+ }, -+/* l.sfnei $rA,$simm16 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_sfgtsi, { 0xbc200000 } -+ }, -+/* l.mac $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_mac, { 0xc4000001 } -+ }, -+/* l.msb $rA,$rB */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, -+ & ifmt_l_mac, { 0xc4000002 } -+ }, -+/* l.maci $rA,${simm16} */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, -+ & ifmt_l_maci, { 0x4c000000 } -+ }, -+/* l.cust1 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0x70000000 } -+ }, -+/* l.cust2 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0x74000000 } -+ }, -+/* l.cust3 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0x78000000 } -+ }, -+/* l.cust4 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0x7c000000 } -+ }, -+/* l.cust5 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0xf0000000 } -+ }, -+/* l.cust6 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0xf4000000 } -+ }, -+/* l.cust7 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0xf8000000 } -+ }, -+/* l.cust8 */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_l_rfe, { 0xfc000000 } -+ }, -+/* lf.add.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000000 } -+ }, -+/* lf.add.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000010 } -+ }, -+/* lf.sub.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000001 } -+ }, -+/* lf.sub.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000011 } -+ }, -+/* lf.mul.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000002 } -+ }, -+/* lf.mul.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000012 } -+ }, -+/* lf.div.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000003 } -+ }, -+/* lf.div.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000013 } -+ }, -+/* lf.rem.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000006 } -+ }, -+/* lf.rem.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000016 } -+ }, -+/* lf.itof.s $rDSF,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RA), 0 } }, -+ & ifmt_lf_itof_s, { 0xc8000004 } -+ }, -+/* lf.itof.d $rDSF,$rA */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RA), 0 } }, -+ & ifmt_lf_itof_s, { 0xc8000014 } -+ }, -+/* lf.ftoi.s $rD,$rASF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RASF), 0 } }, -+ & ifmt_lf_ftoi_s, { 0xc8000005 } -+ }, -+/* lf.ftoi.d $rD,$rADF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RD), ',', OP (RADF), 0 } }, -+ & ifmt_lf_ftoi_d, { 0xc8000015 } -+ }, -+/* lf.sfeq.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc8000008 } -+ }, -+/* lf.sfeq.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc8000018 } -+ }, -+/* lf.sfne.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc8000009 } -+ }, -+/* lf.sfne.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc8000019 } -+ }, -+/* lf.sfge.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800000b } -+ }, -+/* lf.sfge.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800001b } -+ }, -+/* lf.sfgt.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800000a } -+ }, -+/* lf.sfgt.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800001a } -+ }, -+/* lf.sflt.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800000c } -+ }, -+/* lf.sflt.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800001c } -+ }, -+/* lf.sfle.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800000d } -+ }, -+/* lf.sfle.d $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_eq_s, { 0xc800001d } -+ }, -+/* lf.madd.s $rDSF,$rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_add_s, { 0xc8000007 } -+ }, -+/* lf.madd.d $rDDF,$rADF,$rBDF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, -+ & ifmt_lf_add_d, { 0xc8000017 } -+ }, -+/* lf.cust1.s $rASF,$rBSF */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, -+ & ifmt_lf_cust1_s, { 0xc80000d0 } -+ }, -+/* lf.cust1.d */ -+ { -+ { 0, 0, 0, 0 }, -+ { { MNEM, 0 } }, -+ & ifmt_lf_cust1_d, { 0xc80000e0 } -+ }, -+}; -+ -+#undef A -+#undef OPERAND -+#undef MNEM -+#undef OP -+ -+/* Formats for ALIAS macro-insns. */ -+ -+#define F(f) & or1k_cgen_ifld_table[OR1K_##f] -+#undef F -+ -+/* Each non-simple macro entry points to an array of expansion possibilities. */ -+ -+#define A(a) (1 << CGEN_INSN_##a) -+#define OPERAND(op) OR1K_OPERAND_##op -+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ -+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) -+ -+/* The macro instruction table. */ -+ -+static const CGEN_IBASE or1k_cgen_macro_insn_table[] = -+{ -+}; -+ -+/* The macro instruction opcode table. */ -+ -+static const CGEN_OPCODE or1k_cgen_macro_insn_opcode_table[] = -+{ -+}; -+ -+#undef A -+#undef OPERAND -+#undef MNEM -+#undef OP -+ -+#ifndef CGEN_ASM_HASH_P -+#define CGEN_ASM_HASH_P(insn) 1 -+#endif -+ -+#ifndef CGEN_DIS_HASH_P -+#define CGEN_DIS_HASH_P(insn) 1 -+#endif -+ -+/* Return non-zero if INSN is to be added to the hash table. -+ Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */ -+ -+static int -+asm_hash_insn_p (insn) -+ const CGEN_INSN *insn ATTRIBUTE_UNUSED; -+{ -+ return CGEN_ASM_HASH_P (insn); -+} -+ -+static int -+dis_hash_insn_p (insn) -+ const CGEN_INSN *insn; -+{ -+ /* If building the hash table and the NO-DIS attribute is present, -+ ignore. */ -+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS)) -+ return 0; -+ return CGEN_DIS_HASH_P (insn); -+} -+ -+#ifndef CGEN_ASM_HASH -+#define CGEN_ASM_HASH_SIZE 127 -+#ifdef CGEN_MNEMONIC_OPERANDS -+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) -+#else -+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/ -+#endif -+#endif -+ -+/* It doesn't make much sense to provide a default here, -+ but while this is under development we do. -+ BUFFER is a pointer to the bytes of the insn, target order. -+ VALUE is the first base_insn_bitsize bits as an int in host order. */ -+ -+#ifndef CGEN_DIS_HASH -+#define CGEN_DIS_HASH_SIZE 256 -+#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf)) -+#endif -+ -+/* The result is the hash value of the insn. -+ Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */ -+ -+static unsigned int -+asm_hash_insn (mnem) -+ const char * mnem; -+{ -+ return CGEN_ASM_HASH (mnem); -+} -+ -+/* BUF is a pointer to the bytes of the insn, target order. -+ VALUE is the first base_insn_bitsize bits as an int in host order. */ -+ -+static unsigned int -+dis_hash_insn (buf, value) -+ const char * buf ATTRIBUTE_UNUSED; -+ CGEN_INSN_INT value ATTRIBUTE_UNUSED; -+{ -+ return CGEN_DIS_HASH (buf, value); -+} -+ -+/* Set the recorded length of the insn in the CGEN_FIELDS struct. */ -+ -+static void -+set_fields_bitsize (CGEN_FIELDS *fields, int size) -+{ -+ CGEN_FIELDS_BITSIZE (fields) = size; -+} -+ -+/* Function to call before using the operand instance table. -+ This plugs the opcode entries and macro instructions into the cpu table. */ -+ -+void -+or1k_cgen_init_opcode_table (CGEN_CPU_DESC cd) -+{ -+ int i; -+ int num_macros = (sizeof (or1k_cgen_macro_insn_table) / -+ sizeof (or1k_cgen_macro_insn_table[0])); -+ const CGEN_IBASE *ib = & or1k_cgen_macro_insn_table[0]; -+ const CGEN_OPCODE *oc = & or1k_cgen_macro_insn_opcode_table[0]; -+ CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN)); -+ -+ /* This test has been added to avoid a warning generated -+ if memset is called with a third argument of value zero. */ -+ if (num_macros >= 1) -+ memset (insns, 0, num_macros * sizeof (CGEN_INSN)); -+ for (i = 0; i < num_macros; ++i) -+ { -+ insns[i].base = &ib[i]; -+ insns[i].opcode = &oc[i]; -+ or1k_cgen_build_insn_regex (& insns[i]); -+ } -+ cd->macro_insn_table.init_entries = insns; -+ cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE); -+ cd->macro_insn_table.num_init_entries = num_macros; -+ -+ oc = & or1k_cgen_insn_opcode_table[0]; -+ insns = (CGEN_INSN *) cd->insn_table.init_entries; -+ for (i = 0; i < MAX_INSNS; ++i) -+ { -+ insns[i].opcode = &oc[i]; -+ or1k_cgen_build_insn_regex (& insns[i]); -+ } -+ -+ cd->sizeof_fields = sizeof (CGEN_FIELDS); -+ cd->set_fields_bitsize = set_fields_bitsize; -+ -+ cd->asm_hash_p = asm_hash_insn_p; -+ cd->asm_hash = asm_hash_insn; -+ cd->asm_hash_size = CGEN_ASM_HASH_SIZE; -+ -+ cd->dis_hash_p = dis_hash_insn_p; -+ cd->dis_hash = dis_hash_insn; -+ cd->dis_hash_size = CGEN_DIS_HASH_SIZE; -+} -diff -rNU3 dist.orig/opcodes/or1k-opc.h dist/opcodes/or1k-opc.h ---- dist.orig/opcodes/or1k-opc.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-opc.h 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,135 @@ -+/* Instruction opcode header for or1k. -+ -+THIS FILE IS MACHINE GENERATED WITH CGEN. -+ -+Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+This file is part of the GNU Binutils and/or GDB, the GNU debugger. -+ -+ 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 -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ It 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. -+ -+*/ -+ -+#ifndef OR1K_OPC_H -+#define OR1K_OPC_H -+ -+/* -- opc.h */ -+ -+#undef CGEN_DIS_HASH_SIZE -+#define CGEN_DIS_HASH_SIZE 256 -+#undef CGEN_DIS_HASH -+#define CGEN_DIS_HASH(buffer, value) (((unsigned char *) (buffer))[0] >> 2) -+ -+/* -- */ -+/* Enum declaration for or1k instruction types. */ -+typedef enum cgen_insn_type { -+ OR1K_INSN_INVALID, OR1K_INSN_L_J, OR1K_INSN_L_JAL, OR1K_INSN_L_JR -+ , OR1K_INSN_L_JALR, OR1K_INSN_L_BNF, OR1K_INSN_L_BF, OR1K_INSN_L_TRAP -+ , OR1K_INSN_L_SYS, OR1K_INSN_L_MSYNC, OR1K_INSN_L_PSYNC, OR1K_INSN_L_CSYNC -+ , OR1K_INSN_L_RFE, OR1K_INSN_L_NOP_IMM, OR1K_INSN_L_NOP, OR1K_INSN_L_MOVHI -+ , OR1K_INSN_L_MACRC, OR1K_INSN_L_MFSPR, OR1K_INSN_L_MTSPR, OR1K_INSN_L_LWZ -+ , OR1K_INSN_L_LWS, OR1K_INSN_L_LWA, OR1K_INSN_L_LBZ, OR1K_INSN_L_LBS -+ , OR1K_INSN_L_LHZ, OR1K_INSN_L_LHS, OR1K_INSN_L_SW, OR1K_INSN_L_SB -+ , OR1K_INSN_L_SH, OR1K_INSN_L_SWA, OR1K_INSN_L_SLL, OR1K_INSN_L_SLLI -+ , OR1K_INSN_L_SRL, OR1K_INSN_L_SRLI, OR1K_INSN_L_SRA, OR1K_INSN_L_SRAI -+ , OR1K_INSN_L_ROR, OR1K_INSN_L_RORI, OR1K_INSN_L_AND, OR1K_INSN_L_OR -+ , OR1K_INSN_L_XOR, OR1K_INSN_L_ADD, OR1K_INSN_L_SUB, OR1K_INSN_L_ADDC -+ , OR1K_INSN_L_MUL, OR1K_INSN_L_MULU, OR1K_INSN_L_DIV, OR1K_INSN_L_DIVU -+ , OR1K_INSN_L_FF1, OR1K_INSN_L_FL1, OR1K_INSN_L_ANDI, OR1K_INSN_L_ORI -+ , OR1K_INSN_L_XORI, OR1K_INSN_L_ADDI, OR1K_INSN_L_ADDIC, OR1K_INSN_L_MULI -+ , OR1K_INSN_L_EXTHS, OR1K_INSN_L_EXTBS, OR1K_INSN_L_EXTHZ, OR1K_INSN_L_EXTBZ -+ , OR1K_INSN_L_EXTWS, OR1K_INSN_L_EXTWZ, OR1K_INSN_L_CMOV, OR1K_INSN_L_SFGTS -+ , OR1K_INSN_L_SFGTSI, OR1K_INSN_L_SFGTU, OR1K_INSN_L_SFGTUI, OR1K_INSN_L_SFGES -+ , OR1K_INSN_L_SFGESI, OR1K_INSN_L_SFGEU, OR1K_INSN_L_SFGEUI, OR1K_INSN_L_SFLTS -+ , OR1K_INSN_L_SFLTSI, OR1K_INSN_L_SFLTU, OR1K_INSN_L_SFLTUI, OR1K_INSN_L_SFLES -+ , OR1K_INSN_L_SFLESI, OR1K_INSN_L_SFLEU, OR1K_INSN_L_SFLEUI, OR1K_INSN_L_SFEQ -+ , OR1K_INSN_L_SFEQI, OR1K_INSN_L_SFNE, OR1K_INSN_L_SFNEI, OR1K_INSN_L_MAC -+ , OR1K_INSN_L_MSB, OR1K_INSN_L_MACI, OR1K_INSN_L_CUST1, OR1K_INSN_L_CUST2 -+ , OR1K_INSN_L_CUST3, OR1K_INSN_L_CUST4, OR1K_INSN_L_CUST5, OR1K_INSN_L_CUST6 -+ , OR1K_INSN_L_CUST7, OR1K_INSN_L_CUST8, OR1K_INSN_LF_ADD_S, OR1K_INSN_LF_ADD_D -+ , OR1K_INSN_LF_SUB_S, OR1K_INSN_LF_SUB_D, OR1K_INSN_LF_MUL_S, OR1K_INSN_LF_MUL_D -+ , OR1K_INSN_LF_DIV_S, OR1K_INSN_LF_DIV_D, OR1K_INSN_LF_REM_S, OR1K_INSN_LF_REM_D -+ , OR1K_INSN_LF_ITOF_S, OR1K_INSN_LF_ITOF_D, OR1K_INSN_LF_FTOI_S, OR1K_INSN_LF_FTOI_D -+ , OR1K_INSN_LF_EQ_S, OR1K_INSN_LF_EQ_D, OR1K_INSN_LF_NE_S, OR1K_INSN_LF_NE_D -+ , OR1K_INSN_LF_GE_S, OR1K_INSN_LF_GE_D, OR1K_INSN_LF_GT_S, OR1K_INSN_LF_GT_D -+ , OR1K_INSN_LF_LT_S, OR1K_INSN_LF_LT_D, OR1K_INSN_LF_LE_S, OR1K_INSN_LF_LE_D -+ , OR1K_INSN_LF_MADD_S, OR1K_INSN_LF_MADD_D, OR1K_INSN_LF_CUST1_S, OR1K_INSN_LF_CUST1_D -+} CGEN_INSN_TYPE; -+ -+/* Index of `invalid' insn place holder. */ -+#define CGEN_INSN_INVALID OR1K_INSN_INVALID -+ -+/* Total number of insns in table. */ -+#define MAX_INSNS ((int) OR1K_INSN_LF_CUST1_D + 1) -+ -+/* This struct records data prior to insertion or after extraction. */ -+struct cgen_fields -+{ -+ int length; -+ long f_nil; -+ long f_anyof; -+ long f_opcode; -+ long f_r1; -+ long f_r2; -+ long f_r3; -+ long f_op_25_2; -+ long f_op_25_5; -+ long f_op_16_1; -+ long f_op_7_4; -+ long f_op_3_4; -+ long f_op_9_2; -+ long f_op_9_4; -+ long f_op_7_8; -+ long f_op_7_2; -+ long f_resv_25_26; -+ long f_resv_25_10; -+ long f_resv_25_5; -+ long f_resv_23_8; -+ long f_resv_20_21; -+ long f_resv_20_5; -+ long f_resv_20_4; -+ long f_resv_15_8; -+ long f_resv_15_6; -+ long f_resv_10_11; -+ long f_resv_10_7; -+ long f_resv_10_3; -+ long f_resv_10_1; -+ long f_resv_7_4; -+ long f_resv_5_2; -+ long f_imm16_25_5; -+ long f_imm16_10_11; -+ long f_disp26; -+ long f_uimm16; -+ long f_simm16; -+ long f_uimm6; -+ long f_uimm16_split; -+ long f_simm16_split; -+}; -+ -+#define CGEN_INIT_PARSE(od) \ -+{\ -+} -+#define CGEN_INIT_INSERT(od) \ -+{\ -+} -+#define CGEN_INIT_EXTRACT(od) \ -+{\ -+} -+#define CGEN_INIT_PRINT(od) \ -+{\ -+} -+ -+ -+#endif /* OR1K_OPC_H */ -diff -rNU3 dist.orig/opcodes/or1k-opinst.c dist/opcodes/or1k-opinst.c ---- dist.orig/opcodes/or1k-opinst.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/or1k-opinst.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,590 @@ -+/* Semantic operand instances for or1k. -+ -+THIS FILE IS MACHINE GENERATED WITH CGEN. -+ -+Copyright (C) 1996-2014 Free Software Foundation, Inc. -+ -+This file is part of the GNU Binutils and/or GDB, the GNU debugger. -+ -+ 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 -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ It 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 "ansidecl.h" -+#include "bfd.h" -+#include "symcat.h" -+#include "or1k-desc.h" -+#include "or1k-opc.h" -+ -+/* Operand references. */ -+ -+#define OP_ENT(op) OR1K_OPERAND_##op -+#define INPUT CGEN_OPINST_INPUT -+#define OUTPUT CGEN_OPINST_OUTPUT -+#define END CGEN_OPINST_END -+#define COND_REF CGEN_OPINST_COND_REF -+ -+static const CGEN_OPINST sfmt_empty_ops[] ATTRIBUTE_UNUSED = { -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_j_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "disp26", HW_H_IADDR, CGEN_MODE_UDI, OP_ENT (DISP26), 0, 0 }, -+ { INPUT, "sys_cpucfgr_nd", HW_H_SYS_CPUCFGR_ND, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_jal_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "disp26", HW_H_IADDR, CGEN_MODE_UDI, OP_ENT (DISP26), 0, 0 }, -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_cpucfgr_nd", HW_H_SYS_CPUCFGR_ND, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "h_gpr_UDI_9", HW_H_GPR, CGEN_MODE_UDI, 0, 9, 0 }, -+ { OUTPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_jr_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "sys_cpucfgr_nd", HW_H_SYS_CPUCFGR_ND, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_jalr_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "sys_cpucfgr_nd", HW_H_SYS_CPUCFGR_ND, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "h_gpr_UDI_9", HW_H_GPR, CGEN_MODE_UDI, 0, 9, 0 }, -+ { OUTPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_bnf_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "disp26", HW_H_IADDR, CGEN_MODE_UDI, OP_ENT (DISP26), 0, COND_REF }, -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "sys_cpucfgr_nd", HW_H_SYS_CPUCFGR_ND, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_trap_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_msync_ops[] ATTRIBUTE_UNUSED = { -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_nop_imm_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "uimm16", HW_H_UIMM16, CGEN_MODE_UINT, OP_ENT (UIMM16), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_movhi_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "uimm16", HW_H_UIMM16, CGEN_MODE_UINT, OP_ENT (UIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_macrc_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "mac_machi", HW_H_MAC_MACHI, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_mfspr_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "uimm16", HW_H_UIMM16, CGEN_MODE_UINT, OP_ENT (UIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_mtspr_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "uimm16_split", HW_H_UIMM16, CGEN_MODE_UINT, OP_ENT (UIMM16_SPLIT), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lwz_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_USI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_4", HW_H_MEMORY, CGEN_MODE_USI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lws_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_SI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_4", HW_H_MEMORY, CGEN_MODE_SI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lwa_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_USI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_4", HW_H_MEMORY, CGEN_MODE_USI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "atomic_address", HW_H_ATOMIC_ADDRESS, CGEN_MODE_SI, 0, 0, 0 }, -+ { OUTPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lbz_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_UQI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_1", HW_H_MEMORY, CGEN_MODE_UQI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lbs_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_QI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_1", HW_H_MEMORY, CGEN_MODE_QI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lhz_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_UHI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_2", HW_H_MEMORY, CGEN_MODE_UHI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_lhs_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "h_memory_HI_c_call__AI_@cpu@_make_load_store_addr_rA_ext__SI_simm16_2", HW_H_MEMORY, CGEN_MODE_HI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sw_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "atomic_address", HW_H_ATOMIC_ADDRESS, CGEN_MODE_SI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "simm16_split", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16_SPLIT), 0, 0 }, -+ { OUTPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, COND_REF }, -+ { OUTPUT, "h_memory_USI_addr", HW_H_MEMORY, CGEN_MODE_USI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sb_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "atomic_address", HW_H_ATOMIC_ADDRESS, CGEN_MODE_SI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "simm16_split", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16_SPLIT), 0, 0 }, -+ { OUTPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, COND_REF }, -+ { OUTPUT, "h_memory_UQI_addr", HW_H_MEMORY, CGEN_MODE_UQI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sh_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "atomic_address", HW_H_ATOMIC_ADDRESS, CGEN_MODE_SI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "simm16_split", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16_SPLIT), 0, 0 }, -+ { OUTPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, COND_REF }, -+ { OUTPUT, "h_memory_UHI_addr", HW_H_MEMORY, CGEN_MODE_UHI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_swa_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "atomic_address", HW_H_ATOMIC_ADDRESS, CGEN_MODE_SI, 0, 0, 0 }, -+ { INPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, COND_REF }, -+ { INPUT, "simm16_split", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16_SPLIT), 0, 0 }, -+ { INPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "atomic_reserve", HW_H_ATOMIC_RESERVE, CGEN_MODE_BI, 0, 0, 0 }, -+ { OUTPUT, "h_memory_USI_addr", HW_H_MEMORY, CGEN_MODE_USI, 0, 0, COND_REF }, -+ { OUTPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sll_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_slli_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "uimm6", HW_H_UIMM6, CGEN_MODE_UINT, OP_ENT (UIMM6), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_and_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_add_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ove", HW_H_SYS_SR_OVE, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { OUTPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_addc_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ove", HW_H_SYS_SR_OVE, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { OUTPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_div_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, COND_REF }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { INPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ove", HW_H_SYS_SR_OVE, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, COND_REF }, -+ { OUTPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { OUTPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_ff1_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_xori_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_addi_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { INPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ove", HW_H_SYS_SR_OVE, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { OUTPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_addic_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "pc", HW_H_PC, CGEN_MODE_UDI, 0, 0, COND_REF }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { INPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "sys_sr_ove", HW_H_SYS_SR_OVE, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { OUTPUT, "sys_sr_cy", HW_H_SYS_SR_CY, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "sys_sr_ov", HW_H_SYS_SR_OV, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_exths_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_cmov_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, COND_REF }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, COND_REF }, -+ { INPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, COND_REF }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sfgts_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { OUTPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_sfgtsi_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_mac_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "mac_machi", HW_H_MAC_MACHI, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "rB", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RB), 0, 0 }, -+ { OUTPUT, "mac_machi", HW_H_MAC_MACHI, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_l_maci_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "mac_machi", HW_H_MAC_MACHI, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "simm16", HW_H_SIMM16, CGEN_MODE_INT, OP_ENT (SIMM16), 0, 0 }, -+ { OUTPUT, "mac_machi", HW_H_MAC_MACHI, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "mac_maclo", HW_H_MAC_MACLO, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_add_s_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rASF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RASF), 0, 0 }, -+ { INPUT, "rBSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RBSF), 0, 0 }, -+ { OUTPUT, "rDSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RDSF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_add_d_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rADF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RADF), 0, 0 }, -+ { INPUT, "rBDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RBDF), 0, 0 }, -+ { OUTPUT, "rDDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RDDF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_itof_s_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "sys_fpcsr_rm", HW_H_SYS_FPCSR_RM, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rDSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RDSF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_itof_d_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rA", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RA), 0, 0 }, -+ { INPUT, "sys_fpcsr_rm", HW_H_SYS_FPCSR_RM, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rDDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RDDF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_ftoi_s_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rASF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RASF), 0, 0 }, -+ { INPUT, "sys_fpcsr_rm", HW_H_SYS_FPCSR_RM, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_ftoi_d_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rADF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RADF), 0, 0 }, -+ { INPUT, "sys_fpcsr_rm", HW_H_SYS_FPCSR_RM, CGEN_MODE_UDI, 0, 0, 0 }, -+ { OUTPUT, "rD", HW_H_GPR, CGEN_MODE_UDI, OP_ENT (RD), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_eq_s_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rASF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RASF), 0, 0 }, -+ { INPUT, "rBSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RBSF), 0, 0 }, -+ { OUTPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_eq_d_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rADF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RADF), 0, 0 }, -+ { INPUT, "rBDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RBDF), 0, 0 }, -+ { OUTPUT, "sys_sr_f", HW_H_SYS_SR_F, CGEN_MODE_UDI, 0, 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_madd_s_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rASF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RASF), 0, 0 }, -+ { INPUT, "rBSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RBSF), 0, 0 }, -+ { INPUT, "rDSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RDSF), 0, 0 }, -+ { OUTPUT, "rDSF", HW_H_FSR, CGEN_MODE_SF, OP_ENT (RDSF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+static const CGEN_OPINST sfmt_lf_madd_d_ops[] ATTRIBUTE_UNUSED = { -+ { INPUT, "rADF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RADF), 0, 0 }, -+ { INPUT, "rBDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RBDF), 0, 0 }, -+ { INPUT, "rDDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RDDF), 0, 0 }, -+ { OUTPUT, "rDDF", HW_H_FDR, CGEN_MODE_DF, OP_ENT (RDDF), 0, 0 }, -+ { END, (const char *)0, (enum cgen_hw_type)0, (enum cgen_mode)0, (enum cgen_operand_type)0, 0, 0 } -+}; -+ -+#undef OP_ENT -+#undef INPUT -+#undef OUTPUT -+#undef END -+#undef COND_REF -+ -+/* Operand instance lookup table. */ -+ -+static const CGEN_OPINST *or1k_cgen_opinst_table[MAX_INSNS] = { -+ 0, -+ & sfmt_l_j_ops[0], -+ & sfmt_l_jal_ops[0], -+ & sfmt_l_jr_ops[0], -+ & sfmt_l_jalr_ops[0], -+ & sfmt_l_bnf_ops[0], -+ & sfmt_l_bnf_ops[0], -+ & sfmt_l_trap_ops[0], -+ & sfmt_l_trap_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_nop_imm_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_movhi_ops[0], -+ & sfmt_l_macrc_ops[0], -+ & sfmt_l_mfspr_ops[0], -+ & sfmt_l_mtspr_ops[0], -+ & sfmt_l_lwz_ops[0], -+ & sfmt_l_lws_ops[0], -+ & sfmt_l_lwa_ops[0], -+ & sfmt_l_lbz_ops[0], -+ & sfmt_l_lbs_ops[0], -+ & sfmt_l_lhz_ops[0], -+ & sfmt_l_lhs_ops[0], -+ & sfmt_l_sw_ops[0], -+ & sfmt_l_sb_ops[0], -+ & sfmt_l_sh_ops[0], -+ & sfmt_l_swa_ops[0], -+ & sfmt_l_sll_ops[0], -+ & sfmt_l_slli_ops[0], -+ & sfmt_l_sll_ops[0], -+ & sfmt_l_slli_ops[0], -+ & sfmt_l_sll_ops[0], -+ & sfmt_l_slli_ops[0], -+ & sfmt_l_sll_ops[0], -+ & sfmt_l_slli_ops[0], -+ & sfmt_l_and_ops[0], -+ & sfmt_l_and_ops[0], -+ & sfmt_l_and_ops[0], -+ & sfmt_l_add_ops[0], -+ & sfmt_l_add_ops[0], -+ & sfmt_l_addc_ops[0], -+ & sfmt_l_add_ops[0], -+ & sfmt_l_add_ops[0], -+ & sfmt_l_div_ops[0], -+ & sfmt_l_div_ops[0], -+ & sfmt_l_ff1_ops[0], -+ & sfmt_l_ff1_ops[0], -+ & sfmt_l_mfspr_ops[0], -+ & sfmt_l_mfspr_ops[0], -+ & sfmt_l_xori_ops[0], -+ & sfmt_l_addi_ops[0], -+ & sfmt_l_addic_ops[0], -+ & sfmt_l_addi_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_exths_ops[0], -+ & sfmt_l_cmov_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_sfgts_ops[0], -+ & sfmt_l_sfgtsi_ops[0], -+ & sfmt_l_mac_ops[0], -+ & sfmt_l_mac_ops[0], -+ & sfmt_l_maci_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_lf_add_s_ops[0], -+ & sfmt_lf_add_d_ops[0], -+ & sfmt_lf_add_s_ops[0], -+ & sfmt_lf_add_d_ops[0], -+ & sfmt_lf_add_s_ops[0], -+ & sfmt_lf_add_d_ops[0], -+ & sfmt_lf_add_s_ops[0], -+ & sfmt_lf_add_d_ops[0], -+ & sfmt_lf_add_s_ops[0], -+ & sfmt_lf_add_d_ops[0], -+ & sfmt_lf_itof_s_ops[0], -+ & sfmt_lf_itof_d_ops[0], -+ & sfmt_lf_ftoi_s_ops[0], -+ & sfmt_lf_ftoi_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_eq_s_ops[0], -+ & sfmt_lf_eq_d_ops[0], -+ & sfmt_lf_madd_s_ops[0], -+ & sfmt_lf_madd_d_ops[0], -+ & sfmt_l_msync_ops[0], -+ & sfmt_l_msync_ops[0], -+}; -+ -+/* Function to call before using the operand instance table. */ -+ -+void -+or1k_cgen_init_opinst_table (cd) -+ CGEN_CPU_DESC cd; -+{ -+ int i; -+ const CGEN_OPINST **oi = & or1k_cgen_opinst_table[0]; -+ CGEN_INSN *insns = (CGEN_INSN *) cd->insn_table.init_entries; -+ for (i = 0; i < MAX_INSNS; ++i) -+ insns[i].opinst = oi[i]; -+} -diff -rNU3 dist.orig/opcodes/or32-dis.c dist/opcodes/or32-dis.c ---- dist.orig/opcodes/or32-dis.c 2012-05-18 03:59:38.000000000 +0200 -+++ dist/opcodes/or32-dis.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,325 +0,0 @@ --/* Instruction printing code for the OpenRISC 1000 -- Copyright (C) 2002, 2005, 2007, 2012 Free Software Foundation, Inc. -- Contributed by Damjan Lampret . -- Modified from a29k port. -- -- This file is part of the GNU opcodes library. -- -- This library 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, or (at your option) -- any later version. -- -- It 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. */ -- --#ifndef DEBUG --#define DEBUG 0 --#endif -- --#include "sysdep.h" --#include "dis-asm.h" --#include "opcode/or32.h" --#include "safe-ctype.h" -- --#define EXTEND29(x) ((x) & (unsigned long) 0x10000000 ? ((x) | (unsigned long) 0xf0000000) : ((x))) -- --/* Now find the four bytes of INSN_CH and put them in *INSN. */ -- --static void --find_bytes_big (unsigned char *insn_ch, unsigned long *insn) --{ -- *insn = -- ((unsigned long) insn_ch[0] << 24) + -- ((unsigned long) insn_ch[1] << 16) + -- ((unsigned long) insn_ch[2] << 8) + -- ((unsigned long) insn_ch[3]); --#if DEBUG -- printf ("find_bytes_big3: %lx\n", *insn); --#endif --} -- --static void --find_bytes_little (unsigned char *insn_ch, unsigned long *insn) --{ -- *insn = -- ((unsigned long) insn_ch[3] << 24) + -- ((unsigned long) insn_ch[2] << 16) + -- ((unsigned long) insn_ch[1] << 8) + -- ((unsigned long) insn_ch[0]); --} -- --typedef void (*find_byte_func_type) (unsigned char *, unsigned long *); -- --static unsigned long --or32_extract (char param_ch, char *enc_initial, unsigned long insn) --{ -- char *enc; -- unsigned long ret = 0; -- int opc_pos = 0; -- int param_pos = 0; -- -- for (enc = enc_initial; *enc != '\0'; enc++) -- if (*enc == param_ch) -- { -- if (enc - 2 >= enc_initial && (*(enc - 2) == '0') && (*(enc - 1) == 'x')) -- continue; -- else -- param_pos++; -- } -- --#if DEBUG -- printf ("or32_extract: %c %x ", param_ch, param_pos); --#endif -- opc_pos = 32; -- -- for (enc = enc_initial; *enc != '\0'; ) -- if ((*enc == '0') && (*(enc + 1) == 'x')) -- { -- opc_pos -= 4; -- -- if ((param_ch == '0') || (param_ch == '1')) -- { -- unsigned long tmp = strtoul (enc, NULL, 16); --#if DEBUG -- printf (" enc=%s, tmp=%lx ", enc, tmp); --#endif -- if (param_ch == '0') -- tmp = 15 - tmp; -- ret |= tmp << opc_pos; -- } -- enc += 3; -- } -- else if ((*enc == '0') || (*enc == '1')) -- { -- opc_pos--; -- if (param_ch == *enc) -- ret |= 1 << opc_pos; -- enc++; -- } -- else if (*enc == param_ch) -- { -- opc_pos--; -- param_pos--; --#if DEBUG -- printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos); --#endif -- ret += ((insn >> opc_pos) & 0x1) << param_pos; -- -- if (!param_pos -- && letter_signed (param_ch) -- && ret >> (letter_range (param_ch) - 1)) -- { --#if DEBUG -- printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n", -- ret, opc_pos, param_pos); --#endif -- ret |= 0xffffffff << letter_range(param_ch); --#if DEBUG -- printf ("\n after conversion to signed: ret=%lx\n", ret); --#endif -- } -- enc++; -- } -- else if (ISALPHA (*enc)) -- { -- opc_pos--; -- enc++; -- } -- else if (*enc == '-') -- { -- opc_pos--; -- enc++; -- } -- else -- enc++; -- --#if DEBUG -- printf ("ret=%lx\n", ret); --#endif -- return ret; --} -- --static int --or32_opcode_match (unsigned long insn, char *encoding) --{ -- unsigned long ones, zeros; -- --#if DEBUG -- printf ("or32_opcode_match: %.8lx\n", insn); --#endif -- ones = or32_extract ('1', encoding, insn); -- zeros = or32_extract ('0', encoding, insn); -- --#if DEBUG -- printf ("ones: %lx \n", ones); -- printf ("zeros: %lx \n", zeros); --#endif -- if ((insn & ones) != ones) -- { --#if DEBUG -- printf ("ret1\n"); --#endif -- return 0; -- } -- -- if ((~insn & zeros) != zeros) -- { --#if DEBUG -- printf ("ret2\n"); --#endif -- return 0; -- } -- --#if DEBUG -- printf ("ret3\n"); --#endif -- return 1; --} -- --/* Print register to INFO->STREAM. Used only by print_insn. */ -- --static void --or32_print_register (char param_ch, -- char *encoding, -- unsigned long insn, -- struct disassemble_info *info) --{ -- int regnum = or32_extract (param_ch, encoding, insn); -- --#if DEBUG -- printf ("or32_print_register: %c, %s, %lx\n", param_ch, encoding, insn); --#endif -- if (param_ch == 'A') -- (*info->fprintf_func) (info->stream, "r%d", regnum); -- else if (param_ch == 'B') -- (*info->fprintf_func) (info->stream, "r%d", regnum); -- else if (param_ch == 'D') -- (*info->fprintf_func) (info->stream, "r%d", regnum); -- else if (regnum < 16) -- (*info->fprintf_func) (info->stream, "r%d", regnum); -- else if (regnum < 32) -- (*info->fprintf_func) (info->stream, "r%d", regnum-16); -- else -- (*info->fprintf_func) (info->stream, "X%d", regnum); --} -- --/* Print immediate to INFO->STREAM. Used only by print_insn. */ -- --static void --or32_print_immediate (char param_ch, -- char *encoding, -- unsigned long insn, -- struct disassemble_info *info) --{ -- int imm = or32_extract(param_ch, encoding, insn); -- -- if (letter_signed(param_ch)) -- (*info->fprintf_func) (info->stream, "0x%x", imm); --/* (*info->fprintf_func) (info->stream, "%d", imm); */ -- else -- (*info->fprintf_func) (info->stream, "0x%x", imm); --} -- --/* Print one instruction from MEMADDR on INFO->STREAM. -- Return the size of the instruction (always 4 on or32). */ -- --static int --print_insn (bfd_vma memaddr, struct disassemble_info *info) --{ -- /* The raw instruction. */ -- unsigned char insn_ch[4]; -- /* Address. Will be sign extened 27-bit. */ -- unsigned long addr; -- /* The four bytes of the instruction. */ -- unsigned long insn; -- find_byte_func_type find_byte_func = (find_byte_func_type) info->private_data; -- struct or32_opcode const * opcode; -- -- { -- int status = -- (*info->read_memory_func) (memaddr, (bfd_byte *) &insn_ch[0], 4, info); -- -- if (status != 0) -- { -- (*info->memory_error_func) (status, memaddr, info); -- return -1; -- } -- } -- -- (*find_byte_func) (&insn_ch[0], &insn); -- -- for (opcode = &or32_opcodes[0]; -- opcode < &or32_opcodes[or32_num_opcodes]; -- ++opcode) -- { -- if (or32_opcode_match (insn, opcode->encoding)) -- { -- char *s; -- -- (*info->fprintf_func) (info->stream, "%s ", opcode->name); -- -- for (s = opcode->args; *s != '\0'; ++s) -- { -- switch (*s) -- { -- case '\0': -- return 4; -- -- case 'r': -- or32_print_register (*++s, opcode->encoding, insn, info); -- break; -- -- case 'X': -- addr = or32_extract ('X', opcode->encoding, insn) << 2; -- -- /* Calulate the correct address. XXX is this really correct ?? */ -- addr = memaddr + EXTEND29 (addr); -- -- (*info->print_address_func) -- (addr, info); -- break; -- -- default: -- if (strchr (opcode->encoding, *s)) -- or32_print_immediate (*s, opcode->encoding, insn, info); -- else -- (*info->fprintf_func) (info->stream, "%c", *s); -- } -- } -- -- return 4; -- } -- } -- -- /* This used to be %8x for binutils. */ -- (*info->fprintf_func) -- (info->stream, ".word 0x%08lx", insn); -- return 4; --} -- --/* Disassemble a big-endian or32 instruction. */ -- --int --print_insn_big_or32 (bfd_vma memaddr, struct disassemble_info *info) --{ -- info->private_data = find_bytes_big; -- -- return print_insn (memaddr, info); --} -- --/* Disassemble a little-endian or32 instruction. */ -- --int --print_insn_little_or32 (bfd_vma memaddr, struct disassemble_info *info) --{ -- info->private_data = find_bytes_little; -- return print_insn (memaddr, info); --} -diff -rNU3 dist.orig/opcodes/or32-opc.c dist/opcodes/or32-opc.c ---- dist.orig/opcodes/or32-opc.c 2012-05-17 17:13:25.000000000 +0200 -+++ dist/opcodes/or32-opc.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1031 +0,0 @@ --/* Table of opcodes for the OpenRISC 1000 ISA. -- Copyright 2002, 2004, 2005, 2007, 2008, 2009, 2012 -- Free Software Foundation, Inc. -- Contributed by Damjan Lampret (lampret@opencores.org). -- -- This file is part of the GNU opcodes library. -- -- This library 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, or (at your option) -- any later version. -- -- It 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 --#include --#include --#include "safe-ctype.h" --#include "ansidecl.h" --#include "opcode/or32.h" -- --/* We treat all letters the same in encode/decode routines so -- we need to assign some characteristics to them like signess etc. */ -- --const struct or32_letter or32_letters[] = --{ -- { 'A', NUM_UNSIGNED }, -- { 'B', NUM_UNSIGNED }, -- { 'D', NUM_UNSIGNED }, -- { 'I', NUM_SIGNED }, -- { 'K', NUM_UNSIGNED }, -- { 'L', NUM_UNSIGNED }, -- { 'N', NUM_SIGNED }, -- { '0', NUM_UNSIGNED }, -- { '\0', 0 } /* Dummy entry. */ --}; -- --/* Opcode encoding: -- machine[31:30]: first two bits of opcode -- 00 - neither of source operands is GPR -- 01 - second source operand is GPR (rB) -- 10 - first source operand is GPR (rA) -- 11 - both source operands are GPRs (rA and rB) -- machine[29:26]: next four bits of opcode -- machine[25:00]: instruction operands (specific to individual instruction) -- -- Recommendation: irrelevant instruction bits should be set with a value of -- bits in same positions of instruction preceding current instruction in the -- code (when assembling). */ -- --#define EFN &l_none -- --#ifdef HAS_EXECUTION --#define EF(func) &(func) --#define EFI &l_invalid --#else /* HAS_EXECUTION */ --#define EF(func) EFN --#define EFI EFN --#endif /* HAS_EXECUTION */ -- --const struct or32_opcode or32_opcodes[] = --{ -- { "l.j", "N", "00 0x0 NNNNN NNNNN NNNN NNNN NNNN NNNN", EF(l_j), OR32_IF_DELAY }, -- { "l.jal", "N", "00 0x1 NNNNN NNNNN NNNN NNNN NNNN NNNN", EF(l_jal), OR32_IF_DELAY }, -- { "l.bnf", "N", "00 0x3 NNNNN NNNNN NNNN NNNN NNNN NNNN", EF(l_bnf), OR32_IF_DELAY | OR32_R_FLAG}, -- { "l.bf", "N", "00 0x4 NNNNN NNNNN NNNN NNNN NNNN NNNN", EF(l_bf), OR32_IF_DELAY | OR32_R_FLAG }, -- { "l.nop", "K", "00 0x5 01--- ----- KKKK KKKK KKKK KKKK", EF(l_nop), 0 }, -- { "l.movhi", "rD,K", "00 0x6 DDDDD ----0 KKKK KKKK KKKK KKKK", EF(l_movhi), 0 }, /*MM*/ -- { "l.macrc", "rD", "00 0x6 DDDDD ----1 0000 0000 0000 0000", EF(l_macrc), 0 }, /*MM*/ -- -- { "l.sys", "K", "00 0x8 00000 00000 KKKK KKKK KKKK KKKK", EF(l_sys), 0 }, -- { "l.trap", "K", "00 0x8 01000 00000 KKKK KKKK KKKK KKKK", EF(l_trap), 0 }, /* CZ 21/06/01 */ -- { "l.msync", "", "00 0x8 10000 00000 0000 0000 0000 0000", EFN, 0 }, -- { "l.psync", "", "00 0x8 10100 00000 0000 0000 0000 0000", EFN, 0 }, -- { "l.csync", "", "00 0x8 11000 00000 0000 0000 0000 0000", EFN, 0 }, -- { "l.rfe", "", "00 0x9 ----- ----- ---- ---- ---- ----", EF(l_rfe), OR32_IF_DELAY }, -- -- { "lv.all_eq.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x0", EFI, 0 }, -- { "lv.all_eq.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x1", EFI, 0 }, -- { "lv.all_ge.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x2", EFI, 0 }, -- { "lv.all_ge.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x3", EFI, 0 }, -- { "lv.all_gt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x4", EFI, 0 }, -- { "lv.all_gt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x5", EFI, 0 }, -- { "lv.all_le.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x6", EFI, 0 }, -- { "lv.all_le.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x7", EFI, 0 }, -- { "lv.all_lt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x8", EFI, 0 }, -- { "lv.all_lt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0x9", EFI, 0 }, -- { "lv.all_ne.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0xA", EFI, 0 }, -- { "lv.all_ne.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x1 0xB", EFI, 0 }, -- { "lv.any_eq.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x0", EFI, 0 }, -- { "lv.any_eq.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x1", EFI, 0 }, -- { "lv.any_ge.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x2", EFI, 0 }, -- { "lv.any_ge.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x3", EFI, 0 }, -- { "lv.any_gt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x4", EFI, 0 }, -- { "lv.any_gt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x5", EFI, 0 }, -- { "lv.any_le.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x6", EFI, 0 }, -- { "lv.any_le.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x7", EFI, 0 }, -- { "lv.any_lt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x8", EFI, 0 }, -- { "lv.any_lt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0x9", EFI, 0 }, -- { "lv.any_ne.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0xA", EFI, 0 }, -- { "lv.any_ne.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x2 0xB", EFI, 0 }, -- { "lv.add.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x0", EFI, 0 }, -- { "lv.add.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x1", EFI, 0 }, -- { "lv.adds.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x2", EFI, 0 }, -- { "lv.adds.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x3", EFI, 0 }, -- { "lv.addu.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x4", EFI, 0 }, -- { "lv.addu.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x5", EFI, 0 }, -- { "lv.addus.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x6", EFI, 0 }, -- { "lv.addus.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x7", EFI, 0 }, -- { "lv.and", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x8", EFI, 0 }, -- { "lv.avg.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0x9", EFI, 0 }, -- { "lv.avg.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x3 0xA", EFI, 0 }, -- { "lv.cmp_eq.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x0", EFI, 0 }, -- { "lv.cmp_eq.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x1", EFI, 0 }, -- { "lv.cmp_ge.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x2", EFI, 0 }, -- { "lv.cmp_ge.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x3", EFI, 0 }, -- { "lv.cmp_gt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x4", EFI, 0 }, -- { "lv.cmp_gt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x5", EFI, 0 }, -- { "lv.cmp_le.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x6", EFI, 0 }, -- { "lv.cmp_le.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x7", EFI, 0 }, -- { "lv.cmp_lt.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x8", EFI, 0 }, -- { "lv.cmp_lt.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0x9", EFI, 0 }, -- { "lv.cmp_ne.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0xA", EFI, 0 }, -- { "lv.cmp_ne.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x4 0xB", EFI, 0 }, -- { "lv.madds.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x4", EFI, 0 }, -- { "lv.max.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x5", EFI, 0 }, -- { "lv.max.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x6", EFI, 0 }, -- { "lv.merge.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x7", EFI, 0 }, -- { "lv.merge.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x8", EFI, 0 }, -- { "lv.min.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0x9", EFI, 0 }, -- { "lv.min.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xA", EFI, 0 }, -- { "lv.msubs.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xB", EFI, 0 }, -- { "lv.muls.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xC", EFI, 0 }, -- { "lv.nand", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xD", EFI, 0 }, -- { "lv.nor", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xE", EFI, 0 }, -- { "lv.or", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x5 0xF", EFI, 0 }, -- { "lv.pack.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x0", EFI, 0 }, -- { "lv.pack.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x1", EFI, 0 }, -- { "lv.packs.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x2", EFI, 0 }, -- { "lv.packs.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x3", EFI, 0 }, -- { "lv.packus.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x4", EFI, 0 }, -- { "lv.packus.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x5", EFI, 0 }, -- { "lv.perm.n", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x6", EFI, 0 }, -- { "lv.rl.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x7", EFI, 0 }, -- { "lv.rl.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x8", EFI, 0 }, -- { "lv.sll.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0x9", EFI, 0 }, -- { "lv.sll.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xA", EFI, 0 }, -- { "lv.sll", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xB", EFI, 0 }, -- { "lv.srl.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xC", EFI, 0 }, -- { "lv.srl.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xD", EFI, 0 }, -- { "lv.sra.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xE", EFI, 0 }, -- { "lv.sra.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x6 0xF", EFI, 0 }, -- { "lv.srl", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x0", EFI, 0 }, -- { "lv.sub.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x1", EFI, 0 }, -- { "lv.sub.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x2", EFI, 0 }, -- { "lv.subs.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x3", EFI, 0 }, -- { "lv.subs.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x4", EFI, 0 }, -- { "lv.subu.b", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x5", EFI, 0 }, -- { "lv.subu.h", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x6", EFI, 0 }, -- { "lv.subus.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x7", EFI, 0 }, -- { "lv.subus.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x8", EFI, 0 }, -- { "lv.unpack.b","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0x9", EFI, 0 }, -- { "lv.unpack.h","rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0xA", EFI, 0 }, -- { "lv.xor", "rD,rA,rB", "00 0xA DDDDD AAAAA BBBB B--- 0x7 0xB", EFI, 0 }, -- { "lv.cust1", "", "00 0xA ----- ----- ---- ---- 0xC ----", EFI, 0 }, -- { "lv.cust2", "", "00 0xA ----- ----- ---- ---- 0xD ----", EFI, 0 }, -- { "lv.cust3", "", "00 0xA ----- ----- ---- ---- 0xE ----", EFI, 0 }, -- { "lv.cust4", "", "00 0xA ----- ----- ---- ---- 0xF ----", EFI, 0 }, -- -- { "lf.add.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x0", EFI, 0 }, -- { "lf.sub.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x1", EFI, 0 }, -- { "lf.mul.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x2", EFI, 0 }, -- { "lf.div.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x3", EFI, 0 }, -- { "lf.itof.s", "rD,rA", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x4", EFI, 0 }, -- { "lf.ftoi.s", "rD,rA", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x5", EFI, 0 }, -- { "lf.rem.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x6", EFI, 0 }, -- { "lf.madd.s", "rD,rA,rB", "00 0xB DDDDD AAAAA BBBB B--- 0x1 0x7", EFI, 0 }, -- { "lf.sfeq.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0x8", EFI, 0 }, -- { "lf.sfne.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0x9", EFI, 0 }, -- { "lf.sfgt.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0xA", EFI, 0 }, -- { "lf.sfge.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0xB", EFI, 0 }, -- { "lf.sflt.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0xC", EFI, 0 }, -- { "lf.sfle.s", "rA,rB", "00 0xB ----- AAAAA BBBB B--- 0x1 0xD", EFI, 0 }, -- { "lf.cust1.s", "", "00 0xB ----- ----- ---- ---- 0xE ----", EFI, 0 }, -- -- { "lf.add.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x0", EFI, 0 }, -- { "lf.sub.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x1", EFI, 0 }, -- { "lf.mul.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x2", EFI, 0 }, -- { "lf.div.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x3", EFI, 0 }, -- { "lf.itof.d", "rD,rA", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x4", EFI, 0 }, -- { "lf.ftoi.d", "rD,rA", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x5", EFI, 0 }, -- { "lf.rem.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x6", EFI, 0 }, -- { "lf.madd.d", "rD,rA,rB", "00 0xC DDDDD AAAAA BBBB B--- 0x1 0x7", EFI, 0 }, -- { "lf.sfeq.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0x8", EFI, 0 }, -- { "lf.sfne.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0x9", EFI, 0 }, -- { "lf.sfgt.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0xA", EFI, 0 }, -- { "lf.sfge.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0xB", EFI, 0 }, -- { "lf.sflt.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0xC", EFI, 0 }, -- { "lf.sfle.d", "rA,rB", "00 0xC ----- AAAAA BBBB B--- 0x1 0xD", EFI, 0 }, -- { "lf.cust1.d", "", "00 0xC ----- ----- ---- ---- 0xE ----", EFI, 0 }, -- -- { "lvf.ld", "rD,0(rA)", "00 0xD DDDDD AAAAA ---- ---- 0x0 0x0", EFI, 0 }, -- { "lvf.lw", "rD,0(rA)", "00 0xD DDDDD AAAAA ---- ---- 0x0 0x1", EFI, 0 }, -- { "lvf.sd", "0(rA),rB", "00 0xD ----- AAAAA BBBB B--- 0x1 0x0", EFI, 0 }, -- { "lvf.sw", "0(rA),rB", "00 0xD ----- AAAAA BBBB B--- 0x1 0x1", EFI, 0 }, -- -- { "l.jr", "rB", "01 0x1 ----- ----- BBBB B--- ---- ----", EF(l_jr), OR32_IF_DELAY }, -- { "l.jalr", "rB", "01 0x2 ----- ----- BBBB B--- ---- ----", EF(l_jalr), OR32_IF_DELAY }, -- { "l.maci", "rB,I", "01 0x3 IIIII ----- BBBB BIII IIII IIII", EF(l_mac), 0 }, -- { "l.cust1", "", "01 0xC ----- ----- ---- ---- ---- ----", EF(l_cust1), 0 }, -- { "l.cust2", "", "01 0xD ----- ----- ---- ---- ---- ----", EF(l_cust2), 0 }, -- { "l.cust3", "", "01 0xE ----- ----- ---- ---- ---- ----", EF(l_cust3), 0 }, -- { "l.cust4", "", "01 0xF ----- ----- ---- ---- ---- ----", EF(l_cust4), 0 }, -- -- { "l.ld", "rD,I(rA)", "10 0x0 DDDDD AAAAA IIII IIII IIII IIII", EFI, 0 }, -- { "l.lwz", "rD,I(rA)", "10 0x1 DDDDD AAAAA IIII IIII IIII IIII", EF(l_lwz), 0 }, -- { "l.lws", "rD,I(rA)", "10 0x2 DDDDD AAAAA IIII IIII IIII IIII", EFI, 0 }, -- { "l.lbz", "rD,I(rA)", "10 0x3 DDDDD AAAAA IIII IIII IIII IIII", EF(l_lbz), 0 }, -- { "l.lbs", "rD,I(rA)", "10 0x4 DDDDD AAAAA IIII IIII IIII IIII", EF(l_lbs), 0 }, -- { "l.lhz", "rD,I(rA)", "10 0x5 DDDDD AAAAA IIII IIII IIII IIII", EF(l_lhz), 0 }, -- { "l.lhs", "rD,I(rA)", "10 0x6 DDDDD AAAAA IIII IIII IIII IIII", EF(l_lhs), 0 }, -- -- { "l.addi", "rD,rA,I", "10 0x7 DDDDD AAAAA IIII IIII IIII IIII", EF(l_add), 0 }, -- { "l.addic", "rD,rA,I", "10 0x8 DDDDD AAAAA IIII IIII IIII IIII", EFI, 0 }, -- { "l.andi", "rD,rA,K", "10 0x9 DDDDD AAAAA KKKK KKKK KKKK KKKK", EF(l_and), 0 }, -- { "l.ori", "rD,rA,K", "10 0xA DDDDD AAAAA KKKK KKKK KKKK KKKK", EF(l_or), 0 }, -- { "l.xori", "rD,rA,I", "10 0xB DDDDD AAAAA IIII IIII IIII IIII", EF(l_xor), 0 }, -- { "l.muli", "rD,rA,I", "10 0xC DDDDD AAAAA IIII IIII IIII IIII", EFI, 0 }, -- { "l.mfspr", "rD,rA,K", "10 0xD DDDDD AAAAA KKKK KKKK KKKK KKKK", EF(l_mfspr), 0 }, -- { "l.slli", "rD,rA,L", "10 0xE DDDDD AAAAA ---- ---- 00LL LLLL", EF(l_sll), 0 }, -- { "l.srli", "rD,rA,L", "10 0xE DDDDD AAAAA ---- ---- 01LL LLLL", EF(l_srl), 0 }, -- { "l.srai", "rD,rA,L", "10 0xE DDDDD AAAAA ---- ---- 10LL LLLL", EF(l_sra), 0 }, -- { "l.rori", "rD,rA,L", "10 0xE DDDDD AAAAA ---- ---- 11LL LLLL", EFI, 0 }, -- -- { "l.sfeqi", "rA,I", "10 0xF 00000 AAAAA IIII IIII IIII IIII", EF(l_sfeq), OR32_W_FLAG }, -- { "l.sfnei", "rA,I", "10 0xF 00001 AAAAA IIII IIII IIII IIII", EF(l_sfne), OR32_W_FLAG }, -- { "l.sfgtui", "rA,I", "10 0xF 00010 AAAAA IIII IIII IIII IIII", EF(l_sfgtu), OR32_W_FLAG }, -- { "l.sfgeui", "rA,I", "10 0xF 00011 AAAAA IIII IIII IIII IIII", EF(l_sfgeu), OR32_W_FLAG }, -- { "l.sfltui", "rA,I", "10 0xF 00100 AAAAA IIII IIII IIII IIII", EF(l_sfltu), OR32_W_FLAG }, -- { "l.sfleui", "rA,I", "10 0xF 00101 AAAAA IIII IIII IIII IIII", EF(l_sfleu), OR32_W_FLAG }, -- { "l.sfgtsi", "rA,I", "10 0xF 01010 AAAAA IIII IIII IIII IIII", EF(l_sfgts), OR32_W_FLAG }, -- { "l.sfgesi", "rA,I", "10 0xF 01011 AAAAA IIII IIII IIII IIII", EF(l_sfges), OR32_W_FLAG }, -- { "l.sfltsi", "rA,I", "10 0xF 01100 AAAAA IIII IIII IIII IIII", EF(l_sflts), OR32_W_FLAG }, -- { "l.sflesi", "rA,I", "10 0xF 01101 AAAAA IIII IIII IIII IIII", EF(l_sfles), OR32_W_FLAG }, -- -- { "l.mtspr", "rA,rB,K", "11 0x0 KKKKK AAAAA BBBB BKKK KKKK KKKK", EF(l_mtspr), 0 }, -- { "l.mac", "rA,rB", "11 0x1 ----- AAAAA BBBB B--- ---- 0x1", EF(l_mac), 0 }, /*MM*/ -- { "l.msb", "rA,rB", "11 0x1 ----- AAAAA BBBB B--- ---- 0x2", EF(l_msb), 0 }, /*MM*/ -- -- { "l.sd", "I(rA),rB", "11 0x4 IIIII AAAAA BBBB BIII IIII IIII", EFI, 0 }, -- { "l.sw", "I(rA),rB", "11 0x5 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sw), 0 }, -- { "l.sb", "I(rA),rB", "11 0x6 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sb), 0 }, -- { "l.sh", "I(rA),rB", "11 0x7 IIIII AAAAA BBBB BIII IIII IIII", EF(l_sh), 0 }, -- -- { "l.add", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x0", EF(l_add), 0 }, -- { "l.addc", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x1", EFI, 0 }, -- { "l.sub", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x2", EF(l_sub), 0 }, -- { "l.and", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x3", EF(l_and), 0 }, -- { "l.or", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x4", EF(l_or), 0 }, -- { "l.xor", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x5", EF(l_xor), 0 }, -- { "l.mul", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-11 ---- 0x6", EF(l_mul), 0 }, -- -- { "l.sll", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 00-- 0x8", EF(l_sll), 0 }, -- { "l.srl", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 01-- 0x8", EF(l_srl), 0 }, -- { "l.sra", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 10-- 0x8", EF(l_sra), 0 }, -- { "l.ror", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 11-- 0x8", EFI, 0 }, -- { "l.div", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0x9", EF(l_div), 0 }, -- { "l.divu", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0xA", EF(l_divu), 0 }, -- { "l.mulu", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-11 ---- 0xB", EFI, 0 }, -- { "l.exths", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 00-- 0xC", EFI, 0 }, -- { "l.extbs", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 01-- 0xC", EFI, 0 }, -- { "l.exthz", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 10-- 0xC", EFI, 0 }, -- { "l.extbz", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 11-- 0xC", EFI, 0 }, -- { "l.extws", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 00-- 0xD", EFI, 0 }, -- { "l.extwz", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 01-- 0xD", EFI, 0 }, -- { "l.cmov", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0xE", EFI, 0 }, -- { "l.ff1", "rD,rA,rB", "11 0x8 DDDDD AAAAA BBBB B-00 ---- 0xF", EFI, 0 }, -- -- { "l.sfeq", "rA,rB", "11 0x9 00000 AAAAA BBBB B--- ---- ----", EF(l_sfeq), OR32_W_FLAG }, -- { "l.sfne", "rA,rB", "11 0x9 00001 AAAAA BBBB B--- ---- ----", EF(l_sfne), OR32_W_FLAG }, -- { "l.sfgtu", "rA,rB", "11 0x9 00010 AAAAA BBBB B--- ---- ----", EF(l_sfgtu), OR32_W_FLAG }, -- { "l.sfgeu", "rA,rB", "11 0x9 00011 AAAAA BBBB B--- ---- ----", EF(l_sfgeu), OR32_W_FLAG }, -- { "l.sfltu", "rA,rB", "11 0x9 00100 AAAAA BBBB B--- ---- ----", EF(l_sfltu), OR32_W_FLAG }, -- { "l.sfleu", "rA,rB", "11 0x9 00101 AAAAA BBBB B--- ---- ----", EF(l_sfleu), OR32_W_FLAG }, -- { "l.sfgts", "rA,rB", "11 0x9 01010 AAAAA BBBB B--- ---- ----", EF(l_sfgts), OR32_W_FLAG }, -- { "l.sfges", "rA,rB", "11 0x9 01011 AAAAA BBBB B--- ---- ----", EF(l_sfges), OR32_W_FLAG }, -- { "l.sflts", "rA,rB", "11 0x9 01100 AAAAA BBBB B--- ---- ----", EF(l_sflts), OR32_W_FLAG }, -- { "l.sfles", "rA,rB", "11 0x9 01101 AAAAA BBBB B--- ---- ----", EF(l_sfles), OR32_W_FLAG }, -- -- { "l.cust5", "", "11 0xC ----- ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust6", "", "11 0xD ----- ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust7", "", "11 0xE ----- ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust8", "", "11 0xF ----- ----- ---- ---- ---- ----", EFI, 0 }, -- -- /* This section should not be defined in or1ksim, since it contains duplicates, -- which would cause machine builder to complain. */ --#ifdef HAS_CUST -- { "l.cust5_1", "rD", "11 0xC DDDDD ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust5_2", "rD,rA" , "11 0xC DDDDD AAAAA ---- ---- ---- ----", EFI, 0 }, -- { "l.cust5_3", "rD,rA,rB", "11 0xC DDDDD AAAAA BBBB B--- ---- ----", EFI, 0 }, -- -- { "l.cust6_1", "rD", "11 0xD DDDDD ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust6_2", "rD,rA" , "11 0xD DDDDD AAAAA ---- ---- ---- ----", EFI, 0 }, -- { "l.cust6_3", "rD,rA,rB", "11 0xD DDDDD AAAAA BBBB B--- ---- ----", EFI, 0 }, -- -- { "l.cust7_1", "rD", "11 0xE DDDDD ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust7_2", "rD,rA" , "11 0xE DDDDD AAAAA ---- ---- ---- ----", EFI, 0 }, -- { "l.cust7_3", "rD,rA,rB", "11 0xE DDDDD AAAAA BBBB B--- ---- ----", EFI, 0 }, -- -- { "l.cust8_1", "rD", "11 0xF DDDDD ----- ---- ---- ---- ----", EFI, 0 }, -- { "l.cust8_2", "rD,rA" , "11 0xF DDDDD AAAAA ---- ---- ---- ----", EFI, 0 }, -- { "l.cust8_3", "rD,rA,rB", "11 0xF DDDDD AAAAA BBBB B--- ---- ----", EFI, 0 }, --#endif -- -- /* Dummy entry, not included in num_opcodes. This -- lets code examine entry i+1 without checking -- if we've run off the end of the table. */ -- { "", "", "", EFI, 0 } --}; -- --#undef EFI --#undef EFN --#undef EF -- --/* Define dummy, if debug is not defined. */ -- --#if !defined HAS_DEBUG --static void ATTRIBUTE_PRINTF_2 --debug (int level ATTRIBUTE_UNUSED, const char *format ATTRIBUTE_UNUSED, ...) --{ --} --#endif -- --const unsigned int or32_num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1; -- --/* Calculates instruction length in bytes. Always 4 for OR32. */ -- --int --insn_len (int i_index ATTRIBUTE_UNUSED) --{ -- return 4; --} -- --/* Is individual insn's operand signed or unsigned? */ -- --int --letter_signed (char l) --{ -- const struct or32_letter *pletter; -- -- for (pletter = or32_letters; pletter->letter != '\0'; pletter++) -- if (pletter->letter == l) -- return pletter->sign; -- -- printf ("letter_signed(%c): Unknown letter.\n", l); -- return 0; --} -- --/* Number of letters in the individual lettered operand. */ -- --int --letter_range (char l) --{ -- const struct or32_opcode *pinsn; -- char *enc; -- int range = 0; -- -- for (pinsn = or32_opcodes; strlen (pinsn->name); pinsn ++) -- { -- if (strchr (pinsn->encoding,l)) -- { -- for (enc = pinsn->encoding; *enc != '\0'; enc ++) -- if ((*enc == '0') && (*(enc + 1) == 'x')) -- enc += 2; -- else if (*enc == l) -- range++; -- return range; -- } -- } -- -- printf ("\nABORT: letter_range(%c): Never used letter.\n", l); -- exit (1); --} -- --/* MM: Returns index of given instruction name. */ -- --int --insn_index (char *insn) --{ -- unsigned int i; -- int found = -1; -- -- for (i = 0; i < or32_num_opcodes; i++) -- if (!strcmp (or32_opcodes[i].name, insn)) -- { -- found = i; -- break; -- } -- return found; --} -- --const char * --insn_name (int op_index) --{ -- if (op_index >= 0 && op_index < (int) or32_num_opcodes) -- return or32_opcodes[op_index].name; -- else -- return "???"; --} -- --void --l_none (void) --{ --} -- --/* Finite automata for instruction decoding building code. */ -- --/* Find simbols in encoding. */ -- --static unsigned long --insn_extract (char param_ch, char *enc_initial) --{ -- char *enc; -- unsigned long ret = 0; -- unsigned opc_pos = 32; -- -- for (enc = enc_initial; *enc != '\0'; ) -- if ((*enc == '0') && (*(enc + 1) == 'x')) -- { -- unsigned long tmp = strtol (enc+2, NULL, 16); -- -- opc_pos -= 4; -- if (param_ch == '0' || param_ch == '1') -- { -- if (param_ch == '0') -- tmp = 15 - tmp; -- ret |= tmp << opc_pos; -- } -- enc += 3; -- } -- else -- { -- if (*enc == '0' || *enc == '1' || *enc == '-' || ISALPHA (*enc)) -- { -- opc_pos--; -- if (param_ch == *enc) -- ret |= 1 << opc_pos; -- } -- enc++; -- } -- return ret; --} -- --#define MAX_AUTOMATA_SIZE 1200 --#define MAX_OP_TABLE_SIZE 1200 --#define LEAF_FLAG 0x80000000 --#define MAX_LEN 8 -- --#ifndef MIN --#define MIN(x, y) ((x) < (y) ? (x) : (y)) --#endif -- --unsigned long *automata; --int nuncovered; --int curpass = 0; -- --/* MM: Struct that hold runtime build information about instructions. */ --struct temp_insn_struct --{ -- unsigned long insn; -- unsigned long insn_mask; -- int in_pass; --} *ti; -- --struct insn_op_struct *op_data, **op_start; -- --/* Recursive utility function used to find best match and to build automata. */ -- --static unsigned long * --cover_insn (unsigned long * cur, int pass, unsigned int mask) --{ -- int best_first = 0, last_match = -1, ninstr = 0; -- unsigned int best_len = 0; -- unsigned int i; -- unsigned long cur_mask = mask; -- unsigned long *next; -- -- for (i = 0; i < or32_num_opcodes; i++) -- if (ti[i].in_pass == pass) -- { -- cur_mask &= ti[i].insn_mask; -- ninstr++; -- last_match = i; -- } -- -- debug (8, "%08X %08lX\n", mask, cur_mask); -- -- if (ninstr == 0) -- return 0; -- -- if (ninstr == 1) -- { -- /* Leaf holds instruction index. */ -- debug (8, "%li>I%i %s\n", -- (long)(cur - automata), last_match, or32_opcodes[last_match].name); -- -- *cur = LEAF_FLAG | last_match; -- cur++; -- nuncovered--; -- } -- else -- { -- /* Find longest match. */ -- for (i = 0; i < 32; i++) -- { -- unsigned int len; -- -- for (len = best_len + 1; len < MIN (MAX_LEN, 33 - i); len++) -- { -- unsigned long m = (1UL << ((unsigned long) len)) - 1; -- -- debug (9, " (%i(%08lX & %08lX>>%i = %08lX, %08lX)", -- len,m, cur_mask, i, (cur_mask >> (unsigned)i), -- (cur_mask >> (unsigned) i) & m); -- -- if ((m & (cur_mask >> (unsigned) i)) == m) -- { -- best_len = len; -- best_first = i; -- debug (9, "!"); -- } -- else -- break; -- } -- } -- -- debug (9, "\n"); -- -- if (!best_len) -- { -- fprintf (stderr, "%i instructions match mask 0x%08X:\n", ninstr, mask); -- -- for (i = 0; i < or32_num_opcodes; i++) -- if (ti[i].in_pass == pass) -- fprintf (stderr, "%s ", or32_opcodes[i].name); -- -- fprintf (stderr, "\n"); -- exit (1); -- } -- -- debug (8, "%li> #### %i << %i (%i) ####\n", -- (long)(cur - automata), best_len, best_first, ninstr); -- -- *cur = best_first; -- cur++; -- *cur = (1 << best_len) - 1; -- cur++; -- next = cur; -- -- /* Allocate space for pointers. */ -- cur += 1 << best_len; -- cur_mask = (1 << (unsigned long) best_len) - 1; -- -- for (i = 0; i < ((unsigned) 1 << best_len); i++) -- { -- unsigned int j; -- unsigned long *c; -- -- curpass++; -- for (j = 0; j < or32_num_opcodes; j++) -- if (ti[j].in_pass == pass -- && ((ti[j].insn >> best_first) & cur_mask) == (unsigned long) i -- && ((ti[j].insn_mask >> best_first) & cur_mask) == cur_mask) -- ti[j].in_pass = curpass; -- -- debug (9, "%08X %08lX %i\n", mask, cur_mask, best_first); -- c = cover_insn (cur, curpass, mask & (~(cur_mask << best_first))); -- if (c) -- { -- debug (8, "%li> #%X -> %lu\n", (long)(next - automata), i, -- (unsigned long)(cur - automata)); -- *next = cur - automata; -- cur = c; -- } -- else -- { -- debug (8, "%li> N/A\n", (long)(next - automata)); -- *next = 0; -- } -- next++; -- } -- } -- return cur; --} -- --/* Returns number of nonzero bits. */ -- --static int --num_ones (unsigned long value) --{ -- int c = 0; -- -- while (value) -- { -- if (value & 1) -- c++; -- value >>= 1; -- } -- return c; --} -- --/* Utility function, which converts parameters from or32_opcode -- format to more binary form. Parameters are stored in ti struct. */ -- --static struct insn_op_struct * --parse_params (const struct or32_opcode * opcode, -- struct insn_op_struct * cur) --{ -- char *args = opcode->args; -- int i, type; -- -- i = 0; -- type = 0; -- /* In case we don't have any parameters, we add dummy read from r0. */ -- -- if (!(*args)) -- { -- cur->type = OPTYPE_REG | OPTYPE_OP | OPTYPE_LAST; -- cur->data = 0; -- debug (9, "#%08lX %08lX\n", cur->type, cur->data); -- cur++; -- return cur; -- } -- -- while (*args != '\0') -- { -- if (*args == 'r') -- { -- args++; -- type |= OPTYPE_REG; -- } -- else if (ISALPHA (*args)) -- { -- unsigned long arg; -- -- arg = insn_extract (*args, opcode->encoding); -- debug (9, "%s : %08lX ------\n", opcode->name, arg); -- if (letter_signed (*args)) -- { -- type |= OPTYPE_SIG; -- type |= ((num_ones (arg) - 1) << OPTYPE_SBIT_SHR) & OPTYPE_SBIT; -- } -- -- /* Split argument to sequences of consecutive ones. */ -- while (arg) -- { -- int shr = 0; -- unsigned long tmp = arg, mask = 0; -- -- while ((tmp & 1) == 0) -- { -- shr++; -- tmp >>= 1; -- } -- while (tmp & 1) -- { -- mask++; -- tmp >>= 1; -- } -- cur->type = type | shr; -- cur->data = mask; -- arg &= ~(((1 << mask) - 1) << shr); -- debug (6, "|%08lX %08lX\n", cur->type, cur->data); -- cur++; -- } -- args++; -- } -- else if (*args == '(') -- { -- /* Next param is displacement. -- Later we will treat them as one operand. */ -- cur--; -- cur->type = type | cur->type | OPTYPE_DIS | OPTYPE_OP; -- debug (9, ">%08lX %08lX\n", cur->type, cur->data); -- cur++; -- type = 0; -- i++; -- args++; -- } -- else if (*args == OPERAND_DELIM) -- { -- cur--; -- cur->type = type | cur->type | OPTYPE_OP; -- debug (9, ">%08lX %08lX\n", cur->type, cur->data); -- cur++; -- type = 0; -- i++; -- args++; -- } -- else if (*args == '0') -- { -- cur->type = type; -- cur->data = 0; -- debug (9, ">%08lX %08lX\n", cur->type, cur->data); -- cur++; -- type = 0; -- i++; -- args++; -- } -- else if (*args == ')') -- args++; -- else -- { -- fprintf (stderr, "%s : parse error in args.\n", opcode->name); -- exit (1); -- } -- } -- -- cur--; -- cur->type = type | cur->type | OPTYPE_OP | OPTYPE_LAST; -- debug (9, "#%08lX %08lX\n", cur->type, cur->data); -- cur++; -- -- return cur; --} -- --/* Constructs new automata based on or32_opcodes array. */ -- --void --build_automata (void) --{ -- unsigned int i; -- unsigned long *end; -- struct insn_op_struct *cur; -- -- automata = malloc (MAX_AUTOMATA_SIZE * sizeof (unsigned long)); -- ti = malloc (sizeof (struct temp_insn_struct) * or32_num_opcodes); -- -- nuncovered = or32_num_opcodes; -- printf ("Building automata... "); -- /* Build temporary information about instructions. */ -- for (i = 0; i < or32_num_opcodes; i++) -- { -- unsigned long ones, zeros; -- char *encoding = or32_opcodes[i].encoding; -- -- ones = insn_extract('1', encoding); -- zeros = insn_extract('0', encoding); -- -- ti[i].insn_mask = ones | zeros; -- ti[i].insn = ones; -- ti[i].in_pass = curpass = 0; -- -- /*debug(9, "%s: %s %08X %08X\n", or32_opcodes[i].name, -- or32_opcodes[i].encoding, ti[i].insn_mask, ti[i].insn);*/ -- } -- -- /* Until all are covered search for best criteria to separate them. */ -- end = cover_insn (automata, curpass, 0xFFFFFFFF); -- -- if (end - automata > MAX_AUTOMATA_SIZE) -- { -- fprintf (stderr, "Automata too large. Increase MAX_AUTOMATA_SIZE."); -- exit (1); -- } -- -- printf ("done, num uncovered: %i/%i.\n", nuncovered, or32_num_opcodes); -- printf ("Parsing operands data... "); -- -- op_data = malloc (MAX_OP_TABLE_SIZE * sizeof (struct insn_op_struct)); -- op_start = malloc (or32_num_opcodes * sizeof (struct insn_op_struct *)); -- cur = op_data; -- -- for (i = 0; i < or32_num_opcodes; i++) -- { -- op_start[i] = cur; -- cur = parse_params (&or32_opcodes[i], cur); -- -- if (cur - op_data > MAX_OP_TABLE_SIZE) -- { -- fprintf (stderr, "Operands table too small, increase MAX_OP_TABLE_SIZE.\n"); -- exit (1); -- } -- } -- printf ("done.\n"); --} -- --void --destruct_automata (void) --{ -- free (ti); -- free (automata); -- free (op_data); -- free (op_start); --} -- --/* Decodes instruction and returns instruction index. */ -- --int --insn_decode (unsigned int insn) --{ -- unsigned long *a = automata; -- int i; -- -- while (!(*a & LEAF_FLAG)) -- { -- unsigned int first = *a; -- -- debug (9, "%li ", (long)(a - automata)); -- -- a++; -- i = (insn >> first) & *a; -- a++; -- if (!*(a + i)) -- { -- /* Invalid instruction found? */ -- debug (9, "XXX\n"); -- return -1; -- } -- a = automata + *(a + i); -- } -- -- i = *a & ~LEAF_FLAG; -- -- debug (9, "%i\n", i); -- -- /* Final check - do we have direct match? -- (based on or32_opcodes this should be the only possibility, -- but in case of invalid/missing instruction we must perform a check) */ -- if ((ti[i].insn_mask & insn) == ti[i].insn) -- return i; -- else -- return -1; --} -- --static char disassembled_str[50]; --char *disassembled = &disassembled_str[0]; -- --/* Automagically does zero- or sign- extension and also finds correct -- sign bit position if sign extension is correct extension. Which extension -- is proper is figured out from letter description. */ -- --static unsigned long --extend_imm (unsigned long imm, char l) --{ -- unsigned long mask; -- int letter_bits; -- -- /* First truncate all bits above valid range for this letter -- in case it is zero extend. */ -- letter_bits = letter_range (l); -- mask = (1 << letter_bits) - 1; -- imm &= mask; -- -- /* Do sign extend if this is the right one. */ -- if (letter_signed(l) && (imm >> (letter_bits - 1))) -- imm |= (~mask); -- -- return imm; --} -- --static unsigned long --or32_extract (char param_ch, char *enc_initial, unsigned long insn) --{ -- char *enc; -- unsigned long ret = 0; -- int opc_pos = 0; -- int param_pos = 0; -- -- for (enc = enc_initial; *enc != '\0'; enc++) -- if (*enc == param_ch) -- { -- if (enc - 2 >= enc_initial && (*(enc - 2) == '0') && (*(enc - 1) == 'x')) -- continue; -- else -- param_pos++; -- } -- --#if DEBUG -- printf ("or32_extract: %x ", param_pos); --#endif -- opc_pos = 32; -- -- for (enc = enc_initial; *enc != '\0'; ) -- if ((*enc == '0') && (*(enc + 1) == 'x')) -- { -- opc_pos -= 4; -- if ((param_ch == '0') || (param_ch == '1')) -- { -- unsigned long tmp = strtol (enc, NULL, 16); --#if DEBUG -- printf (" enc=%s, tmp=%lx ", enc, tmp); --#endif -- if (param_ch == '0') -- tmp = 15 - tmp; -- ret |= tmp << opc_pos; -- } -- enc += 3; -- } -- else if ((*enc == '0') || (*enc == '1')) -- { -- opc_pos--; -- if (param_ch == *enc) -- ret |= 1 << opc_pos; -- enc++; -- } -- else if (*enc == param_ch) -- { -- opc_pos--; -- param_pos--; --#if DEBUG -- printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos); --#endif -- if (ISLOWER (param_ch)) -- ret -= ((insn >> opc_pos) & 0x1) << param_pos; -- else -- ret += ((insn >> opc_pos) & 0x1) << param_pos; -- enc++; -- } -- else if (ISALPHA (*enc)) -- { -- opc_pos--; -- enc++; -- } -- else if (*enc == '-') -- { -- opc_pos--; -- enc++; -- } -- else -- enc++; -- --#if DEBUG -- printf ("ret=%lx\n", ret); --#endif -- return ret; --} -- --/* Print register. Used only by print_insn. */ -- --static void --or32_print_register (char param_ch, char *encoding, unsigned long insn) --{ -- int regnum = or32_extract(param_ch, encoding, insn); -- char s_regnum[20]; -- -- sprintf (s_regnum, "r%d", regnum); -- strcat (disassembled, s_regnum); --} -- --/* Print immediate. Used only by print_insn. */ -- --static void --or32_print_immediate (char param_ch, char *encoding, unsigned long insn) --{ -- int imm = or32_extract (param_ch, encoding, insn); -- char s_imm[20]; -- -- imm = extend_imm (imm, param_ch); -- -- if (letter_signed (param_ch)) -- { -- if (imm < 0) -- sprintf (s_imm, "%d", imm); -- else -- sprintf (s_imm, "0x%x", imm); -- } -- else -- sprintf (s_imm, "%#x", imm); -- strcat (disassembled, s_imm); --} -- --/* Disassemble one instruction from insn to disassemble. -- Return the size of the instruction. */ -- --int --disassemble_insn (unsigned long insn) --{ -- int op_index; -- op_index = insn_decode (insn); -- -- if (op_index >= 0) -- { -- struct or32_opcode const *opcode = &or32_opcodes[op_index]; -- char *s; -- -- sprintf (disassembled, "%s ", opcode->name); -- for (s = opcode->args; *s != '\0'; ++s) -- { -- switch (*s) -- { -- case '\0': -- return 4; -- -- case 'r': -- or32_print_register (*++s, opcode->encoding, insn); -- break; -- -- default: -- if (strchr (opcode->encoding, *s)) -- or32_print_immediate (*s, opcode->encoding, insn); -- else -- { -- char s_encoding[2] = { *s, '\0' }; -- -- strcat (disassembled, s_encoding); -- } -- -- } -- } -- } -- else -- { -- char s_insn[20]; -- -- /* This used to be %8x for binutils. */ -- sprintf (s_insn, ".word 0x%08lx", insn); -- strcat (disassembled, s_insn); -- } -- -- return insn_len (insn); --} -diff -rNU3 dist.orig/opcodes/riscv-dis.c dist/opcodes/riscv-dis.c ---- dist.orig/opcodes/riscv-dis.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/riscv-dis.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,492 @@ -+/* RISC-V disassembler -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ This file is part of the GNU opcodes library. -+ -+ This library 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, or (at your option) -+ any later version. -+ -+ It 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 "dis-asm.h" -+#include "libiberty.h" -+#include "opcode/riscv.h" -+#include "opintl.h" -+#include "elf-bfd.h" -+#include "elf/riscv.h" -+ -+#include -+#include -+ -+struct riscv_private_data -+{ -+ bfd_vma gp; -+ bfd_vma print_addr; -+ bfd_vma hi_addr[OP_MASK_RD + 1]; -+}; -+ -+static const char * const *riscv_gpr_names; -+static const char * const *riscv_fpr_names; -+ -+/* Other options */ -+static int no_aliases; /* If set disassemble as most general inst. */ -+ -+static void -+set_default_riscv_dis_options (void) -+{ -+ riscv_gpr_names = riscv_gpr_names_abi; -+ riscv_fpr_names = riscv_fpr_names_abi; -+ no_aliases = 0; -+} -+ -+static void -+parse_riscv_dis_option (const char *option) -+{ -+ if (CONST_STRNEQ (option, "no-aliases")) -+ no_aliases = 1; -+ else if (CONST_STRNEQ (option, "numeric")) -+ { -+ riscv_gpr_names = riscv_gpr_names_numeric; -+ riscv_fpr_names = riscv_fpr_names_numeric; -+ } -+ -+ /* Invalid option. */ -+ fprintf (stderr, _("Unrecognized disassembler option: %s\n"), option); -+} -+ -+static void -+parse_riscv_dis_options (const char *opts_in) -+{ -+ char *opts = xstrdup (opts_in), *opt = opts, *opt_end = opts; -+ -+ set_default_riscv_dis_options (); -+ -+ for ( ; opt_end != NULL; opt = opt_end + 1) -+ { -+ if ((opt_end = strchr (opt, ',')) != NULL) -+ *opt_end = 0; -+ parse_riscv_dis_option (opt); -+ } -+ -+ free (opts); -+} -+ -+/* Print one argument from an array. */ -+ -+static void -+arg_print (struct disassemble_info *info, unsigned long val, -+ const char* const* array, size_t size) -+{ -+ const char *s = val >= size || array[val] == NULL ? "unknown" : array[val]; -+ (*info->fprintf_func) (info->stream, "%s", s); -+} -+ -+static void -+maybe_print_address (struct riscv_private_data *pd, int base_reg, int offset) -+{ -+ if (pd->hi_addr[base_reg] != (bfd_vma)-1) -+ { -+ pd->print_addr = pd->hi_addr[base_reg] + offset; -+ pd->hi_addr[base_reg] = -1; -+ } -+ else if (base_reg == X_GP && pd->gp != (bfd_vma)-1) -+ pd->print_addr = pd->gp + offset; -+ else if (base_reg == X_TP) -+ pd->print_addr = offset; -+} -+ -+/* Print insn arguments for 32/64-bit code. */ -+ -+static void -+print_insn_args (const char *d, insn_t l, bfd_vma pc, disassemble_info *info) -+{ -+ struct riscv_private_data *pd = info->private_data; -+ int rs1 = (l >> OP_SH_RS1) & OP_MASK_RS1; -+ int rd = (l >> OP_SH_RD) & OP_MASK_RD; -+ -+ if (*d != '\0') -+ (*info->fprintf_func) (info->stream, "\t"); -+ -+ for (; *d != '\0'; d++) -+ { -+ switch (*d) -+ { -+ /* Xcustom */ -+ case '^': -+ switch (*++d) -+ { -+ case 'd': -+ (*info->fprintf_func) (info->stream, "%d", rd); -+ break; -+ case 's': -+ (*info->fprintf_func) (info->stream, "%d", rs1); -+ break; -+ case 't': -+ (*info->fprintf_func) -+ ( info->stream, "%d", (int)((l >> OP_SH_RS2) & OP_MASK_RS2)); -+ break; -+ case 'j': -+ (*info->fprintf_func) -+ ( info->stream, "%d", (int)((l >> OP_SH_CUSTOM_IMM) & OP_MASK_CUSTOM_IMM)); -+ break; -+ } -+ break; -+ -+ /* Xhwacha */ -+ case '#': -+ switch ( *++d ) { -+ case 'g': -+ (*info->fprintf_func) -+ ( info->stream, "%d", -+ (int)((l >> OP_SH_IMMNGPR) & OP_MASK_IMMNGPR)); -+ break; -+ case 'f': -+ (*info->fprintf_func) -+ ( info->stream, "%d", -+ (int)((l >> OP_SH_IMMNFPR) & OP_MASK_IMMNFPR)); -+ break; -+ case 'p': -+ (*info->fprintf_func) -+ ( info->stream, "%d", -+ (int)((l >> OP_SH_CUSTOM_IMM) & OP_MASK_CUSTOM_IMM)); -+ break; -+ case 'n': -+ (*info->fprintf_func) -+ ( info->stream, "%d", -+ (int)(((l >> OP_SH_IMMSEGNELM) & OP_MASK_IMMSEGNELM) + 1)); -+ break; -+ case 'd': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_gpr_names[(l >> OP_SH_VRD) & OP_MASK_VRD]); -+ break; -+ case 's': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_gpr_names[(l >> OP_SH_VRS) & OP_MASK_VRS]); -+ break; -+ case 't': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_gpr_names[(l >> OP_SH_VRT) & OP_MASK_VRT]); -+ break; -+ case 'r': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_gpr_names[(l >> OP_SH_VRR) & OP_MASK_VRR]); -+ break; -+ case 'D': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_fpr_names[(l >> OP_SH_VFD) & OP_MASK_VFD]); -+ break; -+ case 'S': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_fpr_names[(l >> OP_SH_VFS) & OP_MASK_VFS]); -+ break; -+ case 'T': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_fpr_names[(l >> OP_SH_VFT) & OP_MASK_VFT]); -+ break; -+ case 'R': -+ (*info->fprintf_func) -+ ( info->stream, "%s", -+ riscv_vec_fpr_names[(l >> OP_SH_VFR) & OP_MASK_VFR]); -+ break; -+ } -+ break; -+ -+ case ',': -+ case '(': -+ case ')': -+ case '[': -+ case ']': -+ (*info->fprintf_func) (info->stream, "%c", *d); -+ break; -+ -+ case '0': -+ break; -+ -+ case 'b': -+ case 's': -+ (*info->fprintf_func) (info->stream, "%s", riscv_gpr_names[rs1]); -+ break; -+ -+ case 't': -+ (*info->fprintf_func) (info->stream, "%s", -+ riscv_gpr_names[(l >> OP_SH_RS2) & OP_MASK_RS2]); -+ break; -+ -+ case 'u': -+ (*info->fprintf_func) (info->stream, "0x%x", (unsigned)EXTRACT_UTYPE_IMM (l) >> RISCV_IMM_BITS); -+ break; -+ -+ case 'm': -+ arg_print(info, (l >> OP_SH_RM) & OP_MASK_RM, -+ riscv_rm, ARRAY_SIZE(riscv_rm)); -+ break; -+ -+ case 'P': -+ arg_print(info, (l >> OP_SH_PRED) & OP_MASK_PRED, -+ riscv_pred_succ, ARRAY_SIZE(riscv_pred_succ)); -+ break; -+ -+ case 'Q': -+ arg_print(info, (l >> OP_SH_SUCC) & OP_MASK_SUCC, -+ riscv_pred_succ, ARRAY_SIZE(riscv_pred_succ)); -+ break; -+ -+ case 'o': -+ maybe_print_address (pd, rs1, EXTRACT_ITYPE_IMM (l)); -+ case 'j': -+ if ((l & MASK_ADDI) == MATCH_ADDI || (l & MASK_JALR) == MATCH_JALR) -+ maybe_print_address (pd, rs1, EXTRACT_ITYPE_IMM (l)); -+ (*info->fprintf_func) (info->stream, "%d", (int)EXTRACT_ITYPE_IMM (l)); -+ break; -+ -+ case 'q': -+ maybe_print_address (pd, rs1, EXTRACT_STYPE_IMM (l)); -+ (*info->fprintf_func) (info->stream, "%d", (int)EXTRACT_STYPE_IMM (l)); -+ break; -+ -+ case 'a': -+ info->target = EXTRACT_UJTYPE_IMM (l) + pc; -+ (*info->print_address_func) (info->target, info); -+ break; -+ -+ case 'p': -+ info->target = EXTRACT_SBTYPE_IMM (l) + pc; -+ (*info->print_address_func) (info->target, info); -+ break; -+ -+ case 'd': -+ if ((l & MASK_AUIPC) == MATCH_AUIPC) -+ pd->hi_addr[rd] = pc + EXTRACT_UTYPE_IMM (l); -+ else if ((l & MASK_LUI) == MATCH_LUI) -+ pd->hi_addr[rd] = EXTRACT_UTYPE_IMM (l); -+ (*info->fprintf_func) (info->stream, "%s", riscv_gpr_names[rd]); -+ break; -+ -+ case 'z': -+ (*info->fprintf_func) (info->stream, "%s", riscv_gpr_names[0]); -+ break; -+ -+ case '>': -+ (*info->fprintf_func) (info->stream, "0x%x", -+ (unsigned)((l >> OP_SH_SHAMT) & OP_MASK_SHAMT)); -+ break; -+ -+ case '<': -+ (*info->fprintf_func) (info->stream, "0x%x", -+ (unsigned)((l >> OP_SH_SHAMTW) & OP_MASK_SHAMTW)); -+ break; -+ -+ case 'S': -+ case 'U': -+ (*info->fprintf_func) (info->stream, "%s", riscv_fpr_names[rs1]); -+ break; -+ -+ case 'T': -+ (*info->fprintf_func) (info->stream, "%s", -+ riscv_fpr_names[(l >> OP_SH_RS2) & OP_MASK_RS2]); -+ break; -+ -+ case 'D': -+ (*info->fprintf_func) (info->stream, "%s", riscv_fpr_names[rd]); -+ break; -+ -+ case 'R': -+ (*info->fprintf_func) (info->stream, "%s", -+ riscv_fpr_names[(l >> OP_SH_RS3) & OP_MASK_RS3]); -+ break; -+ -+ case 'E': -+ { -+ const char* csr_name = NULL; -+ unsigned int csr = (l >> OP_SH_CSR) & OP_MASK_CSR; -+ switch (csr) -+ { -+ #define DECLARE_CSR(name, num) case num: csr_name = #name; break; -+ #include "opcode/riscv-opc.h" -+ #undef DECLARE_CSR -+ } -+ if (csr_name) -+ (*info->fprintf_func) (info->stream, "%s", csr_name); -+ else -+ (*info->fprintf_func) (info->stream, "0x%x", csr); -+ break; -+ } -+ -+ case 'Z': -+ (*info->fprintf_func) (info->stream, "%d", rs1); -+ break; -+ -+ default: -+ /* xgettext:c-format */ -+ (*info->fprintf_func) (info->stream, -+ _("# internal error, undefined modifier (%c)"), -+ *d); -+ return; -+ } -+ } -+} -+ -+/* Print the RISC-V instruction at address MEMADDR in debugged memory, -+ on using INFO. Returns length of the instruction, in bytes. -+ BIGENDIAN must be 1 if this is big-endian code, 0 if -+ this is little-endian code. */ -+ -+static int -+riscv_disassemble_insn (bfd_vma memaddr, insn_t word, disassemble_info *info) -+{ -+ const struct riscv_opcode *op; -+ static bfd_boolean init = 0; -+ static const char *extension = NULL; -+ static const struct riscv_opcode *riscv_hash[OP_MASK_OP + 1]; -+ struct riscv_private_data *pd; -+ int insnlen; -+ -+ /* Build a hash table to shorten the search time. */ -+ if (! init) -+ { -+ unsigned int i; -+ unsigned int e_flags = elf_elfheader (info->section->owner)->e_flags; -+ extension = riscv_elf_flag_to_name(EF_GET_RISCV_EXT(e_flags)); -+ -+ for (i = 0; i <= OP_MASK_OP; i++) -+ for (op = riscv_opcodes; op < &riscv_opcodes[NUMOPCODES]; op++) -+ if (i == ((op->match >> OP_SH_OP) & OP_MASK_OP)) -+ { -+ riscv_hash[i] = op; -+ break; -+ } -+ -+ init = 1; -+ } -+ -+ if (info->private_data == NULL) -+ { -+ int i; -+ -+ pd = info->private_data = calloc(1, sizeof (struct riscv_private_data)); -+ pd->gp = -1; -+ pd->print_addr = -1; -+ for (i = 0; i < (int) ARRAY_SIZE(pd->hi_addr); i++) -+ pd->hi_addr[i] = -1; -+ -+ for (i = 0; i < info->symtab_size; i++) -+ if (strcmp (bfd_asymbol_name (info->symtab[i]), "_gp") == 0) -+ pd->gp = bfd_asymbol_value (info->symtab[i]); -+ } -+ else -+ pd = info->private_data; -+ -+ insnlen = riscv_insn_length (word); -+ -+ info->bytes_per_chunk = insnlen % 4 == 0 ? 4 : 2; -+ info->bytes_per_line = 8; -+ info->display_endian = info->endian; -+ info->insn_info_valid = 1; -+ info->branch_delay_insns = 0; -+ info->data_size = 0; -+ info->insn_type = dis_nonbranch; -+ info->target = 0; -+ info->target2 = 0; -+ -+ op = riscv_hash[(word >> OP_SH_OP) & OP_MASK_OP]; -+ if (op != NULL) -+ { -+ for (; op < &riscv_opcodes[NUMOPCODES]; op++) -+ { -+ if ((op->match_func) (op, word) -+ && !(no_aliases && (op->pinfo & INSN_ALIAS)) -+ && !(op->subset[0] == 'X' && strcmp(op->subset, extension))) -+ { -+ (*info->fprintf_func) (info->stream, "%s", op->name); -+ print_insn_args (op->args, word, memaddr, info); -+ if (pd->print_addr != (bfd_vma)-1) -+ { -+ info->target = pd->print_addr; -+ (*info->fprintf_func) (info->stream, " # "); -+ (*info->print_address_func) (info->target, info); -+ pd->print_addr = -1; -+ } -+ return insnlen; -+ } -+ } -+ } -+ -+ /* Handle undefined instructions. */ -+ info->insn_type = dis_noninsn; -+ (*info->fprintf_func) (info->stream, "0x%llx", (unsigned long long)word); -+ return insnlen; -+} -+ -+int -+print_insn_riscv (bfd_vma memaddr, struct disassemble_info *info) -+{ -+ uint16_t i2; -+ insn_t insn = 0; -+ bfd_vma n; -+ int status; -+ -+ if (info->disassembler_options != NULL) -+ { -+ parse_riscv_dis_options (info->disassembler_options); -+ /* Avoid repeatedly parsing the options. */ -+ info->disassembler_options = NULL; -+ } -+ else if (riscv_gpr_names == NULL) -+ set_default_riscv_dis_options (); -+ -+ /* Instructions are a sequence of 2-byte packets in little-endian order. */ -+ for (n = 0; n < sizeof(insn) && n < riscv_insn_length (insn); n += 2) -+ { -+ status = (*info->read_memory_func) (memaddr + n, (bfd_byte*)&i2, 2, info); -+ if (status != 0) -+ { -+ if (n > 0) /* Don't fail just because we fell off the end. */ -+ break; -+ (*info->memory_error_func) (status, memaddr, info); -+ return status; -+ } -+ -+ i2 = bfd_getl16 (&i2); -+ insn |= (insn_t)i2 << (8*n); -+ } -+ -+ return riscv_disassemble_insn (memaddr, insn, info); -+} -+ -+void -+print_riscv_disassembler_options (FILE *stream) -+{ -+ fprintf (stream, _("\n\ -+The following RISC-V-specific disassembler options are supported for use\n\ -+with the -M switch (multiple options should be separated by commas):\n")); -+ -+ fprintf (stream, _("\n\ -+ numeric Print numeric reigster names, rather than ABI names.\n")); -+ -+ fprintf (stream, _("\n\ -+ no-aliases Disassemble only into canonical instructions, rather\n\ -+ than into pseudoinstructions.\n")); -+ -+ fprintf (stream, _("\n")); -+} -diff -rNU3 dist.orig/opcodes/riscv-opc.c dist/opcodes/riscv-opc.c ---- dist.orig/opcodes/riscv-opc.c 1970-01-01 01:00:00.000000000 +0100 -+++ dist/opcodes/riscv-opc.c 2015-10-18 13:11:20.000000000 +0200 -@@ -0,0 +1,734 @@ -+/* RISC-V opcode list -+ Copyright 2011-2014 Free Software Foundation, Inc. -+ -+ Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley. -+ Based on MIPS target. -+ -+ This file is part of the GNU opcodes library. -+ -+ This library 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, or (at your option) -+ any later version. -+ -+ It 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 file; see the file COPYING. If not, write to the -+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#include "sysdep.h" -+#include "opcode/riscv.h" -+#include -+ -+/* Register names used by gas and objdump. */ -+ -+const char * const riscv_gpr_names_numeric[32] = -+{ -+ "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", -+ "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", -+ "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", -+ "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31" -+}; -+ -+const char * const riscv_gpr_names_abi[32] = { -+ "zero", "ra", "sp", "gp", "tp", "t0", "t1", "t2", -+ "s0", "s1", "a0", "a1", "a2", "a3", "a4", "a5", -+ "a6", "a7", "s2", "s3", "s4", "s5", "s6", "s7", -+ "s8", "s9", "s10", "s11", "t3", "t4", "t5", "t6" -+}; -+ -+const char * const riscv_fpr_names_numeric[32] = -+{ -+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", -+ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", -+ "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", -+ "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31" -+}; -+ -+const char * const riscv_fpr_names_abi[32] = { -+ "ft0", "ft1", "ft2", "ft3", "ft4", "ft5", "ft6", "ft7", -+ "fs0", "fs1", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5", -+ "fa6", "fa7", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7", -+ "fs8", "fs9", "fs10", "fs11", "ft8", "ft9", "ft10", "ft11" -+}; -+ -+const char * const riscv_vec_gpr_names[32] = -+{ -+ "vx0", "vx1", "vx2", "vx3", "vx4", "vx5", "vx6", "vx7", -+ "vx8", "vx9", "vx10", "vx11", "vx12", "vx13", "vx14", "vx15", -+ "vx16", "vx17", "vx18", "vx19", "vx20", "vx21", "vx22", "vx23", -+ "vx24", "vx25", "vx26", "vx27", "vx28", "vx29", "vx30", "vx31" -+}; -+ -+const char * const riscv_vec_fpr_names[32] = -+{ -+ "vf0", "vf1", "vf2", "vf3", "vf4", "vf5", "vf6", "vf7", -+ "vf8", "vf9", "vf10", "vf11", "vf12", "vf13", "vf14", "vf15", -+ "vf16", "vf17", "vf18", "vf19", "vf20", "vf21", "vf22", "vf23", -+ "vf24", "vf25", "vf26", "vf27", "vf28", "vf29", "vf30", "vf31" -+}; -+ -+/* The order of overloaded instructions matters. Label arguments and -+ register arguments look the same. Instructions that can have either -+ for arguments must apear in the correct order in this table for the -+ assembler to pick the right one. In other words, entries with -+ immediate operands must apear after the same instruction with -+ registers. -+ -+ Because of the lookup algorithm used, entries with the same opcode -+ name must be contiguous. */ -+ -+#define WR_xd INSN_WRITE_GPR_D -+#define WR_fd INSN_WRITE_FPR_D -+#define RD_xs1 INSN_READ_GPR_S -+#define RD_xs2 INSN_READ_GPR_T -+#define RD_fs1 INSN_READ_FPR_S -+#define RD_fs2 INSN_READ_FPR_T -+#define RD_fs3 INSN_READ_FPR_R -+ -+#define MASK_RS1 (OP_MASK_RS1 << OP_SH_RS1) -+#define MASK_RS2 (OP_MASK_RS2 << OP_SH_RS2) -+#define MASK_RD (OP_MASK_RD << OP_SH_RD) -+#define MASK_IMM ENCODE_ITYPE_IMM(-1U) -+#define MASK_UIMM ENCODE_UTYPE_IMM(-1U) -+#define MASK_RM (OP_MASK_RM << OP_SH_RM) -+#define MASK_PRED (OP_MASK_PRED << OP_SH_PRED) -+#define MASK_SUCC (OP_MASK_SUCC << OP_SH_SUCC) -+#define MASK_AQ (OP_MASK_AQ << OP_SH_AQ) -+#define MASK_RL (OP_MASK_RL << OP_SH_RL) -+#define MASK_AQRL (MASK_AQ | MASK_RL) -+ -+static int match_opcode(const struct riscv_opcode *op, insn_t insn) -+{ -+ return (insn & op->mask) == op->match; -+} -+ -+static int match_never(const struct riscv_opcode *op ATTRIBUTE_UNUSED, -+ insn_t insn ATTRIBUTE_UNUSED) -+{ -+ return 0; -+} -+ -+static int match_rs1_eq_rs2(const struct riscv_opcode *op, insn_t insn) -+{ -+ return match_opcode(op, insn) && -+ ((insn & MASK_RS1) >> OP_SH_RS1) == ((insn & MASK_RS2) >> OP_SH_RS2); -+} -+ -+const struct riscv_opcode riscv_builtin_opcodes[] = -+{ -+/* These instructions appear first so that the disassembler will find -+ them first. The assemblers uses a hash table based on the -+ instruction name anyhow. */ -+/* name, isa, operands, match, mask, pinfo */ -+{"unimp", "I", "", 0, 0xffff, match_opcode, 0 }, -+{"nop", "I", "", MATCH_ADDI, MASK_ADDI | MASK_RD | MASK_RS1 | MASK_IMM, match_opcode, INSN_ALIAS }, -+{"li", "I", "d,j", MATCH_ADDI, MASK_ADDI | MASK_RS1, match_opcode, INSN_ALIAS|WR_xd }, /* addi */ -+{"li", "I", "d,I", 0, (int) M_LI, match_never, INSN_MACRO }, -+{"mv", "I", "d,s", MATCH_ADDI, MASK_ADDI | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"move", "I", "d,s", MATCH_ADDI, MASK_ADDI | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"andi", "I", "d,s,j", MATCH_ANDI, MASK_ANDI, match_opcode, WR_xd|RD_xs1 }, -+{"and", "I", "d,s,t", MATCH_AND, MASK_AND, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"and", "I", "d,s,j", MATCH_ANDI, MASK_ANDI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"beqz", "I", "s,p", MATCH_BEQ, MASK_BEQ | MASK_RS2, match_opcode, INSN_ALIAS|RD_xs1 }, -+{"beq", "I", "s,t,p", MATCH_BEQ, MASK_BEQ, match_opcode, RD_xs1|RD_xs2 }, -+{"blez", "I", "t,p", MATCH_BGE, MASK_BGE | MASK_RS1, match_opcode, INSN_ALIAS|RD_xs2 }, -+{"bgez", "I", "s,p", MATCH_BGE, MASK_BGE | MASK_RS2, match_opcode, INSN_ALIAS|RD_xs1 }, -+{"ble", "I", "t,s,p", MATCH_BGE, MASK_BGE, match_opcode, INSN_ALIAS|RD_xs1|RD_xs2 }, -+{"bleu", "I", "t,s,p", MATCH_BGEU, MASK_BGEU, match_opcode, INSN_ALIAS|RD_xs1|RD_xs2 }, -+{"bge", "I", "s,t,p", MATCH_BGE, MASK_BGE, match_opcode, RD_xs1|RD_xs2 }, -+{"bgeu", "I", "s,t,p", MATCH_BGEU, MASK_BGEU, match_opcode, RD_xs1|RD_xs2 }, -+{"bltz", "I", "s,p", MATCH_BLT, MASK_BLT | MASK_RS2, match_opcode, INSN_ALIAS|RD_xs1 }, -+{"bgtz", "I", "t,p", MATCH_BLT, MASK_BLT | MASK_RS1, match_opcode, INSN_ALIAS|RD_xs2 }, -+{"blt", "I", "s,t,p", MATCH_BLT, MASK_BLT, match_opcode, RD_xs1|RD_xs2 }, -+{"bltu", "I", "s,t,p", MATCH_BLTU, MASK_BLTU, match_opcode, RD_xs1|RD_xs2 }, -+{"bgt", "I", "t,s,p", MATCH_BLT, MASK_BLT, match_opcode, INSN_ALIAS|RD_xs1|RD_xs2 }, -+{"bgtu", "I", "t,s,p", MATCH_BLTU, MASK_BLTU, match_opcode, INSN_ALIAS|RD_xs1|RD_xs2 }, -+{"bnez", "I", "s,p", MATCH_BNE, MASK_BNE | MASK_RS2, match_opcode, INSN_ALIAS|RD_xs1 }, -+{"bne", "I", "s,t,p", MATCH_BNE, MASK_BNE, match_opcode, RD_xs1|RD_xs2 }, -+{"addi", "I", "d,s,j", MATCH_ADDI, MASK_ADDI, match_opcode, WR_xd|RD_xs1 }, -+{"add", "I", "d,s,t", MATCH_ADD, MASK_ADD, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"add", "I", "d,s,t,0",MATCH_ADD, MASK_ADD, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"add", "I", "d,s,j", MATCH_ADDI, MASK_ADDI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"la", "I", "d,A", 0, (int) M_LA, match_never, INSN_MACRO }, -+{"lla", "I", "d,A", 0, (int) M_LLA, match_never, INSN_MACRO }, -+{"la.tls.gd", "I", "d,A", 0, (int) M_LA_TLS_GD, match_never, INSN_MACRO }, -+{"la.tls.ie", "I", "d,A", 0, (int) M_LA_TLS_IE, match_never, INSN_MACRO }, -+{"neg", "I", "d,t", MATCH_SUB, MASK_SUB | MASK_RS1, match_opcode, INSN_ALIAS|WR_xd|RD_xs2 }, /* sub 0 */ -+{"slli", "I", "d,s,>", MATCH_SLLI, MASK_SLLI, match_opcode, WR_xd|RD_xs1 }, -+{"sll", "I", "d,s,t", MATCH_SLL, MASK_SLL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"sll", "I", "d,s,>", MATCH_SLLI, MASK_SLLI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"srli", "I", "d,s,>", MATCH_SRLI, MASK_SRLI, match_opcode, WR_xd|RD_xs1 }, -+{"srl", "I", "d,s,t", MATCH_SRL, MASK_SRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"srl", "I", "d,s,>", MATCH_SRLI, MASK_SRLI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"srai", "I", "d,s,>", MATCH_SRAI, MASK_SRAI, match_opcode, WR_xd|RD_xs1 }, -+{"sra", "I", "d,s,t", MATCH_SRA, MASK_SRA, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"sra", "I", "d,s,>", MATCH_SRAI, MASK_SRAI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"sub", "I", "d,s,t", MATCH_SUB, MASK_SUB, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"ret", "I", "", MATCH_JALR | (X_RA << OP_SH_RS1), MASK_JALR | MASK_RD | MASK_RS1 | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"j", "I", "a", MATCH_JAL, MASK_JAL | MASK_RD, match_opcode, INSN_ALIAS }, -+{"jal", "I", "a", MATCH_JAL | (X_RA << OP_SH_RD), MASK_JAL | MASK_RD, match_opcode, INSN_ALIAS|WR_xd }, -+{"jal", "I", "d,a", MATCH_JAL, MASK_JAL, match_opcode, WR_xd }, -+{"call", "I", "c", (X_T0 << OP_SH_RS1) | (X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO }, -+{"tail", "I", "c", (X_T0 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, -+{"jump", "I", "c,s", 0, (int) M_CALL, match_never, INSN_MACRO }, -+{"jr", "I", "s", MATCH_JALR, MASK_JALR | MASK_RD | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"jr", "I", "s,j", MATCH_JALR, MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"jalr", "I", "s", MATCH_JALR | (X_RA << OP_SH_RD), MASK_JALR | MASK_RD | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"jalr", "I", "s,j", MATCH_JALR | (X_RA << OP_SH_RD), MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"jalr", "I", "d,s", MATCH_JALR, MASK_JALR | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"jalr", "I", "d,s,j", MATCH_JALR, MASK_JALR, match_opcode, WR_xd|RD_xs1 }, -+{"lb", "I", "d,o(s)", MATCH_LB, MASK_LB, match_opcode, WR_xd|RD_xs1 }, -+{"lb", "I", "d,A", 0, (int) M_LB, match_never, INSN_MACRO }, -+{"lbu", "I", "d,o(s)", MATCH_LBU, MASK_LBU, match_opcode, WR_xd|RD_xs1 }, -+{"lbu", "I", "d,A", 0, (int) M_LBU, match_never, INSN_MACRO }, -+{"lh", "I", "d,o(s)", MATCH_LH, MASK_LH, match_opcode, WR_xd|RD_xs1 }, -+{"lh", "I", "d,A", 0, (int) M_LH, match_never, INSN_MACRO }, -+{"lhu", "I", "d,o(s)", MATCH_LHU, MASK_LHU, match_opcode, WR_xd|RD_xs1 }, -+{"lhu", "I", "d,A", 0, (int) M_LHU, match_never, INSN_MACRO }, -+{"lw", "I", "d,o(s)", MATCH_LW, MASK_LW, match_opcode, WR_xd|RD_xs1 }, -+{"lw", "I", "d,A", 0, (int) M_LW, match_never, INSN_MACRO }, -+{"lui", "I", "d,u", MATCH_LUI, MASK_LUI, match_opcode, WR_xd }, -+{"not", "I", "d,s", MATCH_XORI | MASK_IMM, MASK_XORI | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"ori", "I", "d,s,j", MATCH_ORI, MASK_ORI, match_opcode, WR_xd|RD_xs1 }, -+{"or", "I", "d,s,t", MATCH_OR, MASK_OR, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"or", "I", "d,s,j", MATCH_ORI, MASK_ORI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"auipc", "I", "d,u", MATCH_AUIPC, MASK_AUIPC, match_opcode, WR_xd }, -+{"seqz", "I", "d,s", MATCH_SLTIU | ENCODE_ITYPE_IMM(1), MASK_SLTIU | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"snez", "I", "d,t", MATCH_SLTU, MASK_SLTU | MASK_RS1, match_opcode, INSN_ALIAS|WR_xd|RD_xs2 }, -+{"sltz", "I", "d,s", MATCH_SLT, MASK_SLT | MASK_RS2, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"sgtz", "I", "d,t", MATCH_SLT, MASK_SLT | MASK_RS1, match_opcode, INSN_ALIAS|WR_xd|RD_xs2 }, -+{"slti", "I", "d,s,j", MATCH_SLTI, MASK_SLTI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"slt", "I", "d,s,t", MATCH_SLT, MASK_SLT, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"slt", "I", "d,s,j", MATCH_SLTI, MASK_SLTI, match_opcode, WR_xd|RD_xs1 }, -+{"sltiu", "I", "d,s,j", MATCH_SLTIU, MASK_SLTIU, match_opcode, WR_xd|RD_xs1 }, -+{"sltu", "I", "d,s,t", MATCH_SLTU, MASK_SLTU, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"sltu", "I", "d,s,j", MATCH_SLTIU, MASK_SLTIU, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"sgt", "I", "d,t,s", MATCH_SLT, MASK_SLT, match_opcode, INSN_ALIAS|WR_xd|RD_xs1|RD_xs2 }, -+{"sgtu", "I", "d,t,s", MATCH_SLTU, MASK_SLTU, match_opcode, INSN_ALIAS|WR_xd|RD_xs1|RD_xs2 }, -+{"sb", "I", "t,q(s)", MATCH_SB, MASK_SB, match_opcode, RD_xs1|RD_xs2 }, -+{"sb", "I", "t,A,s", 0, (int) M_SB, match_never, INSN_MACRO }, -+{"sh", "I", "t,q(s)", MATCH_SH, MASK_SH, match_opcode, RD_xs1|RD_xs2 }, -+{"sh", "I", "t,A,s", 0, (int) M_SH, match_never, INSN_MACRO }, -+{"sw", "I", "t,q(s)", MATCH_SW, MASK_SW, match_opcode, RD_xs1|RD_xs2 }, -+{"sw", "I", "t,A,s", 0, (int) M_SW, match_never, INSN_MACRO }, -+{"fence", "I", "", MATCH_FENCE | MASK_PRED | MASK_SUCC, MASK_FENCE | MASK_RD | MASK_RS1 | MASK_IMM, match_opcode, INSN_ALIAS }, -+{"fence", "I", "P,Q", MATCH_FENCE, MASK_FENCE | MASK_RD | MASK_RS1 | (MASK_IMM & ~MASK_PRED & ~MASK_SUCC), match_opcode, 0 }, -+{"fence.i", "I", "", MATCH_FENCE_I, MASK_FENCE | MASK_RD | MASK_RS1 | MASK_IMM, match_opcode, 0 }, -+{"rdcycle", "I", "d", MATCH_RDCYCLE, MASK_RDCYCLE, match_opcode, WR_xd }, -+{"rdinstret", "I", "d", MATCH_RDINSTRET, MASK_RDINSTRET, match_opcode, WR_xd }, -+{"rdtime", "I", "d", MATCH_RDTIME, MASK_RDTIME, match_opcode, WR_xd }, -+{"rdcycleh", "32I", "d", MATCH_RDCYCLEH, MASK_RDCYCLEH, match_opcode, WR_xd }, -+{"rdinstreth","32I", "d", MATCH_RDINSTRETH, MASK_RDINSTRETH, match_opcode, WR_xd }, -+{"rdtimeh", "32I", "d", MATCH_RDTIMEH, MASK_RDTIMEH, match_opcode, WR_xd }, -+{"sbreak", "I", "", MATCH_SBREAK, MASK_SBREAK, match_opcode, 0 }, -+{"scall", "I", "", MATCH_SCALL, MASK_SCALL, match_opcode, 0 }, -+{"ecall", "I", "", MATCH_SCALL, MASK_SCALL, match_opcode, 0 }, -+{"xori", "I", "d,s,j", MATCH_XORI, MASK_XORI, match_opcode, WR_xd|RD_xs1 }, -+{"xor", "I", "d,s,t", MATCH_XOR, MASK_XOR, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"xor", "I", "d,s,j", MATCH_XORI, MASK_XORI, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"lwu", "64I", "d,o(s)", MATCH_LWU, MASK_LWU, match_opcode, WR_xd|RD_xs1 }, -+{"lwu", "64I", "d,A", 0, (int) M_LWU, match_never, INSN_MACRO }, -+{"ld", "64I", "d,o(s)", MATCH_LD, MASK_LD, match_opcode, WR_xd|RD_xs1 }, -+{"ld", "64I", "d,A", 0, (int) M_LD, match_never, INSN_MACRO }, -+{"sd", "64I", "t,q(s)", MATCH_SD, MASK_SD, match_opcode, RD_xs1|RD_xs2 }, -+{"sd", "64I", "t,A,s", 0, (int) M_SD, match_never, INSN_MACRO }, -+{"sext.w", "64I", "d,s", MATCH_ADDIW, MASK_ADDIW | MASK_IMM, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"addiw", "64I", "d,s,j", MATCH_ADDIW, MASK_ADDIW, match_opcode, WR_xd|RD_xs1 }, -+{"addw", "64I", "d,s,t", MATCH_ADDW, MASK_ADDW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"addw", "64I", "d,s,j", MATCH_ADDIW, MASK_ADDIW, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"negw", "64I", "d,t", MATCH_SUBW, MASK_SUBW | MASK_RS1, match_opcode, INSN_ALIAS|WR_xd|RD_xs2 }, /* sub 0 */ -+{"slliw", "64I", "d,s,<", MATCH_SLLIW, MASK_SLLIW, match_opcode, WR_xd|RD_xs1 }, -+{"sllw", "64I", "d,s,t", MATCH_SLLW, MASK_SLLW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"sllw", "64I", "d,s,<", MATCH_SLLIW, MASK_SLLIW, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"srliw", "64I", "d,s,<", MATCH_SRLIW, MASK_SRLIW, match_opcode, WR_xd|RD_xs1 }, -+{"srlw", "64I", "d,s,t", MATCH_SRLW, MASK_SRLW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"srlw", "64I", "d,s,<", MATCH_SRLIW, MASK_SRLIW, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"sraiw", "64I", "d,s,<", MATCH_SRAIW, MASK_SRAIW, match_opcode, WR_xd|RD_xs1 }, -+{"sraw", "64I", "d,s,t", MATCH_SRAW, MASK_SRAW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"sraw", "64I", "d,s,<", MATCH_SRAIW, MASK_SRAIW, match_opcode, INSN_ALIAS|WR_xd|RD_xs1 }, -+{"subw", "64I", "d,s,t", MATCH_SUBW, MASK_SUBW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+ -+/* Atomic memory operation instruction subset */ -+{"lr.w", "A", "d,0(s)", MATCH_LR_W, MASK_LR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.w", "A", "d,t,0(s)", MATCH_SC_W, MASK_SC_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.w", "A", "d,t,0(s)", MATCH_AMOADD_W, MASK_AMOADD_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.w", "A", "d,t,0(s)", MATCH_AMOSWAP_W, MASK_AMOSWAP_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.w", "A", "d,t,0(s)", MATCH_AMOAND_W, MASK_AMOAND_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.w", "A", "d,t,0(s)", MATCH_AMOOR_W, MASK_AMOOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.w", "A", "d,t,0(s)", MATCH_AMOXOR_W, MASK_AMOXOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.w", "A", "d,t,0(s)", MATCH_AMOMAX_W, MASK_AMOMAX_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.w", "A", "d,t,0(s)", MATCH_AMOMAXU_W, MASK_AMOMAXU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.w", "A", "d,t,0(s)", MATCH_AMOMIN_W, MASK_AMOMIN_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.w", "A", "d,t,0(s)", MATCH_AMOMINU_W, MASK_AMOMINU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.w.aq", "A", "d,0(s)", MATCH_LR_W | MASK_AQ, MASK_LR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.w.aq", "A", "d,t,0(s)", MATCH_SC_W | MASK_AQ, MASK_SC_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.w.aq", "A", "d,t,0(s)", MATCH_AMOADD_W | MASK_AQ, MASK_AMOADD_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.w.aq", "A", "d,t,0(s)", MATCH_AMOSWAP_W | MASK_AQ, MASK_AMOSWAP_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.w.aq", "A", "d,t,0(s)", MATCH_AMOAND_W | MASK_AQ, MASK_AMOAND_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.w.aq", "A", "d,t,0(s)", MATCH_AMOOR_W | MASK_AQ, MASK_AMOOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.w.aq", "A", "d,t,0(s)", MATCH_AMOXOR_W | MASK_AQ, MASK_AMOXOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.w.aq", "A", "d,t,0(s)", MATCH_AMOMAX_W | MASK_AQ, MASK_AMOMAX_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.w.aq", "A", "d,t,0(s)", MATCH_AMOMAXU_W | MASK_AQ, MASK_AMOMAXU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.w.aq", "A", "d,t,0(s)", MATCH_AMOMIN_W | MASK_AQ, MASK_AMOMIN_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.w.aq", "A", "d,t,0(s)", MATCH_AMOMINU_W | MASK_AQ, MASK_AMOMINU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.w.rl", "A", "d,0(s)", MATCH_LR_W | MASK_RL, MASK_LR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.w.rl", "A", "d,t,0(s)", MATCH_SC_W | MASK_RL, MASK_SC_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.w.rl", "A", "d,t,0(s)", MATCH_AMOADD_W | MASK_RL, MASK_AMOADD_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.w.rl", "A", "d,t,0(s)", MATCH_AMOSWAP_W | MASK_RL, MASK_AMOSWAP_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.w.rl", "A", "d,t,0(s)", MATCH_AMOAND_W | MASK_RL, MASK_AMOAND_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.w.rl", "A", "d,t,0(s)", MATCH_AMOOR_W | MASK_RL, MASK_AMOOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.w.rl", "A", "d,t,0(s)", MATCH_AMOXOR_W | MASK_RL, MASK_AMOXOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.w.rl", "A", "d,t,0(s)", MATCH_AMOMAX_W | MASK_RL, MASK_AMOMAX_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.w.rl", "A", "d,t,0(s)", MATCH_AMOMAXU_W | MASK_RL, MASK_AMOMAXU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.w.rl", "A", "d,t,0(s)", MATCH_AMOMIN_W | MASK_RL, MASK_AMOMIN_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.w.rl", "A", "d,t,0(s)", MATCH_AMOMINU_W | MASK_RL, MASK_AMOMINU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.w.sc", "A", "d,0(s)", MATCH_LR_W | MASK_AQRL, MASK_LR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.w.sc", "A", "d,t,0(s)", MATCH_SC_W | MASK_AQRL, MASK_SC_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.w.sc", "A", "d,t,0(s)", MATCH_AMOADD_W | MASK_AQRL, MASK_AMOADD_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.w.sc", "A", "d,t,0(s)", MATCH_AMOSWAP_W | MASK_AQRL, MASK_AMOSWAP_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.w.sc", "A", "d,t,0(s)", MATCH_AMOAND_W | MASK_AQRL, MASK_AMOAND_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.w.sc", "A", "d,t,0(s)", MATCH_AMOOR_W | MASK_AQRL, MASK_AMOOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.w.sc", "A", "d,t,0(s)", MATCH_AMOXOR_W | MASK_AQRL, MASK_AMOXOR_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.w.sc", "A", "d,t,0(s)", MATCH_AMOMAX_W | MASK_AQRL, MASK_AMOMAX_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.w.sc", "A", "d,t,0(s)", MATCH_AMOMAXU_W | MASK_AQRL, MASK_AMOMAXU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.w.sc", "A", "d,t,0(s)", MATCH_AMOMIN_W | MASK_AQRL, MASK_AMOMIN_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.w.sc", "A", "d,t,0(s)", MATCH_AMOMINU_W | MASK_AQRL, MASK_AMOMINU_W | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.d", "64A", "d,0(s)", MATCH_LR_D, MASK_LR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.d", "64A", "d,t,0(s)", MATCH_SC_D, MASK_SC_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.d", "64A", "d,t,0(s)", MATCH_AMOADD_D, MASK_AMOADD_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.d", "64A", "d,t,0(s)", MATCH_AMOSWAP_D, MASK_AMOSWAP_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.d", "64A", "d,t,0(s)", MATCH_AMOAND_D, MASK_AMOAND_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.d", "64A", "d,t,0(s)", MATCH_AMOOR_D, MASK_AMOOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.d", "64A", "d,t,0(s)", MATCH_AMOXOR_D, MASK_AMOXOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.d", "64A", "d,t,0(s)", MATCH_AMOMAX_D, MASK_AMOMAX_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.d", "64A", "d,t,0(s)", MATCH_AMOMAXU_D, MASK_AMOMAXU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.d", "64A", "d,t,0(s)", MATCH_AMOMIN_D, MASK_AMOMIN_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.d", "64A", "d,t,0(s)", MATCH_AMOMINU_D, MASK_AMOMINU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.d.aq", "64A", "d,0(s)", MATCH_LR_D | MASK_AQ, MASK_LR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.d.aq", "64A", "d,t,0(s)", MATCH_SC_D | MASK_AQ, MASK_SC_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.d.aq", "64A", "d,t,0(s)", MATCH_AMOADD_D | MASK_AQ, MASK_AMOADD_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.d.aq", "64A", "d,t,0(s)", MATCH_AMOSWAP_D | MASK_AQ, MASK_AMOSWAP_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.d.aq", "64A", "d,t,0(s)", MATCH_AMOAND_D | MASK_AQ, MASK_AMOAND_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.d.aq", "64A", "d,t,0(s)", MATCH_AMOOR_D | MASK_AQ, MASK_AMOOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.d.aq", "64A", "d,t,0(s)", MATCH_AMOXOR_D | MASK_AQ, MASK_AMOXOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.d.aq", "64A", "d,t,0(s)", MATCH_AMOMAX_D | MASK_AQ, MASK_AMOMAX_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.d.aq", "64A", "d,t,0(s)", MATCH_AMOMAXU_D | MASK_AQ, MASK_AMOMAXU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.d.aq", "64A", "d,t,0(s)", MATCH_AMOMIN_D | MASK_AQ, MASK_AMOMIN_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.d.aq", "64A", "d,t,0(s)", MATCH_AMOMINU_D | MASK_AQ, MASK_AMOMINU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.d.rl", "64A", "d,0(s)", MATCH_LR_D | MASK_RL, MASK_LR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.d.rl", "64A", "d,t,0(s)", MATCH_SC_D | MASK_RL, MASK_SC_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.d.rl", "64A", "d,t,0(s)", MATCH_AMOADD_D | MASK_RL, MASK_AMOADD_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.d.rl", "64A", "d,t,0(s)", MATCH_AMOSWAP_D | MASK_RL, MASK_AMOSWAP_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.d.rl", "64A", "d,t,0(s)", MATCH_AMOAND_D | MASK_RL, MASK_AMOAND_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.d.rl", "64A", "d,t,0(s)", MATCH_AMOOR_D | MASK_RL, MASK_AMOOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.d.rl", "64A", "d,t,0(s)", MATCH_AMOXOR_D | MASK_RL, MASK_AMOXOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.d.rl", "64A", "d,t,0(s)", MATCH_AMOMAX_D | MASK_RL, MASK_AMOMAX_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.d.rl", "64A", "d,t,0(s)", MATCH_AMOMAXU_D | MASK_RL, MASK_AMOMAXU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.d.rl", "64A", "d,t,0(s)", MATCH_AMOMIN_D | MASK_RL, MASK_AMOMIN_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.d.rl", "64A", "d,t,0(s)", MATCH_AMOMINU_D | MASK_RL, MASK_AMOMINU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"lr.d.sc", "64A", "d,0(s)", MATCH_LR_D | MASK_AQRL, MASK_LR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1 }, -+{"sc.d.sc", "64A", "d,t,0(s)", MATCH_SC_D | MASK_AQRL, MASK_SC_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoadd.d.sc", "64A", "d,t,0(s)", MATCH_AMOADD_D | MASK_AQRL, MASK_AMOADD_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoswap.d.sc", "64A", "d,t,0(s)", MATCH_AMOSWAP_D | MASK_AQRL, MASK_AMOSWAP_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoand.d.sc", "64A", "d,t,0(s)", MATCH_AMOAND_D | MASK_AQRL, MASK_AMOAND_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoor.d.sc", "64A", "d,t,0(s)", MATCH_AMOOR_D | MASK_AQRL, MASK_AMOOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amoxor.d.sc", "64A", "d,t,0(s)", MATCH_AMOXOR_D | MASK_AQRL, MASK_AMOXOR_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomax.d.sc", "64A", "d,t,0(s)", MATCH_AMOMAX_D | MASK_AQRL, MASK_AMOMAX_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomaxu.d.sc", "64A", "d,t,0(s)", MATCH_AMOMAXU_D | MASK_AQRL, MASK_AMOMAXU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amomin.d.sc", "64A", "d,t,0(s)", MATCH_AMOMIN_D | MASK_AQRL, MASK_AMOMIN_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"amominu.d.sc", "64A", "d,t,0(s)", MATCH_AMOMINU_D | MASK_AQRL, MASK_AMOMINU_D | MASK_AQRL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+ -+/* Multiply/Divide instruction subset */ -+{"mul", "M", "d,s,t", MATCH_MUL, MASK_MUL, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"mulh", "M", "d,s,t", MATCH_MULH, MASK_MULH, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"mulhu", "M", "d,s,t", MATCH_MULHU, MASK_MULHU, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"mulhsu", "M", "d,s,t", MATCH_MULHSU, MASK_MULHSU, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"div", "M", "d,s,t", MATCH_DIV, MASK_DIV, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"divu", "M", "d,s,t", MATCH_DIVU, MASK_DIVU, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"rem", "M", "d,s,t", MATCH_REM, MASK_REM, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"remu", "M", "d,s,t", MATCH_REMU, MASK_REMU, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"mulw", "64M", "d,s,t", MATCH_MULW, MASK_MULW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"divw", "64M", "d,s,t", MATCH_DIVW, MASK_DIVW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"divuw", "64M", "d,s,t", MATCH_DIVUW, MASK_DIVUW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"remw", "64M", "d,s,t", MATCH_REMW, MASK_REMW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+{"remuw", "64M", "d,s,t", MATCH_REMUW, MASK_REMUW, match_opcode, WR_xd|RD_xs1|RD_xs2 }, -+ -+/* Single-precision floating-point instruction subset */ -+{"frsr", "F", "d", MATCH_FRCSR, MASK_FRCSR, match_opcode, WR_xd }, -+{"fssr", "F", "s", MATCH_FSCSR, MASK_FSCSR | MASK_RD, match_opcode, RD_xs1 }, -+{"fssr", "F", "d,s", MATCH_FSCSR, MASK_FSCSR, match_opcode, WR_xd|RD_xs1 }, -+{"frcsr", "F", "d", MATCH_FRCSR, MASK_FRCSR, match_opcode, WR_xd }, -+{"fscsr", "F", "s", MATCH_FSCSR, MASK_FSCSR | MASK_RD, match_opcode, RD_xs1 }, -+{"fscsr", "F", "d,s", MATCH_FSCSR, MASK_FSCSR, match_opcode, WR_xd|RD_xs1 }, -+{"frrm", "F", "d", MATCH_FRRM, MASK_FRRM, match_opcode, WR_xd }, -+{"fsrm", "F", "s", MATCH_FSRM, MASK_FSRM | MASK_RD, match_opcode, RD_xs1 }, -+{"fsrm", "F", "d,s", MATCH_FSRM, MASK_FSRM, match_opcode, WR_xd|RD_xs1 }, -+{"frflags", "F", "d", MATCH_FRFLAGS, MASK_FRFLAGS, match_opcode, WR_xd }, -+{"fsflags", "F", "s", MATCH_FSFLAGS, MASK_FSFLAGS | MASK_RD, match_opcode, RD_xs1 }, -+{"fsflags", "F", "d,s", MATCH_FSFLAGS, MASK_FSFLAGS, match_opcode, WR_xd|RD_xs1 }, -+{"flw", "F", "D,o(s)", MATCH_FLW, MASK_FLW, match_opcode, WR_fd|RD_xs1 }, -+{"flw", "F", "D,A,s", 0, (int) M_FLW, match_never, INSN_MACRO }, -+{"fsw", "F", "T,q(s)", MATCH_FSW, MASK_FSW, match_opcode, RD_xs1|RD_fs2 }, -+{"fsw", "F", "T,A,s", 0, (int) M_FSW, match_never, INSN_MACRO }, -+{"fmv.x.s", "F", "d,S", MATCH_FMV_X_S, MASK_FMV_X_S, match_opcode, WR_xd|RD_fs1 }, -+{"fmv.s.x", "F", "D,s", MATCH_FMV_S_X, MASK_FMV_S_X, match_opcode, WR_fd|RD_xs1 }, -+{"fmv.s", "F", "D,U", MATCH_FSGNJ_S, MASK_FSGNJ_S, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fneg.s", "F", "D,U", MATCH_FSGNJN_S, MASK_FSGNJN_S, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fabs.s", "F", "D,U", MATCH_FSGNJX_S, MASK_FSGNJX_S, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnj.s", "F", "D,S,T", MATCH_FSGNJ_S, MASK_FSGNJ_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjn.s", "F", "D,S,T", MATCH_FSGNJN_S, MASK_FSGNJN_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjx.s", "F", "D,S,T", MATCH_FSGNJX_S, MASK_FSGNJX_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.s", "F", "D,S,T", MATCH_FADD_S | MASK_RM, MASK_FADD_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.s", "F", "D,S,T,m", MATCH_FADD_S, MASK_FADD_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.s", "F", "D,S,T", MATCH_FSUB_S | MASK_RM, MASK_FSUB_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.s", "F", "D,S,T,m", MATCH_FSUB_S, MASK_FSUB_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.s", "F", "D,S,T", MATCH_FMUL_S | MASK_RM, MASK_FMUL_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.s", "F", "D,S,T,m", MATCH_FMUL_S, MASK_FMUL_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.s", "F", "D,S,T", MATCH_FDIV_S | MASK_RM, MASK_FDIV_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.s", "F", "D,S,T,m", MATCH_FDIV_S, MASK_FDIV_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsqrt.s", "F", "D,S", MATCH_FSQRT_S | MASK_RM, MASK_FSQRT_S | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fsqrt.s", "F", "D,S,m", MATCH_FSQRT_S, MASK_FSQRT_S, match_opcode, WR_fd|RD_fs1 }, -+{"fmin.s", "F", "D,S,T", MATCH_FMIN_S, MASK_FMIN_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmax.s", "F", "D,S,T", MATCH_FMAX_S, MASK_FMAX_S, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmadd.s", "F", "D,S,T,R", MATCH_FMADD_S | MASK_RM, MASK_FMADD_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmadd.s", "F", "D,S,T,R,m", MATCH_FMADD_S, MASK_FMADD_S, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.s", "F", "D,S,T,R", MATCH_FNMADD_S | MASK_RM, MASK_FNMADD_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.s", "F", "D,S,T,R,m", MATCH_FNMADD_S, MASK_FNMADD_S, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.s", "F", "D,S,T,R", MATCH_FMSUB_S | MASK_RM, MASK_FMSUB_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.s", "F", "D,S,T,R,m", MATCH_FMSUB_S, MASK_FMSUB_S, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.s", "F", "D,S,T,R", MATCH_FNMSUB_S | MASK_RM, MASK_FNMSUB_S | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.s", "F", "D,S,T,R,m", MATCH_FNMSUB_S, MASK_FNMSUB_S, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fcvt.w.s", "F", "d,S", MATCH_FCVT_W_S | MASK_RM, MASK_FCVT_W_S | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.w.s", "F", "d,S,m", MATCH_FCVT_W_S, MASK_FCVT_W_S, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.s", "F", "d,S", MATCH_FCVT_WU_S | MASK_RM, MASK_FCVT_WU_S | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.s", "F", "d,S,m", MATCH_FCVT_WU_S, MASK_FCVT_WU_S, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.s.w", "F", "D,s", MATCH_FCVT_S_W | MASK_RM, MASK_FCVT_S_W | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.w", "F", "D,s,m", MATCH_FCVT_S_W, MASK_FCVT_S_W, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.wu", "F", "D,s", MATCH_FCVT_S_WU | MASK_RM, MASK_FCVT_S_W | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.wu", "F", "D,s,m", MATCH_FCVT_S_WU, MASK_FCVT_S_WU, match_opcode, WR_fd|RD_xs1 }, -+{"fclass.s", "F", "d,S", MATCH_FCLASS_S, MASK_FCLASS_S, match_opcode, WR_xd|RD_fs1 }, -+{"feq.s", "F", "d,S,T", MATCH_FEQ_S, MASK_FEQ_S, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"flt.s", "F", "d,S,T", MATCH_FLT_S, MASK_FLT_S, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fle.s", "F", "d,S,T", MATCH_FLE_S, MASK_FLE_S, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fgt.s", "F", "d,T,S", MATCH_FLT_S, MASK_FLT_S, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fge.s", "F", "d,T,S", MATCH_FLE_S, MASK_FLE_S, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fcvt.l.s", "64F", "d,S", MATCH_FCVT_L_S | MASK_RM, MASK_FCVT_L_S | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.l.s", "64F", "d,S,m", MATCH_FCVT_L_S, MASK_FCVT_L_S, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.s", "64F", "d,S", MATCH_FCVT_LU_S | MASK_RM, MASK_FCVT_LU_S | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.s", "64F", "d,S,m", MATCH_FCVT_LU_S, MASK_FCVT_LU_S, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.s.l", "64F", "D,s", MATCH_FCVT_S_L | MASK_RM, MASK_FCVT_S_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.l", "64F", "D,s,m", MATCH_FCVT_S_L, MASK_FCVT_S_L, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.lu", "64F", "D,s", MATCH_FCVT_S_LU | MASK_RM, MASK_FCVT_S_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.s.lu", "64F", "D,s,m", MATCH_FCVT_S_LU, MASK_FCVT_S_LU, match_opcode, WR_fd|RD_xs1 }, -+ -+/* Double-precision floating-point instruction subset */ -+{"fld", "D", "D,o(s)", MATCH_FLD, MASK_FLD, match_opcode, WR_fd|RD_xs1 }, -+{"fld", "D", "D,A,s", 0, (int) M_FLD, match_never, INSN_MACRO }, -+{"fsd", "D", "T,q(s)", MATCH_FSD, MASK_FSD, match_opcode, RD_xs1|RD_fs2 }, -+{"fsd", "D", "T,A,s", 0, (int) M_FSD, match_never, INSN_MACRO }, -+{"fmv.d", "D", "D,U", MATCH_FSGNJ_D, MASK_FSGNJ_D, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fneg.d", "D", "D,U", MATCH_FSGNJN_D, MASK_FSGNJN_D, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fabs.d", "D", "D,U", MATCH_FSGNJX_D, MASK_FSGNJX_D, match_rs1_eq_rs2, INSN_ALIAS|WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnj.d", "D", "D,S,T", MATCH_FSGNJ_D, MASK_FSGNJ_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjn.d", "D", "D,S,T", MATCH_FSGNJN_D, MASK_FSGNJN_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjx.d", "D", "D,S,T", MATCH_FSGNJX_D, MASK_FSGNJX_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.d", "D", "D,S,T", MATCH_FADD_D | MASK_RM, MASK_FADD_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.d", "D", "D,S,T,m", MATCH_FADD_D, MASK_FADD_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.d", "D", "D,S,T", MATCH_FSUB_D | MASK_RM, MASK_FSUB_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.d", "D", "D,S,T,m", MATCH_FSUB_D, MASK_FSUB_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.d", "D", "D,S,T", MATCH_FMUL_D | MASK_RM, MASK_FMUL_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.d", "D", "D,S,T,m", MATCH_FMUL_D, MASK_FMUL_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.d", "D", "D,S,T", MATCH_FDIV_D | MASK_RM, MASK_FDIV_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.d", "D", "D,S,T,m", MATCH_FDIV_D, MASK_FDIV_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsqrt.d", "D", "D,S", MATCH_FSQRT_D | MASK_RM, MASK_FSQRT_D | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fsqrt.d", "D", "D,S,m", MATCH_FSQRT_D, MASK_FSQRT_D, match_opcode, WR_fd|RD_fs1 }, -+{"fmin.d", "D", "D,S,T", MATCH_FMIN_D, MASK_FMIN_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmax.d", "D", "D,S,T", MATCH_FMAX_D, MASK_FMAX_D, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmadd.d", "D", "D,S,T,R", MATCH_FMADD_D | MASK_RM, MASK_FMADD_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmadd.d", "D", "D,S,T,R,m", MATCH_FMADD_D, MASK_FMADD_D, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.d", "D", "D,S,T,R", MATCH_FNMADD_D | MASK_RM, MASK_FNMADD_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.d", "D", "D,S,T,R,m", MATCH_FNMADD_D, MASK_FNMADD_D, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.d", "D", "D,S,T,R", MATCH_FMSUB_D | MASK_RM, MASK_FMSUB_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.d", "D", "D,S,T,R,m", MATCH_FMSUB_D, MASK_FMSUB_D, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.d", "D", "D,S,T,R", MATCH_FNMSUB_D | MASK_RM, MASK_FNMSUB_D | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.d", "D", "D,S,T,R,m", MATCH_FNMSUB_D, MASK_FNMSUB_D, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fcvt.w.d", "D", "d,S", MATCH_FCVT_W_D | MASK_RM, MASK_FCVT_W_D | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.w.d", "D", "d,S,m", MATCH_FCVT_W_D, MASK_FCVT_W_D, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.d", "D", "d,S", MATCH_FCVT_WU_D | MASK_RM, MASK_FCVT_WU_D | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.d", "D", "d,S,m", MATCH_FCVT_WU_D, MASK_FCVT_WU_D, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.d.w", "D", "D,s", MATCH_FCVT_D_W, MASK_FCVT_D_W | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.d.wu", "D", "D,s", MATCH_FCVT_D_WU, MASK_FCVT_D_WU | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.d.s", "D", "D,S", MATCH_FCVT_D_S, MASK_FCVT_D_S | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.s.d", "D", "D,S", MATCH_FCVT_S_D | MASK_RM, MASK_FCVT_S_D | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.s.d", "D", "D,S,m", MATCH_FCVT_S_D, MASK_FCVT_S_D, match_opcode, WR_fd|RD_fs1 }, -+{"fclass.d", "D", "d,S", MATCH_FCLASS_D, MASK_FCLASS_D, match_opcode, WR_xd|RD_fs1 }, -+{"feq.d", "D", "d,S,T", MATCH_FEQ_D, MASK_FEQ_D, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"flt.d", "D", "d,S,T", MATCH_FLT_D, MASK_FLT_D, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fle.d", "D", "d,S,T", MATCH_FLE_D, MASK_FLE_D, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fgt.d", "D", "d,T,S", MATCH_FLT_D, MASK_FLT_D, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fge.d", "D", "d,T,S", MATCH_FLE_D, MASK_FLE_D, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fmv.x.d", "64D", "d,S", MATCH_FMV_X_D, MASK_FMV_X_D, match_opcode, WR_xd|RD_fs1 }, -+{"fmv.d.x", "64D", "D,s", MATCH_FMV_D_X, MASK_FMV_D_X, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.l.d", "64D", "d,S", MATCH_FCVT_L_D | MASK_RM, MASK_FCVT_L_D | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.l.d", "64D", "d,S,m", MATCH_FCVT_L_D, MASK_FCVT_L_D, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.d", "64D", "d,S", MATCH_FCVT_LU_D | MASK_RM, MASK_FCVT_LU_D | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.d", "64D", "d,S,m", MATCH_FCVT_LU_D, MASK_FCVT_LU_D, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.d.l", "64D", "D,s", MATCH_FCVT_D_L | MASK_RM, MASK_FCVT_D_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.d.l", "64D", "D,s,m", MATCH_FCVT_D_L, MASK_FCVT_D_L, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.d.lu", "64D", "D,s", MATCH_FCVT_D_LU | MASK_RM, MASK_FCVT_D_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.d.lu", "64D", "D,s,m", MATCH_FCVT_D_LU, MASK_FCVT_D_LU, match_opcode, WR_fd|RD_xs1 }, -+ -+/* Supervisor instructions */ -+{"csrr", "I", "d,E", MATCH_CSRRS, MASK_CSRRS | MASK_RS1, match_opcode, WR_xd }, -+{"csrwi", "I", "E,Z", MATCH_CSRRWI, MASK_CSRRWI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrw", "I", "E,s", MATCH_CSRRW, MASK_CSRRW | MASK_RD, match_opcode, RD_xs1 }, -+{"csrw", "I", "E,Z", MATCH_CSRRWI, MASK_CSRRWI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrsi", "I", "E,Z", MATCH_CSRRSI, MASK_CSRRSI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrs", "I", "E,s", MATCH_CSRRS, MASK_CSRRS | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrs", "I", "E,Z", MATCH_CSRRSI, MASK_CSRRSI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrci", "I", "E,Z", MATCH_CSRRCI, MASK_CSRRCI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrc", "I", "E,s", MATCH_CSRRC, MASK_CSRRC | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrc", "I", "E,Z", MATCH_CSRRCI, MASK_CSRRCI | MASK_RD, match_opcode, WR_xd|RD_xs1 }, -+{"csrrw", "I", "d,E,s", MATCH_CSRRW, MASK_CSRRW, match_opcode, WR_xd|RD_xs1 }, -+{"csrrw", "I", "d,E,Z", MATCH_CSRRWI, MASK_CSRRWI, match_opcode, WR_xd|RD_xs1 }, -+{"csrrs", "I", "d,E,s", MATCH_CSRRS, MASK_CSRRS, match_opcode, WR_xd|RD_xs1 }, -+{"csrrs", "I", "d,E,Z", MATCH_CSRRSI, MASK_CSRRSI, match_opcode, WR_xd|RD_xs1 }, -+{"csrrc", "I", "d,E,s", MATCH_CSRRC, MASK_CSRRC, match_opcode, WR_xd|RD_xs1 }, -+{"csrrc", "I", "d,E,Z", MATCH_CSRRCI, MASK_CSRRCI, match_opcode, WR_xd|RD_xs1 }, -+{"csrrwi", "I", "d,E,Z", MATCH_CSRRWI, MASK_CSRRWI, match_opcode, WR_xd|RD_xs1 }, -+{"csrrsi", "I", "d,E,Z", MATCH_CSRRSI, MASK_CSRRSI, match_opcode, WR_xd|RD_xs1 }, -+{"csrrci", "I", "d,E,Z", MATCH_CSRRCI, MASK_CSRRCI, match_opcode, WR_xd|RD_xs1 }, -+{"sret", "I", "", MATCH_SRET, MASK_SRET, match_opcode, 0 }, -+{"eret", "I", "", MATCH_SRET, MASK_SRET, match_opcode, 0 }, -+{"mrts", "I", "", MATCH_MRTS, MASK_MRTS, match_opcode, 0 }, -+{"sfence.vm", "I", "", MATCH_SFENCE_VM | MASK_RS1, MASK_SFENCE_VM | MASK_RS1, match_opcode, 0 }, -+{"sfence.vm", "I", "s", MATCH_SFENCE_VM, MASK_SFENCE_VM, match_opcode, RD_xs1 }, -+ -+/* Half-precision floating-point instruction subset */ -+{"flh", "Xhwacha", "D,o(s)", MATCH_FLH, MASK_FLH, match_opcode, WR_fd|RD_xs1 }, -+{"fsh", "Xhwacha", "T,q(s)", MATCH_FSH, MASK_FSH, match_opcode, RD_xs1|RD_fs2 }, -+{"fsgnj.h", "Xhwacha", "D,S,T", MATCH_FSGNJ_H, MASK_FSGNJ_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjn.h", "Xhwacha", "D,S,T", MATCH_FSGNJN_H, MASK_FSGNJN_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsgnjx.h", "Xhwacha", "D,S,T", MATCH_FSGNJX_H, MASK_FSGNJX_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.h", "Xhwacha", "D,S,T", MATCH_FADD_H | MASK_RM, MASK_FADD_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fadd.h", "Xhwacha", "D,S,T,m", MATCH_FADD_H, MASK_FADD_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.h", "Xhwacha", "D,S,T", MATCH_FSUB_H | MASK_RM, MASK_FSUB_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsub.h", "Xhwacha", "D,S,T,m", MATCH_FSUB_H, MASK_FSUB_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.h", "Xhwacha", "D,S,T", MATCH_FMUL_H | MASK_RM, MASK_FMUL_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmul.h", "Xhwacha", "D,S,T,m", MATCH_FMUL_H, MASK_FMUL_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.h", "Xhwacha", "D,S,T", MATCH_FDIV_H | MASK_RM, MASK_FDIV_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fdiv.h", "Xhwacha", "D,S,T,m", MATCH_FDIV_H, MASK_FDIV_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fsqrt.h", "Xhwacha", "D,S", MATCH_FSQRT_H | MASK_RM, MASK_FSQRT_H | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fsqrt.h", "Xhwacha", "D,S,m", MATCH_FSQRT_H, MASK_FSQRT_H, match_opcode, WR_fd|RD_fs1 }, -+{"fmin.h", "Xhwacha", "D,S,T", MATCH_FMIN_H, MASK_FMIN_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmax.h", "Xhwacha", "D,S,T", MATCH_FMAX_H, MASK_FMAX_H, match_opcode, WR_fd|RD_fs1|RD_fs2 }, -+{"fmadd.h", "Xhwacha", "D,S,T,R", MATCH_FMADD_H | MASK_RM, MASK_FMADD_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmadd.h", "Xhwacha", "D,S,T,R,m", MATCH_FMADD_H, MASK_FMADD_H, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.h", "Xhwacha", "D,S,T,R", MATCH_FNMADD_H | MASK_RM, MASK_FNMADD_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmadd.h", "Xhwacha", "D,S,T,R,m", MATCH_FNMADD_H, MASK_FNMADD_H, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.h", "Xhwacha", "D,S,T,R", MATCH_FMSUB_H | MASK_RM, MASK_FMSUB_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fmsub.h", "Xhwacha", "D,S,T,R,m", MATCH_FMSUB_H, MASK_FMSUB_H, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.h", "Xhwacha", "D,S,T,R", MATCH_FNMSUB_H | MASK_RM, MASK_FNMSUB_H | MASK_RM, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fnmsub.h", "Xhwacha", "D,S,T,R,m", MATCH_FNMSUB_H, MASK_FNMSUB_H, match_opcode, WR_fd|RD_fs1|RD_fs2|RD_fs3 }, -+{"fcvt.s.h", "Xhwacha", "D,S", MATCH_FCVT_S_H, MASK_FCVT_S_H | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.h.s", "Xhwacha", "D,S", MATCH_FCVT_H_S | MASK_RM, MASK_FCVT_H_S | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.h.s", "Xhwacha", "D,S,m", MATCH_FCVT_H_S, MASK_FCVT_H_S, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.d.h", "Xhwacha", "D,S", MATCH_FCVT_D_H, MASK_FCVT_D_H | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.h.d", "Xhwacha", "D,S", MATCH_FCVT_H_D | MASK_RM, MASK_FCVT_H_D | MASK_RM, match_opcode, WR_fd|RD_fs1 }, -+{"fcvt.h.d", "Xhwacha", "D,S,m", MATCH_FCVT_H_D, MASK_FCVT_H_D, match_opcode, WR_fd|RD_fs1 }, -+{"feq.h", "Xhwacha", "d,S,T", MATCH_FEQ_H, MASK_FEQ_H, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"flt.h", "Xhwacha", "d,S,T", MATCH_FLT_H, MASK_FLT_H, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fle.h", "Xhwacha", "d,S,T", MATCH_FLE_H, MASK_FLE_H, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fgt.h", "Xhwacha", "d,T,S", MATCH_FLT_H, MASK_FLT_H, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fge.h", "Xhwacha", "d,T,S", MATCH_FLE_H, MASK_FLE_H, match_opcode, WR_xd|RD_fs1|RD_fs2 }, -+{"fmv.x.h", "Xhwacha", "d,S", MATCH_FMV_X_H, MASK_FMV_X_H, match_opcode, WR_xd|RD_fs1 }, -+{"fmv.h.x", "Xhwacha", "D,s", MATCH_FMV_H_X, MASK_FMV_H_X, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.w.h", "Xhwacha", "d,S", MATCH_FCVT_W_H | MASK_RM, MASK_FCVT_W_H | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.w.h", "Xhwacha", "d,S,m", MATCH_FCVT_W_H, MASK_FCVT_W_H, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.h", "Xhwacha", "d,S", MATCH_FCVT_WU_H | MASK_RM, MASK_FCVT_WU_H | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.wu.h", "Xhwacha", "d,S,m", MATCH_FCVT_WU_H, MASK_FCVT_WU_H, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.h.w", "Xhwacha", "D,s", MATCH_FCVT_H_W, MASK_FCVT_H_W | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.h.wu", "Xhwacha", "D,s", MATCH_FCVT_H_WU, MASK_FCVT_H_WU | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.l.h", "Xhwacha", "d,S", MATCH_FCVT_L_H | MASK_RM, MASK_FCVT_L_H | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.l.h", "Xhwacha", "d,S,m", MATCH_FCVT_L_H, MASK_FCVT_L_H, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.h", "Xhwacha", "d,S", MATCH_FCVT_LU_H | MASK_RM, MASK_FCVT_LU_H | MASK_RM, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.lu.h", "Xhwacha", "d,S,m", MATCH_FCVT_LU_H, MASK_FCVT_LU_H, match_opcode, WR_xd|RD_fs1 }, -+{"fcvt.h.l", "Xhwacha", "D,s", MATCH_FCVT_H_L | MASK_RM, MASK_FCVT_H_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.h.l", "Xhwacha", "D,s,m", MATCH_FCVT_H_L, MASK_FCVT_H_L, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.h.lu", "Xhwacha", "D,s", MATCH_FCVT_H_LU | MASK_RM, MASK_FCVT_H_L | MASK_RM, match_opcode, WR_fd|RD_xs1 }, -+{"fcvt.h.lu", "Xhwacha", "D,s,m", MATCH_FCVT_H_LU, MASK_FCVT_H_LU, match_opcode, WR_fd|RD_xs1 }, -+ -+/* Rocket Custom Coprocessor extension */ -+{"custom0", "Xcustom", "d,s,t,^j", MATCH_CUSTOM0_RD_RS1_RS2, MASK_CUSTOM0_RD_RS1_RS2, match_opcode, 0}, -+{"custom0", "Xcustom", "d,s,^t,^j", MATCH_CUSTOM0_RD_RS1, MASK_CUSTOM0_RD_RS1, match_opcode, 0}, -+{"custom0", "Xcustom", "d,^s,^t,^j", MATCH_CUSTOM0_RD, MASK_CUSTOM0_RD, match_opcode, 0}, -+{"custom0", "Xcustom", "^d,s,t,^j", MATCH_CUSTOM0_RS1_RS2, MASK_CUSTOM0_RS1_RS2, match_opcode, 0}, -+{"custom0", "Xcustom", "^d,s,^t,^j", MATCH_CUSTOM0_RS1, MASK_CUSTOM0_RS1, match_opcode, 0}, -+{"custom0", "Xcustom", "^d,^s,^t,^j", MATCH_CUSTOM0, MASK_CUSTOM0, match_opcode, 0}, -+{"custom1", "Xcustom", "d,s,t,^j", MATCH_CUSTOM1_RD_RS1_RS2, MASK_CUSTOM1_RD_RS1_RS2, match_opcode, 0}, -+{"custom1", "Xcustom", "d,s,^t,^j", MATCH_CUSTOM1_RD_RS1, MASK_CUSTOM1_RD_RS1, match_opcode, 0}, -+{"custom1", "Xcustom", "d,^s,^t,^j", MATCH_CUSTOM1_RD, MASK_CUSTOM1_RD, match_opcode, 0}, -+{"custom1", "Xcustom", "^d,s,t,^j", MATCH_CUSTOM1_RS1_RS2, MASK_CUSTOM1_RS1_RS2, match_opcode, 0}, -+{"custom1", "Xcustom", "^d,s,^t,^j", MATCH_CUSTOM1_RS1, MASK_CUSTOM1_RS1, match_opcode, 0}, -+{"custom1", "Xcustom", "^d,^s,^t,^j", MATCH_CUSTOM1, MASK_CUSTOM1, match_opcode, 0}, -+{"custom2", "Xcustom", "d,s,t,^j", MATCH_CUSTOM2_RD_RS1_RS2, MASK_CUSTOM2_RD_RS1_RS2, match_opcode, 0}, -+{"custom2", "Xcustom", "d,s,^t,^j", MATCH_CUSTOM2_RD_RS1, MASK_CUSTOM2_RD_RS1, match_opcode, 0}, -+{"custom2", "Xcustom", "d,^s,^t,^j", MATCH_CUSTOM2_RD, MASK_CUSTOM2_RD, match_opcode, 0}, -+{"custom2", "Xcustom", "^d,s,t,^j", MATCH_CUSTOM2_RS1_RS2, MASK_CUSTOM2_RS1_RS2, match_opcode, 0}, -+{"custom2", "Xcustom", "^d,s,^t,^j", MATCH_CUSTOM2_RS1, MASK_CUSTOM2_RS1, match_opcode, 0}, -+{"custom2", "Xcustom", "^d,^s,^t,^j", MATCH_CUSTOM2, MASK_CUSTOM2, match_opcode, 0}, -+{"custom3", "Xcustom", "d,s,t,^j", MATCH_CUSTOM3_RD_RS1_RS2, MASK_CUSTOM3_RD_RS1_RS2, match_opcode, 0}, -+{"custom3", "Xcustom", "d,s,^t,^j", MATCH_CUSTOM3_RD_RS1, MASK_CUSTOM3_RD_RS1, match_opcode, 0}, -+{"custom3", "Xcustom", "d,^s,^t,^j", MATCH_CUSTOM3_RD, MASK_CUSTOM3_RD, match_opcode, 0}, -+{"custom3", "Xcustom", "^d,s,t,^j", MATCH_CUSTOM3_RS1_RS2, MASK_CUSTOM3_RS1_RS2, match_opcode, 0}, -+{"custom3", "Xcustom", "^d,s,^t,^j", MATCH_CUSTOM3_RS1, MASK_CUSTOM3_RS1, match_opcode, 0}, -+{"custom3", "Xcustom", "^d,^s,^t,^j", MATCH_CUSTOM3, MASK_CUSTOM3, match_opcode, 0}, -+ -+/* Xhwacha extension */ -+{"stop", "Xhwacha", "", MATCH_STOP, MASK_STOP, match_opcode, 0}, -+{"utidx", "Xhwacha", "d", MATCH_UTIDX, MASK_UTIDX, match_opcode, WR_xd}, -+{"movz", "Xhwacha", "d,s,t", MATCH_MOVZ, MASK_MOVZ, match_opcode, WR_xd|RD_xs1|RD_xs2}, -+{"movn", "Xhwacha", "d,s,t", MATCH_MOVN, MASK_MOVN, match_opcode, WR_xd|RD_xs1|RD_xs2}, -+{"fmovz", "Xhwacha", "D,s,T", MATCH_FMOVZ, MASK_FMOVZ, match_opcode, WR_fd|RD_xs1|RD_fs2}, -+{"fmovn", "Xhwacha", "D,s,T", MATCH_FMOVN, MASK_FMOVN, match_opcode, WR_fd|RD_xs1|RD_fs2}, -+ -+/* unit stride */ -+/* xloads */ -+{"vld", "Xhwacha", "#d,s", MATCH_VLD, MASK_VLD, match_opcode, 0}, -+{"vlw", "Xhwacha", "#d,s", MATCH_VLW, MASK_VLW, match_opcode, 0}, -+{"vlwu", "Xhwacha", "#d,s", MATCH_VLWU, MASK_VLWU, match_opcode, 0}, -+{"vlh", "Xhwacha", "#d,s", MATCH_VLH, MASK_VLH, match_opcode, 0}, -+{"vlhu", "Xhwacha", "#d,s", MATCH_VLHU, MASK_VLHU, match_opcode, 0}, -+{"vlb", "Xhwacha", "#d,s", MATCH_VLB, MASK_VLB, match_opcode, 0}, -+{"vlbu", "Xhwacha", "#d,s", MATCH_VLBU, MASK_VLBU, match_opcode, 0}, -+/* floads */ -+{"vfld", "Xhwacha", "#D,s", MATCH_VFLD, MASK_VFLD, match_opcode, 0}, -+{"vflw", "Xhwacha", "#D,s", MATCH_VFLW, MASK_VFLW, match_opcode, 0}, -+ -+/* stride */ -+/* xloads */ -+{"vlstd", "Xhwacha", "#d,s,t", MATCH_VLSTD, MASK_VLSTD, match_opcode, 0}, -+{"vlstw", "Xhwacha", "#d,s,t", MATCH_VLSTW, MASK_VLSTW, match_opcode, 0}, -+{"vlstwu", "Xhwacha", "#d,s,t", MATCH_VLSTWU, MASK_VLSTWU, match_opcode, 0}, -+{"vlsth", "Xhwacha", "#d,s,t", MATCH_VLSTH, MASK_VLSTH, match_opcode, 0}, -+{"vlsthu", "Xhwacha", "#d,s,t", MATCH_VLSTHU, MASK_VLSTHU, match_opcode, 0}, -+{"vlstb", "Xhwacha", "#d,s,t", MATCH_VLSTB, MASK_VLSTB, match_opcode, 0}, -+{"vlstbu", "Xhwacha", "#d,s,t", MATCH_VLSTBU, MASK_VLSTBU, match_opcode, 0}, -+/* floads */ -+{"vflstd", "Xhwacha", "#D,s,t", MATCH_VFLSTD, MASK_VFLSTD, match_opcode, 0}, -+{"vflstw", "Xhwacha", "#D,s,t", MATCH_VFLSTW, MASK_VFLSTW, match_opcode, 0}, -+ -+/* segment */ -+/* xloads */ -+{"vlsegd", "Xhwacha", "#d,s,#n", MATCH_VLSEGD, MASK_VLSEGD, match_opcode, 0}, -+{"vlsegw", "Xhwacha", "#d,s,#n", MATCH_VLSEGW, MASK_VLSEGW, match_opcode, 0}, -+{"vlsegwu", "Xhwacha", "#d,s,#n", MATCH_VLSEGWU, MASK_VLSEGWU, match_opcode, 0}, -+{"vlsegh", "Xhwacha", "#d,s,#n", MATCH_VLSEGH, MASK_VLSEGH, match_opcode, 0}, -+{"vlseghu", "Xhwacha", "#d,s,#n", MATCH_VLSEGHU, MASK_VLSEGHU, match_opcode, 0}, -+{"vlsegb", "Xhwacha", "#d,s,#n", MATCH_VLSEGB, MASK_VLSEGB, match_opcode, 0}, -+{"vlsegbu", "Xhwacha", "#d,s,#n", MATCH_VLSEGBU, MASK_VLSEGBU, match_opcode, 0}, -+/* floads */ -+{"vflsegd", "Xhwacha", "#D,s,#n", MATCH_VFLSEGD, MASK_VFLSEGD, match_opcode, 0}, -+{"vflsegw", "Xhwacha", "#D,s,#n", MATCH_VFLSEGW, MASK_VFLSEGW, match_opcode, 0}, -+ -+/* stride segment */ -+/* xloads */ -+{"vlsegstd", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTD, MASK_VLSEGSTD, match_opcode, 0}, -+{"vlsegstw", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTW, MASK_VLSEGSTW, match_opcode, 0}, -+{"vlsegstwu", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTWU, MASK_VLSEGSTWU, match_opcode, 0}, -+{"vlsegsth", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTH, MASK_VLSEGSTH, match_opcode, 0}, -+{"vlsegsthu", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTHU, MASK_VLSEGSTHU, match_opcode, 0}, -+{"vlsegstb", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTB, MASK_VLSEGSTB, match_opcode, 0}, -+{"vlsegstbu", "Xhwacha", "#d,s,t,#n", MATCH_VLSEGSTBU, MASK_VLSEGSTBU, match_opcode, 0}, -+/* floads */ -+{"vflsegstd", "Xhwacha", "#D,s,t,#n", MATCH_VFLSEGSTD, MASK_VFLSEGSTD, match_opcode, 0}, -+{"vflsegstw", "Xhwacha", "#D,s,t,#n", MATCH_VFLSEGSTW, MASK_VFLSEGSTW, match_opcode, 0}, -+ -+/* unit stride */ -+/* xstores */ -+{"vsd", "Xhwacha", "#d,s", MATCH_VSD, MASK_VSD, match_opcode, 0}, -+{"vsw", "Xhwacha", "#d,s", MATCH_VSW, MASK_VSW, match_opcode, 0}, -+{"vsh", "Xhwacha", "#d,s", MATCH_VSH, MASK_VSH, match_opcode, 0}, -+{"vsb", "Xhwacha", "#d,s", MATCH_VSB, MASK_VSB, match_opcode, 0}, -+/* fstores */ -+{"vfsd", "Xhwacha", "#D,s", MATCH_VFSD, MASK_VFSD, match_opcode, 0}, -+{"vfsw", "Xhwacha", "#D,s", MATCH_VFSW, MASK_VFSW, match_opcode, 0}, -+ -+/* stride */ -+/* xstores */ -+{"vsstd", "Xhwacha", "#d,s,t", MATCH_VSSTD, MASK_VSSTD, match_opcode, 0}, -+{"vsstw", "Xhwacha", "#d,s,t", MATCH_VSSTW, MASK_VSSTW, match_opcode, 0}, -+{"vssth", "Xhwacha", "#d,s,t", MATCH_VSSTH, MASK_VSSTH, match_opcode, 0}, -+{"vsstb", "Xhwacha", "#d,s,t", MATCH_VSSTB, MASK_VSSTB, match_opcode, 0}, -+/* fstores */ -+{"vfsstd", "Xhwacha", "#D,s,t", MATCH_VFSSTD, MASK_VFSSTD, match_opcode, 0}, -+{"vfsstw", "Xhwacha", "#D,s,t", MATCH_VFSSTW, MASK_VFSSTW, match_opcode, 0}, -+ -+/* segment */ -+/* xstores */ -+{"vssegd", "Xhwacha", "#d,s,#n", MATCH_VSSEGD, MASK_VSSEGD, match_opcode, 0}, -+{"vssegw", "Xhwacha", "#d,s,#n", MATCH_VSSEGW, MASK_VSSEGW, match_opcode, 0}, -+{"vssegh", "Xhwacha", "#d,s,#n", MATCH_VSSEGH, MASK_VSSEGH, match_opcode, 0}, -+{"vssegb", "Xhwacha", "#d,s,#n", MATCH_VSSEGB, MASK_VSSEGB, match_opcode, 0}, -+/* fstores */ -+{"vfssegd", "Xhwacha", "#D,s,#n", MATCH_VFSSEGD, MASK_VFSSEGD, match_opcode, 0}, -+{"vfssegw", "Xhwacha", "#D,s,#n", MATCH_VFSSEGW, MASK_VFSSEGW, match_opcode, 0}, -+ -+/* stride segment */ -+/* xsegstores */ -+{"vssegstd", "Xhwacha", "#d,s,t,#n", MATCH_VSSEGSTD, MASK_VSSEGSTD, match_opcode, 0}, -+{"vssegstw", "Xhwacha", "#d,s,t,#n", MATCH_VSSEGSTW, MASK_VSSEGSTW, match_opcode, 0}, -+{"vssegsth", "Xhwacha", "#d,s,t,#n", MATCH_VSSEGSTH, MASK_VSSEGSTH, match_opcode, 0}, -+{"vssegstb", "Xhwacha", "#d,s,t,#n", MATCH_VSSEGSTB, MASK_VSSEGSTB, match_opcode, 0}, -+/* fsegstores */ -+{"vfssegstd", "Xhwacha", "#D,s,t,#n", MATCH_VFSSEGSTD, MASK_VFSSEGSTD, match_opcode, 0}, -+{"vfssegstw", "Xhwacha", "#D,s,t,#n", MATCH_VFSSEGSTW, MASK_VFSSEGSTW, match_opcode, 0}, -+ -+{"vsetcfg", "Xhwacha", "s", MATCH_VSETCFG, MASK_VSETCFG | MASK_IMM, match_opcode, 0}, -+{"vsetcfg", "Xhwacha", "#g,#f", MATCH_VSETCFG, MASK_VSETCFG | MASK_RS1, match_opcode, 0}, -+{"vsetcfg", "Xhwacha", "s,#g,#f", MATCH_VSETCFG, MASK_VSETCFG, match_opcode, 0}, -+{"vsetucfg", "Xhwacha", "d,u", MATCH_LUI, MASK_LUI, match_opcode, INSN_ALIAS | WR_xd}, -+{"vsetvl", "Xhwacha", "d,s", MATCH_VSETVL, MASK_VSETVL, match_opcode, 0}, -+{"vgetcfg", "Xhwacha", "d", MATCH_VGETCFG, MASK_VGETCFG, match_opcode, 0}, -+{"vgetvl", "Xhwacha", "d", MATCH_VGETVL, MASK_VGETVL, match_opcode, 0}, -+ -+{"vmvv", "Xhwacha", "#d,#s", MATCH_VMVV, MASK_VMVV, match_opcode, 0}, -+{"vmsv", "Xhwacha", "#d,s", MATCH_VMSV, MASK_VMSV, match_opcode, 0}, -+{"vfmvv", "Xhwacha", "#D,#S", MATCH_VFMVV, MASK_VFMVV, match_opcode, 0}, -+{"vfmsv.d", "Xhwacha", "#D,s", MATCH_VFMSV_D, MASK_VFMSV_D, match_opcode, 0}, -+{"vfmsv.s", "Xhwacha", "#D,s", MATCH_VFMSV_S, MASK_VFMSV_S, match_opcode, 0}, -+ -+{"vf", "Xhwacha", "q(s)", MATCH_VF, MASK_VF, match_opcode, 0}, -+{"vf", "Xhwacha", "A,s", 0, (int) M_VF, match_never, INSN_MACRO }, -+ -+{"vxcptcause", "Xhwacha", "d", MATCH_VXCPTCAUSE, MASK_VXCPTCAUSE, match_opcode, 0}, -+{"vxcptaux", "Xhwacha", "d", MATCH_VXCPTAUX, MASK_VXCPTAUX, match_opcode, 0}, -+ -+{"vxcptsave", "Xhwacha", "s", MATCH_VXCPTSAVE, MASK_VXCPTSAVE, match_opcode, 0}, -+{"vxcptrestore", "Xhwacha", "s", MATCH_VXCPTRESTORE, MASK_VXCPTRESTORE, match_opcode, 0}, -+{"vxcptkill", "Xhwacha", "", MATCH_VXCPTKILL, MASK_VXCPTKILL, match_opcode, 0}, -+ -+{"vxcptevac", "Xhwacha", "s", MATCH_VXCPTEVAC, MASK_VXCPTEVAC, match_opcode, 0}, -+{"vxcpthold", "Xhwacha", "s", MATCH_VXCPTHOLD, MASK_VXCPTHOLD, match_opcode, 0}, -+{"venqcmd", "Xhwacha", "s,t", MATCH_VENQCMD, MASK_VENQCMD, match_opcode, 0}, -+{"venqimm1", "Xhwacha", "s,t", MATCH_VENQIMM1, MASK_VENQIMM1, match_opcode, 0}, -+{"venqimm2", "Xhwacha", "s,t", MATCH_VENQIMM2, MASK_VENQIMM2, match_opcode, 0}, -+{"venqcnt", "Xhwacha", "s,t", MATCH_VENQCNT, MASK_VENQCNT, match_opcode, 0}, -+}; -+ -+#define RISCV_NUM_OPCODES \ -+ ((sizeof riscv_builtin_opcodes) / (sizeof (riscv_builtin_opcodes[0]))) -+const int bfd_riscv_num_builtin_opcodes = RISCV_NUM_OPCODES; -+ -+/* const removed from the following to allow for dynamic extensions to the -+ * built-in instruction set. */ -+struct riscv_opcode *riscv_opcodes = -+ (struct riscv_opcode *) riscv_builtin_opcodes; -+int bfd_riscv_num_opcodes = RISCV_NUM_OPCODES; -+#undef RISCV_NUM_OPCODES diff --git a/external/gpl3/binutils/patches/0001-NetBSD-Minix.patch b/external/gpl3/binutils/patches/0001-NetBSD-Minix.patch new file mode 100644 index 000000000..79ded6a15 --- /dev/null +++ b/external/gpl3/binutils/patches/0001-NetBSD-Minix.patch @@ -0,0 +1,248 @@ +diff -rNU3 a/bfd/config.bfd b/bfd/config.bfd +--- a/bfd/config.bfd 2021-04-01 23:41:19.699481000 -0300 ++++ b/bfd/config.bfd 2021-04-01 23:44:05.966151225 -0300 +@@ -386,6 +386,7 @@ + targ_selvecs=arm_elf32_be_vec + ;; + arm-*-elf | arm*-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \ ++ arm*-*-minix* | \ + arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \ + arm*-*-eabi* | arm-*-rtems* | arm*-*-uclinuxfdpiceabi) + targ_defvec=arm_elf32_le_vec +@@ -620,6 +621,9 @@ + targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;; + esac + ;; ++ i[3-7]86-*-minix) ++ targ_defvec=i386_elf32_minix_vec ++ ;; + i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu) + targ_defvec=i386_elf32_vec + targ_selvecs="iamcu_elf32_vec i386_coff_vec i386_pei_vec i386_aout_bsd_vec i386_aout_nbsd_vec" +diff -rNU3 a/bfd/configure b/bfd/configure +--- a/bfd/configure 2021-04-01 23:41:19.706148000 -0300 ++++ b/bfd/configure 2021-04-01 23:44:05.972817891 -0300 +@@ -14759,6 +14759,7 @@ + i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;; + i386_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; + i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; ++ i386_elf32_minix_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; + i386_elf32_nacl_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; + i386_elf32_sol2_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; + i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;; +diff -rNU3 a/bfd/elf32-i386.c b/bfd/elf32-i386.c +--- a/bfd/elf32-i386.c 2021-04-01 23:41:19.722814000 -0300 ++++ b/bfd/elf32-i386.c 2021-04-01 23:44:05.976151225 -0300 +@@ -4392,6 +4392,18 @@ + + #include "elf32-target.h" + ++/* MINIX3 support. */ ++ ++#undef TARGET_LITTLE_SYM ++#define TARGET_LITTLE_SYM i386_elf32_minix_vec ++#undef TARGET_LITTLE_NAME ++#define TARGET_LITTLE_NAME "elf32-i386-minix" ++ ++#undef elf32_bed ++#define elf32_bed elf32_i386_minix_bed ++ ++#include "elf32-target.h" ++ + /* FreeBSD support. */ + + #undef TARGET_LITTLE_SYM +diff -rNU3 a/bfd/targets.c b/bfd/targets.c +--- a/bfd/targets.c 2021-04-01 23:41:19.776148000 -0300 ++++ b/bfd/targets.c 2021-04-01 23:44:05.979484558 -0300 +@@ -734,6 +734,7 @@ + extern const bfd_target i386_coff_lynx_vec; + extern const bfd_target i386_elf32_vec; + extern const bfd_target i386_elf32_fbsd_vec; ++extern const bfd_target i386_elf32_minix_vec; + extern const bfd_target i386_elf32_nacl_vec; + extern const bfd_target i386_elf32_sol2_vec; + extern const bfd_target i386_elf32_vxworks_vec; +diff -rNU3 a/config.guess b/config.guess +--- a/config.guess 2021-04-01 23:41:19.802814000 -0300 ++++ b/config.guess 2021-04-01 23:44:05.979484558 -0300 +@@ -917,7 +917,7 @@ + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) +- echo "$UNAME_MACHINE"-unknown-minix ++ echo "$UNAME_MACHINE"-elf32-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" +diff -rNU3 a/configure b/configure +--- a/configure 2020-01-18 11:01:13.000000000 -0300 ++++ b/configure 2021-04-01 23:44:05.982817892 -0300 +@@ -3055,7 +3055,7 @@ + *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ + | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ + | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ +- | *-*-solaris2* | *-*-nto* | *-*-nacl*) ++ | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-minix*) + case "${target}" in + *-*-linux*aout* | *-*-linux*oldld*) + ;; +diff -rNU3 a/gas/config/tc-i386.c b/gas/config/tc-i386.c +--- a/gas/config/tc-i386.c 2020-01-18 10:55:47.000000000 -0300 ++++ b/gas/config/tc-i386.c 2021-04-02 00:10:25.766178832 -0300 +@@ -478,6 +478,7 @@ + && !defined (TE_NACL) \ + && !defined (TE_FreeBSD) \ + && !defined (TE_DragonFly) \ ++ && !defined (TE_MINIX) \ + && !defined (TE_NetBSD))) + /* This array holds the chars that always start a comment. If the + pre-processor is disabled, these aren't very useful. The option +diff -rNU3 a/gas/config/tc-i386.h b/gas/config/tc-i386.h +--- a/gas/config/tc-i386.h 2020-01-18 10:55:47.000000000 -0300 ++++ b/gas/config/tc-i386.h 2021-04-01 23:44:05.986151225 -0300 +@@ -72,6 +72,10 @@ + #define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2" + #endif + ++#ifdef TE_MINIX ++#define ELF_TARGET_FORMAT "elf32-i386-minix" ++#endif ++ + #ifndef ELF_TARGET_FORMAT + #define ELF_TARGET_FORMAT "elf32-i386" + #endif +diff -rNU3 a/gas/config/te-minix.h b/gas/config/te-minix.h +--- a/gas/config/te-minix.h 1969-12-31 21:00:00.000000000 -0300 ++++ b/gas/config/te-minix.h 2021-04-01 23:44:05.986151225 -0300 +@@ -0,0 +1,9 @@ ++#define TE_MINIX 1 ++ ++/* Added these, because if we don't know what we're targeting we may ++ need an assembler version of libgcc, and that will use local ++ labels. */ ++#define LOCAL_LABELS_DOLLAR 1 ++#define LOCAL_LABELS_FB 1 ++ ++#include "obj-format.h" +diff -rNU3 a/gas/configure b/gas/configure +--- a/gas/configure 2020-02-01 08:49:51.000000000 -0300 ++++ b/gas/configure 2021-04-01 23:44:05.992817892 -0300 +@@ -6269,6 +6269,10 @@ + fi + ;; + ++minix*) ++ lt_cv_deplibs_check_method=pass_all ++ ;; ++ + gnu*) + lt_cv_deplibs_check_method=pass_all + ;; +diff -rNU3 a/gas/configure.tgt b/gas/configure.tgt +--- a/gas/configure.tgt 2021-04-01 23:41:19.829481000 -0300 ++++ b/gas/configure.tgt 2021-04-01 23:44:05.992817892 -0300 +@@ -438,6 +438,8 @@ + *-*-elf | *-*-rtems* | *-*-sysv4*) fmt=elf ;; + *-*-solaris*) fmt=elf em=solaris ;; + *-*-aros*) fmt=elf em=linux ;; ++ i*-*-minix*) fmt=elf em=minix ;; ++ arm*-*-minix*) fmt=elf em=armeabi ;; + *-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;; + esac + +diff -rNU3 a/ld/configure.tgt b/ld/configure.tgt +--- a/ld/configure.tgt 2021-04-01 23:41:19.839481000 -0300 ++++ b/ld/configure.tgt 2021-04-01 23:44:05.992817892 -0300 +@@ -167,6 +167,9 @@ + arm-*-elf | arm*-*-eabi* | arm-*-rtems*) + targ_emul=armelf + ;; ++arm*-*-minix*) targ_emul=armelf_minix ++ targ_extra_emuls="armelf" ++ ;; + arm*-*-symbianelf*) targ_emul=armsymbian;; + arm-*-kaos*) targ_emul=armelf + ;; +@@ -344,6 +347,9 @@ + targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om" + targ64_extra_libpath="elf_x86_64 elf32_x86_64" + ;; ++i[3-7]86-*-minix) targ_emul=elf_i386_minix ++ targ_extra_emuls="elf_i386" ++ ;; + i[3-7]86-*-redox*) targ_emul=elf_i386 + targ_extra_emuls=elf_x86_64 + ;; +diff -rNU3 a/ld/emulparams/armelf_minix.sh b/ld/emulparams/armelf_minix.sh +--- a/ld/emulparams/armelf_minix.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/armelf_minix.sh 2021-04-01 23:44:05.992817892 -0300 +@@ -0,0 +1,15 @@ ++. ${srcdir}/emulparams/armelf.sh ++. ${srcdir}/emulparams/elf_minix.sh ++OUTPUT_FORMAT="elf32-littlearm" ++MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ++COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ++TEXT_START_ADDR=0x00010000 ++ ++# Dynamic libraries support ++TARGET2_TYPE=got-rel ++ ++unset EMBEDDED ++unset DATA_START_SYMBOLS ++unset STACK_ADDR ++ ++# Use the ARM ABI-compliant exception-handling sections. ++OTHER_READONLY_SECTIONS=" ++ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } ++ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } ++ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" ++ +diff -rNU3 a/ld/emulparams/elf_i386_minix.sh b/ld/emulparams/elf_i386_minix.sh +--- a/ld/emulparams/elf_i386_minix.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/elf_i386_minix.sh 2021-04-01 23:44:05.992817892 -0300 +@@ -0,0 +1,3 @@ ++. ${srcdir}/emulparams/elf_i386.sh ++. ${srcdir}/emulparams/elf_minix.sh ++OUTPUT_FORMAT="elf32-i386-minix" +diff -rNU3 a/ld/emulparams/elf_minix.sh b/ld/emulparams/elf_minix.sh +--- a/ld/emulparams/elf_minix.sh 1969-12-31 21:00:00.000000000 -0300 ++++ b/ld/emulparams/elf_minix.sh 2021-04-01 23:44:05.992817892 -0300 +@@ -0,0 +1 @@ ++ELF_INTERPRETER_NAME=\"/libexec/ld-elf.so.1\" +diff -rNU3 a/ld/Makefile.in b/ld/Makefile.in +--- a/ld/Makefile.in 2021-04-01 23:41:19.856148000 -0300 ++++ b/ld/Makefile.in 2021-04-01 23:44:05.996151225 -0300 +@@ -669,6 +669,7 @@ + earmelf_linux.c \ + earmelf_linux_eabi.c \ + earmelf_linux_fdpiceabi.c \ ++ earmelf_minix.c \ + earmelf_nacl.c \ + earmelf_nbsd.c \ + earmelf_nbsd_eabi.c \ +@@ -795,6 +796,7 @@ + eelf_i386_be.c \ + eelf_i386_fbsd.c \ + eelf_i386_ldso.c \ ++ eelf_i386_minix.c \ + eelf_i386_nacl.c \ + eelf_i386_sol2.c \ + eelf_i386_vxworks.c \ +@@ -2298,6 +2300,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Pc@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_minix.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Pc@am__quote@ +@@ -2411,6 +2414,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Pc@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_minix.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Pc@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_vxworks.Pc@am__quote@ diff --git a/external/gpl3/binutils/patches/0001-minix.patch b/external/gpl3/binutils/patches/0001-minix.patch deleted file mode 100644 index 10561c7ce..000000000 --- a/external/gpl3/binutils/patches/0001-minix.patch +++ /dev/null @@ -1,249 +0,0 @@ -diff -rNU3 dist.nbsd/bfd/config.bfd dist/bfd/config.bfd ---- dist.nbsd/bfd/config.bfd 2014-02-17 14:34:49.407022105 +0100 -+++ dist/bfd/config.bfd 2014-02-17 16:13:26.634958919 +0100 -@@ -316,7 +316,7 @@ - ;; - arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \ - arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \ -- arm*-*-eabi* ) -+ arm*-*-eabi* | arm*-*-minix*) - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -@@ -711,6 +711,9 @@ - i[3-7]86-none-*) - targ_defvec=i386coff_vec - ;; -+ i[3-7]86-*-minix) -+ targ_defvec=bfd_elf32_i386_minix_vec -+ ;; - i[3-7]86-*-aout* | i[3-7]86*-*-vsta*) - targ_defvec=i386aout_vec - ;; -diff -rNU3 dist.nbsd/bfd/configure dist/bfd/configure ---- dist.nbsd/bfd/configure 2014-02-17 14:34:49.413688892 +0100 -+++ dist/bfd/configure 2014-02-17 16:13:26.638292303 +0100 -@@ -15232,6 +15232,7 @@ - bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; - bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; -+ bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; -diff -rNU3 dist.nbsd/bfd/configure.in dist/bfd/configure.in ---- dist.nbsd/bfd/configure.in 2014-02-17 14:34:49.393688529 +0100 -+++ dist/bfd/configure.in 2014-02-17 16:13:26.638292303 +0100 -@@ -724,6 +724,7 @@ - bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; - bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; -+ bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; -diff -rNU3 dist.nbsd/bfd/elf32-i386.c dist/bfd/elf32-i386.c ---- dist.nbsd/bfd/elf32-i386.c 2014-02-17 14:34:49.393688529 +0100 -+++ dist/bfd/elf32-i386.c 2014-02-17 16:13:26.644959071 +0100 -@@ -4979,6 +4979,18 @@ - - #include "elf32-target.h" - -+/* MINIX3 support. */ -+ -+#undef TARGET_LITTLE_SYM -+#define TARGET_LITTLE_SYM bfd_elf32_i386_minix_vec -+#undef TARGET_LITTLE_NAME -+#define TARGET_LITTLE_NAME "elf32-i386-minix" -+ -+#undef elf32_bed -+#define elf32_bed elf32_i386_minix_bed -+ -+#include "elf32-target.h" -+ - /* FreeBSD support. */ - - #undef TARGET_LITTLE_SYM -diff -rNU3 dist.nbsd/bfd/targets.c dist/bfd/targets.c ---- dist.nbsd/bfd/targets.c 2014-02-17 14:34:49.417022286 +0100 -+++ dist/bfd/targets.c 2014-02-17 16:13:26.644959071 +0100 -@@ -624,6 +624,7 @@ - extern const bfd_target bfd_elf32_hppa_vec; - extern const bfd_target bfd_elf32_i370_vec; - extern const bfd_target bfd_elf32_i386_freebsd_vec; -+extern const bfd_target bfd_elf32_i386_minix_vec; - extern const bfd_target bfd_elf32_i386_nacl_vec; - extern const bfd_target bfd_elf32_i386_sol2_vec; - extern const bfd_target bfd_elf32_i386_vxworks_vec; -diff -rNU3 dist.nbsd/config.guess dist/config.guess ---- dist.nbsd/config.guess 2014-02-17 14:34:49.417022286 +0100 -+++ dist/config.guess 2014-02-17 16:13:26.644959071 +0100 -@@ -872,8 +872,8 @@ - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; -- i*86:Minix:*:*) -- echo ${UNAME_MACHINE}-pc-minix -+ *:Minix:*:*) -+ echo ${UNAME_MACHINE}-elf32-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -diff -rNU3 dist.nbsd/configure dist/configure ---- dist.nbsd/configure 2014-02-17 14:34:49.430355862 +0100 -+++ dist/configure 2014-02-17 16:13:26.648292455 +0100 -@@ -2869,7 +2869,7 @@ - *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ - | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ - | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ -- | *-*-solaris2* | *-*-nto* | *-*-nacl*) -+ | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-minix*) - case "${target}" in - *-*-linux*aout* | *-*-linux*oldld*) - ;; -diff -rNU3 dist.nbsd/gas/config/tc-i386.h dist/gas/config/tc-i386.h ---- dist.nbsd/gas/config/tc-i386.h 2014-02-17 14:34:48.917013206 +0100 -+++ dist/gas/config/tc-i386.h 2014-02-17 16:13:26.648292455 +0100 -@@ -72,6 +72,10 @@ - #define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2" - #endif - -+#ifdef TE_MINIX -+#define ELF_TARGET_FORMAT "elf32-i386-minix" -+#endif -+ - #ifndef ELF_TARGET_FORMAT - #define ELF_TARGET_FORMAT "elf32-i386" - #endif -diff -rNU3 dist.nbsd/gas/config/te-minix.h dist/gas/config/te-minix.h ---- dist.nbsd/gas/config/te-minix.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/te-minix.h 2014-02-17 16:13:26.648292455 +0100 -@@ -0,0 +1,9 @@ -+#define TE_MINIX 1 -+ -+/* Added these, because if we don't know what we're targeting we may -+ need an assembler version of libgcc, and that will use local -+ labels. */ -+#define LOCAL_LABELS_DOLLAR 1 -+#define LOCAL_LABELS_FB 1 -+ -+#include "obj-format.h" -diff -rNU3 dist.nbsd/gas/configure dist/gas/configure ---- dist.nbsd/gas/configure 2014-02-17 14:34:48.930346782 +0100 -+++ dist/gas/configure 2014-02-17 16:13:26.651625840 +0100 -@@ -6127,6 +6127,10 @@ - fi - ;; - -+minix*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; -+ - gnu*) - lt_cv_deplibs_check_method=pass_all - ;; -diff -rNU3 dist.nbsd/gas/configure.tgt dist/gas/configure.tgt ---- dist.nbsd/gas/configure.tgt 2014-02-17 14:34:48.930346782 +0100 -+++ dist/gas/configure.tgt 2014-02-17 16:13:26.651625840 +0100 -@@ -448,6 +448,8 @@ - *-*-elf | *-*-sysv4*) fmt=elf ;; - *-*-solaris*) fmt=elf em=solaris ;; - *-*-aros*) fmt=elf em=linux ;; -+ i*-*-minix*) fmt=elf em=minix ;; -+ arm*-*-minix*) fmt=elf em=armeabi ;; - *-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;; - *-*-netware) fmt=elf em=netware ;; - esac -diff -rNU3 dist.nbsd/ld/configure.tgt dist/ld/configure.tgt ---- dist.nbsd/ld/configure.tgt 2014-02-17 14:34:49.170351140 +0100 -+++ dist/ld/configure.tgt 2014-02-17 16:13:26.651625840 +0100 -@@ -82,6 +82,8 @@ - armeb-*-elf) targ_emul=armelfb ;; - arm-*-elf | arm*-*-eabi*) - targ_emul=armelf ;; -+arm*-*-minix*) targ_emul=armelf_minix -+ targ_extra_emuls="armelf" ;; - arm*-*-symbianelf*) targ_emul=armsymbian;; - arm-*-kaos*) targ_emul=armelf ;; - arm9e-*-elf) targ_emul=armelf ;; -@@ -208,6 +210,8 @@ - i[3-7]86-*-bsd386) targ_emul=i386bsd ;; - i[3-7]86-*-bsdi*) targ_emul=i386bsd ;; - i[3-7]86-*-aout) targ_emul=i386aout ;; -+i[3-7]86-*-minix) targ_emul=elf_i386_minix -+ targ_extra_emuls="elf_i386" ;; - i[3-7]86-*-linux*aout*) targ_emul=i386linux - targ_extra_emuls=elf_i386 - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;; -diff -rNU3 dist.nbsd/ld/emulparams/armelf_minix.sh dist/ld/emulparams/armelf_minix.sh ---- dist.nbsd/ld/emulparams/armelf_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelf_minix.sh 2014-02-17 16:13:26.651625840 +0100 -@@ -0,0 +1,15 @@ -+. ${srcdir}/emulparams/armelf.sh -+. ${srcdir}/emulparams/elf_minix.sh -+OUTPUT_FORMAT="elf32-littlearm" -+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" -+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -+ -+DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; -+ -+# Dynamic libraries support -+GENERATE_SHLIB_SCRIPT=yes -+TARGET2_TYPE=got-rel -+ -+GENERATE_PIE_SCRIPT=yes -+ -+unset EMBEDDED -diff -rNU3 dist.nbsd/ld/emulparams/elf_i386_minix.sh dist/ld/emulparams/elf_i386_minix.sh ---- dist.nbsd/ld/emulparams/elf_i386_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf_i386_minix.sh 2014-02-17 16:13:26.651625840 +0100 -@@ -0,0 +1,3 @@ -+. ${srcdir}/emulparams/elf_i386.sh -+. ${srcdir}/emulparams/elf_minix.sh -+OUTPUT_FORMAT="elf32-i386-minix" -diff -rNU3 dist.nbsd/ld/emulparams/elf_minix.sh dist/ld/emulparams/elf_minix.sh ---- dist.nbsd/ld/emulparams/elf_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf_minix.sh 2014-02-17 16:13:26.651625840 +0100 -@@ -0,0 +1 @@ -+ELF_INTERPRETER_NAME=\"/libexec/ld-elf.so.1\" -diff -rNU3 dist.nbsd/ld/Makefile.in dist/ld/Makefile.in ---- dist.nbsd/ld/Makefile.in 2014-02-17 14:34:49.163684353 +0100 -+++ dist/ld/Makefile.in 2014-02-17 16:13:26.651625840 +0100 -@@ -450,6 +450,7 @@ - earmelf_fbsd.c \ - earmelf_linux.c \ - earmelf_linux_eabi.c \ -+ earmelf_minix.c \ - earmelf_nacl.c \ - earmelf_nbsd.c \ - earmelf_nbsd_eabi.c \ -@@ -574,6 +575,7 @@ - eelf_i386_chaos.c \ - eelf_i386_fbsd.c \ - eelf_i386_ldso.c \ -+ eelf_i386_minix.c \ - eelf_i386_nacl.c \ - eelf_i386_sol2.c \ - eelf_i386_vxworks.c \ -@@ -2195,6 +2197,10 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)" -+earmelf_minix.c: $(srcdir)/emulparams/armelf_minix.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelf_minix "$(tdir_armelf_minix)" - earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \ - $(srcdir)/emulparams/armelf_linux_eabi.sh \ - $(srcdir)/emulparams/armelf_linux.sh \ -@@ -2715,6 +2721,10 @@ - eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ - $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" -+eelf_i386_minix.c: $(srcdir)/emulparams/elf_i386_minix.sh \ -+ $(srcdir)/emulparams/elf_i386.sh \ -+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf_i386_minix "$(tdir_elf_i386_minix)" - eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \ - $(srcdir)/emulparams/elf_i386.sh \ - $(srcdir)/emulparams/elf_nacl.sh \ diff --git a/external/gpl3/binutils/patches/0002-minix-on-minix.patch b/external/gpl3/binutils/patches/0002-minix-on-minix.patch deleted file mode 100644 index 5f2092f8e..000000000 --- a/external/gpl3/binutils/patches/0002-minix-on-minix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rNU3 dist/binutils/dwarf.c dist.mxm/binutils/dwarf.c ---- dist/binutils/dwarf.c 2012-07-02 16:35:33.000000000 +0200 -+++ dist.mxm/binutils/dwarf.c 2014-02-17 16:11:55.310119155 +0100 -@@ -29,6 +29,7 @@ - #include "dwarf2.h" - #include "dwarf.h" - #include "gdb/gdb-index.h" -+#include "getopt.h" - - static const char *regname (unsigned int regno, int row); - diff --git a/external/gpl3/binutils/patches/0003-gold-target.patch b/external/gpl3/binutils/patches/0003-gold-target.patch deleted file mode 100644 index 98f1ab318..000000000 --- a/external/gpl3/binutils/patches/0003-gold-target.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- dist/gold/i386.cc.orig 2014-03-03 15:51:57.725314830 +0100 -+++ dist/gold/i386.cc 2014-03-03 16:09:42.514935341 +0100 -@@ -3813,8 +3813,8 @@ - public: - Target_selector_i386() - : Target_selector_freebsd(elfcpp::EM_386, 32, false, -- "elf32-i386", "elf32-i386-freebsd", -- "elf_i386") -+ "elf_i386_minix", "elf32-i386-freebsd", -+ "elf_i386_minix") - { } - - Target* diff --git a/external/gpl3/binutils/patches/0004-libdl-and-reconf.patch b/external/gpl3/binutils/patches/0004-libdl-and-reconf.patch deleted file mode 100644 index 2d387960c..000000000 --- a/external/gpl3/binutils/patches/0004-libdl-and-reconf.patch +++ /dev/null @@ -1,238 +0,0 @@ -diff --git a/bfd/Makefile.am b/bfd/Makefile.am -index 49f9662..2ac03e9 100644 ---- a/bfd/Makefile.am -+++ b/bfd/Makefile.am -@@ -35,7 +35,7 @@ AM_CFLAGS = $(WARN_CFLAGS) - AM_CPPFLAGS = -DBINDIR='"$(bindir)"' - if PLUGINS - bfdinclude_HEADERS += $(INCDIR)/plugin-api.h --LIBDL = -ldl -+LIBDL = @lt_cv_dlopen_libs@ - endif - - # bfd.h goes here, for now -diff --git a/bfd/Makefile.in b/bfd/Makefile.in -index 5718fab..7b0f863 100644 ---- a/bfd/Makefile.in -+++ b/bfd/Makefile.in -@@ -293,6 +293,7 @@ libdir = @libdir@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_cv_dlopen_libs = @lt_cv_dlopen_libs@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -336,7 +337,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \ - @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la - AM_CFLAGS = $(WARN_CFLAGS) - AM_CPPFLAGS = -DBINDIR='"$(bindir)"' --@PLUGINS_TRUE@LIBDL = -ldl -+@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@ - - # bfd.h goes here, for now - BFD_H = bfd.h -diff --git a/bfd/configure b/bfd/configure -index d81719d..fdf5356 100755 ---- a/bfd/configure -+++ b/bfd/configure -@@ -606,6 +606,7 @@ havevecs - tdefaults - bfd_ufile_ptr - bfd_file_ptr -+lt_cv_dlopen_libs - supports_plugins - bfd_default_target_size - bfd_machines -diff --git a/bfd/configure.in b/bfd/configure.in -index 612d032..530bbcb 100644 ---- a/bfd/configure.in -+++ b/bfd/configure.in -@@ -1100,6 +1100,7 @@ else - supports_plugins=0 - fi - AC_SUBST(supports_plugins) -+AC_SUBST(lt_cv_dlopen_libs) - - # Determine the host dependant file_ptr a.k.a. off_t type. In order - # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and -diff --git a/gold/Makefile.am b/gold/Makefile.am -index df8dcb5..f6ced44 100644 ---- a/gold/Makefile.am -+++ b/gold/Makefile.am -@@ -37,7 +38,7 @@ AM_CPPFLAGS = \ - LIBIBERTY = ../libiberty/libiberty.a - - if PLUGINS --LIBDL = -ldl -+LIBDL = @DLOPEN_LIBS@ - endif - - if THREADS -diff --git a/gold/Makefile.in b/gold/Makefile.in -index 216532a..f12832b 100644 ---- a/gold/Makefile.in -+++ b/gold/Makefile.in -@@ -272,6 +273,7 @@ CYGPATH_W = @CYGPATH_W@ - DATADIRNAME = @DATADIRNAME@ - DEFS = @DEFS@ - DEPDIR = @DEPDIR@ -+DLOPEN_LIBS = @DLOPEN_LIBS@ - ECHO_C = @ECHO_C@ - ECHO_N = @ECHO_N@ - ECHO_T = @ECHO_T@ -@@ -398,7 +400,7 @@ AM_CPPFLAGS = \ - -DTOOLLIBDIR="\"$(tooldir)/lib\"" @INCINTL@ - - LIBIBERTY = ../libiberty/libiberty.a --@PLUGINS_TRUE@LIBDL = -ldl -+@PLUGINS_TRUE@LIBDL = @DLOPEN_LIBS@ - @THREADS_TRUE@THREADSLIB = -lpthread - AM_YFLAGS = -d - -diff --git a/gold/config.in b/gold/config.in -index 42252bf..d46fd75 100644 ---- a/gold/config.in -+++ b/gold/config.in -@@ -73,6 +73,9 @@ - don't. */ - #undef HAVE_DECL_VSNPRINTF - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_DLFCN_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_EXT_HASH_MAP - -@@ -184,6 +187,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_WINDOWS_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_ZLIB_H - -diff --git a/gold/configure b/gold/configure -index 9e1ee27..7e58cdf 100755 ---- a/gold/configure -+++ b/gold/configure -@@ -596,6 +596,7 @@ MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - HAVE_PUBNAMES_FALSE - HAVE_PUBNAMES_TRUE -+DLOPEN_LIBS - CXXCPP - HAVE_ZLIB_FALSE - HAVE_ZLIB_TRUE -@@ -7139,6 +7140,35 @@ fi - - done - -+ -+for ac_header in windows.h -+do : -+ ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -+if test "x$ac_cv_header_windows_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_WINDOWS_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+for ac_header in dlfcn.h -+do : -+ ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -+if test "x$ac_cv_header_dlfcn_h" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DLFCN_H 1 -+_ACEOF -+ DLOPEN_LIBS="-ldl" -+else -+ DLOPEN_LIBS="" -+fi -+ -+done -+ -+ -+ - for ac_func in mallinfo posix_fallocate fallocate readv sysconf times - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -diff --git a/gold/configure.ac b/gold/configure.ac -index 804a474..b03c09d 100644 ---- a/gold/configure.ac -+++ b/gold/configure.ac -@@ -505,6 +506,13 @@ AC_LANG_PUSH(C++) - AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) - AC_CHECK_HEADERS(ext/hash_map ext/hash_set) - AC_CHECK_HEADERS(byteswap.h) -+ -+dnl When plugins enabled dynamic loader interface is required. Check headers -+dnl which may provide this interface. In case of dlfcn.h add libdl to link. -+AC_CHECK_HEADERS(windows.h) -+AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""]) -+AC_SUBST(DLOPEN_LIBS) -+ - AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times) - AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp, strndup, memmem]) - -diff --git a/gold/plugin.cc b/gold/plugin.cc -index c39e11ec..9176e06 100644 ---- a/gold/plugin.cc -+++ b/gold/plugin.cc -@@ -29,9 +29,39 @@ - #include - - #ifdef ENABLE_PLUGINS -+#ifdef HAVE_DLFCN_H - #include -+#elif defined (HAVE_WINDOWS_H) -+#include -+#else -+#error Unknown how to handle dynamic-load-libraries. - #endif - -+#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) -+ -+#define RTLD_NOW 0 /* Dummy value. */ -+static void * -+dlopen(const char *file, int mode ATTRIBUTE_UNUSED) -+{ -+ return LoadLibrary(file); -+} -+ -+static void * -+dlsym(void *handle, const char *name) -+{ -+ return reinterpret_cast( -+ GetProcAddress(static_cast(handle),name)); -+} -+ -+static const char * -+dlerror(void) -+{ -+ return "unable to load dll"; -+} -+ -+#endif /* !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) */ -+#endif /* ENABLE_PLUGINS */ -+ - #include "parameters.h" - #include "errors.h" - #include "fileread.h" -diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in -index 6e22934..b2eb352 100644 ---- a/gold/testsuite/Makefile.in -+++ b/gold/testsuite/Makefile.in -@@ -1878,6 +1878,7 @@ CYGPATH_W = @CYGPATH_W@ - DATADIRNAME = @DATADIRNAME@ - DEFS = @DEFS@ - DEPDIR = @DEPDIR@ -+DLOPEN_LIBS = @DLOPEN_LIBS@ - ECHO_C = @ECHO_C@ - ECHO_N = @ECHO_N@ - ECHO_T = @ECHO_T@ diff --git a/external/gpl3/binutils/patches/0005-gold-libdl.patch b/external/gpl3/binutils/patches/0005-gold-libdl.patch deleted file mode 100644 index f9d805cab..000000000 --- a/external/gpl3/binutils/patches/0005-gold-libdl.patch +++ /dev/null @@ -1,112 +0,0 @@ -commit 6632e8ccecd8fe5de18ad78ced1c14755a24b169 -Author: Cary Coutant -Date: Fri Nov 22 15:46:51 2013 -0800 - - Add check for which library is needed for dlopen. - - gold/ - PR gold/16203 - * configure.ac: Add check for which library is needed for - dlopen. - * configure: Regenerate. - -diff --git a/gold/configure b/gold/configure -index 83f5aa9..24140cf 100755 ---- a/gold/configure -+++ b/gold/configure -@@ -7193,13 +7193,71 @@ if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF - #define HAVE_DLFCN_H 1 - _ACEOF -- DLOPEN_LIBS="-ldl" --else -- DLOPEN_LIBS="" -+ - fi - - done - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -+$as_echo_n "checking for library containing dlopen... " >&6; } -+if test "${ac_cv_search_dlopen+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_func_search_save_LIBS=$LIBS -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char dlopen (); -+int -+main () -+{ -+return dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+for ac_lib in '' dl dld; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ if ac_fn_cxx_try_link "$LINENO"; then : -+ ac_cv_search_dlopen=$ac_res -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext -+ if test "${ac_cv_search_dlopen+set}" = set; then : -+ break -+fi -+done -+if test "${ac_cv_search_dlopen+set}" = set; then : -+ -+else -+ ac_cv_search_dlopen=no -+fi -+rm conftest.$ac_ext -+LIBS=$ac_func_search_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -+$as_echo "$ac_cv_search_dlopen" >&6; } -+ac_res=$ac_cv_search_dlopen -+if test "$ac_res" != no; then : -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -+ -+fi -+ -+case "$ac_cv_search_dlopen" in -+ no*) DLOPEN_LIBS="";; -+ *) DLOPEN_LIBS="$ac_cv_search_dlopen";; -+esac - - - for ac_func in mallinfo posix_fallocate fallocate readv sysconf times -diff --git a/gold/configure.ac b/gold/configure.ac -index 82ad11e..9bc216b 100644 ---- a/gold/configure.ac -+++ b/gold/configure.ac -@@ -528,9 +528,14 @@ AC_CHECK_HEADERS(ext/hash_map ext/hash_set) - AC_CHECK_HEADERS(byteswap.h) - - dnl When plugins enabled dynamic loader interface is required. Check headers --dnl which may provide this interface. In case of dlfcn.h add libdl to link. -+dnl which may provide this interface. Add the necessary library to link. - AC_CHECK_HEADERS(windows.h) --AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""]) -+AC_CHECK_HEADERS(dlfcn.h) -+AC_SEARCH_LIBS(dlopen, [dl dld]) -+case "$ac_cv_search_dlopen" in -+ no*) DLOPEN_LIBS="";; -+ *) DLOPEN_LIBS="$ac_cv_search_dlopen";; -+esac - AC_SUBST(DLOPEN_LIBS) - - AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times) diff --git a/external/gpl3/binutils/patches/0006-gold-plt.patch b/external/gpl3/binutils/patches/0006-gold-plt.patch deleted file mode 100644 index f7fe9f6d6..000000000 --- a/external/gpl3/binutils/patches/0006-gold-plt.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit 31245c9b262fa983d9711f7795b35ad31c3a6618 -Author: Ben Gras -Date: Sat May 3 19:40:19 2014 +0200 - - plt - -diff --git a/gold/i386.cc b/gold/i386.cc -index a2f7522..f06d60d 100644 ---- a/gold/i386.cc -+++ b/gold/i386.cc -@@ -2543,6 +2543,10 @@ Target_i386::do_finalize_sections( - Symbol* sym = this->global_offset_table_; - if (sym != NULL) - { -+ // create a plt -+ if (this->plt_ == NULL) -+ this->make_plt_section(symtab, layout); -+ - uint32_t data_size = this->got_plt_->current_data_size(); - symtab->get_sized_symbol<32>(sym)->set_symsize(data_size); - } diff --git a/external/gpl3/binutils/patches/0007-gold-as-tool-on-minix.patch b/external/gpl3/binutils/patches/0007-gold-as-tool-on-minix.patch deleted file mode 100644 index 6788495af..000000000 --- a/external/gpl3/binutils/patches/0007-gold-as-tool-on-minix.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff -rNU3 dist/gold/configure dist.mxm/gold/configure ---- dist/gold/configure 2014-07-14 18:21:16.292364610 +0200 -+++ dist.mxm/gold/configure 2014-07-14 18:25:08.509642134 +0200 -@@ -7106,6 +7106,20 @@ - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -+for ac_header in unordered_set unordered_map -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -+eval as_val=\$$as_ac_Header -+ if test "x$as_val" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ - for ac_header in tr1/unordered_set tr1/unordered_map - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -diff -rNU3 dist/gold/configure.ac dist.mxm/gold/configure.ac ---- dist/gold/configure.ac 2014-07-14 18:21:16.292364610 +0200 -+++ dist.mxm/gold/configure.ac 2014-07-14 18:15:57.376945885 +0200 -@@ -496,6 +496,7 @@ - - AC_LANG_PUSH(C++) - -+AC_CHECK_HEADERS(unordered_set unordered_map) - AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) - AC_CHECK_HEADERS(ext/hash_map ext/hash_set) - AC_CHECK_HEADERS(byteswap.h) -diff -rNU3 dist/gold/gold.h dist.mxm/gold/gold.h ---- dist/gold/gold.h 2012-11-09 09:21:28.000000000 +0100 -+++ dist.mxm/gold/gold.h 2014-07-14 18:18:04.885779352 +0200 -@@ -66,7 +66,20 @@ - - // Figure out how to get a hash set and a hash map. - --#if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \ -+#if defined(HAVE_UNORDERED_SET) && defined(HAVE_UNORDERED_MAP) -+ -+#include -+#include -+ -+// We need a template typedef here. -+ -+#define Unordered_set std::unordered_set -+#define Unordered_map std::unordered_map -+#define Unordered_multimap std::unordered_multimap -+ -+#define reserve_unordered_map(map, n) ((map)->rehash(n)) -+ -+#elif defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \ - && defined(HAVE_TR1_UNORDERED_MAP_REHASH) - - #include -diff -rNU3 dist/gold/stringpool.cc dist.mxm/gold/stringpool.cc ---- dist/gold/stringpool.cc 2010-08-25 10:36:54.000000000 +0200 -+++ dist.mxm/gold/stringpool.cc 2014-07-14 18:19:48.650875718 +0200 -@@ -72,7 +72,10 @@ - { - this->key_to_offset_.reserve(n); - --#if defined(HAVE_TR1_UNORDERED_MAP) -+#if defined(HAVE_UNORDERED_MAP) -+ this->string_set_.rehash(this->string_set_.size() + n); -+ return; -+#elif defined(HAVE_TR1_UNORDERED_MAP) - // rehash() implementation is broken in gcc 4.0.3's stl - //this->string_set_.rehash(this->string_set_.size() + n); - //return; -@@ -499,7 +502,7 @@ - void - Stringpool_template::print_stats(const char* name) const - { --#if defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_EXT_HASH_MAP) -+#if defined(HAVE_UNORDERED_MAP) || defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_EXT_HASH_MAP) - fprintf(stderr, _("%s: %s entries: %zu; buckets: %zu\n"), - program_name, name, this->string_set_.size(), - this->string_set_.bucket_count()); -diff -rNU3 dist/gold/config.in dist.mxm/gold/config.in ---- dist/gold/config.in 2014-07-14 19:21:52.217425468 +0200 -+++ dist.mxm/gold/config.in 2014-07-14 20:08:52.208824229 +0200 -@@ -175,6 +175,12 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_UNORDERED_MAP -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_UNORDERED_SET -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_WINDOWS_H - -diff -rNU3 dist/include/safe-ctype.h dist.mxm/include/safe-ctype.h ---- dist/include/safe-ctype.h 2008-07-07 19:09:31.000000000 +0200 -+++ dist.mxm/include/safe-ctype.h 2014-07-15 10:49:44.583026808 +0200 -@@ -119,6 +119,7 @@ - including another system header (for instance gnulib's stdint.h). - So we include ctype.h here and then immediately redefine its macros. */ - -+#if !defined(__minix) || !defined(__clang__) - #include - #undef isalpha - #define isalpha(c) do_not_use_isalpha_with_safe_ctype -@@ -145,6 +146,34 @@ - #undef toupper - #define toupper(c) do_not_use_toupper_with_safe_ctype - #undef tolower --#define tolower(c) do_not_use_tolower_with_safe_ctype -+#else -+#include -+#undef isalpha -+#define isalpha(c) ISALPHA(c) -+#undef isalnum -+#define isalnum(c) ISALNUM(c) -+#undef iscntrl -+#define iscntrl(c) ISCNTRL(c) -+#undef isdigit -+#define isdigit(c) ISDIGIT(c) -+#undef isgraph -+#define isgraph(c) ISGRAPH(c) -+#undef islower -+#define islower(c) ISLOWER(c) -+#undef isprint -+#define isprint(c) ISPRINT(c) -+#undef ispunct -+#define ispunct(c) ISPUNCT(c) -+#undef isspace -+#define isspace(c) ISSPACE(c) -+#undef isupper -+#define isupper(c) ISUPPER(c) -+#undef isxdigit -+#define isxdigit(c) ISXDIGIT(c) -+#undef toupper -+#define toupper(c) TOUPPER(c) -+#undef tolower -+#define tolower(c) TOLOWER(c) -+#endif /* !defined(__minix) || !defined(__clang__) */ - - #endif /* SAFE_CTYPE_H */ diff --git a/external/gpl3/binutils/patches/0008-Fix-build-error-on-OSX.patch b/external/gpl3/binutils/patches/0008-Fix-build-error-on-OSX.patch deleted file mode 100644 index 83f57ab59..000000000 --- a/external/gpl3/binutils/patches/0008-Fix-build-error-on-OSX.patch +++ /dev/null @@ -1,40 +0,0 @@ -From aff3cc514eff051c4c4a838d6c927c816733b01a Mon Sep 17 00:00:00 2001 -From: Thomas Veerman -Date: Fri, 10 Oct 2014 12:17:39 +0200 -Subject: [PATCH] Fix build error on OSX - -When building Gold on OSX 10.9 and Clang 6.0, the build process fails -with the error: - - In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/binary.cc:31: - In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/stringpool.h:23: - In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438: - In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107: - In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54: - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72: error: use of undeclared identifier 'do_not_use_isalnum_with_safe_ctype' - inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);} - -Signed-off-by: Thomas Veerman ---- - gold/binary.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gold/binary.cc b/gold/binary.cc -index 4dab52c..77a78f0 100644 ---- a/gold/binary.cc -+++ b/gold/binary.cc -@@ -24,10 +24,10 @@ - - #include - #include -+#include "stringpool.h" - #include "safe-ctype.h" - - #include "elfcpp.h" --#include "stringpool.h" - #include "fileread.h" - #include "output.h" - #include "binary.h" --- -1.7.12.4 (Apple Git-37) - diff --git a/external/gpl3/binutils/patches/0009-Slash-means-divide.patch b/external/gpl3/binutils/patches/0009-Slash-means-divide.patch deleted file mode 100644 index 5c4755630..000000000 --- a/external/gpl3/binutils/patches/0009-Slash-means-divide.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rNU3 dist.orig/gas/config/tc-i386.c dist/gas/config/tc-i386.c ---- dist.orig/gas/config/tc-i386.c 2012-11-09 14:32:04.000000000 +0100 -+++ dist/gas/config/tc-i386.c 2015-10-17 16:40:27.000000000 +0200 -@@ -317,6 +317,7 @@ - && !defined (TE_NETWARE) \ - && !defined (TE_FreeBSD) \ - && !defined (TE_DragonFly) \ -+ && !defined (TE_MINIX) \ - && !defined (TE_NetBSD))) - /* This array holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful. The option diff --git a/external/gpl3/binutils/patches/0010-armelf_minix-update.patch b/external/gpl3/binutils/patches/0010-armelf_minix-update.patch deleted file mode 100644 index b4e463a44..000000000 --- a/external/gpl3/binutils/patches/0010-armelf_minix-update.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -rNU3 dist.orig/ld/emulparams/armelf_minix.sh dist/ld/emulparams/armelf_minix.sh ---- dist.orig/ld/emulparams/armelf_minix.sh 2015-12-20 16:45:57.000000000 +0100 -+++ dist/ld/emulparams/armelf_minix.sh 2016-01-13 13:21:27.000000000 +0100 -@@ -3,13 +3,19 @@ - OUTPUT_FORMAT="elf32-littlearm" - MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" - COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -- --DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; -+TEXT_START_ADDR=0x00010000 - - # Dynamic libraries support --GENERATE_SHLIB_SCRIPT=yes - TARGET2_TYPE=got-rel - --GENERATE_PIE_SCRIPT=yes -- - unset EMBEDDED -+unset DATA_START_SYMBOLS -+unset STACK_ADDR -+ -+# Use the ARM ABI-compliant exception-handling sections. -+OTHER_READONLY_SECTIONS=" -+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } -+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" -+ diff --git a/external/gpl3/binutils/usr.bin/Makefile b/external/gpl3/binutils/usr.bin/Makefile index 1ec042e3d..ba65afdd3 100644 --- a/external/gpl3/binutils/usr.bin/Makefile +++ b/external/gpl3/binutils/usr.bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2013/08/06 05:35:57 matt Exp $ +# $NetBSD: Makefile,v 1.6 2016/01/29 14:42:48 christos Exp $ .include @@ -7,7 +7,7 @@ BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} .if ${MKBINUTILS} != "no" && exists(${.CURDIR}/common/arch/${BINUTILS_MACHINE_ARCH}/defs.mk) .include "${.CURDIR}/common/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" -SSUBDIR+= gas gprof ld ${G_PROGRAMS:C/-new$//:C/sysdump//:C/srconv//:cxxfilt=c++filt} +SSUBDIR+= gas gprof ld ${G_PROGRAMS:C/-new$//:C/sysdump//:C/bfdtest1//:C/bfdtest2//:C/srconv//:cxxfilt=c++filt/} SUBDIR+= common .WAIT ${SSUBDIR:O} # alphabetize .endif # MKBINUTILS != no diff --git a/external/gpl3/binutils/usr.bin/Makefile.inc b/external/gpl3/binutils/usr.bin/Makefile.inc index 2e860ad98..1d5cc5edf 100644 --- a/external/gpl3/binutils/usr.bin/Makefile.inc +++ b/external/gpl3/binutils/usr.bin/Makefile.inc @@ -1,20 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/08/06 05:35:57 matt Exp $ +# $NetBSD: Makefile.inc,v 1.7 2016/01/26 19:37:47 christos Exp $ BINDIR?= /usr/bin - -.if !defined(__MAKEFILE_INC_INCLUDED__) -__MAKEFILE_INC_INCLUDED__=1 - -.include - -BINUTILS_MACHINE_ARCH= ${MACHINE_ARCH:C/armv[4-7]/arm/} - -GNUHOSTDIST= ${DIST} -GNUCPPFLAGS= ${G_DEFS} ${G_INCLUDES} -CPPFLAGS+= ${GNUCPPFLAGS:M-D*:N-DLOCALEDIR*} ${GNUCPPFLAGS:M-I*:N-I.*} \ - -I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} \ - -I${DIST}/include -I${DIST}/bfd -I${DIST}/binutils \ - -DLOCALEDIR=\"${LOCALEDIR}\" NOGCCERROR= # defined - -.endif # __MAKEFILE_INC_INCLUDED__ +.include "${.PARSEDIR}/../Makefile.inc" diff --git a/external/gpl3/binutils/usr.bin/addr2line/Makefile b/external/gpl3/binutils/usr.bin/addr2line/Makefile index fa65632fb..18ed457c7 100644 --- a/external/gpl3/binutils/usr.bin/addr2line/Makefile +++ b/external/gpl3/binutils/usr.bin/addr2line/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:07 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:47 christos Exp $ PROG= addr2line -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/ar/Makefile b/external/gpl3/binutils/usr.bin/ar/Makefile index 421fbce6a..d7468b480 100644 --- a/external/gpl3/binutils/usr.bin/ar/Makefile +++ b/external/gpl3/binutils/usr.bin/ar/Makefile @@ -1,10 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2011/09/25 04:32:46 christos Exp $ +# $NetBSD: Makefile,v 1.3 2016/01/26 19:37:47 christos Exp $ PROG= ar COPTS.arparse.c = -Wno-stack-protector CPPFLAGS+=-Dbin_dummy_emulation=bin_vanilla_emulation -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/c++filt/Makefile b/external/gpl3/binutils/usr.bin/c++filt/Makefile index 7ce0f008a..b96238d3c 100644 --- a/external/gpl3/binutils/usr.bin/c++filt/Makefile +++ b/external/gpl3/binutils/usr.bin/c++filt/Makefile @@ -1,11 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:08 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:47 christos Exp $ PROG= c++filt CPPFLAGS+= -DMAIN CLEANFILES+= c++filt.1 -.include - .include "${.CURDIR}/../common/Makefile.prog" .PATH: ${DIST}/libiberty diff --git a/external/gpl3/binutils/usr.bin/coffdump/Makefile b/external/gpl3/binutils/usr.bin/coffdump/Makefile index 4d200db27..d5dc33bc6 100644 --- a/external/gpl3/binutils/usr.bin/coffdump/Makefile +++ b/external/gpl3/binutils/usr.bin/coffdump/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:08 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:47 christos Exp $ PROG= coffdump -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/common/Makefile b/external/gpl3/binutils/usr.bin/common/Makefile index 58eb946f4..3a3d698fb 100644 --- a/external/gpl3/binutils/usr.bin/common/Makefile +++ b/external/gpl3/binutils/usr.bin/common/Makefile @@ -1,8 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2013/08/05 00:08:58 matt Exp $ - -.include - -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils +# $NetBSD: Makefile,v 1.7 2016/01/26 19:37:47 christos Exp $ .include "${.CURDIR}/../common/Makefile.inc" .include "${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" diff --git a/external/gpl3/binutils/usr.bin/common/Makefile.inc b/external/gpl3/binutils/usr.bin/common/Makefile.inc index 389f12a8d..271edda00 100644 --- a/external/gpl3/binutils/usr.bin/common/Makefile.inc +++ b/external/gpl3/binutils/usr.bin/common/Makefile.inc @@ -1,10 +1,19 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/08/06 05:35:57 matt Exp $ +# $NetBSD: Makefile.inc,v 1.4 2016/01/26 19:37:47 christos Exp $ .if !defined(__COMMON_MAKEFILE_INC_INCLUDED__) __COMMON_MAKEFILE_INC_INCLUDED__=1 +.include + +BINUTILS_MACHINE_ARCH= ${MACHINE_ARCH:C/armv[4-7]/arm/} + +GNUHOSTDIST= ${DIST} +GNUCPPFLAGS= ${G_DEFS} ${G_INCLUDES} +CPPFLAGS+= ${GNUCPPFLAGS:M-D*:N-DLOCALEDIR*} ${GNUCPPFLAGS:M-I*:N-I.*} \ + -I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} \ + -I${DIST}/include -I${DIST}/bfd -I${DIST}/binutils \ + -DLOCALEDIR=\"${LOCALEDIR}\" BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} -DIST= ${NETBSDSRCDIR}/external/gpl3/binutils/dist BFDSUBDIR= lib .endif diff --git a/external/gpl3/binutils/usr.bin/common/Makefile.prog b/external/gpl3/binutils/usr.bin/common/Makefile.prog index 587159401..5758deb2b 100644 --- a/external/gpl3/binutils/usr.bin/common/Makefile.prog +++ b/external/gpl3/binutils/usr.bin/common/Makefile.prog @@ -1,13 +1,12 @@ -# $NetBSD: Makefile.prog,v 1.9 2013/08/06 05:35:57 matt Exp $ +# $NetBSD: Makefile.prog,v 1.10 2016/01/26 19:37:47 christos Exp $ # # Common Makefile fragment for a binutils program. # -.include - BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} +CPPFLAGS+= -I${.CURDIR}/../common/arch/${BINUTILS_MACHINE_ARCH} -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils +.include .include "${.CURDIR}/../common/Makefile.inc" .include "${.CURDIR}/../common/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" @@ -20,7 +19,6 @@ SRCS= ${G_${BUPROG}_OBJECTS:.o=.c} \ ${G_${BUPROG}_DEPENDENCIES:M*.o:.o=.c} MAN= ${G_man_MANS:M${PROG}.1} -CPPFLAGS+= -I${.CURDIR}/../common/arch/${BINUTILS_MACHINE_ARCH} .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*) PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes diff --git a/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h b/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h index 105acc14b..3d999fbdd 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk index 72107e7fd..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/config.h b/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/config.h new file mode 100644 index 000000000..229e3fa23 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/config.h @@ -0,0 +1,309 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Should ar and ranlib use -D behavior by default? */ +#define DEFAULT_AR_DETERMINISTIC 0 + +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Suffix used for executables, if any. */ +#define EXECUTABLE_SUFFIX "" + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the declaration of `environ', and to 0 if you + don't. */ +#define HAVE_DECL_ENVIRON 0 + +/* Define to 1 if you have the declaration of `fprintf', and to 0 if you + don't. */ +#define HAVE_DECL_FPRINTF 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. + */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Does the platform use an executable suffix? */ +/* #undef HAVE_EXECUTABLE_SUFFIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getc_unlocked' function. */ +#define HAVE_GETC_UNLOCKED 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Does define struct utimbuf? */ +#define HAVE_GOOD_UTIME_H 1 + +/* Define if you have the iconv() function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + +/* Define if mbstate_t exists in wchar.h. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +#define HAVE_MKDTEMP 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setmode' function. */ +#define HAVE_SETMODE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcoll' function. */ +#define HAVE_STRCOLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TIME_H 1 + +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "binutils" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "binutils" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "binutils 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "binutils" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Configured target name. */ +#define TARGET "aarch64_be--netbsd" + +/* Define to 1 if user symbol names have a leading underscore, 0 if not. */ +#define TARGET_PREPENDS_UNDERSCORE 0 + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.34" + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..8d338db83 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/common/arch/aarch64eb/defs.mk @@ -0,0 +1,40 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_VERSION=2.34 +G_DEFS=-DHAVE_CONFIG_H +G_INCLUDES= +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_TEXINFOS=binutils.texi +G_PKGVERSION=(NetBSD Binutils nb1) +G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} +G_size_OBJECTS=size.o bucomm.o version.o filemode.o +G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la +G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o +G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o +G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o +G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o +G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la +G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o +G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o +G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o +G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h b/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h index b6959eeee..0b3122eba 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/alpha/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/alpha/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/arm/config.h b/external/gpl3/binutils/usr.bin/common/arch/arm/config.h index 1bd28988a..a458d0cb1 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/arm/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/arm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/arm/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/arm/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/arm/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/arm/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/armeb/config.h b/external/gpl3/binutils/usr.bin/common/arch/armeb/config.h index 05a9dca2d..95cd98a2e 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/armeb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/armeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/armeb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/armeb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/armeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/armeb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/coldfire/config.h b/external/gpl3/binutils/usr.bin/common/arch/coldfire/config.h index 1735e8d6a..f6f9b2776 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/coldfire/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/coldfire/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -68,6 +71,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -106,6 +113,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -172,11 +182,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +199,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,7 +265,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/coldfire/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/coldfire/defs.mk index e7616a664..9408644dd 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/coldfire/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/coldfire/defs.mk @@ -1,11 +1,11 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.26.1 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) @@ -34,3 +34,7 @@ G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/earm/config.h b/external/gpl3/binutils/usr.bin/common/arch/earm/config.h index 05c1edee3..4e0cd9eac 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earm/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/earm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -39,6 +42,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -70,6 +77,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -90,6 +101,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -104,6 +118,9 @@ #define HAVE_LC_MESSAGES 1 #endif /* !defined(__minix) */ +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -112,6 +129,9 @@ #define HAVE_LOCALE_H 1 #endif /* !defined(__minix) */ +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -124,6 +144,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -182,11 +205,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -199,19 +222,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -259,12 +288,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -280,3 +314,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/earm/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/earm/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earm/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/earm/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmeb/config.h b/external/gpl3/binutils/usr.bin/common/arch/earmeb/config.h index 40030d990..650da8787 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmeb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/earmeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmeb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/earmeb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/earmeb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmhf/config.h b/external/gpl3/binutils/usr.bin/common/arch/earmhf/config.h index ee219d291..f8add3d8b 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmhf/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/earmhf/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmhf/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/earmhf/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmhf/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/earmhf/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/config.h b/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/config.h index f4ec757a7..9077118ac 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/earmhfeb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/hppa/config.h b/external/gpl3/binutils/usr.bin/common/arch/hppa/config.h index ab7bf2881..5ce4e46c7 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/hppa/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/hppa/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/hppa/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/hppa/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/hppa/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/hppa/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/i386/config.h b/external/gpl3/binutils/usr.bin/common/arch/i386/config.h index 7f73f04e0..820fd4536 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/i386/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/i386/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -39,6 +42,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -70,6 +77,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -90,6 +101,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -104,6 +118,9 @@ #define HAVE_LC_MESSAGES 1 #endif /* !defined(__minix) */ +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -112,6 +129,9 @@ #define HAVE_LOCALE_H 1 #endif /* !defined(__minix) */ +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -124,6 +144,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -182,11 +205,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -199,19 +222,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -259,12 +288,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -280,3 +314,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk index e7616a664..6a244f9c7 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/ia64/config.h b/external/gpl3/binutils/usr.bin/common/arch/ia64/config.h index 6ee278610..efe9cffbb 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/ia64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/ia64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,8 +138,11 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ -/* #undef HAVE_SBRK */ +#define HAVE_SBRK 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/ia64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/ia64/defs.mk index 81b76b45f..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/ia64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/ia64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/m68000/config.h b/external/gpl3/binutils/usr.bin/common/arch/m68000/config.h index 79d185926..91835cef0 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/m68000/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/m68000/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/m68000/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/m68000/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/m68000/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/m68000/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h b/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h index d75e89454..cd3993d7f 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/m68k/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/m68k/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h b/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h index f05082116..4d950e57c 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/mips64eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/mips64eb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h b/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h index 24dbf4223..9e55377dd 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/mips64el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/mips64el/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h b/external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h index e7073bf87..b6d94a3ab 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/mipseb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/mipseb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h b/external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h index 8ee2006fb..4915a530f 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/mipsel/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/mipsel/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/or1k/config.h b/external/gpl3/binutils/usr.bin/common/arch/or1k/config.h index 4ea901cd9..3c55b0264 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/or1k/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/or1k/config.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -68,6 +71,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -106,6 +113,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -172,11 +182,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +199,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -218,7 +234,7 @@ #define STRING_WITH_STRINGS 1 /* Configured target name. */ -#define TARGET "or1k-unknown-netbsd" +#define TARGET "or1k--netbsd" /* Define to 1 if user symbol names have a leading underscore, 0 if not. */ #define TARGET_PREPENDS_UNDERSCORE 0 @@ -249,11 +265,11 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ -/* #undef YYTEXT_POINTER */ +#define YYTEXT_POINTER 1 /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/or1k/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/or1k/defs.mk index 81b76b45f..9408644dd 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/or1k/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/or1k/defs.mk @@ -2,10 +2,10 @@ # Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.26.1 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) @@ -34,3 +34,7 @@ G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h b/external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h index 054e8a8f7..a292eb968 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/powerpc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/powerpc/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h b/external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h index 59540dd4f..549e1acf2 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/powerpc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk index d821d1b31..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/powerpc64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/riscv32/config.h b/external/gpl3/binutils/usr.bin/common/arch/riscv32/config.h index b28ac7b06..7887263ca 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/riscv32/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/riscv32/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -218,7 +247,7 @@ #define STRING_WITH_STRINGS 1 /* Configured target name. */ -#define TARGET "riscv32-ucb-netbsd" +#define TARGET "riscv32--netbsd" /* Define to 1 if user symbol names have a leading underscore, 0 if not. */ #define TARGET_PREPENDS_UNDERSCORE 0 @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/riscv32/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/riscv32/defs.mk index 81b76b45f..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/riscv32/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/riscv32/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/riscv64/config.h b/external/gpl3/binutils/usr.bin/common/arch/riscv64/config.h index 4b57db1b8..12c600671 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/riscv64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/riscv64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -218,7 +247,7 @@ #define STRING_WITH_STRINGS 1 /* Configured target name. */ -#define TARGET "riscv64-ucb-netbsd" +#define TARGET "riscv64--netbsd" /* Define to 1 if user symbol names have a leading underscore, 0 if not. */ #define TARGET_PREPENDS_UNDERSCORE 0 @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/riscv64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/riscv64/defs.mk index 81b76b45f..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/riscv64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/riscv64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/sh3eb/config.h b/external/gpl3/binutils/usr.bin/common/arch/sh3eb/config.h index aa672d4a0..fd6213950 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sh3eb/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/sh3eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/sh3eb/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/sh3eb/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sh3eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/sh3eb/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/sh3el/config.h b/external/gpl3/binutils/usr.bin/common/arch/sh3el/config.h index 830aed7b4..186674903 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sh3el/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/sh3el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,8 +195,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST const @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/sh3el/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/sh3el/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sh3el/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/sh3el/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h b/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h index a6b0b5f32..2467b0060 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h b/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h index f6d1424fb..965f8b800 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/sparc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/sparc64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/vax/config.h b/external/gpl3/binutils/usr.bin/common/arch/vax/config.h index 11520e70c..2e5029bf9 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/vax/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/vax/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk index e7616a664..8d338db83 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/common/arch/x86_64/config.h b/external/gpl3/binutils/usr.bin/common/arch/x86_64/config.h index 39d04695a..f59af309b 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/x86_64/config.h +++ b/external/gpl3/binutils/usr.bin/common/arch/x86_64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -23,6 +23,9 @@ /* Should ar and ranlib use -D behavior by default? */ #define DEFAULT_AR_DETERMINISTIC 0 +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -37,6 +40,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 @@ -68,6 +75,10 @@ */ #define HAVE_DECL_STPCPY 1 +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + /* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. */ #define HAVE_DECL_STRSTR 1 @@ -88,6 +99,9 @@ /* Define to 1 if you have the `getc_unlocked' function. */ #define HAVE_GETC_UNLOCKED 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Does define struct utimbuf? */ #define HAVE_GOOD_UTIME_H 1 @@ -100,12 +114,18 @@ /* Define if your file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 +/* Define to 1 if debuginfod is enabled. */ +/* #undef HAVE_LIBDEBUGINFOD */ + /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + /* Define if mbstate_t exists in wchar.h. */ #define HAVE_MBSTATE_T 1 @@ -118,6 +138,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -172,11 +195,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -189,19 +212,25 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "binutils" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "binutils 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "binutils" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -249,12 +278,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -270,3 +304,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/common/arch/x86_64/defs.mk b/external/gpl3/binutils/usr.bin/common/arch/x86_64/defs.mk index e7616a664..6a244f9c7 100644 --- a/external/gpl3/binutils/usr.bin/common/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/usr.bin/common/arch/x86_64/defs.mk @@ -1,36 +1,40 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_VERSION=2.23.2 +G_VERSION=2.34 G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= -G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt -G_man_MANS=addr2line.1 ar.1 dlltool.1 nlmconv.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 +G_PROGRAMS=size objdump ar strings ranlib objcopy addr2line readelf elfedit nm-new strip-new cxxfilt bfdtest1 bfdtest2 +G_man_MANS=addr2line.1 ar.1 dlltool.1 nm.1 objcopy.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 elfedit.1 windres.1 windmc.1 c++filt.1 G_TEXINFOS=binutils.texi G_PKGVERSION=(NetBSD Binutils nb1) G_REPORT_BUGS_TEXI=@uref{http://www.NetBSD.org/support/send-pr.html} G_size_OBJECTS=size.o bucomm.o version.o filemode.o G_size_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o -G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la +G_objdump_OBJECTS=objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o +G_objdump_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la ../opcodes/libopcodes.la ../libctf/libctf.la G_ar_OBJECTS=arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ar_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_strings_OBJECTS=strings.o bucomm.o version.o filemode.o G_strings_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_ranlib_OBJECTS=ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o G_ranlib_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_objcopy_OBJECTS=objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_objcopy_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_addr2line_OBJECTS=addr2line.o bucomm.o version.o filemode.o G_addr2line_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_readelf_OBJECTS=readelf.o version.o unwind-ia64.o dwarf.o elfcomm.o -G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a +G_readelf_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../libctf/libctf-nobfd.la G_elfedit_OBJECTS=elfedit.o version.o elfcomm.o G_elfedit_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a G_nm_new_OBJECTS=nm.o bucomm.o version.o filemode.o G_nm_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la -G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +G_strip_new_OBJECTS=objcopy.o is-strip.o rename.o rddbg.o debug.o stabs.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o G_strip_new_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la G_cxxfilt_OBJECTS=cxxfilt.o bucomm.o version.o filemode.o G_cxxfilt_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest1_OBJECTS=bfdtest1.o +G_bfdtest1_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la +G_bfdtest2_OBJECTS=bfdtest2.o +G_bfdtest2_DEPENDENCIES=./../intl/libintl.a ../libiberty/libiberty.a ../bfd/libbfd.la diff --git a/external/gpl3/binutils/usr.bin/elfedit/Makefile b/external/gpl3/binutils/usr.bin/elfedit/Makefile index bcc21f3b7..f1a784cb9 100644 --- a/external/gpl3/binutils/usr.bin/elfedit/Makefile +++ b/external/gpl3/binutils/usr.bin/elfedit/Makefile @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2011/09/25 04:32:46 christos Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:47 christos Exp $ PROG= elfedit SRCS= elfcomm.c elfedit.c -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/gas/Makefile b/external/gpl3/binutils/usr.bin/gas/Makefile index ed3744c9c..1f9289e9f 100644 --- a/external/gpl3/binutils/usr.bin/gas/Makefile +++ b/external/gpl3/binutils/usr.bin/gas/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.12 2013/10/02 14:35:33 christos Exp $ +# $NetBSD: Makefile,v 1.13 2016/01/26 19:37:47 christos Exp $ -.include - -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils +CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} +CPPFLAGS+= -I${DIST}/gas -I${DIST}/gas/config +CPPFLAGS+= -I${DIST} .include "${.CURDIR}/../common/Makefile.inc" .include "${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" @@ -20,10 +20,6 @@ COPTS.symbols.c = -Wno-stack-protector COPTS.stabs.c = -Wno-stack-protector COPTS.macro.c = -Wno-stack-protector -CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} -CPPFLAGS+= -I${DIST}/gas -I${DIST}/gas/config -CPPFLAGS+= -I${DIST} - PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h index 552fb7009..29acba00c 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -33,7 +33,7 @@ /* #undef C_ALLOCA */ /* Default architecture. */ -/* #undef DEFAULT_ARCH */ +#define DEFAULT_ARCH "aarch64" /* Default CRIS architecture. */ /* #undef DEFAULT_CRIS_ARCH */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/config.h new file mode 100644 index 000000000..93424eeb1 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/config.h @@ -0,0 +1,421 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if using AIX 5.2 value for C_WEAKEXT. */ +/* #undef AIX_WEAK_SUPPORT */ + +/* assert broken? */ +/* #undef BROKEN_ASSERT */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Compiling cross-assembler? */ +/* #undef CROSS_COMPILE */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Default architecture. */ +#define DEFAULT_ARCH "aarch64" + +/* Default CRIS architecture. */ +/* #undef DEFAULT_CRIS_ARCH */ + +/* Default emulation. */ +#define DEFAULT_EMULATION "" + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + +/* Supported emulations. */ +#define EMULATIONS + +/* Define if you want run-time sanity checks. */ +/* #undef ENABLE_CHECKING */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if you have the declaration of `mempcpy', and to 0 if you + don't. */ +#define HAVE_DECL_MEMPCPY 0 + +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `remove' function. */ +/* #undef HAVE_REMOVE */ + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define if has struct stat.st_mtim.tv_nsec */ +#define HAVE_ST_MTIM_TV_NSEC 1 + +/* Define if has struct stat.st_mtim.tv_sec */ +#define HAVE_ST_MTIM_TV_SEC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define if has struct tm.tm_gmtoff. */ +#define HAVE_TM_GMTOFF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unlink' function. */ +#define HAVE_UNLINK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Using i386 COFF? */ +/* #undef I386COFF */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Default CPU for MIPS targets. */ +/* #undef MIPS_CPU_STRING_DEFAULT */ + +/* Generate 64-bit code by default on MIPS targets. */ +/* #undef MIPS_DEFAULT_64BIT */ + +/* Choose a default ABI for MIPS targets. */ +/* #undef MIPS_DEFAULT_ABI */ + +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + +/* Define if environ is not declared in system header files. */ +#define NEED_DECLARATION_ENVIRON 1 + +/* Define if errno is not declared in system header files. */ +/* #undef NEED_DECLARATION_ERRNO */ + +/* Define if ffs is not declared in system header files. */ +/* #undef NEED_DECLARATION_FFS */ + +/* Define if free is not declared in system header files. */ +/* #undef NEED_DECLARATION_FREE */ + +/* Define if malloc is not declared in system header files. */ +/* #undef NEED_DECLARATION_MALLOC */ + +/* Define if sbrk is not declared in system header files. */ +/* #undef NEED_DECLARATION_SBRK */ + +/* Define if strstr is not declared in system header files. */ +/* #undef NEED_DECLARATION_STRSTR */ + +/* a.out support? */ +/* #undef OBJ_MAYBE_AOUT */ + +/* COFF support? */ +/* #undef OBJ_MAYBE_COFF */ + +/* ECOFF support? */ +/* #undef OBJ_MAYBE_ECOFF */ + +/* ELF support? */ +/* #undef OBJ_MAYBE_ELF */ + +/* generic support? */ +/* #undef OBJ_MAYBE_GENERIC */ + +/* SOM support? */ +/* #undef OBJ_MAYBE_SOM */ + +/* Name of package */ +#define PACKAGE "gas" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gas" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gas 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gas" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Using strict COFF? */ +/* #undef STRICTCOFF */ + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Target alias. */ +#define TARGET_ALIAS "aarch64_be--netbsd" + +/* Define as 1 if big endian. */ +#define TARGET_BYTES_BIG_ENDIAN 1 + +/* Canonical target. */ +#define TARGET_CANONICAL "aarch64_be--netbsd" + +/* Target CPU. */ +#define TARGET_CPU "aarch64_be" + +/* Target OS. */ +#define TARGET_OS "netbsd" + +/* Define if default target is PowerPC Solaris. */ +/* #undef TARGET_SOLARIS_COMMENT */ + +/* Target vendor. */ +#define TARGET_VENDOR "" + +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Use emulation support? */ +/* #undef USE_EMULATIONS */ + +/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */ +/* #undef USE_E_MIPS_ABI_O32 */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Using cgen code? */ +/* #undef USING_CGEN */ + +/* Version number of package */ +#define VERSION "2.34" + +/* 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 +# define WORDS_BIGENDIAN 1 +# endif +#endif + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/defs.mk b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..852f95d78 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/defs.mk @@ -0,0 +1,8 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# +G_DEFS=-DHAVE_CONFIG_H +G_INCLUDES= +G_OBJS=app.o as.o atof-generic.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o +G_OBJS+=tc-aarch64.o obj-elf.o atof-ieee.o diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/itbl-cpu.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/itbl-cpu.h new file mode 100644 index 000000000..84fcad67f --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/itbl-cpu.h @@ -0,0 +1,5 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ + +#include "itbl-aarch64.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/obj-format.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/obj-format.h new file mode 100644 index 000000000..268cdeaad --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/obj-format.h @@ -0,0 +1,5 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ + +#include "obj-elf.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-cpu.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-cpu.h new file mode 100644 index 000000000..ce40ad560 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-cpu.h @@ -0,0 +1,5 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ + +#include "tc-aarch64.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-env.h new file mode 100644 index 000000000..146d9553f --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gas/arch/aarch64eb/targ-env.h @@ -0,0 +1,5 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ + +#include "te-nbsd.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h b/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h index d403b8919..97c01f650 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/alpha/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/arm/config.h b/external/gpl3/binutils/usr.bin/gas/arch/arm/config.h index d22a9f41c..07974fa48 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/arm/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/arm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/armeb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/armeb/config.h index 3243c45ca..b4b3945d8 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/armeb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/armeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -336,7 +382,7 @@ # endif #else # ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ +# define WORDS_BIGENDIAN 1 # endif #endif @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/coldfire/config.h b/external/gpl3/binutils/usr.bin/gas/arch/coldfire/config.h index 67858813f..cc40b83a8 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/coldfire/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/coldfire/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,11 +41,17 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + /* Supported emulations. */ #define EMULATIONS /* Define if you want run-time sanity checks. */ -/* #undef ENABLE_CHECKING */ +#define ENABLE_CHECKING 1 /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -58,6 +64,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -159,8 +169,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -184,6 +194,24 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -233,19 +261,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define if defaulting to ELF on SCO 5. */ /* #undef SCO_ELF */ @@ -326,7 +354,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earm/config.h b/external/gpl3/binutils/usr.bin/gas/arch/earm/config.h index a410b4a8a..91e3fa1cb 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earm/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -60,6 +84,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -143,6 +171,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -167,8 +198,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -177,12 +208,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -192,6 +217,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -216,9 +268,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -241,22 +290,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -293,12 +339,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "elf32" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -334,7 +380,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -352,6 +398,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -373,3 +424,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earm/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/earm/targ-env.h index 4c7d0fcc2..ad528b87e 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earm/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earm/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ #include "te-armnbsdeabi.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmeb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/earmeb/config.h index 544d8c1e9..948b75668 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmeb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmeb/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/earmeb/targ-env.h index 4c7d0fcc2..ad528b87e 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmeb/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmeb/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ #include "te-armnbsdeabi.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmhf/config.h b/external/gpl3/binutils/usr.bin/gas/arch/earmhf/config.h index 1672cb51d..c81c56afa 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmhf/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmhf/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmhf/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/earmhf/targ-env.h index 75045d5bc..5ca71edad 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmhf/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmhf/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ #include "te-armnbsdeabihf.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/config.h index 344f9f443..336408bad 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/targ-env.h index 75045d5bc..5ca71edad 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/earmhfeb/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ #include "te-armnbsdeabihf.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/hppa/config.h b/external/gpl3/binutils/usr.bin/gas/arch/hppa/config.h index 8a9678ebd..2b29c0a9a 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/hppa/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/hppa/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/i386/config.h b/external/gpl3/binutils/usr.bin/gas/arch/i386/config.h index 6c56b1d0c..715259270 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/i386/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/i386/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "i386elf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &i386elf, @@ -60,6 +84,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -143,6 +171,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -167,8 +198,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -177,12 +208,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -192,6 +217,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -216,9 +268,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -241,22 +290,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -293,12 +339,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "elf32" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -334,7 +380,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -352,6 +398,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -373,3 +424,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/ia64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/ia64/config.h index e6594c987..cc4d59737 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/ia64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/ia64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -118,7 +146,7 @@ /* #undef HAVE_REMOVE */ /* Define to 1 if you have the `sbrk' function. */ -/* #undef HAVE_SBRK */ +#define HAVE_SBRK 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -200,7 +252,7 @@ /* #undef NEED_DECLARATION_MALLOC */ /* Define if sbrk is not declared in system header files. */ -#define NEED_DECLARATION_SBRK 1 +/* #undef NEED_DECLARATION_SBRK */ /* Define if strstr is not declared in system header files. */ /* #undef NEED_DECLARATION_STRSTR */ @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/m68000/config.h b/external/gpl3/binutils/usr.bin/gas/arch/m68000/config.h index b1c412156..3dd07cb09 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/m68000/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/m68000/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h b/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h index 6a8f3327c..eddab2953 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/m68k/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h index a1ab58e31..1a1ed13b0 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/mips64eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "mipsbelf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &mipsbelf, &mipslelf, &mipself, @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ #define MIPS_DEFAULT_ABI NO_ABI +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h b/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h index 9b9412a55..67759b8e1 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/mips64el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "mipslelf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &mipslelf, &mipsbelf, &mipself, @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ #define MIPS_DEFAULT_ABI NO_ABI +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h index 36d02d015..5f891b790 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/mipseb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "mipsbelf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &mipsbelf, &mipslelf, &mipself, @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ #define MIPS_DEFAULT_ABI NO_ABI +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h b/external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h index fb7e76dcc..5acc14b6d 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/mipsel/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "mipslelf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &mipslelf, &mipsbelf, &mipself, @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ #define MIPS_DEFAULT_ABI NO_ABI +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/or1k/config.h b/external/gpl3/binutils/usr.bin/gas/arch/or1k/config.h index c132ea08e..37d217fd5 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/or1k/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/or1k/config.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,11 +41,17 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + /* Supported emulations. */ #define EMULATIONS /* Define if you want run-time sanity checks. */ -/* #undef ENABLE_CHECKING */ +#define ENABLE_CHECKING 1 /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -58,6 +64,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -159,8 +169,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -184,6 +194,24 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -233,19 +261,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define if defaulting to ELF on SCO 5. */ /* #undef SCO_ELF */ @@ -274,7 +302,7 @@ #define TARGET_BYTES_BIG_ENDIAN 1 /* Canonical target. */ -#define TARGET_CANONICAL "or1k-unknown-netbsd" +#define TARGET_CANONICAL "or1k--netbsd" /* Target CPU. */ #define TARGET_CPU "or1k" @@ -289,7 +317,7 @@ /* #undef TARGET_SYMBIAN */ /* Target vendor. */ -#define TARGET_VENDOR "unknown" +#define TARGET_VENDOR "" /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +354,7 @@ #define USING_CGEN 1 /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -342,7 +370,7 @@ /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ -/* #undef YYTEXT_POINTER */ +#define YYTEXT_POINTER 1 /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h b/external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h index e0e079099..70cb6ec8e 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/powerpc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h index c02c44e25..2b6161192 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/powerpc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/riscv32/config.h b/external/gpl3/binutils/usr.bin/gas/arch/riscv32/config.h index 9f67f3b1f..d322effec 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/riscv32/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/riscv32/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -33,7 +33,7 @@ /* #undef C_ALLOCA */ /* Default architecture. */ -/* #undef DEFAULT_ARCH */ +#define DEFAULT_ARCH "riscv32" /* Default CRIS architecture. */ /* #undef DEFAULT_CRIS_ARCH */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -274,7 +320,7 @@ #define TARGET_BYTES_BIG_ENDIAN 0 /* Canonical target. */ -#define TARGET_CANONICAL "riscv32-ucb-netbsd" +#define TARGET_CANONICAL "riscv32--netbsd" /* Target CPU. */ #define TARGET_CPU "riscv32" @@ -285,11 +331,11 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ -#define TARGET_VENDOR "ucb" +#define TARGET_VENDOR "" + +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/riscv32/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/riscv32/targ-env.h index 146d9553f..b64fbccf0 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/riscv32/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/riscv32/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#include "te-nbsd.h" +#include "te-generic.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/riscv64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/riscv64/config.h index 25c2e1fd8..83c8349fa 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/riscv64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/riscv64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -33,7 +33,7 @@ /* #undef C_ALLOCA */ /* Default architecture. */ -/* #undef DEFAULT_ARCH */ +#define DEFAULT_ARCH "riscv64" /* Default CRIS architecture. */ /* #undef DEFAULT_CRIS_ARCH */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -274,7 +320,7 @@ #define TARGET_BYTES_BIG_ENDIAN 0 /* Canonical target. */ -#define TARGET_CANONICAL "riscv64-ucb-netbsd" +#define TARGET_CANONICAL "riscv64--netbsd" /* Target CPU. */ #define TARGET_CPU "riscv64" @@ -285,11 +331,11 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ -#define TARGET_VENDOR "ucb" +#define TARGET_VENDOR "" + +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/riscv64/targ-env.h b/external/gpl3/binutils/usr.bin/gas/arch/riscv64/targ-env.h index 146d9553f..b64fbccf0 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/riscv64/targ-env.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/riscv64/targ-env.h @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -#include "te-nbsd.h" +#include "te-generic.h" diff --git a/external/gpl3/binutils/usr.bin/gas/arch/sh3eb/config.h b/external/gpl3/binutils/usr.bin/gas/arch/sh3eb/config.h index 69e3df479..cf2864ef4 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/sh3eb/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/sh3eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/sh3el/config.h b/external/gpl3/binutils/usr.bin/gas/arch/sh3el/config.h index bd6da3f3f..bcd0d8d57 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/sh3el/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/sh3el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h b/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h index 3daa7e81e..26ac02053 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h index 882509fe6..35c82cea8 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/sparc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/vax/config.h b/external/gpl3/binutils/usr.bin/gas/arch/vax/config.h index 7d1a911bb..22c9eb694 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/vax/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/vax/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/x86_64/config.h b/external/gpl3/binutils/usr.bin/gas/arch/x86_64/config.h index 86ca8b959..e943c2ac4 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/x86_64/config.h +++ b/external/gpl3/binutils/usr.bin/gas/arch/x86_64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -41,6 +41,30 @@ /* Default emulation. */ #define DEFAULT_EMULATION "i386elf" +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate GNU Build attribute notes by default, + if none are contained in the input. */ +#define DEFAULT_GENERATE_BUILD_NOTES 0 + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */ +#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0 + +/* Define to 1 if you want to generate RISC-V arch attribute by default. */ +#define DEFAULT_RISCV_ATTR 0 + +/* Define to 1 if you want to generate GNU x86 used ISA and feature properties + by default. */ +#define DEFAULT_X86_USED_NOTE 0 + /* Supported emulations. */ #define EMULATIONS &i386elf, @@ -58,6 +82,10 @@ */ /* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + /* Define to 1 if you have the declaration of `free', and to 0 if you don't. */ #define HAVE_DECL_FREE 1 @@ -135,6 +163,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + /* Define if has struct stat.st_mtim.tv_nsec */ #define HAVE_ST_MTIM_TV_NSEC 1 @@ -159,8 +190,8 @@ /* Define to 1 if you have the `unlink' function. */ #define HAVE_UNLINK 1 -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ /* Using i386 COFF? */ /* #undef I386COFF */ @@ -169,12 +200,6 @@ */ #define LT_OBJDIR ".libs/" -/* Using m68k COFF? */ -/* #undef M68KCOFF */ - -/* Using m88k COFF? */ -/* #undef M88KCOFF */ - /* Default CPU for MIPS targets. */ /* #undef MIPS_CPU_STRING_DEFAULT */ @@ -184,6 +209,33 @@ /* Choose a default ABI for MIPS targets. */ /* #undef MIPS_DEFAULT_ABI */ +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dsp_ext */ +/* #undef NDS32_DEFAULT_DSP_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define default value for nds32_zol_ext */ +/* #undef NDS32_DEFAULT_ZOL_EXT */ + +/* Define default value for nds32_linux_toolchain */ +/* #undef NDS32_LINUX_TOOLCHAIN */ + /* Define if environ is not declared in system header files. */ #define NEED_DECLARATION_ENVIRON 1 @@ -208,9 +260,6 @@ /* a.out support? */ /* #undef OBJ_MAYBE_AOUT */ -/* b.out support? */ -/* #undef OBJ_MAYBE_BOUT */ - /* COFF support? */ /* #undef OBJ_MAYBE_COFF */ @@ -233,22 +282,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gas" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gas 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gas" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if defaulting to ELF on SCO 5. */ -/* #undef SCO_ELF */ +#define PACKAGE_VERSION "2.34" /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be @@ -285,12 +331,12 @@ /* Define if default target is PowerPC Solaris. */ /* #undef TARGET_SOLARIS_COMMENT */ -/* Define if target is Symbian OS. */ -/* #undef TARGET_SYMBIAN */ - /* Target vendor. */ #define TARGET_VENDOR "" +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + /* Use b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ @@ -326,7 +372,7 @@ /* #undef USING_CGEN */ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -344,6 +390,11 @@ `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -365,3 +416,6 @@ #ifndef __cplusplus /* #undef inline */ #endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk b/external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk index e8312c65f..4020a0fbb 100644 --- a/external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk @@ -1,6 +1,6 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.7 2009/11/09 13:50:41 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.10 2018/11/07 01:14:19 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= diff --git a/external/gpl3/binutils/usr.bin/gprof/Makefile b/external/gpl3/binutils/usr.bin/gprof/Makefile index af5eb38da..97ae82102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/Makefile +++ b/external/gpl3/binutils/usr.bin/gprof/Makefile @@ -1,15 +1,12 @@ -# $NetBSD: Makefile,v 1.8 2013/08/05 00:08:58 matt Exp $ +# $NetBSD: Makefile,v 1.9 2016/01/26 19:37:48 christos Exp $ -.include - -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils +CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} .include "${.CURDIR}/../common/Makefile.inc" .include "${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" PROG= gprof SRCS= ${G_gprof_OBJECTS:.o=.c} -CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty @@ -29,6 +26,6 @@ gprof.info: bfdver.texi LDADD+= -lintl -lz DPADD+= ${LIBINTL} ${LIBZ} .else -LDADD+= -lz -DPADD+= ${LIBZ} +LDADD+= -lz +DPADD+= ${LIBZ} .endif # !defined(__MINIX) diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/defs.mk index 58ce31e94..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h index 80e69bb8c..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..63d0f738a --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/defs.mk @@ -0,0 +1,8 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_DEFS=-DHAVE_CONFIG_H +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_INCLUDES= +G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/gconfig.h new file mode 100644 index 000000000..4e211a102 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/gprof/arch/aarch64eb/gconfig.h @@ -0,0 +1,126 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* gconfig.h. Generated from gconfig.in by configure. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `setmode' function. */ +#define HAVE_SETMODE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_GMON_OUT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "gprof" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gprof" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gprof 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gprof" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/alpha/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/alpha/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/alpha/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/alpha/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/alpha/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/arm/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/arm/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/arm/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/arm/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/arm/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/arm/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/arm/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/arm/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/armeb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/armeb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/armeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/armeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/armeb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/armeb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/armeb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/armeb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/defs.mk index 8dbddf1d5..bfb445db1 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/gconfig.h index 5711c7e4a..421c82382 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/coldfire/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earm/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/earm/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earm/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earm/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earm/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/earm/gconfig.h index 55daccca9..56e549bb4 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earm/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earm/gconfig.h @@ -1,13 +1,13 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ +#if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ -#if !defined(__minix) #define ENABLE_NLS 1 #endif /* !defined(__minix) */ @@ -50,6 +50,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -61,19 +64,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -101,7 +104,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmeb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmhf/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/earmhfeb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/hppa/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/hppa/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/hppa/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/hppa/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/hppa/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/hppa/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/hppa/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/hppa/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/i386/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/i386/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/i386/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/i386/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h index 6277ffc5f..57b700b5f 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native @@ -50,6 +50,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -61,19 +64,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -101,7 +104,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/ia64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/ia64/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/ia64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/ia64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/ia64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/ia64/gconfig.h index 30dc3f3fd..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/ia64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/ia64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/m68000/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/m68000/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/m68000/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/m68000/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/m68000/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/m68000/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/m68000/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/m68000/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/m68k/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/m68k/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/m68k/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/m68k/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/m68k/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mips64eb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mips64el/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mipseb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/mipsel/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/or1k/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/or1k/defs.mk index a9f9a1485..bfb445db1 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/or1k/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/or1k/defs.mk @@ -3,6 +3,6 @@ # Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/or1k/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/or1k/gconfig.h index 30dc3f3fd..421c82382 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/or1k/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/or1k/gconfig.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h index 3d5ff3420..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/powerpc64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/defs.mk index a9f9a1485..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/gconfig.h index 30dc3f3fd..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/riscv32/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/defs.mk index a9f9a1485..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/gconfig.h index 30dc3f3fd..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/riscv64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sh3eb/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sh3el/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sparc/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/sparc/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sparc/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sparc/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/sparc64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/vax/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/vax/defs.mk index 8dbddf1d5..61b178395 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/vax/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/vax/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/vax/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/vax/gconfig.h index 5711c7e4a..4e211a102 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/vax/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/vax/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/defs.mk b/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/defs.mk index 01302e964..9cda8ec55 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/defs.mk @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.7 2009/11/09 13:50:41 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H -G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o +G_gprof_OBJECTS=basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o G_INCLUDES= G_TEXINFOS=gprof.texi diff --git a/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/gconfig.h b/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/gconfig.h index 5711c7e4a..b61010edb 100644 --- a/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/gconfig.h +++ b/external/gpl3/binutils/usr.bin/gprof/arch/x86_64/gconfig.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* gconfig.h. Generated from gconfig.in by configure. */ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -48,6 +48,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -59,19 +62,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "gprof" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "gprof 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "gprof" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -99,7 +102,12 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/Makefile b/external/gpl3/binutils/usr.bin/ld/Makefile index b8de27a51..2816f0226 100644 --- a/external/gpl3/binutils/usr.bin/ld/Makefile +++ b/external/gpl3/binutils/usr.bin/ld/Makefile @@ -1,8 +1,22 @@ -# $NetBSD: Makefile,v 1.21 2013/10/03 23:42:38 mrg Exp $ +# $NetBSD: Makefile,v 1.33 2020/04/04 01:34:30 christos Exp $ -.include +CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \ + -I${DIST}/ld \ + -DDEFAULT_EMULATION=\"${G_EMUL}\" \ + -DSCRIPTDIR=\"${SCRIPTSDIR}\" \ + -DTARGET=\"${G_target_alias}\" \ + -DBINDIR=\"/usr/bin\" \ + -DTOOLBINDIR=\"/usr/bin\" \ + -DENABLE_PLUGINS \ + -DELF_LIST_OPTIONS=TRUE \ + -DELF_SHLIB_LIST_OPTIONS=TRUE \ + -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils +.if !defined(__MINIX) +CPPFLAGS+= \ + -DTARGET_SYSTEM_ROOT=\"/usr/${G_target_alias}/sys-root\" \ + -DTARGET_SYSTEM_ROOT_RELOCATABLE +.endif # !defined(__MINIX) .include "${.CURDIR}/../common/Makefile.inc" .include "${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" @@ -11,23 +25,10 @@ SCRIPTSDIR= /usr/libdata PROG= ld SRCS= ${G_OFILES:.o=.c} -CPPFLAGS+= -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \ - -I${DIST}/ld \ - -DDEFAULT_EMULATION=\"${G_EMUL}\" \ - -DSCRIPTDIR=\"${SCRIPTSDIR}\" \ - -DTARGET=\"${G_target_alias}\" \ - -DBINDIR=\"/usr/bin\" \ - -DTOOLBINDIR=\"/usr/bin\" \ - -DENABLE_PLUGINS - -.if defined(__MINIX) -CPPFLAGS+= \ - -DTARGET_SYSTEM_ROOT=\"/usr/${G_target_alias}/sys-root\" \ - -DTARGET_SYSTEM_ROOT_RELOCATABLE -.endif # !defined(__MINIX COPTS.ldgram.c = -Wno-stack-protector +PROGDPLIBS+= gnuctf ${TOP}/${BFDSUBDIR}/libgnuctf PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty @@ -69,52 +70,28 @@ ${PROG}.info: configdoc.texi bfdver.texi DPSRCS+= .depend.${f} e${f}.c CLEANFILES+= .depend.${f} e${f}.c -# XXX super hack -. if (${BINUTILS_MACHINE_ARCH} == "x86_64" && \ - ("${f}" == "elf_i386" || "${f}" == "i386nbsd")) -EMUL_LIB_PATH.${f}=/usr/lib/i386 -. elif (${BINUTILS_MACHINE_ARCH} == "sparc64" && \ - ("${f}" == "elf32_sparc" || "${f}" == "sparcnbsd")) -EMUL_LIB_PATH.${f}=/usr/lib/sparc -. elif ${BINUTILS_MACHINE_ARCH} == "mips64el" -. if "${f}" == "elf32ltsmip" || "${f}" == "elf32btsmip" -EMUL_LIB_PATH.${f}:=/usr/lib/o32 -. elif "${f}" == "elf64ltsmip" || "${f}" == "elf64btsmip" -EMUL_LIB_PATH.${f}:=/usr/lib/64 -. else -EMUL_LIB_PATH.${f}=/usr/lib -. endif -. else -EMUL_LIB_PATH.${f}=/usr/lib -. endif - -#GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @ta rget_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ - e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed ${_MKTARGET_CREATE} unset MACHINE || true; \ - LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \ - ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld ${LIBDIR} "/usr" "/usr/bin" \ + NATIVE=yes ${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \ + ${LIBDIR} "/usr" "/usr/bin" \ ${G_target_alias} ${G_target_alias} ${G_target_alias} \ - ${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} ${f} "${G_target_alias}" - -.if ${BINUTILS_MACHINE_ARCH} == "x86_64" \ - || ${BINUTILS_MACHINE_ARCH} == "sparc64" \ - || !empty(BINUTILS_MACHINE_ARCH:Mmips64*) -FILES+= ${f}.x ${f}.xbn ${f}.xn ${f}.xr ${f}.xu - -# XXX hack to find out if .xs/.xc exists - slow! -HAS_XS!= grep '^GENERATE_SHLIB_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo -# XXX -#HAS_XC!= grep '^GENERATE_COMBRELOC_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo -.if !empty(HAS_XS) -FILES+= ${f}.xc ${f}.xd ${f}.xdc ${f}.xdw ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw -# only do this if we don't have GENERATE_SHLIB_SCRIPT -.elif !empty(BINUTILS_MACHINE_ARCH:Mmips64*) -FILES+= ${f}.xc ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw -.endif -.endif # x64_64 || sparc64 || mips64 + "" "" ${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \ + ${f} "${G_target_alias}" +. if ${BINUTILS_MACHINE_ARCH} == "x86_64" || \ + ${BINUTILS_MACHINE_ARCH} == "sparc64" || \ + ${BINUTILS_MACHINE_ARCH} == "riscv64" || \ + !empty(BINUTILS_MACHINE_ARCH:Maarch64*) || \ + !empty(BINUTILS_MACHINE_ARCH:Mearm*) || \ + !empty(BINUTILS_MACHINE_ARCH:Marm*) || \ + !empty(BINUTILS_MACHINE_ARCH:Mmips64*) +. for e in x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw +. if exists(ldscripts/${f}.${e}) +FILES+= ${f}.${e} +. endif +. endfor +. endif .endfor .include diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h index 88e1b2ad0..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/defs.mk index 2104be991..c147d8e41 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=aarch64nbsd -G_EMULATION_OFILES=eaarch64nbsd.o eaarch64nbsdb.o eaarch64elf.o eaarch64elfb.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf.o earmelfb.o +G_EMULATION_OFILES=eaarch64nbsd.o eaarch64nbsdb.o eaarch64elf.o eaarch64elfb.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmelfb.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eaarch64nbsd.o eaarch64nbsdb.o eaarch64elf.o eaarch64elfb.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf.o earmelfb.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eaarch64nbsd.o eaarch64nbsdb.o eaarch64elf.o eaarch64elfb.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmelfb.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=aarch64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/ldemul-list.h index 4768a5f0b..6fb7ce6da 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/aarch64/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64/ldemul-list.h @@ -1,14 +1,18 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_aarch64nbsd_emulation; extern ld_emulation_xfer_type ld_aarch64nbsdb_emulation; extern ld_emulation_xfer_type ld_aarch64elf_emulation; extern ld_emulation_xfer_type ld_aarch64elfb_emulation; +extern ld_emulation_xfer_type ld_armelf_nbsd_eabihf_emulation; +extern ld_emulation_xfer_type ld_armelfb_nbsd_eabihf_emulation; extern ld_emulation_xfer_type ld_armelf_nbsd_eabi_emulation; extern ld_emulation_xfer_type ld_armelfb_nbsd_eabi_emulation; +extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; +extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; extern ld_emulation_xfer_type ld_armelfb_emulation; @@ -17,8 +21,12 @@ extern ld_emulation_xfer_type ld_armelfb_emulation; &ld_aarch64nbsdb_emulation, \ &ld_aarch64elf_emulation, \ &ld_aarch64elfb_emulation, \ + &ld_armelf_nbsd_eabihf_emulation, \ + &ld_armelfb_nbsd_eabihf_emulation, \ &ld_armelf_nbsd_eabi_emulation, \ &ld_armelfb_nbsd_eabi_emulation, \ + &ld_armelf_nbsd_emulation, \ + &ld_armelfb_nbsd_emulation, \ &ld_armelf_emulation, \ &ld_armelfb_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/config.h new file mode 100644 index 000000000..dadc26068 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/config.h @@ -0,0 +1,261 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ + +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Additional extension a shared object might have. */ +/* #undef EXTRA_SHLIB_EXTENSION */ + +/* Define to choose default GOT handling scheme */ +#define GOT_HANDLING_DEFAULT GOT_HANDLING_TARGET_DEFAULT + +/* Define to 1 if you have the `close' function. */ +#define HAVE_CLOSE 1 + +/* Define to 1 if you have the declaration of `environ', and to 0 if you + don't. */ +#define HAVE_DECL_ENVIRON 0 + +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. + */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ELF_HINTS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `glob' function. */ +#define HAVE_GLOB 1 + +/* Define .init_array/.fini_array sections are available and working. */ +/* #undef HAVE_INITFINI_ARRAY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `lseek' function. */ +#define HAVE_LSEEK 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the `open' function. */ +#define HAVE_OPEN 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "ld" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ld" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ld 2.34" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ld" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.34" + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.34" + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/defs.mk new file mode 100644 index 000000000..21d58cc0a --- /dev/null +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/defs.mk @@ -0,0 +1,13 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_DEFS=-DHAVE_CONFIG_H +G_EMUL=aarch64nbsdb +G_EMULATION_OFILES=eaarch64nbsdb.o eaarch64nbsd.o eaarch64elfb.o eaarch64elf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelfb_nbsd.o earmelf_nbsd.o earmelf.o earmelfb.o +G_INCLUDES= +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eaarch64nbsdb.o eaarch64nbsd.o eaarch64elfb.o eaarch64elf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelfb_nbsd.o earmelf_nbsd.o earmelf.o earmelfb.o ldelf.o ldelfgen.o ldbuildid.o +G_STRINGIFY=astring.sed +G_TEXINFOS=ld.texi +G_target_alias=aarch64_be--netbsd +G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/ldemul-list.h new file mode 100644 index 000000000..23fdea6f2 --- /dev/null +++ b/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb/ldemul-list.h @@ -0,0 +1,32 @@ +/* This file is automatically generated. DO NOT EDIT! */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ + +/* This file is automatically generated. DO NOT EDIT! */ +extern ld_emulation_xfer_type ld_aarch64nbsdb_emulation; +extern ld_emulation_xfer_type ld_aarch64nbsd_emulation; +extern ld_emulation_xfer_type ld_aarch64elfb_emulation; +extern ld_emulation_xfer_type ld_aarch64elf_emulation; +extern ld_emulation_xfer_type ld_armelfb_nbsd_eabihf_emulation; +extern ld_emulation_xfer_type ld_armelf_nbsd_eabihf_emulation; +extern ld_emulation_xfer_type ld_armelfb_nbsd_eabi_emulation; +extern ld_emulation_xfer_type ld_armelf_nbsd_eabi_emulation; +extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; +extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; +extern ld_emulation_xfer_type ld_armelf_emulation; +extern ld_emulation_xfer_type ld_armelfb_emulation; + +#define EMULATION_LIST \ + &ld_aarch64nbsdb_emulation, \ + &ld_aarch64nbsd_emulation, \ + &ld_aarch64elfb_emulation, \ + &ld_aarch64elf_emulation, \ + &ld_armelfb_nbsd_eabihf_emulation, \ + &ld_armelf_nbsd_eabihf_emulation, \ + &ld_armelfb_nbsd_eabi_emulation, \ + &ld_armelf_nbsd_eabi_emulation, \ + &ld_armelfb_nbsd_emulation, \ + &ld_armelf_nbsd_emulation, \ + &ld_armelf_emulation, \ + &ld_armelfb_emulation, \ + 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h b/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h index 990aa389f..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/alpha/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/alpha/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/alpha/defs.mk index ee4c98b04..660bf03bf 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/alpha/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/alpha/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf64alpha_nbsd G_EMULATION_OFILES=eelf64alpha_nbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64alpha_nbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64alpha_nbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=alpha--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/arm/config.h b/external/gpl3/binutils/usr.bin/ld/arch/arm/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/arm/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/arm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/arm/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/arm/defs.mk index b28f75c27..0493a02d0 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/arm/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/arm/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelf_nbsd -G_EMULATION_OFILES=earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_EMULATION_OFILES=earmelf_nbsd.o earmelfb_nbsd.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=arm--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/arm/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/arm/ldemul-list.h index fb8cee96c..d4c8d52de 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/arm/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/arm/ldemul-list.h @@ -1,15 +1,14 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; -extern ld_emulation_xfer_type ld_armnbsd_emulation; #define EMULATION_LIST \ &ld_armelf_nbsd_emulation, \ &ld_armelfb_nbsd_emulation, \ &ld_armelf_emulation, \ - &ld_armnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/armeb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/armeb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/armeb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/armeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/armeb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/armeb/defs.mk index a6edf9ccd..860bb0935 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/armeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/armeb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelfb_nbsd -G_EMULATION_OFILES=earmelfb_nbsd.o earmelf_nbsd.o earmelf.o earmnbsd.o +G_EMULATION_OFILES=earmelfb_nbsd.o earmelf_nbsd.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd.o earmelf_nbsd.o earmelf.o earmnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd.o earmelf_nbsd.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=armeb--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/armeb/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/armeb/ldemul-list.h index 7c12fc0a7..8bade41da 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/armeb/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/armeb/ldemul-list.h @@ -1,15 +1,14 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.12 2003/03/05 06:17:17 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; -extern ld_emulation_xfer_type ld_armnbsd_emulation; #define EMULATION_LIST \ &ld_armelfb_nbsd_emulation, \ &ld_armelf_nbsd_emulation, \ &ld_armelf_emulation, \ - &ld_armnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/coldfire/config.h b/external/gpl3/binutils/usr.bin/ld/arch/coldfire/config.h index ef2d2cafa..9401e9350 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/coldfire/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/coldfire/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,9 @@ #endif #define __CONFIG_H__ 1 +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +55,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +94,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +156,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +167,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,7 +216,7 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/coldfire/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/coldfire/defs.mk index 015c2b085..e5dd7898e 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/coldfire/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/coldfire/defs.mk @@ -1,12 +1,12 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp +# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=m68kelfnbsd G_EMULATION_OFILES=em68kelfnbsd.o em68knbsd.o em68k4knbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o em68knbsd.o em68k4knbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o em68knbsd.o em68k4knbsd.o ldbuildid.o G_STRINGIFY=astring.sed G_TEXINFOS=ld.texinfo G_target_alias=m5407--netbsdelf diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earm/config.h b/external/gpl3/binutils/usr.bin/ld/arch/earm/config.h index 6a48bb2c2..7d0478952 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earm/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earm/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -54,24 +74,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -103,6 +117,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -164,9 +181,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -178,19 +192,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -227,12 +241,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earm/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/earm/defs.mk index 49faa4f09..b8983b0f3 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earm/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/earm/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelf_minix G_EMULATION_OFILES=earmelf_minix.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_minix.o earmelf.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_minix.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=arm-elf32-minix G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earm/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/earm/ldemul-list.h index 2ace838de..2bcaf7f8f 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earm/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earm/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelf_minix_emulation; diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/defs.mk index 655bd2b05..dfefc6f6b 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelfb_nbsd_eabi -G_EMULATION_OFILES=earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_EMULATION_OFILES=earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd_eabi.o earmelf_nbsd_eabi.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=armeb--netbsdelf-eabi G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/ldemul-list.h index cf6e53ab1..e5a0cb80d 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmeb/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmeb/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelfb_nbsd_eabi_emulation; @@ -10,7 +10,6 @@ extern ld_emulation_xfer_type ld_armelfb_nbsd_eabihf_emulation; extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; -extern ld_emulation_xfer_type ld_armnbsd_emulation; #define EMULATION_LIST \ &ld_armelfb_nbsd_eabi_emulation, \ @@ -20,5 +19,4 @@ extern ld_emulation_xfer_type ld_armnbsd_emulation; &ld_armelf_nbsd_emulation, \ &ld_armelfb_nbsd_emulation, \ &ld_armelf_emulation, \ - &ld_armnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/config.h b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/defs.mk index bd4f286a3..7fbc9d76a 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelf_nbsd_eabihf -G_EMULATION_OFILES=earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_EMULATION_OFILES=earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelf_nbsd_eabihf.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=arm--netbsdelf-eabihf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/ldemul-list.h index 58a9a399a..03db5c8d0 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhf/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhf/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelf_nbsd_eabihf_emulation; @@ -10,7 +10,6 @@ extern ld_emulation_xfer_type ld_armelfb_nbsd_eabi_emulation; extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; -extern ld_emulation_xfer_type ld_armnbsd_emulation; #define EMULATION_LIST \ &ld_armelf_nbsd_eabihf_emulation, \ @@ -20,5 +19,4 @@ extern ld_emulation_xfer_type ld_armnbsd_emulation; &ld_armelf_nbsd_emulation, \ &ld_armelfb_nbsd_emulation, \ &ld_armelf_emulation, \ - &ld_armnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/defs.mk index 84fddbc0a..18c104e63 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=armelfb_nbsd_eabihf -G_EMULATION_OFILES=earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_EMULATION_OFILES=earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o earmnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o earmelfb_nbsd_eabihf.o earmelf_nbsd_eabihf.o earmelf_nbsd_eabi.o earmelfb_nbsd_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=armeb--netbsdelf-eabihf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/ldemul-list.h index aa56de707..73c057ec1 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/earmhfeb/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_armelfb_nbsd_eabihf_emulation; @@ -10,7 +10,6 @@ extern ld_emulation_xfer_type ld_armelfb_nbsd_eabi_emulation; extern ld_emulation_xfer_type ld_armelf_nbsd_emulation; extern ld_emulation_xfer_type ld_armelfb_nbsd_emulation; extern ld_emulation_xfer_type ld_armelf_emulation; -extern ld_emulation_xfer_type ld_armnbsd_emulation; #define EMULATION_LIST \ &ld_armelfb_nbsd_eabihf_emulation, \ @@ -20,5 +19,4 @@ extern ld_emulation_xfer_type ld_armnbsd_emulation; &ld_armelf_nbsd_emulation, \ &ld_armelfb_nbsd_emulation, \ &ld_armelf_emulation, \ - &ld_armnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/hppa/config.h b/external/gpl3/binutils/usr.bin/ld/arch/hppa/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/hppa/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/hppa/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/hppa/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/hppa/defs.mk index 320a77981..269d0aa12 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/hppa/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/hppa/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=hppanbsd G_EMULATION_OFILES=ehppanbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o ehppanbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o ehppanbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=hppa--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/i386/config.h b/external/gpl3/binutils/usr.bin/ld/arch/i386/config.h index 6a48bb2c2..6a12ef906 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/i386/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/i386/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + #if !defined(__minix) /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -54,24 +74,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -103,6 +117,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -164,9 +181,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -178,19 +192,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -227,12 +241,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/i386/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/i386/defs.mk index d46b576cc..26618e6bd 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/i386/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/i386/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf_i386_minix G_EMULATION_OFILES=eelf_i386_minix.o eelf_i386.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf_i386_minix.o eelf_i386.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf_i386_minix.o eelf_i386.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=i586-elf32-minix G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/i386/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/i386/ldemul-list.h index 05aee3d23..c8aebbc43 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/i386/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/i386/ldemul-list.h @@ -1,5 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf_i386_minix_emulation; diff --git a/external/gpl3/binutils/usr.bin/ld/arch/ia64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/ia64/config.h index 9b11ef201..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/ia64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/ia64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -107,7 +124,7 @@ #define HAVE_REALPATH 1 /* Define to 1 if you have the `sbrk' function. */ -/* #undef HAVE_SBRK */ +#define HAVE_SBRK 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/ia64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/ia64/defs.mk index 983ef59e5..e48a70e04 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/ia64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/ia64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf64_ia64 G_EMULATION_OFILES=eelf64_ia64.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64_ia64.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64_ia64.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=ia64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68000/config.h b/external/gpl3/binutils/usr.bin/ld/arch/m68000/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68000/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68000/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68000/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/m68000/defs.mk index 632db378d..cbaec4289 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68000/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68000/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=m68kelfnbsd -G_EMULATION_OFILES=em68kelfnbsd.o em68knbsd.o em68k4knbsd.o +G_EMULATION_OFILES=em68kelfnbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o em68knbsd.o em68k4knbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=m68010--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68000/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/m68000/ldemul-list.h index 0b6658f42..a5958c2c1 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68000/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68000/ldemul-list.h @@ -1,13 +1,10 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_m68kelfnbsd_emulation; -extern ld_emulation_xfer_type ld_m68knbsd_emulation; -extern ld_emulation_xfer_type ld_m68k4knbsd_emulation; #define EMULATION_LIST \ &ld_m68kelfnbsd_emulation, \ - &ld_m68knbsd_emulation, \ - &ld_m68k4knbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h b/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68k/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68k/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/m68k/defs.mk index 1a852a572..bd6b8e68f 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68k/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68k/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=m68kelfnbsd -G_EMULATION_OFILES=em68kelfnbsd.o em68knbsd.o em68k4knbsd.o +G_EMULATION_OFILES=em68kelfnbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o em68knbsd.o em68k4knbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o em68kelfnbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=m68k--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/m68k/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/m68k/ldemul-list.h index 0b6658f42..a5958c2c1 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/m68k/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/m68k/ldemul-list.h @@ -1,13 +1,10 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_m68kelfnbsd_emulation; -extern ld_emulation_xfer_type ld_m68knbsd_emulation; -extern ld_emulation_xfer_type ld_m68k4knbsd_emulation; #define EMULATION_LIST \ &ld_m68kelfnbsd_emulation, \ - &ld_m68knbsd_emulation, \ - &ld_m68k4knbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/defs.mk index 7844c7154..909fd423c 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32btsmipn32 G_EMULATION_OFILES=eelf32btsmipn32.o eelf64ltsmip.o eelf64btsmip.o eelf32btsmip.o eelf32ltsmipn32.o eelf32ltsmip.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32btsmipn32.o eelf64ltsmip.o eelf64btsmip.o eelf32btsmip.o eelf32ltsmipn32.o eelf32ltsmip.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32btsmipn32.o eelf64ltsmip.o eelf64btsmip.o eelf32btsmip.o eelf32ltsmipn32.o eelf32ltsmip.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=mips64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/ldemul-list.h index e6b21739e..44d7bad49 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64eb/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.7 2009/11/09 13:50:41 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf32btsmipn32_emulation; diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/defs.mk index 08d167f52..3384d31c8 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32ltsmipn32 G_EMULATION_OFILES=eelf32ltsmipn32.o eelf64btsmip.o eelf64ltsmip.o eelf32ltsmip.o eelf32btsmipn32.o eelf32btsmip.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ltsmipn32.o eelf64btsmip.o eelf64ltsmip.o eelf32ltsmip.o eelf32btsmipn32.o eelf32btsmip.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ltsmipn32.o eelf64btsmip.o eelf64ltsmip.o eelf32ltsmip.o eelf32btsmipn32.o eelf32btsmip.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=mips64el--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/ldemul-list.h index 15f86522b..3a4734435 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mips64el/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mips64el/ldemul-list.h @@ -1,6 +1,6 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.7 2009/11/09 13:50:41 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf32ltsmipn32_emulation; diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mipseb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mipseb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/mipseb/defs.mk index 979748a42..3e7298fb8 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mipseb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/mipseb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32btsmip G_EMULATION_OFILES=eelf32btsmip.o eelf32ltsmip.o eelf64btsmip.o eelf64ltsmip.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32btsmip.o eelf32ltsmip.o eelf64btsmip.o eelf64ltsmip.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32btsmip.o eelf32ltsmip.o eelf64btsmip.o eelf64ltsmip.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=mipseb--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h b/external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/mipsel/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/mipsel/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/mipsel/defs.mk index 35df556d3..feee3ab4f 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/mipsel/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/mipsel/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32ltsmip G_EMULATION_OFILES=eelf32ltsmip.o eelf32btsmip.o eelf64ltsmip.o eelf64btsmip.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ltsmip.o eelf32btsmip.o eelf64ltsmip.o eelf64btsmip.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ltsmip.o eelf32btsmip.o eelf64ltsmip.o eelf64btsmip.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=mipsel--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/or1k/config.h b/external/gpl3/binutils/usr.bin/ld/arch/or1k/config.h index f2409bbb7..9401e9350 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/or1k/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/or1k/config.h @@ -3,7 +3,7 @@ /* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,9 @@ #endif #define __CONFIG_H__ 1 +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +55,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +94,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +156,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +167,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.26.1" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.26.1" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,11 +216,11 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.26.1" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ -/* #undef YYTEXT_POINTER */ +#define YYTEXT_POINTER 1 /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/or1k/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/or1k/defs.mk index 750d62a69..b95ac1a76 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/or1k/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/or1k/defs.mk @@ -6,7 +6,7 @@ G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32or1k_nbsd G_EMULATION_OFILES=eelf32or1k_nbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32or1k_nbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32or1k_nbsd.o ldbuildid.o G_STRINGIFY=astring.sed G_TEXINFOS=ld.texinfo G_target_alias=or1k--netbsd diff --git a/external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h b/external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/powerpc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/powerpc/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/powerpc/defs.mk index eea4facaa..7f84f349b 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/powerpc/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/powerpc/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32ppc_nbsd G_EMULATION_OFILES=eelf32ppc_nbsd.o eelf32ppc.o eelf32ppcsim.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ppc_nbsd.o eelf32ppc.o eelf32ppcsim.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32ppc_nbsd.o eelf32ppc.o eelf32ppcsim.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=powerpc--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h index b69a0a88a..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/defs.mk index 355130d5a..f57d2dca7 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf64ppc -G_EMULATION_OFILES=eelf64ppc.o eelf32ppc.o eelf32ppclinux.o eelf32ppcsim.o +G_EMULATION_OFILES=eelf64ppc.o eelf32ppc.o eelf32ppc_nbsd.o eelf32ppcsim.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64ppc.o eelf32ppc.o eelf32ppclinux.o eelf32ppcsim.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64ppc.o eelf32ppc.o eelf32ppc_nbsd.o eelf32ppcsim.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=powerpc64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/ldemul-list.h index fec5ec40b..795b681e6 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/powerpc64/ldemul-list.h @@ -1,16 +1,16 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.5 2006/02/02 20:06:04 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.8 2006/05/26 19:17:21 mrg Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf64ppc_emulation; extern ld_emulation_xfer_type ld_elf32ppc_emulation; -extern ld_emulation_xfer_type ld_elf32ppclinux_emulation; +extern ld_emulation_xfer_type ld_elf32ppc_nbsd_emulation; extern ld_emulation_xfer_type ld_elf32ppcsim_emulation; #define EMULATION_LIST \ &ld_elf64ppc_emulation, \ &ld_elf32ppc_emulation, \ - &ld_elf32ppclinux_emulation, \ + &ld_elf32ppc_nbsd_emulation, \ &ld_elf32ppcsim_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/config.h b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/config.h index d31a3cad7..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/defs.mk index cf31aeb32..705c192b0 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32lriscv -G_EMULATION_OFILES=eelf32lriscv.o eelf64lriscv.o +G_EMULATION_OFILES=eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o eelf64lriscv.o eelf64lriscv_lp64f.o eelf64lriscv_lp64.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32lriscv.o eelf64lriscv.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o eelf64lriscv.o eelf64lriscv_lp64f.o eelf64lriscv_lp64.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=riscv32--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/ldemul-list.h index 8eea8251b..041cce57e 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv32/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv32/ldemul-list.h @@ -1,12 +1,20 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf32lriscv_emulation; +extern ld_emulation_xfer_type ld_elf32lriscv_ilp32f_emulation; +extern ld_emulation_xfer_type ld_elf32lriscv_ilp32_emulation; extern ld_emulation_xfer_type ld_elf64lriscv_emulation; +extern ld_emulation_xfer_type ld_elf64lriscv_lp64f_emulation; +extern ld_emulation_xfer_type ld_elf64lriscv_lp64_emulation; #define EMULATION_LIST \ &ld_elf32lriscv_emulation, \ + &ld_elf32lriscv_ilp32f_emulation, \ + &ld_elf32lriscv_ilp32_emulation, \ &ld_elf64lriscv_emulation, \ + &ld_elf64lriscv_lp64f_emulation, \ + &ld_elf64lriscv_lp64_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/config.h index 1b082f1f8..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk index 2789e9ca9..914987447 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf64lriscv -G_EMULATION_OFILES=eelf64lriscv.o eelf32lriscv.o +G_EMULATION_OFILES=eelf64lriscv.o eelf64lriscv_lp64f.o eelf64lriscv_lp64.o eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64lriscv.o eelf32lriscv.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64lriscv.o eelf64lriscv_lp64f.o eelf64lriscv_lp64.o eelf32lriscv.o eelf32lriscv_ilp32f.o eelf32lriscv_ilp32.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=riscv64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h index 67de92337..b63ac6963 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/riscv64/ldemul-list.h @@ -1,12 +1,20 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ -/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf64lriscv_emulation; +extern ld_emulation_xfer_type ld_elf64lriscv_lp64f_emulation; +extern ld_emulation_xfer_type ld_elf64lriscv_lp64_emulation; extern ld_emulation_xfer_type ld_elf32lriscv_emulation; +extern ld_emulation_xfer_type ld_elf32lriscv_ilp32f_emulation; +extern ld_emulation_xfer_type ld_elf32lriscv_ilp32_emulation; #define EMULATION_LIST \ &ld_elf64lriscv_emulation, \ + &ld_elf64lriscv_lp64f_emulation, \ + &ld_elf64lriscv_lp64_emulation, \ &ld_elf32lriscv_emulation, \ + &ld_elf32lriscv_ilp32f_emulation, \ + &ld_elf32lriscv_ilp32_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/config.h b/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/defs.mk index 7de4e4e91..3f29be129 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/sh3eb/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=shelf_nbsd G_EMULATION_OFILES=eshelf_nbsd.o eshlelf_nbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eshelf_nbsd.o eshlelf_nbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eshelf_nbsd.o eshlelf_nbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=sh--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sh3el/config.h b/external/gpl3/binutils/usr.bin/ld/arch/sh3el/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sh3el/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sh3el/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sh3el/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/sh3el/defs.mk index dce99dcd3..9f564c759 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sh3el/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/sh3el/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=shlelf_nbsd G_EMULATION_OFILES=eshlelf_nbsd.o eshelf_nbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eshlelf_nbsd.o eshelf_nbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eshlelf_nbsd.o eshelf_nbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=shle--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h b/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/sparc/defs.mk index 04ebd3ffa..bc25230ad 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32_sparc -G_EMULATION_OFILES=eelf32_sparc.o esparcnbsd.o +G_EMULATION_OFILES=eelf32_sparc.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32_sparc.o esparcnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32_sparc.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=sparc--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/sparc/ldemul-list.h index eaabc9d9e..d6e8ee445 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc/ldemul-list.h @@ -1,11 +1,10 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf32_sparc_emulation; -extern ld_emulation_xfer_type ld_sparcnbsd_emulation; #define EMULATION_LIST \ &ld_elf32_sparc_emulation, \ - &ld_sparcnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/config.h index 990aa389f..dadc26068 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/defs.mk index e0b966701..b25e0a75d 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf64_sparc -G_EMULATION_OFILES=eelf64_sparc.o eelf32_sparc.o esparcnbsd.o +G_EMULATION_OFILES=eelf64_sparc.o eelf32_sparc.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64_sparc.o eelf32_sparc.o esparcnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf64_sparc.o eelf32_sparc.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=sparc64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/ldemul-list.h index 2aaa94680..3a8bc6fb4 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/sparc64/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/sparc64/ldemul-list.h @@ -1,13 +1,12 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative,v 1.9 2003/02/07 01:52:54 lukem Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf64_sparc_emulation; extern ld_emulation_xfer_type ld_elf32_sparc_emulation; -extern ld_emulation_xfer_type ld_sparcnbsd_emulation; #define EMULATION_LIST \ &ld_elf64_sparc_emulation, \ &ld_elf32_sparc_emulation, \ - &ld_sparcnbsd_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/ld/arch/vax/config.h b/external/gpl3/binutils/usr.bin/ld/arch/vax/config.h index ef2d2cafa..d4a6dac28 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/vax/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/vax/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 4 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/vax/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/vax/defs.mk index 25042e206..0cc589830 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/vax/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/vax/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf32vax G_EMULATION_OFILES=eelf32vax.o evaxnbsd.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=vax--netbsdelf G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/config.h b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/config.h index 990aa389f..e87dfe3e8 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/config.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/config.h @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ @@ -12,6 +12,26 @@ #endif #define __CONFIG_H__ 1 +/* Define to 1 if you want to emit gnu hash in the ELF linker by default. */ +#define DEFAULT_EMIT_GNU_HASH 0 + +/* Define to 1 if you want to emit sysv hash in the ELF linker by default. */ +#define DEFAULT_EMIT_SYSV_HASH 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +#define DEFAULT_LD_Z_RELRO 0 + +/* Define to 1 if you want to enable -z separate-code in ELF linker by + default. */ +#define DEFAULT_LD_Z_SEPARATE_CODE 0 + +/* Define to 1 if you want to set DT_RUNPATH instead of DT_RPATH by default. + */ +#define DEFAULT_NEW_DTAGS 0 + /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 @@ -52,24 +72,18 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dlclose' function. */ -#define HAVE_DLCLOSE 1 - /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dlopen' function. */ -#define HAVE_DLOPEN 1 - -/* Define to 1 if you have the `dlsym' function. */ -#define HAVE_DLSYM 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_ELF_HINTS_H */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + /* Define to 1 if you have the `glob' function. */ #define HAVE_GLOB 1 @@ -97,6 +111,9 @@ /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -156,9 +173,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -170,19 +184,19 @@ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "ld" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "ld 2.34" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "ld" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "2.34" /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 @@ -219,12 +233,17 @@ /* Version number of package */ -#define VERSION "2.23.2" +#define VERSION "2.34" /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff --git a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/defs.mk b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/defs.mk index a4747d7fe..a7a9a0aed 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/defs.mk +++ b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/defs.mk @@ -1,13 +1,13 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp -# Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp +# Generated from: NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_DEFS=-DHAVE_CONFIG_H G_EMUL=elf_x86_64 -G_EMULATION_OFILES=eelf_x86_64.o eelf_i386.o ei386nbsd.o eelf_l1om.o eelf_k1om.o +G_EMULATION_OFILES=eelf_x86_64.o eelf_i386.o eelf_iamcu.o eelf_l1om.o eelf_k1om.o G_INCLUDES= -G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf_x86_64.o eelf_i386.o ei386nbsd.o eelf_l1om.o eelf_k1om.o +G_OFILES=ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o plugin.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf_x86_64.o eelf_i386.o eelf_iamcu.o eelf_l1om.o eelf_k1om.o ldelf.o ldelfgen.o ldbuildid.o G_STRINGIFY=astring.sed -G_TEXINFOS=ld.texinfo +G_TEXINFOS=ld.texi G_target_alias=x86_64--netbsd G_enable_initfini_array=no diff --git a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/ldemul-list.h b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/ldemul-list.h index 9ba609da8..dab9d3d15 100644 --- a/external/gpl3/binutils/usr.bin/ld/arch/x86_64/ldemul-list.h +++ b/external/gpl3/binutils/usr.bin/ld/arch/x86_64/ldemul-list.h @@ -1,18 +1,18 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp */ -/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* This file is automatically generated. DO NOT EDIT! */ extern ld_emulation_xfer_type ld_elf_x86_64_emulation; extern ld_emulation_xfer_type ld_elf_i386_emulation; -extern ld_emulation_xfer_type ld_i386nbsd_emulation; +extern ld_emulation_xfer_type ld_elf_iamcu_emulation; extern ld_emulation_xfer_type ld_elf_l1om_emulation; extern ld_emulation_xfer_type ld_elf_k1om_emulation; #define EMULATION_LIST \ &ld_elf_x86_64_emulation, \ &ld_elf_i386_emulation, \ - &ld_i386nbsd_emulation, \ + &ld_elf_iamcu_emulation, \ &ld_elf_l1om_emulation, \ &ld_elf_k1om_emulation, \ 0 diff --git a/external/gpl3/binutils/usr.bin/nlmconv/Makefile b/external/gpl3/binutils/usr.bin/nlmconv/Makefile index 6d37ba3d5..2e5b2e0cc 100644 --- a/external/gpl3/binutils/usr.bin/nlmconv/Makefile +++ b/external/gpl3/binutils/usr.bin/nlmconv/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:19 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= nlmconv -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/nm/Makefile b/external/gpl3/binutils/usr.bin/nm/Makefile index a53847a4e..f6220ff86 100644 --- a/external/gpl3/binutils/usr.bin/nm/Makefile +++ b/external/gpl3/binutils/usr.bin/nm/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:19 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= nm -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/objcopy/Makefile b/external/gpl3/binutils/usr.bin/objcopy/Makefile index b827d46ce..4eec8d016 100644 --- a/external/gpl3/binutils/usr.bin/objcopy/Makefile +++ b/external/gpl3/binutils/usr.bin/objcopy/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:19 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= objcopy -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/objdump/Makefile b/external/gpl3/binutils/usr.bin/objdump/Makefile index 3b847a592..e5fb2c647 100644 --- a/external/gpl3/binutils/usr.bin/objdump/Makefile +++ b/external/gpl3/binutils/usr.bin/objdump/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2013/09/29 14:20:37 christos Exp $ +# $NetBSD: Makefile,v 1.5 2020/04/04 01:34:30 christos Exp $ PROG= objdump -.include - CPPFLAGS+=-DOBJDUMP_PRIVATE_VECTORS="" +PROGDPLIBS+= gnuctf ${TOP}/${BFDSUBDIR}/libgnuctf + .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/ranlib/Makefile b/external/gpl3/binutils/usr.bin/ranlib/Makefile index 44c864741..60b43b238 100644 --- a/external/gpl3/binutils/usr.bin/ranlib/Makefile +++ b/external/gpl3/binutils/usr.bin/ranlib/Makefile @@ -1,9 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2011/09/25 04:32:47 christos Exp $ +# $NetBSD: Makefile,v 1.3 2016/01/26 19:37:48 christos Exp $ PROG= ranlib -.include - COPTS.arparse.c = -Wno-stack-protector CPPFLAGS+=-Dbin_dummy_emulation=bin_vanilla_emulation diff --git a/external/gpl3/binutils/usr.bin/readelf/Makefile b/external/gpl3/binutils/usr.bin/readelf/Makefile index 0742b1554..8ef67245c 100644 --- a/external/gpl3/binutils/usr.bin/readelf/Makefile +++ b/external/gpl3/binutils/usr.bin/readelf/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2013/02/14 21:29:36 christos Exp $ +# $NetBSD: Makefile,v 1.5 2020/04/04 01:34:30 christos Exp $ PROG= readelf -.include +PROGDPLIBS+= gnuctf ${TOP}/${BFDSUBDIR}/libgnuctf +PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/size/Makefile b/external/gpl3/binutils/usr.bin/size/Makefile index f5e713f89..a744adfe8 100644 --- a/external/gpl3/binutils/usr.bin/size/Makefile +++ b/external/gpl3/binutils/usr.bin/size/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:20 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= size -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/strings/Makefile b/external/gpl3/binutils/usr.bin/strings/Makefile index 35005f717..505eba44e 100644 --- a/external/gpl3/binutils/usr.bin/strings/Makefile +++ b/external/gpl3/binutils/usr.bin/strings/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:20 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= strings -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.bin/strip/Makefile b/external/gpl3/binutils/usr.bin/strip/Makefile index dfbe55b75..ab68f272d 100644 --- a/external/gpl3/binutils/usr.bin/strip/Makefile +++ b/external/gpl3/binutils/usr.bin/strip/Makefile @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:20 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/01/26 19:37:48 christos Exp $ PROG= strip -.include - .include "${.CURDIR}/../common/Makefile.prog" diff --git a/external/gpl3/binutils/usr.sbin/Makefile.inc b/external/gpl3/binutils/usr.sbin/Makefile.inc index bd575c5fe..7abebce5b 100644 --- a/external/gpl3/binutils/usr.sbin/Makefile.inc +++ b/external/gpl3/binutils/usr.sbin/Makefile.inc @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/09/29 14:20:37 christos Exp $ +# $NetBSD: Makefile.inc,v 1.7 2016/01/26 19:37:48 christos Exp $ +.include "${.PARSEDIR}/../Makefile.inc" BINDIR?= /usr/sbin WARNS?= 1 diff --git a/external/gpl3/binutils/usr.sbin/dbsym/Makefile b/external/gpl3/binutils/usr.sbin/dbsym/Makefile index cac96f240..11d521fc3 100644 --- a/external/gpl3/binutils/usr.sbin/dbsym/Makefile +++ b/external/gpl3/binutils/usr.sbin/dbsym/Makefile @@ -1,12 +1,10 @@ -# $NetBSD: Makefile,v 1.11 2013/09/29 14:20:38 christos Exp $ +# $NetBSD: Makefile,v 1.12 2016/01/26 19:37:49 christos Exp $ .include .if (defined(HOSTPROG) && \ (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \ ${MKBINUTILS} != "no" -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils -DIST= ${TOP}/dist BFDSUBDIR= lib PROG= dbsym diff --git a/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c b/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c index b508e3231..eacda47ca 100644 --- a/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c +++ b/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $ */ +/* $NetBSD: dbsym.c,v 1.6 2017/07/11 21:19:42 joerg Exp $ */ /* * Copyright (c) 2001 Simon Burge (for Wasabi Systems) @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1996 Christopher G. Demetriou.\ Copyright 2001 Simon Burge.\ All rights reserved."); -__RCSID("$NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $"); +__RCSID("$NetBSD: dbsym.c,v 1.6 2017/07/11 21:19:42 joerg Exp $"); #endif /* not lint */ #include @@ -362,8 +362,9 @@ load_symtab(bfd *abfd, int fd, char **symtab, u_int32_t *symtabsize) Elf32_External_Shdr *s32hdr = NULL; Elf64_External_Shdr *s64hdr = NULL; void *shdr; + char *shstrtab = NULL; u_int32_t osymtabsize, sh_offset; - int elftype, e_shnum, i, sh_size; + int elftype, e_shnum, i, sh_size, rv = 1, shstridx; off_t e_shoff; if (lseek(fd, 0, SEEK_SET) < 0) @@ -422,8 +423,19 @@ load_symtab(bfd *abfd, int fd, char **symtab, u_int32_t *symtabsize) if (read(fd, shdr, sh_size) != sh_size) goto out; + shstridx = (ISELF64 + ? bfd_get_16(abfd, e64_hdr.e_shstrndx) + : bfd_get_16(abfd, e32_hdr.e_shstrndx)); + shstrtab = malloc(SH_SIZE(shstridx)); + if (shstrtab == NULL) + goto out; + if (pread(fd, shstrtab, SH_SIZE(shstridx), SH_OFFSET(shstridx)) != + SH_SIZE(shstridx)) + goto out; + for (i = 0; i < e_shnum; i++) { - if (SH_TYPE(i) == SHT_SYMTAB || SH_TYPE(i) == SHT_STRTAB) { + if (SH_TYPE(i) == SHT_SYMTAB || SH_TYPE(i) == SHT_STRTAB || + !strcmp(shstrtab + SH_NAME(i), ".SUNW_ctf")) { osymtabsize = *symtabsize; *symtabsize += roundup(SH_SIZE(i), ISELF64 ? 8 : 4); if ((*symtab = realloc(*symtab, *symtabsize)) == NULL) @@ -467,10 +479,11 @@ load_symtab(bfd *abfd, int fd, char **symtab, u_int32_t *symtabsize) bfd_put_16(abfd, 0, e32_hdr.e_phnum); } memcpy(*symtab, &ehdr, sizeof(ehdr)); + rv = 0; - free(shdr); - return (0); out: + if (shstrtab != NULL) + free(shstrtab); free(shdr); - return (1); + return (rv); } diff --git a/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile b/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile index 74ad5ba65..d9d3a085e 100644 --- a/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile +++ b/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile @@ -1,18 +1,20 @@ -# $NetBSD: Makefile,v 1.10 2013/08/05 00:17:53 matt Exp $ +# $NetBSD: Makefile,v 1.13 2016/09/22 01:53:39 christos Exp $ -.include +.include + +MDSETIMAGE=${NETBSDSRCDIR}/usr.sbin/mdsetimage +.PATH: ${MDSETIMAGE} .if (defined(HOSTPROG) && \ (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \ ${MKBINUTILS} != "no" -TOP= ${NETBSDSRCDIR}/external/gpl3/binutils -DIST= ${TOP}/dist BFDSUBDIR= lib PROG= mdsetimage +SRCS= mdsetimage.c bin_bfd.c MAN= mdsetimage.8 -CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include +CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include -I${MDSETIMAGE} .if !defined(HOSTPROG) PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd diff --git a/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c b/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c new file mode 100644 index 000000000..7d3151888 --- /dev/null +++ b/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c @@ -0,0 +1,151 @@ +/* $NetBSD: bin_bfd.c,v 1.2 2017/07/25 06:43:03 mrg Exp $ */ + +/* + * Copyright (c) 1996, 2002 Christopher G. Demetriou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * <> + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +__RCSID("$NetBSD: bin_bfd.c,v 1.2 2017/07/25 06:43:03 mrg Exp $"); + +#include +#include +#include +#include +#include +#include "bin.h" + +void * +bin_open(int kfd, const char *kfile, const char *bfdname) +{ + bfd *abfd; + bfd_init(); + if ((abfd = bfd_fdopenr(kfile, bfdname, kfd)) == NULL) { + bfd_perror("open"); + exit(1); + } + if (!bfd_check_format(abfd, bfd_object)) { + bfd_perror("check format"); + exit(1); + } + return abfd; +} + +int +bin_find_md_root(void *bin, const char *mappedkfile, off_t size, + unsigned long text_start, + const char *root_name, const char *size_name, size_t *md_root_offset, + size_t *md_root_size_offset, uint32_t *md_root_size, int verbose) +{ + bfd *abfd = bin; + long i; + long storage_needed; + long number_of_symbols; + asymbol **symbol_table = NULL; + struct symbols { + const char *name; + size_t offset; + } *s, symbols[3]; + + symbols[0].offset = 0; + symbols[1].offset = 0; + symbols[0].name = root_name; + symbols[1].name = size_name; + symbols[2].name = NULL; + + storage_needed = bfd_get_symtab_upper_bound(abfd); + if (storage_needed <= 0) { + warnx("bfd storage needed error"); + return 1; + } + + symbol_table = malloc(storage_needed); + if (symbol_table == NULL) { + warn("symbol table"); + return 1; + } + + number_of_symbols = bfd_canonicalize_symtab(abfd, symbol_table); + if (number_of_symbols <= 0) { + warnx("can't canonicalize symbol table"); + free(symbol_table); + return 1; + } + + for (i = 0; i < number_of_symbols; i++) { + for (s = symbols; s->name != NULL; s++) { + const char *sym = symbol_table[i]->name; + + /* + * match symbol prefix '_' or ''. + */ + if (!strcmp(s->name, sym) || + !strcmp(s->name + 1, sym)) { + s->offset = + (size_t)(symbol_table[i]->section->filepos + + symbol_table[i]->value); + } + } + } + + free(symbol_table); + + for (s = symbols; s->name != NULL; s++) { + if (s->offset == 0) { + warnx("missing offset for `%s'", s->name); + return 1; + } + } + + *md_root_offset = symbols[0].offset; + *md_root_size_offset = symbols[1].offset; + *md_root_size = bfd_get_32(abfd, &mappedkfile[*md_root_size_offset]); + + return 0; +} + +void +bin_put_32(void *bin, off_t size, char *buf) +{ + bfd_put_32((struct bfd *)bin, size, buf); +} + +void +bin_close(void *bin) +{ + bfd_close_all_done((struct bfd *)bin); +} + +const char ** +bin_supported_targets(void) +{ + return bfd_target_list(); +} diff --git a/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.8 b/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.8 deleted file mode 100644 index f1b101e7b..000000000 --- a/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.8 +++ /dev/null @@ -1,92 +0,0 @@ -.\" $NetBSD: mdsetimage.8,v 1.3 2010/11/07 11:50:23 wiz Exp $ -.\" -.\" Copyright (c) 1996 Christopher G. Demetriou -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" <> -.\" -.Dd November 4, 2010 -.Dt MDSETIMAGE 8 -.Os -.Sh NAME -.Nm mdsetimage -.Nd set kernel RAM disk image -.Sh SYNOPSIS -.Nm -.Op Fl svx -.Op Fl b Ar bfdname -.Op Fl I Ar image_symbol -.Op Fl S Ar size_symbol -.Ar kernel -.Ar image -.Sh DESCRIPTION -The -.Nm -command copies the disk image specified by -.Ar image -into the memory disk storage area in -.Ar kernel . -The file system present in -.Ar image -will typically be used by the kernel -as the root file system. -.Pp -To recognize kernel executable format, the -.Fl b -flag specifies BFD name of kernel. -.Pp -The -.Fl I -and -.Fl S -flags specify the symbol names of image and size of memory disk -drivers respectively. -.Pp -If the -.Fl s -flags is given, -.Nm -will write back the actual disk image size back into -.Ar kernel . -.Pp -If the -.Fl v -flag is given, -.Nm -will print out status information as -it is copying the image. -.Pp -If the -.Fl x -flag is given, -.Nm -will extract the disk image from -.Ar kernel -into the file -.Ar image . -This is the opposite of the default behavior. -.Sh SEE ALSO -.Xr md 4 , -.Xr mdconfig 8 diff --git a/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.c b/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.c deleted file mode 100644 index 15b8664e4..000000000 --- a/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.c +++ /dev/null @@ -1,317 +0,0 @@ -/* $NetBSD: mdsetimage.c,v 1.2 2010/11/06 16:03:23 uebayasi Exp $ */ -/* from: NetBSD: mdsetimage.c,v 1.15 2001/03/21 23:46:48 cgd Exp $ */ - -/* - * Copyright (c) 1996, 2002 Christopher G. Demetriou - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * <> - */ - -#if HAVE_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#include -#if !defined(lint) -__COPYRIGHT("@(#) Copyright (c) 1996\ - Christopher G. Demetriou. All rights reserved."); -__RCSID("$NetBSD: mdsetimage.c,v 1.2 2010/11/06 16:03:23 uebayasi Exp $"); -#endif /* not lint */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -struct symbols { - char *name; - size_t offset; -}; -#define X_MD_ROOT_IMAGE 0 -#define X_MD_ROOT_SIZE 1 - -#define CHUNKSIZE (64 * 1024) - -int main(int, char *[]); -static void usage(void) __attribute__((noreturn)); -static int find_md_root(bfd *, struct symbols symbols[]); - -int verbose; -int extract; -int setsize; - -static const char *progname; -#undef setprogname -#define setprogname(x) (void)(progname = (x)) -#undef getprogname -#define getprogname() (progname) - -int -main(int argc, char *argv[]) -{ - int ch, kfd, fsfd, rv; - struct stat ksb, fssb; - size_t md_root_offset, md_root_size_offset; - u_int32_t md_root_size; - const char *kfile, *fsfile; - char *mappedkfile; - char *bfdname = NULL; - bfd *abfd; - ssize_t left_to_copy; - struct symbols md_root_symbols[3] = { { 0 } }; - - md_root_symbols[X_MD_ROOT_IMAGE].name = "_md_root_image"; - md_root_symbols[X_MD_ROOT_SIZE].name = "_md_root_size"; - - setprogname(argv[0]); - - while ((ch = getopt(argc, argv, "I:S:b:svx")) != -1) - switch (ch) { - case 'I': - md_root_symbols[X_MD_ROOT_IMAGE].name = optarg; - break; - case 'S': - md_root_symbols[X_MD_ROOT_SIZE].name = optarg; - break; - case 'b': - bfdname = optarg; - break; - case 's': - setsize = 1; - break; - case 'v': - verbose = 1; - break; - case 'x': - extract = 1; - break; - case '?': - default: - usage(); - } - argc -= optind; - argv += optind; - - if (argc != 2) - usage(); - kfile = argv[0]; - fsfile = argv[1]; - - if (extract) { - if ((kfd = open(kfile, O_RDONLY, 0)) == -1) - err(1, "open %s", kfile); - } else { - if ((kfd = open(kfile, O_RDWR, 0)) == -1) - err(1, "open %s", kfile); - } - - bfd_init(); - if ((abfd = bfd_fdopenr(kfile, bfdname, kfd)) == NULL) { - bfd_perror("open"); - exit(1); - } - if (!bfd_check_format(abfd, bfd_object)) { - bfd_perror("check format"); - exit(1); - } - - if (find_md_root(abfd, md_root_symbols) != 0) - errx(1, "could not find symbols in %s", kfile); - if (verbose) - fprintf(stderr, "got symbols from %s\n", kfile); - - if (fstat(kfd, &ksb) == -1) - err(1, "fstat %s", kfile); - if (ksb.st_size != (size_t)ksb.st_size) - errx(1, "%s too big to map", kfile); - - if ((mappedkfile = mmap(NULL, ksb.st_size, PROT_READ, - MAP_FILE | MAP_PRIVATE, kfd, 0)) == (caddr_t)-1) - err(1, "mmap %s", kfile); - if (verbose) - fprintf(stderr, "mapped %s\n", kfile); - - md_root_offset = md_root_symbols[X_MD_ROOT_IMAGE].offset; - md_root_size_offset = md_root_symbols[X_MD_ROOT_SIZE].offset; - md_root_size = bfd_get_32(abfd, &mappedkfile[md_root_size_offset]); - - munmap(mappedkfile, ksb.st_size); - - if (extract) { - if ((fsfd = open(fsfile, O_WRONLY|O_CREAT, 0777)) == -1) - err(1, "open %s", fsfile); - left_to_copy = md_root_size; - } else { - if ((fsfd = open(fsfile, O_RDONLY, 0)) == -1) - err(1, "open %s", fsfile); - if (fstat(fsfd, &fssb) == -1) - err(1, "fstat %s", fsfile); - if (fssb.st_size != (size_t)fssb.st_size) - errx(1, "fs image is too big"); - if (fssb.st_size > md_root_size) - errx(1, "fs image (%lld bytes) too big for buffer (%lu bytes)", - (long long)fssb.st_size, (unsigned long)md_root_size); - left_to_copy = fssb.st_size; - } - - if (verbose) - fprintf(stderr, "copying image %s %s %s\n", fsfile, - (extract ? "from" : "into"), kfile); - - if (lseek(kfd, md_root_offset, SEEK_SET) != md_root_offset) - err(1, "seek %s", kfile); - while (left_to_copy > 0) { - char buf[CHUNKSIZE]; - ssize_t todo; - int rfd; - int wfd; - const char *rfile; - const char *wfile; - if (extract) { - rfd = kfd; - rfile = kfile; - wfd = fsfd; - wfile = fsfile; - } else { - rfd = fsfd; - rfile = fsfile; - wfd = kfd; - wfile = kfile; - } - - todo = (left_to_copy > CHUNKSIZE) ? CHUNKSIZE : left_to_copy; - if ((rv = read(rfd, buf, todo)) != todo) { - if (rv == -1) - err(1, "read %s", rfile); - else - errx(1, "unexpected EOF reading %s", rfile); - } - if ((rv = write(wfd, buf, todo)) != todo) { - if (rv == -1) - err(1, "write %s", wfile); - else - errx(1, "short write writing %s", wfile); - } - left_to_copy -= todo; - } - if (verbose) - fprintf(stderr, "done copying image\n"); - if (setsize && !extract) { - char buf[sizeof(uint32_t)]; - - if (verbose) - fprintf(stderr, "setting md_root_size to %llu\n", - (unsigned long long) fssb.st_size); - if (lseek(kfd, md_root_size_offset, SEEK_SET) != - md_root_size_offset) - err(1, "seek %s", kfile); - bfd_put_32(abfd, fssb.st_size, buf); - if (write(kfd, buf, sizeof(buf)) != sizeof(buf)) - err(1, "write %s", kfile); - } - - close(fsfd); - close(kfd); - - if (verbose) - fprintf(stderr, "exiting\n"); - - bfd_close_all_done(abfd); - exit(0); -} - -static void -usage(void) -{ - const char **list; - - fprintf(stderr, - "usage: %s [-svx] [-b bfdname] kernel image\n", - getprogname()); - fprintf(stderr, "supported targets:"); - for (list = bfd_target_list(); *list != NULL; list++) - fprintf(stderr, " %s", *list); - fprintf(stderr, "\n"); - exit(1); -} - -static int -find_md_root(bfd *abfd, struct symbols symbols[]) -{ - long i; - long storage_needed; - long number_of_symbols; - asymbol **symbol_table = NULL; - struct symbols *s; - - storage_needed = bfd_get_symtab_upper_bound(abfd); - if (storage_needed <= 0) - return (1); - - symbol_table = (asymbol **)malloc(storage_needed); - if (symbol_table == NULL) - return (1); - - number_of_symbols = bfd_canonicalize_symtab(abfd, symbol_table); - if (number_of_symbols <= 0) { - free(symbol_table); - return (1); - } - - for (i = 0; i < number_of_symbols; i++) { - for (s = symbols; s->name != NULL; s++) { - const char *sym = symbol_table[i]->name; - - /* - * match symbol prefix '_' or ''. - */ - if (!strcmp(s->name, sym) || - !strcmp(s->name + 1, sym)) { - s->offset = - (size_t)(symbol_table[i]->section->filepos - + symbol_table[i]->value); - } - } - } - - free(symbol_table); - - for (s = symbols; s->name != NULL; s++) { - if (s->offset == 0) - return (1); - } - - return (0); -} diff --git a/share/mk/bsd.hostinit.mk b/share/mk/bsd.hostinit.mk new file mode 100644 index 000000000..8428c0c86 --- /dev/null +++ b/share/mk/bsd.hostinit.mk @@ -0,0 +1,13 @@ +# $NetBSD: bsd.hostinit.mk,v 1.1 2018/05/01 19:59:44 christos Exp $ + +.if !defined(_BSD_HOSTINIT_MK_) +_BSD_HOSTINIT_MK_=1 + +NOINFO= # defined +NOLINT= # defined +NOMAN= # defined +MKREPRO=no # Native toolchain might be unable to do it + +.include + +.endif # !defined(_BSD_HOSTINIT_MK_) diff --git a/tools/binutils/Makefile b/tools/binutils/Makefile index c0b4fa77a..4521cb336 100644 --- a/tools/binutils/Makefile +++ b/tools/binutils/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.24 2014/02/15 13:34:28 tsutsui Exp $ +# $NetBSD: Makefile,v 1.31 2020/04/04 00:47:30 christos Exp $ -.include +.include MODULE= binutils @@ -13,7 +13,7 @@ BRANDING?= \ CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \ --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \ - --disable-werror \ + --disable-werror --disable-initfini-array \ ${BRANDING} .if defined(__MINIX) && ! exists(${GNUHOSTDIST}/gas/m68k-parse.c) @@ -40,29 +40,11 @@ ALL_TARGET+= all-gprof INSTALL_TARGET+=install-gprof .endif -.if defined(__MINIX) && ${HAVE_GOLD:Uyes} != "no" -ALL_TARGET+= all-gold -INSTALL_TARGET+=install-gold - -CONFIGURE_ARGS+= \ - --enable-lto \ - --enable-plugins -# LSC: Here we use the MK variable, as we have to select the right default -# linker. Problem is, when Gold is not seen, USE_BITCODE is forced to -# "no". -.if ${MKBITCODE:Uno} == "yes" -CONFIGURE_ARGS+= \ - --enable-ld=yes \ - --enable-gold=default -.else -CONFIGURE_ARGS+= \ - --enable-ld=default \ - --enable-gold=yes -.endif # ${MKBITCODE:Uno} == "yes" -.endif # defined(__MINIX) .include "${.CURDIR}/../Makefile.gnuhost" -CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ +CCADDFLAGS= -I${GNUHOSTDIST}/include -I${DESTDIR}/usr/include +CCADDFLAGS+= -B${DESTDIR}/usr/lib/ +LDADDFLAGS= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib # Force avoiding possibly non-executable install-sh. CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" @@ -83,7 +65,8 @@ native-binutils: .native/.configure_done CC=${CC:Q}' '${CCADDFLAGS:Q} \ CXX=${CXX:Q}' '${CCADDFLAGS:Q} \ CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ - CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \ + CFLAGS= CPPFLAGS= CXXFLAGS= \ + LDFLAGS=${LDADDFLAGS:Q} \ MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \ XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \ LIBS=-lintl \ @@ -93,6 +76,7 @@ native-binutils: .native/.configure_done --build=`${GNUHOSTDIST}/config.guess` \ --host=${MACHINE_GNU_PLATFORM} \ --target=${MACHINE_GNU_PLATFORM} \ + --disable-initfini-array \ ${BRANDING} \ ) PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ diff --git a/tools/binutils/mknative-binutils b/tools/binutils/mknative-binutils index 82b12307e..8bfe00d3f 100755 --- a/tools/binutils/mknative-binutils +++ b/tools/binutils/mknative-binutils @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp $ +# $NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/binutils @@ -22,7 +22,7 @@ get_libbfd () { { getvars bfd/Makefile \ libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \ - INCLUDES TDEFAULTS + INCLUDES TDEFAULTS HAVEVECS } | write_mk external/gpl3/binutils/lib/libbfd/arch/$MACHINE_ARCH/defs.mk write_c external/gpl3/binutils/lib/libbfd/arch/$MACHINE_ARCH/bfd.h <$_TMPDIR/bfd/bfd.h @@ -49,6 +49,18 @@ get_libopcodes () { } | write_c external/gpl3/binutils/lib/libopcodes/arch/$MACHINE_ARCH/config.h } +get_libgnuctf () { + mkdir -p $_TOP/external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH + + { + getvars libctf/Makefile libctf_la_SOURCES + } | write_mk external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH/defs.mk + + { + cat $_TMPDIR/libctf/config.h + } | write_c external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH/config.h +} + ##### external/gpl3/binutils/lib/libiberty ##### get_libiberty () { @@ -96,6 +108,7 @@ get_binutils () { DEFS INCLUDES as_new_OBJECTS as_new_LDADD | sed -e s/G_as_new_OBJECTS/G_OBJS/ \ -e s/G_as_new_LDADD=/G_OBJS+=/ \ + -e s@config/@@g \ -e 's/\.\..*a//' | write_mk external/gpl3/binutils/usr.bin/gas/arch/$MACHINE_ARCH/defs.mk @@ -137,6 +150,7 @@ case $1 in all|binutils) # everything (uses "canadian cross" temp environment) get_binutils get_libbfd + get_libgnuctf get_libopcodes get_libiberty exit 0